:root {
    --japan-blue: #0075C2; /* Updated Blue */
    --hinomaru-red: #D80A30; /* Updated Red */
    --text-primary: #1f2937; /* Tailwind gray-800 */
    --text-secondary: #374151; /* Tailwind gray-700 */
    --text-light: #6b7280; /* Tailwind gray-500 */
    --bg-light: #f9fafb; /* Tailwind gray-50 */
    --bg-ultra-light: #fdfdff;
    --border-color: #e5e7eb; /* Tailwind gray-200 */
    --border-medium: #d1d5db; /* Tailwind gray-300 */
    --header-height: 68px; /* Adjust this based on your actual header height sm:72px */
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Noto Sans JP', sans-serif; font-weight: 400; color: var(--text-primary);
    background-color: white; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    line-height: 1.8; font-size: 16px;
    padding-bottom: 0; /* Initial padding, JS might adjust it */
    transition: padding-bottom 0.3s ease-out;
}
/* Padding adjustments for Sticky CTA */
@media (max-width: 767px) { /* Use md breakpoint consistent with JS */
  body.has-sticky-cta { padding-bottom: 80px; } /* Adjust height if sticky CTA is 80px tall */
}

/* Typographic Scale */
h1 { font-size: 2.25rem; font-weight: 900; line-height: 1.3; color: var(--japan-blue); letter-spacing: -0.02em;}
h2.section-title { font-size: 2rem; font-weight: 900; line-height: 1.3; color: var(--japan-blue); letter-spacing: 0.02em; padding-bottom: 1rem; position: relative; text-align: center;}
h3 { font-size: 1.5rem; font-weight: 700; line-height: 1.4; color: var(--japan-blue); }
h4 { font-size: 1.125rem; font-weight: 700; line-height: 1.5; color: var(--text-primary); }
p, li { font-size: 1rem; color: var(--text-secondary); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
@media (min-width: 768px) {
    h1 { font-size: 3rem; }
    h2.section-title { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }
}
strong, .font-semibold { font-weight: 700; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }

/* Component Styles */
.section-title::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 70px; height: 4px; background-color: var(--hinomaru-red); border-radius: 2px; }
.btn { display: inline-block; padding: 0.85rem 2.25rem; border-radius: 0.5rem; font-weight: 700; transition: all 0.3s ease; text-align: center; border: 2px solid transparent; cursor: pointer; letter-spacing: 0.03em; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04); }
.btn-blue { background-color: var(--japan-blue); color: white; border-color: var(--japan-blue); }
.btn-blue:hover { background-color: #005a9e; border-color: #005a9e; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 117, 194, 0.15), 0 4px 6px -2px rgba(0, 117, 194, 0.1); }
.btn-red { background-color: var(--hinomaru-red); color: white; border-color: var(--hinomaru-red); }
.btn-red:hover { background-color: #b00828; border-color: #b00828; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(216, 10, 48, 0.15), 0 4px 6px -2px rgba(216, 10, 48, 0.1); }
.btn-red-outline { background-color: white; color: var(--hinomaru-red); border-color: var(--hinomaru-red); }
.btn-red-outline:hover { background-color: #fef2f2; transform: translateY(-2px); box-shadow: 0 6px 10px -2px rgba(216, 10, 48, 0.1), 0 3px 4px -2px rgba(216, 10, 48, 0.06); }
.btn-outline-gray { background-color: white; color: var(--text-secondary); border-color: var(--border-medium); }
.btn-outline-gray:hover { background-color: #f9fafb; border-color: #9ca3af; transform: translateY(-2px); box-shadow: 0 6px 10px -2px rgba(0,0,0,0.05), 0 3px 4px -2px rgba(0,0,0,0.03); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-on-dark { background-color: white; color: var(--japan-blue); border-color: white; }
.btn-on-dark:hover { background-color: rgba(255,255,255,0.9); border-color: rgba(255,255,255,0.9); color: #005a9e; transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05); }
.btn-outline-on-dark { background-color: transparent; color: white; border-color: white; }
.btn-outline-on-dark:hover { background-color: rgba(255,255,255,0.1); border-color: white; transform: translateY(-2px); box-shadow: 0 6px 10px -2px rgba(0,0,0,0.1), 0 3px 4px -2px rgba(0,0,0,0.06); }

.clean-card { background-color: white; border: 1px solid var(--border-color); border-radius: 0.75rem; padding: 2rem; box-shadow: 0 4px 10px rgba(0,0,0,0.03); transition: all 0.3s ease; height: 100%; display: flex; flex-direction: column; }
.clean-card:hover { transform: translateY(-5px); box-shadow: 0 12px 20px rgba(0, 0, 0, 0.06); }

.step-item { position: relative; padding-left: 50px; padding-bottom: 2.5rem; }
.step-number { position: absolute; left: 0; top: -2px; width: 36px; height: 36px; background-color: var(--bg-light); border: 2px solid var(--japan-blue); color: var(--japan-blue); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; transition: all 0.3s ease; }
.step-item:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 40px; bottom: -10px; width: 2px; background-color: var(--border-medium); z-index: -1; }
.step-item:hover .step-number { background-color: var(--japan-blue); color: white; transform: scale(1.1); }
.step-last .step-number { background-color: var(--hinomaru-red); border-color: var(--hinomaru-red); color: white; }

.form-input, .form-select, .form-textarea { display: block; width: 100%; padding: 0.875rem 1rem; border: 1px solid var(--border-medium); border-radius: 0.5rem; background-color: white; color: var(--text-primary); font-size: 1rem; transition: border-color 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--japan-blue); box-shadow: 0 0 0 3px rgba(0, 117, 194, 0.15); }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.875rem; font-weight: 500; color: var(--text-secondary); }
.form-checkbox { accent-color: var(--japan-blue); }

.section-padding { padding-top: 5rem; padding-bottom: 5rem; }
@media (min-width: 768px) { .section-padding { padding-top: 7rem; padding-bottom: 7rem; } }

.scroll-fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1); }
.scroll-fade-in.visible { opacity: 1; transform: translateY(0); }
.delay-100 { transition-delay: 0.1s; } .delay-200 { transition-delay: 0.2s; } .delay-300 { transition-delay: 0.3s; } .delay-400 { transition-delay: 0.4s; } .delay-500 { transition-delay: 0.5s; }

