/* =========================================
   IMPORTS & CSS VARIABLES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,700&family=DM+Sans:wght@300;400;500&display=swap');

:root {
    --black: #0a0a0a;
    --off-black: #111111;
    --dark: #1a1a1a;
    --mid: #2e2e2e;
    --gold: #C9A84C;
    --gold-light: #e8c97a;
    --gold-dim: #8a6f32;
    --white: #f8f6f2;
    --white-dim: rgba(248, 246, 242, 0.6);
    --white-faint: rgba(248, 246, 242, 0.08);

    /* Semantic tokens */
    --bg-primary: #0a0a0a;
    --bg-secondary: #111111;
    --bg-tertiary: #1a1a1a;
    --text-primary: #f8f6f2;
    --text-secondary: rgba(248, 246, 242, 0.6);
    --text-faint: rgba(248, 246, 242, 0.3);
    --border-subtle: rgba(201, 168, 76, 0.1);
    --border-mid: rgba(201, 168, 76, 0.15);
    --section-border: rgba(255,255,255,0.04);
    --stat-border: rgba(255,255,255,0.05);
    --shadow-heavy: rgba(0, 0, 0, 0.7);
    --shadow-mid: rgba(0,0,0,0.5);
    --navbar-bg: rgba(10, 10, 10, 0.92);
    --hero-grain-opacity: 0.4;
    --img-brightness: brightness(0.85);
    --gold-accent: #C9A84C;
    --cta-text: #0a0a0a;

    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'DM Sans', sans-serif;
    --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =========================================
   LIGHT MODE OVERRIDES
   ========================================= */
body.light-mode {
    --bg-primary: #FAF8F4;
    --bg-secondary: #F0EDE6;
    --bg-tertiary: #E8E4DA;
    --text-primary: #1C160A;
    --text-secondary: rgba(28, 22, 10, 0.62);
    --text-faint: rgba(28, 22, 10, 0.35);
    --border-subtle: rgba(168, 121, 31, 0.2);
    --border-mid: rgba(168, 121, 31, 0.28);
    --section-border: rgba(28, 22, 10, 0.07);
    --stat-border: rgba(28, 22, 10, 0.08);
    --shadow-heavy: rgba(90, 65, 10, 0.14);
    --shadow-mid: rgba(90, 65, 10, 0.1);
    --navbar-bg: rgba(28, 22, 14, 0.93);
    --hero-grain-opacity: 0.2;
    --img-brightness: brightness(0.97);
    --gold-accent: #8F6514;
    --cta-text: #FAF8F4;
}

/* =========================================
   THEME TOGGLE BUTTON
   ========================================= */
.theme-toggle {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 99999;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid var(--border-mid);
    background: var(--bg-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px var(--shadow-mid), 0 2px 8px rgba(0,0,0,0.1);
    transition: background 0.5s ease, border-color 0.5s ease,
                box-shadow 0.3s ease, transform 0.25s ease;
    outline: none;
}

.theme-toggle:hover {
    transform: scale(1.09);
    box-shadow: 0 12px 40px var(--shadow-mid), 0 0 0 1px var(--gold-accent);
    border-color: var(--gold-accent);
}

.theme-toggle:active {
    transform: scale(0.94);
}

.toggle-icon {
    position: relative;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-icon svg {
    position: absolute;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--gold-accent);
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
                stroke 0.5s ease;
}

/* Dark mode: show moon */
.toggle-icon .icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.toggle-icon .icon-sun  { opacity: 0; transform: rotate(90deg) scale(0.5); }

/* Light mode: show sun */
body.light-mode .toggle-icon .icon-moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
body.light-mode .toggle-icon .icon-sun  { opacity: 1; transform: rotate(0deg) scale(1); }

/* Keep header dark in light mode */
body.light-mode header {
    background: rgba(0, 0, 0, 0.82);
}
body.light-mode header.scrolled {
    background: rgba(0, 0, 0, 0.95);
    border-bottom-color: rgba(201, 168, 76, 0.2);
}
body.light-mode .navbar .left a {
    color: rgba(248, 246, 242, 0.65);
}
body.light-mode .navbar .left a:hover {
    color: var(--gold-light);
}



/* Tooltip */
.theme-toggle::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 62px;
    bottom: 50%;
    transform: translateY(50%);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 2px;
    border: 1px solid var(--border-mid);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.theme-toggle:hover::after {
    opacity: 1;
}

/* =========================================
   PULSE ANIMATION
   ========================================= */
@keyframes togglePulse {
    0%   { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(201, 168, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
}
.theme-toggle.pulse { animation: togglePulse 0.65s ease-out; }

/* =========================================
   RESET & BASE
   ========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    transition: background 0.5s ease, color 0.5s ease;
}

/* =========================================
   NAVBAR
   ========================================= */
header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 9999;
    transition: background var(--transition), backdrop-filter var(--transition), border-color 0.5s ease;
}

header.scrolled {
    background: var(--navbar-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-mid);
}

.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 48px; height: 72px;
}

.navbar .left, .navbar .right { flex: 1; display: flex; align-items: center; }
.navbar .right { justify-content: flex-end; gap: 15px; }

.navbar .left a {
    font-family: var(--font-body); font-weight: 400; font-size: 0.85rem;
    letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--text-secondary); text-decoration: none;
    transition: color var(--transition);
}
.navbar .left a:hover { color: var(--gold-accent); }

