/* 
   Design Direction: Prosperous Partnership (Chinese Market Adaptation)
   Aesthetic: Auspicious Luxury / Warm Elegance
   DFII Score: 13
*/

:root {
    /* Color Palette: Rice Paper & Imperial Red */
    --color-bg: #F9F7F2;
    /* Warm Cream / Rice Paper */
    --color-surface: #FFFFFF;
    /* Pure White for cards */
    --color-text-main: #2C2C2C;
    /* Charcoal (Not pure black - softer) */
    --color-text-muted: #5A5A5A;
    /* Warm Grey */
    --color-primary: #8B0000;
    /* Imperial Red (Auspicious/Luck) */
    --color-accent: #D4AF37;
    /* Rich Gold (Wealth/Status) */

    /* Typography */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;

    /* Spacing & Rhythm */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 32px;
    --spacing-lg: 64px;
    --spacing-xl: 120px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography Overrides */
h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--color-primary);
    /* Red headers for luck */
}

h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-style: normal;
    /* Less italic, more stable/traditional */
}

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
}

h3 {
    font-size: 1.4rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-main);
}

p {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 65ch;
    margin-bottom: 24px;
    /* More breathing room */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.4s ease;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: var(--spacing-xl) 0;
}

/* Header */
.site-header {
    padding: 32px 0;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(249, 247, 242, 0.95), transparent);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
    /* Subtle red line */
    padding-bottom: 24px;
}

.logo {
    font-family: var(--font-display);
    font-size: 28px;
    color: var(--color-primary);
    font-weight: 600;
}

/* Navigation & Lang Switcher */
.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 40px;
}

.main-nav ul {
    display: flex;
    gap: 32px;
}

.main-nav a {
    font-family: var(--font-body);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-main);
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--color-primary);
}

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 1px solid rgba(139, 0, 0, 0.2);
    padding-left: 24px;
}

.lang-btn {
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.lang-btn:hover,
.lang-btn.active {
    color: var(--color-primary);
    opacity: 1;
}

.flag-icon {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: block;
    object-fit: cover;
}

/* Lenis Soft Scroll Utils */
html.lenis,
body.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
}

.hero::before {
    /* Subtle background pattern/texture could go here */
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.1), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent);
    /* Gold for auspicious start */
    margin-bottom: var(--spacing-sm);
    display: block;
    font-weight: 600;
}

.hero h1 {
    margin-bottom: var(--spacing-md);
}

/* Red Seal / Stamp Effect */
.seal-mark {
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    /* Slightly rounded, like a chop */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-weight: 700;
    font-family: var(--font-display);
    margin-bottom: var(--spacing-md);
    font-size: 12px;
    letter-spacing: 1px;
}

/* About Section - "Guanxi" Focus */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.about-text {
    border-left: 3px solid var(--color-primary);
    /* Red line of continuity */
    padding-left: var(--spacing-md);
}

.about-text p.lead {
    font-size: 1.3rem;
    color: var(--color-primary);
    font-family: var(--font-display);
    font-style: italic;
}

.about-stats {
    background: var(--color-surface);
    padding: var(--spacing-lg);
    border: 1px solid rgba(212, 175, 55, 0.2);
    box-shadow: 0 20px 40px rgba(139, 0, 0, 0.03);
    /* Subtle red shadow */
}

.stat-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: var(--spacing-sm) 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-accent);
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

/* Divisions - Expanded Text, No Buttons */
.divisions-section {
    background-color: #F4F1EA;
    /* Slightly darker cream */
}

.divisions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

.division-card {
    background: var(--color-surface);
    padding: var(--spacing-lg);
    border-top: 4px solid var(--color-accent);
    transition: transform 0.4s ease;
}

.division-card:hover {
    transform: translateY(-5px);
    border-top-color: var(--color-primary);
}

.division-subtitle {
    font-size: 11px;
    letter-spacing: 0.15em;
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    display: block;
    font-weight: 600;
}

.division-card h3 {
    margin-bottom: var(--spacing-sm);
    color: #000;
}

/* Footer / Contact */
.site-footer {
    padding: var(--spacing-xl) 0;
    background-color: var(--color-primary);
    /* Full Red Footer for Luck */
    color: var(--color-surface);
    text-align: center;
}

.footer-cta h2 {
    color: var(--color-surface);
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.footer-cta p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.btn-contact {
    display: inline-block;
    padding: 16px 40px;
    background: var(--color-accent);
    color: #fff;
    font-family: var(--font-body);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-top: var(--spacing-md);
    font-weight: 600;
}

.btn-contact:hover {
    background: #fff;
    color: var(--color-primary);
}

.copyright {
    margin-top: var(--spacing-lg);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Memorable Element: Soft fade up */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out;
}

.reveal-text.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
/* --- Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: all 0.3s ease;
}

/* Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 0 20px;
        /* Reduced padding */
    }

    /* Header Mobile Layout */
    .menu-toggle {
        display: flex;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s ease-in-out;
        z-index: 150;
        gap: 40px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-wrapper.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }

    .main-nav a {
        font-size: 16px;
        /* Larger hit area */
        letter-spacing: 0.2em;
    }

    /* Language Switcher in Mobile Menu */
    .lang-switch {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid rgba(139, 0, 0, 0.1);
        padding-top: 32px;
        width: 100%;
        justify-content: center;
    }

    /* Typography Scaling */
    h1 {
        font-size: 2.5rem;
        /* Smaller for mobile */
    }

    .hero {
        padding-top: 140px;
        align-items: flex-start;
        min-height: 80vh;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .about-grid,
    .divisions-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .about-text {
        border-left: none;
        border-top: 3px solid var(--color-primary);
        padding-top: 24px;
        padding-left: 0;
    }
}

/* --- 3D Globe Background --- */
#globe-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: all;
    /* Allow interaction */
}

/* --- Improved Flag Icons --- */
.flag-icon {
    display: inline-block;
    width: 20px;
    height: auto;
    margin-right: 8px;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.lang-btn {
    display: flex;
    align-items: center;
    opacity: 0.6;
    transition: opacity 0.3s ease;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    padding: 4px 8px;
}

.lang-btn:hover,
.lang-btn.active {
    opacity: 1;
    font-weight: 500;
}