/* Background Images & Hero Section Specific Styles */
.hero-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    /* Adjust height based on header. Fallback if JS for header height fails. */
    min-height: calc(100vh - 72px); /* Default for sm screens and up */
    height: calc(100vh - var(--header-height)); /* Dynamically set height */
    overflow: hidden; /* Ensures pseudo-elements don't overflow */
}
@media (max-width: 639px) { /* xs screens, Tailwind default for no prefix */
     .hero-section {
        min-height: calc(100vh - 68px); /* Default for xs screens */
     }
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.japantechinnovators.com/lp/img/main_shokunin_webp.webp'); /* Placeholder DUMMY IMAGE */
    background-size: cover;
    background-position: center center;
    z-index: 1;
}
.hero-section::before { /* Overlay for text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Adjust darkness (0.4-0.6 is usually good) */
    z-index: 2;
}
.hero-content {
    position: relative;
    z-index: 3;
    padding: 2rem; /* Add some padding for content */
}
.hero-content h1 span {
    text-shadow: 0 2px 8px rgba(0,0,0,0.7); /* Stronger shadow for better readability */
}
.hero-content p {
    text-shadow: 0 1px 6px rgba(0,0,0,0.6); /* Softer shadow for paragraphs */
}


.challenge-bg { background-image: url('https://www.japantechinnovators.com/lp/img/problem_light.jpg'); background-size: cover; background-position: center; }
.why-global-bg { background-image: url('https://www.japantechinnovators.com/lp/img/blueocean_light.jpg'); background-size: cover; background-position: center center; background-attachment: fixed; }
.about-bg {
    background-image: url('https://www.japantechinnovators.com/lp/img/nagano.jpg');
    background-size: cover;
    background-position: center;
}
.text-shadow-strong { text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.text-shadow-soft { text-shadow: 0 1px 3px rgba(0,0,0,0.3); }

/* Colors */
.text-accent-red { color: var(--hinomaru-red); }
.text-accent-blue { color: var(--japan-blue); }
.bg-accent-blue { background-color: var(--japan-blue); }
.border-accent-blue { border-color: var(--japan-blue); }
.border-accent-red { border-color: var(--hinomaru-red); }
.icon-accent-blue { color: var(--japan-blue); }
.icon-accent-red { color: var(--hinomaru-red); }
.underline-accent-red { text-decoration-color: var(--hinomaru-red); }
.list-disc-red li::marker { color: var(--hinomaru-red); }
.unit-connector line { stroke: var(--border-medium); stroke-width: 2; }

/* Sticky CTA */
.sticky-cta {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(100%);
    pointer-events: none;
}
/* Control visibility with .show class added by JS */
.sticky-cta.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Confirmation Modal Styles */
.modal-overlay { position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.6); z-index: 150; opacity: 0; transition: opacity 0.3s ease-out; pointer-events: none; }
.modal-container { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -60%); background-color: white; border-radius: 0.75rem; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); z-index: 160; width: 90%; max-width: 550px; max-height: 85vh; overflow-y: auto; opacity: 0; transition: opacity 0.3s ease-out, transform 0.3s ease-out; pointer-events: none; }
body.modal-open { overflow: hidden; /* Prevent background scroll when modal is open */ }
body.modal-open .modal-overlay { opacity: 1; pointer-events: auto; }
body.modal-open .modal-container { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.modal-confirm-item { display: grid; grid-template-columns: 100px 1fr; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid var(--border-color); }
.modal-confirm-item:last-child { border-bottom: none; }
.modal-confirm-label { font-weight: 500; color: var(--text-secondary); font-size: 0.875rem; padding-top: 0.1rem; }
.modal-confirm-value { font-size: 0.95rem; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }

/* Tooltip Styles */
.tooltip { position: relative; border-bottom: 1px dotted var(--text-light); cursor: help; }
.tooltip::after { content: attr(data-tooltip); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-8px); background-color: rgba(31, 41, 55, 0.95); color: white; padding: 0.5rem 0.75rem; border-radius: 0.375rem; font-size: 0.75rem; line-height: 1.4; white-space: nowrap; opacity: 0; visibility: hidden; transition: opacity 0.2s ease-out, visibility 0.2s ease-out, transform 0.2s ease-out; z-index: 10; min-width: 150px; max-width: 300px; white-space: normal; text-align: left; pointer-events: none; }
.tooltip:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-12px); }