.logo { flex: 0 0 auto; display: flex; justify-content: center; }
.logo img { height: 55px; width: auto; transition: opacity var(--transition), filter 0.5s ease; }

.logo:hover img { opacity: 0.8; }

.right .get-started-btn {
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 500;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--bg-primary); background: var(--gold-accent);
    text-decoration: none; padding: 10px 22px; border-radius: 2px;
    transition: background var(--transition), transform var(--transition), color 0.5s ease;
    display: inline-block;
}
.right .get-started-btn:hover { background: var(--gold-light); transform: translateY(-1px); }

.language-selector { margin-left: 24px; }

.lang-dropdown {
    background: transparent; border: 1px solid var(--border-mid);
    color: var(--text-secondary); font-family: var(--font-body);
    font-size: 0.75rem; letter-spacing: 0.08em; padding: 5px 8px;
    border-radius: 2px; cursor: pointer; outline: none;
    transition: border-color var(--transition), color 0.5s ease;
}
.lang-dropdown:hover, .lang-dropdown:focus { border-color: var(--gold-accent); color: var(--text-primary); }

/* Options always use dark bg + light text so they're readable in every OS/browser */
.lang-dropdown option {
    background: #1a1a1a;
    color: #f8f6f2;
}

/* Light mode: keep dropdown text readable against the black header */
body.light-mode .lang-dropdown {
    color: rgba(248, 246, 242, 0.7);
    border-color: rgba(201, 168, 76, 0.35);
}



/* =========================================
   HERO
   ========================================= */
.hero {
    position: relative; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; text-align: center;
    padding: 120px 48px 80px; overflow: hidden;
    background: var(--bg-primary);
    transition: background 0.5s ease;
}

.hero::before {
    content: ''; position: absolute; inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: var(--hero-grain-opacity); pointer-events: none; z-index: 1;
    transition: opacity 0.5s ease;
}

.hero::after {
    content: ''; position: absolute; bottom: 0; left: 50%;
    transform: translateX(-50%); width: 1px; height: 80px;
    background: linear-gradient(to bottom, var(--gold-accent), transparent); z-index: 2;
    transition: background 0.5s ease;
}

