:root {
    /* Theme Engine - Default Light */
    --bg-primary: #F9F7F2;
    --bg-secondary: #EAE6DC;
    --text-primary: #1E3A2B;
    --text-secondary: #4A5B4E;
    --accent-pink: #FF2D95;
    --accent-gold: #C8A273;
    --highlight-mint: #DFF0E1;
    
    /* Functional Tokens */
    --primary: #0a0a0a;
    --accent: #C8A273;
    --accent-warm: #D8643B;
    --bg-warm: #E1A282;
    --nature-green: #174C2F;
    --nature-text: #e8f3ee;
    --hot-pink: #FF2D95;
    --white: #fff;
    
    /* Animation */
    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-theme: all 0.8s cubic-bezier(0.45, 0, 0.25, 1);
    --container: 1600px;
}

[data-theme="dark"] {
    --bg-primary: #0B0E12;
    --bg-secondary: #181F27;
    --text-primary: #E4E7EB;
    --text-secondary: #9AA5B1;
    --accent-pink: #FF2D95;
    --accent-gold: #C8A273;
    --glow-sapphire: #5A9FF5;
    --shadow-quarry: rgba(0,0,0,0.45);
    
    /* Override Functional */
    --white: #E4E7EB;
}

*, *::before, *::after {
    transition: background-color 0.8s cubic-bezier(0.45, 0, 0.25, 1),
                color 0.8s cubic-bezier(0.45, 0, 0.25, 1),
                border-color 0.8s cubic-bezier(0.45, 0, 0.25, 1),
                box-shadow 0.8s cubic-bezier(0.45, 0, 0.25, 1),
                filter 0.8s cubic-bezier(0.45, 0, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* No-Blue Policy */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

:focus {
    outline: none !important;
}

h1, h2, h3, h4, .logo {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 8rem 0;
}

.bg-dark { 
    background-color: var(--bg-dark) !important; 
    color: var(--text-light) !important; 
}
.bg-warm { 
    background-color: var(--bg-warm) !important; 
    color: var(--primary) !important;
}
.bg-warm h2, .bg-warm .subtitle {
    color: var(--primary) !important;
}
.bg-nature {
    background-color: var(--nature-green) !important;
    color: var(--nature-text) !important;
}
.bg-nature h2, .bg-nature .subtitle, .bg-nature p {
    color: var(--nature-text) !important;
}
.bg-dark { 
    background-color: var(--bg-primary) !important; 
    color: var(--text-primary) !important; 
}
.bg-warm { 
    background-color: var(--bg-warm) !important; 
    color: var(--primary) !important;
}
.bg-warm h2, .bg-warm .subtitle {
    color: var(--primary) !important;
}
.bg-nature {
    background-color: var(--nature-green) !important;
    color: var(--nature-text) !important;
}
.bg-nature h2, .bg-nature .subtitle, .bg-nature p {
    color: var(--nature-text) !important;
}
.bg-light { 
    background-color: var(--bg-secondary) !important; 
    color: var(--text-primary) !important;
}

.text-gold { color: var(--accent-gold) !important; }
.text-muted { color: var(--text-secondary) !important; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 1px;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--white);
    border: 1px solid var(--accent-gold);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-warm);
}

.hero .btn-outline {
    background: var(--hot-pink);
    color: var(--white);
    border: 1px solid var(--hot-pink);
    font-weight: 600;
}

.hero .btn-outline:hover {
    background: transparent;
    color: var(--hot-pink);
    border-color: var(--accent);
}

.bg-dark .btn-outline {
    border-color: var(--white);
    color: var(--white);
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
    color: var(--white); /* Default for hero overlay */
}

header.scrolled {
    background: var(--bg-primary);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 1rem 0;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    color: var(--text-primary);
}

header nav {
    height: 100px; /* Increased to accommodate stacked logo */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

header.scrolled nav {
    height: 70px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.theme-toggle {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-theme);
    border-radius: 50%;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(15deg);
}

header.scrolled .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.sun-icon { display: block; }
.moon-icon { display: none; }

[data-theme="dark"] .sun-icon { display: none; }
[data-theme="dark"] .moon-icon { display: block; }

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo svg {
    height: 70px; /* Fully visible size */
    width: auto;
    transition: var(--transition);
}

header.scrolled .logo svg {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: inherit; /* Use header color */
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    transition: var(--transition);
    opacity: 0.85;
    position: relative;
    padding-bottom: 4px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Hero */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 200px; /* PROTECT THE LOGO */
    background: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
}

.hero-logo-large {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

.hero-logo-large svg {
    width: 300px;
}

/* Grid System */
.grid {
    display: grid;
    gap: 4rem;
}

.col-2 { grid-template-columns: 1fr 1fr; }
.col-3 { grid-template-columns: repeat(3, 1fr); }
.items-center { align-items: center; }

/* About Section */
.subtitle {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

.about-text h2 {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.img-wrapper {
    overflow: hidden;
    height: 600px;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* Events Cards */
.card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 3rem 2rem;
    transition: var(--transition);
    height: 100%;
}

.card:hover {
    background: rgba(255,255,255,0.05);
    transform: translateY(-10px);
}

.card h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Terrace Section */
.terrace-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('onyx_lake_terrace.png');
    background-size: cover;
    background-attachment: fixed;
    color: var(--white);
    padding: 15rem 0;
}

.terrace-section h2 {
    font-size: 4rem;
    margin-bottom: 2rem;
}

/* Sparkle Animation */
@keyframes sparkle-travel {
    0% { transform: translate(-150px, -150px) scale(0) rotate(-45deg); opacity: 0; }
    60% { opacity: 1; }
    100% { transform: translate(0, 0) scale(1) rotate(360deg); opacity: 1; }
}

.sparkle-container {
    transform-origin: center center;
}

.sparkle-logo {
    animation: sparkle-travel 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.onyx-text text {
    transition: var(--transition);
}

/* Refined Hero */
.hero-content h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1.5rem;
    line-height: 1;
    font-weight: 400;
}

.hero-content p {
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    letter-spacing: 0.05em;
    opacity: 0.9;
}

/* Glassmorphism for Cards */
.card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem 2.5rem;
    transition: var(--transition);
}

.card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--accent);
    transform: translateY(-15px) scale(1.02);
}