/* --- Article Page Specific Styles --- */

/* Article H1 (記事タイトル) スタイル */
.article-page h1 {
    font-size: 2rem; /* 32px */
    font-weight: 900;
    line-height: 1.4;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Article H2 (大見出し) スタイル */
h2.section-title-article {
    font-size: 1.75rem; /* 28px */
    font-weight: 900;
    line-height: 1.4;
    color: var(--japan-blue);
    letter-spacing: 0.02em;
    padding-bottom: 1rem;
    margin-top: 4rem; /* 上の余白を大きく取る */
    margin-bottom: 2rem; /* 下の余白 */
    border-bottom: 3px solid var(--border-color);
    position: relative;
}
h2.section-title-article::after {
    content: '';
    position: absolute;
    bottom: -2px; /* 太いボーダーの上に配置 */
    left: 0;
    width: 90px;
    height: 4px;
    background-color: var(--hinomaru-red);
}

/* Article H3 (小見出し) スタイル */
h3.subsection-title-article {
    font-size: 1.375rem; /* 22px */
    font-weight: 700;
    color: var(--text-primary);
    padding-left: 1rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--japan-blue);
}

@media (min-width: 768px) {
    .article-page h1 {
        font-size: 2.5rem; /* 40px */
    }
    h2.section-title-article {
        font-size: 2rem; /* 32px */
    }
    h3.subsection-title-article {
        font-size: 1.5rem; /* 24px */
    }
}

/* ▼▼▼ START: ここからが追加箇所です ▼▼▼ */
/* Language Switcher Styles */
.lang-switcher {
    font-size: 0.875rem; /* 14px */
    font-weight: 700;
    color: var(--text-light); /* 非アクティブ時の色 */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
    padding: 0.25rem;
    display: inline-block;
}

.lang-switcher:not(.active):hover {
    color: var(--japan-blue); /* ホバー時の色 */
}

.lang-switcher.active {
    color: var(--hinomaru-red); /* アクティブ時の色 */
    cursor: default;
    font-weight: 900;
}

/* For mobile menu */
#mobile-menu .lang-switcher {
    font-size: 0.95rem; /* タッチしやすいように少し大きく */
    font-weight: 500;
}
#mobile-menu .lang-switcher.active {
    font-weight: 700;
    color: var(--hinomaru-red);
}
/* ▲▲▲ END: ここまでが追加箇所です ▲▲▲ */