/* ============================================================
   BCT Global - Base Design System
   Shared styles for all pages. Import BEFORE page-specific CSS.
   ============================================================ */

/* --- CSS Variables (Single Source of Truth) --- */
:root {
    /* Brand Colors */
    --brand-blue: #2563eb;
    --brand-blue-dark: #1d4ed8;
    --brand-blue-light: #dbeafe;
    --brand-navy: #1e3a5f;
    --brand-teal: #14b8a6;
    --brand-teal-light: #ccfbf1;
    --brand-green: #22c55e;
    --brand-green-dark: #16a34a;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;

    /* Typography */
    --font-primary: 'Inter', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 5rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Container */
    --container-max: 1280px;
    --container-padding: 1.5rem;

    /* Legacy aliases (used by page CSS files) */
    --blue-600: #2563eb;
    --teal-500: #14b8a6;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-gray-300: #d1d5db;
    --color-gray-400: #9ca3af;
    --color-gray-500: #6b7280;
    --color-white: #ffffff;
    --color-indigo-400: #818cf8;
}

/* --- Google Fonts ---
   Noto Sans JP loaded here for pages that don't have it in HTML.
   Inter is loaded via <link> tags in all HTML files.
*/
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;800&display=swap');

/* --- CSS Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--white);
    color: var(--gray-800);
    line-height: 1.6;
}

/* Japanese text needs more breathing room */
html[lang="ja"] body {
    line-height: 1.8;
}

img {
    max-width: 100%;
    height: auto;
}

/* --- Container --- */
.container,
.header-container,
.contact-container,
.footer-container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* --- Helper Classes --- */
.hidden {
    display: none;
}

/* --- CTA Button (Unified) --- */
.cta-button {
    display: inline-block;
    font-weight: 700;
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

/* --- Header & Navigation --- */
.sticky-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.logo img {
    height: auto;
    width: 80px;
}

.logo svg {
    width: 2rem;
    height: 2rem;
    color: var(--brand-blue);
}

.logo span {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-blue);
    margin-left: var(--space-sm);
}

/* Nav links - hidden on mobile, centered on desktop */
.nav-links {
    display: none;
    flex: 1;
    justify-content: center;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-links a:hover {
    color: var(--brand-blue);
}

.nav-links .cta-button {
    background-color: var(--brand-green);
    color: var(--white);
    padding: var(--space-sm) 1.25rem;
    white-space: nowrap;
}

.nav-links .cta-button:hover {
    background-color: var(--brand-blue-dark);
}

/* Mobile menu button */
#mobile-menu-button {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

#mobile-menu-button svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--gray-600);
}

/* Mobile menu panel */
#mobile-menu {
    padding: 0.75rem 0 1rem;
    border-top: 1px solid var(--gray-200);
}

#mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid var(--gray-100);
}

#mobile-menu a:last-child {
    border-bottom: none;
}

#mobile-menu .cta-button {
    margin-top: 0.75rem;
    background-color: var(--brand-blue);
    color: var(--white);
    text-align: center;
    padding: 0.75rem 1.25rem;
    border-bottom: none;
    border-radius: var(--radius-sm);
}

/* Mobile language switcher */
#mobile-menu .mobile-lang-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

#mobile-menu .mobile-lang-switch .lang-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gray-400);
    flex-shrink: 0;
}

#mobile-menu .mobile-lang-switch a.mobile-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.45rem 1.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--gray-500);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    margin: 0;
    transition: all 0.15s ease;
}

#mobile-menu .mobile-lang-switch a.mobile-lang:hover {
    color: var(--brand-blue);
    border-color: var(--brand-blue-light);
    background: var(--white);
}

#mobile-menu .mobile-lang-switch a.mobile-lang.active {
    color: var(--white);
    background: var(--brand-blue);
    border-color: var(--brand-blue);
}

/* --- Language Dropdown (hidden on mobile, shown at 768px+) --- */
.language-dropdown {
    position: relative;
    display: none !important;
    margin-left: 1.5rem;
}

.language-toggle-btn {
    background: none;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.language-toggle-btn:hover {
    color: var(--brand-blue);
}

.globe-icon {
    width: 1rem;
    height: 1rem;
}

.dropdown-arrow {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.language-toggle-btn.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 10;
    border-radius: var(--radius-sm);
    margin-top: var(--space-md);
    right: 0;
    overflow: hidden;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: var(--gray-600);
    padding: var(--space-md) var(--space-md);
    display: block;
    text-align: left;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
}

.dropdown-content a:hover {
    background-color: var(--gray-700);
    color: var(--white);
}

/* --- Contact Banner (CTA Section) --- */
#contact {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
}

.contact-banner {
    color: var(--white);
    font-weight: 500;
    text-align: center;
    position: relative;
    max-width: 48rem;
    margin: 0 auto;
}

.contact-banner::before {
    display: none;
}

.background-image {
    display: none;
}

.contact-banner h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--white);
}

.contact-banner p {
    font-size: 1.125rem;
    margin: 0 auto var(--space-xl) auto;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.contact-banner .cta-button {
    background-color: var(--white);
    color: var(--brand-blue);
    padding: 0.875rem 2.5rem;
    text-decoration: none;
    font-size: 1rem;
}

.contact-banner .cta-button:hover {
    background-color: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* --- Footer --- */
footer {
    background-color: #0f172a;
    color: var(--white);
    padding: 4rem 0 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
}

.footer-logo img {
    width: 48px;
    height: auto;
}

.footer-brand {
    display: flex;
    flex-direction: column;
}

.footer-brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 0.02em;
}

.footer-brand-sub {
    font-size: 0.65rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.1rem;
}

.footer-company-legal {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
    line-height: 1.5;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

.footer-grid h4 {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.25rem;
    color: var(--white);
}

.footer-grid p {
    color: var(--gray-400);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-grid li,
.footer-grid a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid ul li {
    margin-bottom: 0.6rem;
}

.footer-grid a:hover {
    color: var(--white);
}

/* Contact info styling */
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-400);
    font-size: 0.9rem;
}

.footer-contact-item svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: var(--brand-blue);
}

.footer-japan-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.4rem 0.8rem;
    background: rgba(37, 99, 235, 0.15);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 0.4rem;
    font-size: 0.8rem;
    color: #93bbfc;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.social-links a:hover {
    background: rgba(37, 99, 235, 0.2);
    border-color: rgba(37, 99, 235, 0.4);
}

.social-links svg {
    width: 1rem;
    height: 1rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* --- Responsive: Tablet (768px+) --- */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1.25rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    #mobile-menu-button,
    #mobile-menu {
        display: none;
    }

    .language-dropdown {
        display: inline-block !important;
        flex-shrink: 0;
        margin-left: 1rem;
    }

    #contact {
        padding: 6rem 0;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Responsive: Desktop (1024px+) --- */
@media (min-width: 1024px) {
    .nav-links {
        gap: 2rem;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