body.light-mode .hero {
    background: radial-gradient(ellipse 80% 55% at 50% -5%, rgba(168, 121, 31, 0.1) 0%, #FAF8F4 65%);
}

.hero > * { position: relative; z-index: 3; }

.hero-eyebrow {
    font-family: var(--font-body); font-size: 0.72rem; font-weight: 500;
    letter-spacing: 0.25em; text-transform: uppercase; color: var(--gold-accent);
    margin-bottom: 28px; opacity: 0; animation: fadeUp 0.8s 0.2s forwards;
    transition: color 0.5s ease;
}

.hero-title {
    font-family: var(--font-display); font-size: clamp(3.5rem, 8vw, 7.5rem);
    font-weight: 300; line-height: 1.05; letter-spacing: -0.01em;
    color: var(--text-primary); margin-bottom: 28px;
    opacity: 0; animation: fadeUp 0.9s 0.4s forwards;
    transition: color 0.5s ease;
}
.hero-title .highlight { font-weight: 700; font-style: italic; color: var(--gold-accent); transition: color 0.5s ease; }

.hero-subtext {
    font-family: var(--font-body); font-size: 1rem; font-weight: 300;
    color: var(--text-secondary); letter-spacing: 0.02em; max-width: 480px;
    margin-bottom: 48px; opacity: 0; animation: fadeUp 0.9s 0.6s forwards;
    transition: color 0.5s ease;
}

.video-container {
    position: relative; width: min(860px, 90vw); border-radius: 4px; overflow: hidden;
    box-shadow: 0 40px 100px var(--shadow-heavy), 0 0 0 1px var(--border-mid);
    opacity: 0; animation: fadeUp 1s 0.8s forwards; margin-bottom: 48px;
    transition: box-shadow 0.5s ease;
}

.hero-video {
    width: 100%; height: auto; display: block;
    opacity: 0; visibility: hidden; transition: opacity 2s ease-in-out;
}

#play-button {
    display: none; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); padding: 12px 28px;
    font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.12em;
    text-transform: uppercase; background: rgba(201, 168, 76, 0.15);
    color: var(--gold-accent); border: 1px solid var(--gold-accent); border-radius: 2px;
    cursor: pointer; backdrop-filter: blur(8px); transition: background var(--transition);
}
#play-button:hover { background: rgba(201, 168, 76, 0.3); }

.cta-button {
    font-family: var(--font-body); font-size: 0.8rem; font-weight: 500;
    letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-accent);
    text-decoration: none; border: 1px solid rgba(201, 168, 76, 0.4);
    padding: 14px 36px; border-radius: 2px;
    transition: background 0.5s ease, border-color 0.5s ease, color 0.5s ease;
    opacity: 0; animation: fadeUp 0.9s 1s forwards; display: inline-block;
}
.cta-button:hover { background: var(--gold-accent); border-color: var(--gold-accent); color: var(--cta-text); }

/* =========================================
   FEATURE SECTIONS
   ========================================= */
.fade-section {
    display: grid; grid-template-columns: 1fr 1fr; min-height: 560px; overflow: hidden;
    background: var(--bg-secondary); border-top: 1px solid var(--section-border);
    transition: background 0.5s ease, border-color 0.5s ease;
}

#Special-design-1 .image-container, #Special-design-2 .image-container { overflow: hidden; position: relative; }

#Special-design-1 .image-container img, #Special-design-2 .image-container img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform 0.8s ease, filter 0.5s ease; filter: var(--img-brightness);
}
.fade-section:hover .image-container img { transform: scale(1.03); }

.text-content {
    display: flex; flex-direction: column; justify-content: center;
    padding: 80px 72px; position: relative;
}
.text-content::before {
    content: ''; position: absolute; top: 80px; left: 72px;
    width: 32px; height: 1px; background: var(--gold-accent); transition: background 0.5s ease;
}
.text-content h3 {
    font-family: var(--font-display); font-weight: 300; font-size: clamp(2.8rem, 4vw, 4.5rem);
    line-height: 1.1; color: var(--text-primary); margin-top: 28px; margin-bottom: 20px;
    transition: color 0.5s ease;
}
.text-content h3 .highlight-text { font-weight: 700; font-style: italic; color: var(--gold-accent); transition: color 0.5s ease; }
.text-content p { font-family: var(--font-body); font-weight: 300; font-size: 1.05rem; color: var(--text-secondary); line-height: 1.8; max-width: 380px; transition: color 0.5s ease; }

#Special-design-1 .image-container, #Special-design-1 .text-content { opacity: 0; transform: translateX(60px); transition: opacity 0.9s ease, transform 0.9s ease; }
#Special-design-2 .image-container, #Special-design-2 .text-content { opacity: 0; transform: translateX(-60px); transition: opacity 0.9s ease, transform 0.9s ease; }

#Special-design-1.visible .image-container, #Special-design-1.visible .text-content,
#Special-design-2.visible .image-container, #Special-design-2.visible .text-content { opacity: 1; transform: translateX(0); }