/* Bento Grid Refinement */
.gallery-section {
    padding-bottom: 10rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 400px;
    gap: 1.5rem;
    margin-top: 3rem;
}

.bento-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.bento-item:hover img {
    transform: scale(1.08);
}

.bento-item.tall { grid-row: span 2; }
.bento-item.wide { grid-column: span 2; }

.bento-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.5));
    opacity: 0;
    transition: var(--transition);
}

.bento-item:hover::after {
    opacity: 1;
}

/* Reveal Variations */
.reveal-left { opacity: 0; transform: translateX(-50px); transition: all 1s ease; }
.reveal-right { opacity: 0; transform: translateX(50px); transition: all 1s ease; }
.reveal-up { opacity: 0; transform: translateY(50px); transition: all 1s ease; }

.reveal-left.active, .reveal-right.active, .reveal-up.active {
    opacity: 1;
    transform: translate(0);
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Contact Form - Glassmorphic & Floating Labels */
.contact-form {
    background: var(--bg-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--text-secondary);
    padding: 4rem;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.form-group {
    position: relative;
    margin-bottom: 2.5rem;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--text-secondary);
    color: var(--text-primary) !important;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group label {
    position: absolute;
    top: 1rem;
    left: 0;
    color: var(--text-secondary);
    pointer-events: none;
    transition: var(--transition);
}

.form-group input:focus ~ label,
.form-group input:not(:placeholder-shown) ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:not(:placeholder-shown) ~ label,
.form-group select:focus ~ label,
.form-group select:not([value=""]) ~ label {
    top: -1.2rem;
    font-size: 0.7rem;
    color: var(--hot-pink) !important;
}

.contact-form .btn-primary {
    background: var(--hot-pink) !important;
    border-color: var(--hot-pink) !important;
    color: var(--white) !important;
}

.contact-form .btn-primary:hover {
    background: transparent !important;
    color: var(--hot-pink) !important;
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    border-bottom-color: var(--accent) !important;
}

.map-container {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Footer Refinement */
footer {
    padding: 6rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

.footer-brand .logo {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: 4px;
}

.footer-links h4 {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.8rem;
    margin-bottom: 2rem;
    color: var(--accent);
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    margin-top: 6rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Mobile Navigation Toggle Button */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1010; /* Ensure above nav overlay */
    width: 30px;
    height: 20px;
    position: relative;
}

.mobile-nav-toggle span, 
.mobile-nav-toggle span::before, 
.mobile-nav-toggle span::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: currentColor; /* Respect parent color */
    position: absolute;
    transition: var(--transition);
}

.mobile-nav-toggle span { top: 50%; transform: translateY(-50%); }
.mobile-nav-toggle span::before { top: -8px; }
.mobile-nav-toggle span::after { top: 8px; }

.mobile-nav-toggle.active span { background: transparent; }
.mobile-nav-toggle.active span::before { transform: rotate(45deg); top: 0; background: var(--white); }
.mobile-nav-toggle.active span::after { transform: rotate(-45deg); top: 0; background: var(--white); }
/* Tablet & Mobile Adjustments */
@media (max-width: 1024px) {
    :root { --container: 90%; }
    .hero-content h1 { font-size: 4rem; }
    .section { padding: 6rem 0; }
}

@media (max-width: 768px) {
    header nav {
        height: 80px;
        padding: 0 1.5rem;
    }

    .logo {
        justify-content: flex-start;
        flex: 1;
    }

    .logo svg {
        height: 45px;
    }

    .nav-actions {
        justify-content: flex-end;
        gap: 1.25rem;
    }

    .mobile-nav-toggle { display: block; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary); /* Use theme background */
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 3rem;
        transition: 0.8s cubic-bezier(0.85, 0, 0.15, 1);
        z-index: 1009;
        padding: 4rem 2rem;
    }

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

    .nav-links li {
        opacity: 0;
        transform: translateY(20px);
        transition: 0.5s ease forwards;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered entrance for links */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.6s; }
    .nav-links.active li:nth-child(7) { transition-delay: 0.7s; }

    .nav-links a {
        color: var(--text-primary);
        font-size: 1.8rem;
        font-family: 'Cormorant Garamond', serif;
        font-weight: 700;
        letter-spacing: 4px;
        text-transform: uppercase;
    }

    .grid.col-2, .grid.col-3 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-content h1 { font-size: 3rem; }
    .about-text h2 { font-size: 2.5rem; }
    .img-wrapper { height: 400px; }
    
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: 200px;
    }
}

@media (max-width: 480px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
    .hero-content h1 { font-size: 2.5rem; }
}