/* =========================================
   STATS
   ========================================= */
.stats-section {
    background: var(--bg-tertiary); border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle); padding: 80px 48px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px;
    transition: background 0.5s ease, border-color 0.5s ease;
}
.stat-item { padding: 40px; text-align: center; border-right: 1px solid var(--stat-border); transition: border-color 0.5s ease; }
.stat-item:last-child { border-right: none; }
.stat-number { font-family: var(--font-display); font-size: 3.5rem; font-weight: 600; color: var(--gold-accent); display: block; line-height: 1; margin-bottom: 12px; transition: color 0.5s ease; }
.stat-label { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-secondary); transition: color 0.5s ease; }

/* =========================================
   ABOUT
   ========================================= */
#about { padding: 120px 48px; max-width: 900px; margin: 0 auto; text-align: center; }
#about h3 { font-family: var(--font-display); font-size: 0.75rem; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-accent); margin-bottom: 32px; transition: color 0.5s ease; }
#about p { font-family: var(--font-display); font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 300; line-height: 1.6; color: var(--text-secondary); transition: color 0.5s ease; }

/* =========================================
   MAP
   ========================================= */
.map-section { position: relative; padding: 0 48px 80px; }
.map-section h3 { font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-accent); margin-bottom: 24px; padding-top: 0; transition: color 0.5s ease; }
#map-preview { border: 1px solid var(--border-mid); border-radius: 4px; overflow: hidden; box-shadow: 0 20px 60px var(--shadow-mid); transition: border-color 0.5s ease, box-shadow 0.5s ease; }
#map { height: 420px; width: 100%; display: block; }

/* =========================================
   FOOTER
   ========================================= */
footer { background: var(--bg-secondary); border-top: 1px solid var(--border-subtle); padding: 40px 48px; display: flex; align-items: center; justify-content: center; transition: background 0.5s ease, border-color 0.5s ease; }
footer p { font-family: var(--font-body); font-size: 0.78rem; letter-spacing: 0.1em; color: var(--text-faint); text-transform: uppercase; transition: color 0.5s ease; }

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes togglePulse {
    0%   { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(201, 168, 76, 0); }
    100% { box-shadow: 0 0 0 0 rgba(201, 168, 76, 0); }
}
.theme-toggle.pulse { animation: togglePulse 0.65s ease-out; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .navbar { padding: 0 32px; }
    .text-content { padding: 60px 48px; }
    .text-content::before { left: 48px; top: 60px; }
}
@media (max-width: 768px) {
    .navbar { padding: 0 20px; height: 60px; }
    .navbar .left a { font-size: 0.75rem; }
    .logo img { height: 28px; }
    .right .get-started-btn { padding: 8px 14px; font-size: 0.72rem; }
    .hero { padding: 100px 24px 60px; }
    .fade-section { grid-template-columns: 1fr; min-height: auto; }
    #Special-design-1 .image-container, #Special-design-2 .image-container { height: 280px; }
    #Special-design-2 { direction: ltr; }
    .text-content { padding: 48px 32px; }
    .text-content::before { left: 32px; top: 48px; }
    .stats-section { grid-template-columns: 1fr; padding: 48px 24px; }
    .stat-item { border-right: none; border-bottom: 1px solid var(--stat-border); padding: 32px; }
    .stat-item:last-child { border-bottom: none; }
    #about { padding: 80px 24px; }
    .map-section { padding: 0 24px 60px; }
    footer { padding: 32px 24px; }
    .theme-toggle { bottom: 20px; right: 20px; width: 46px; height: 46px; }
    .theme-toggle::after { display: none; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 2.8rem; }

    .navbar { padding: 0 10px; height: 52px; }

    .navbar .left a { font-size: 0.62rem; letter-spacing: 0.04em; }

    .logo img { height: 20px; }

    .navbar .right { gap: 4px; }

    .right .get-started-btn {
        padding: 5px 7px;
        font-size: 0.55rem;
        letter-spacing: 0.04em;
    }

    .language-selector { margin-left: 2px; }
    .lang-dropdown { font-size: 0.6rem; padding: 3px 4px; letter-spacing: 0; }
}