:root {
    --color-navy: #0F172A;
    --color-slate: #1E293B;
    --color-brass: #C9A84C;
    --color-champagne: #E8D5A3;
    --color-ember: #D4763A;
    --color-pearl: #F1EDE6;
    --color-silver: #A8B2C1;
    --color-indigo: #3B4F7A;
    --font-display: 'Quicksand', sans-serif;
    --font-body: 'Nunito', sans-serif;
    --font-accent: 'Josefin Sans', sans-serif;
    --spring-ease: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-navy);
    color: var(--color-champagne);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: repeating-linear-gradient(90deg, rgba(168,178,193,0.03) 0px, transparent 1px, transparent 3px);
}

/* ===========================
   NAV TOGGLE
   =========================== */
.nav-toggle {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-brass);
    border: none;
    cursor: pointer;
    z-index: 1000;
    animation: navPulse 3s ease-in-out infinite;
    box-shadow: 0 0 12px rgba(201,168,76,0.2);
}

.nav-toggle-inner {
    display: block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-navy);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-toggle.active .nav-toggle-inner {
    opacity: 1;
}

@keyframes navPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* ===========================
   NAV OVERLAY
   =========================== */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-navy);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.nav-links {
    list-style: none;
    text-align: center;
}

.nav-links li {
    margin-bottom: 2rem;
}

.nav-link {
    font-family: var(--font-accent);
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-brass);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: var(--color-ember);
    transition: width 0.3s ease;
    margin: 0.25rem auto 0;
}

.nav-link:hover {
    color: var(--color-ember);
}

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

/* ===========================
   CANOPY (HERO)
   =========================== */
.canopy {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(175deg, var(--color-navy) 0%, var(--color-slate) 55%, rgba(201,168,76,0.12) 100%);
    overflow: hidden;
}

.canopy-brushed-metal {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(90deg, rgba(168,178,193,0.03) 0px, transparent 1px, transparent 3px);
    pointer-events: none;
}

.canopy-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(201,168,76,0.08) 0%, transparent 70%);
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.canopy-center {
    text-align: center;
    position: relative;
    z-index: 2;
}

.candle-pair {
    position: absolute;
    bottom: 15%;
    z-index: 1;
}

.candle-left {
    left: 15%;
}

.candle-right {
    right: 15%;
}

.candle-svg {
    display: block;
}

.candle-taper {
    width: 50px;
    height: 160px;
}

.candle-pillar {
    width: 60px;
    height: 140px;
}

.candle-glow-ring {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(201,168,76,0.08) 0%, transparent 70%);
    pointer-events: none;
}

/* Flame Animation */
.flame {
    animation: flicker 2.5s ease-in-out infinite;
    transform-origin: center bottom;
}

.flame-1 { animation-delay: 0s; }
.flame-2 { animation-delay: 0.7s; }
.flame-3 { animation-delay: 0.3s; }
.flame-4 { animation-delay: 0.1s; }
.flame-5 { animation-delay: 0.5s; }
.flame-6 { animation-delay: 0.9s; }
.flame-7 { animation-delay: 1.1s; }
.flame-8 { animation-delay: 0.4s; }
.flame-9 { animation-delay: 0.8s; }
.flame-10 { animation-delay: 1.3s; }
.flame-11 { animation-delay: 0.2s; }
.flame-12 { animation-delay: 0.6s; }

@keyframes flicker {
    0%, 100% { transform: translateY(0) scaleX(1); opacity: 1; }
    25% { transform: translateY(-2px) scaleX(0.96); opacity: 0.92; }
    50% { transform: translateY(-1px) scaleX(1.04); opacity: 0.97; }
    75% { transform: translateY(-3px) scaleX(0.98); opacity: 0.95; }
}

.canopy-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw + 0.5rem, 4.5rem);
    letter-spacing: 0.02em;
    color: var(--color-brass);
    position: relative;
}

.canopy-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 200%;
    background: radial-gradient(ellipse at center, rgba(201,168,76,0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: -1;
}

.canopy-dot {
    color: var(--color-ember);
}

.canopy-sub {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: clamp(0.75rem, 0.9vw, 0.875rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-silver);
    margin-top: 1rem;
}

.scroll-hint {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.4;
    animation: scrollBob 2s ease-in-out infinite;
}

@keyframes scrollBob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(6px); }
}

/* ===========================
   WAX DRIP DIVIDERS
   =========================== */
.wax-drip-divider {
    width: 100%;
    height: 30px;
    overflow: hidden;
}

.wax-drip-divider svg {
    width: 100%;
    height: 100%;
}

.wax-drip-accent {
    width: 60%;
    max-width: 400px;
    height: 2px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.15) 30%, rgba(201,168,76,0.15) 70%, transparent 100%);
    border-radius: 1px;
}

.wax-drip-bottom {
    margin: 1.5rem auto 0;
}

/* ===========================
   GRID FIELD
   =========================== */
.grid-field {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(1.5rem, 3vw, 2.5rem);
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 4rem) 2rem;
}

/* ===========================
   CARDS
   =========================== */
.card {
    background: linear-gradient(175deg, #0F172A 0%, #1E293B 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s var(--spring-ease),
                box-shadow 0.3s ease;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(175deg, rgba(59,79,122,0.04) 0%, transparent 60%);
    pointer-events: none;
    border-radius: 12px;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18), 0 0 20px rgba(201, 168, 76, 0.06);
}

.card:hover .card-visual .card-illustration {
    transform: scale(1.03);
}

.card:hover .card-spotlight {
    opacity: 1;
}

.card-wide {
    grid-column: span 2;
}

.card-visual {
    padding: 2rem 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.card-illustration {
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.candle-cluster {
    width: 80px;
    height: 100px;
}

.candle-cluster-wide {
    width: 240px;
    height: 100px;
}

.sprig-detail {
    width: 100px;
    height: 80px;
}

.card-illustration:not(.candle-cluster):not(.candle-cluster-wide):not(.sprig-detail) {
    width: 80px;
    height: 80px;
}

.card-wide .card-illustration:not(.candle-cluster-wide) {
    width: 200px;
    height: 100px;
}

.card-spotlight {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,213,163,0.05) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.card-content {
    padding: 1.25rem 2rem 2rem;
}

.card-label {
    font-family: var(--font-accent);
    font-weight: 400;
    font-size: clamp(0.7rem, 0.8vw, 0.8rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-silver);
    display: block;
    margin-bottom: 0.75rem;
}

.card-heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    letter-spacing: 0.02em;
    color: var(--color-brass);
    margin-bottom: 1rem;
}

.card-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.2vw, 1.15rem);
    line-height: 1.65;
    color: var(--color-champagne);
}

.card-body em {
    color: var(--color-ember);
    font-style: italic;
}

/* ===========================
   INTERSTITIALS
   =========================== */
.interstitial {
    grid-column: 1 / -1;
    text-align: center;
    padding: clamp(3rem, 6vw, 6rem) 2rem;
    position: relative;
}

.interstitial-text {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--color-brass);
    line-height: 1.4;
}

.interstitial-text em {
    color: var(--color-ember);
    font-style: normal;
}

/* Word reveal animation */
.interstitial-text .word-span {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s var(--spring-ease), transform 0.4s var(--spring-ease);
}

.interstitial-text .word-span.word-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
   CLOSING GLOW
   =========================== */
.closing-glow {
    text-align: center;
    padding: 8rem 2rem 6rem;
    position: relative;
    overflow: hidden;
}

.glow-halo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(201,168,76,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.glow-halo-outer {
    width: 700px;
    height: 700px;
    background: radial-gradient(ellipse at center, rgba(201,168,76,0.04) 0%, transparent 70%);
}

.closing-candle {
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.closing-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.5rem, 2.5vw, 2.2rem);
    color: var(--color-brass);
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
    margin-bottom: 0.75rem;
}

.closing-statement {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    color: var(--color-champagne);
    line-height: 1.6;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
    opacity: 0.85;
}

.closing-label {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--color-silver);
    display: block;
    position: relative;
    z-index: 1;
    opacity: 0.6;
}

/* ===========================
   FADE REVEAL ANIMATION
   =========================== */
.fade-reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 0.6s var(--spring-ease),
                transform 0.6s var(--spring-ease);
}

.fade-reveal.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ===========================
   REDUCED MOTION
   =========================== */
@media (prefers-reduced-motion: reduce) {
    .flame {
        animation: none;
        opacity: 0.8;
    }
    .fade-reveal {
        transition: none;
        opacity: 1;
        transform: none;
    }
    .nav-toggle {
        animation: none;
    }
    .scroll-hint {
        animation: none;
    }
    .interstitial-text .word-span {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* ===========================
   TABLET (768px - 1024px)
   =========================== */
@media (max-width: 1024px) {
    .grid-field {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-wide {
        grid-column: span 1;
    }

    .candle-left {
        left: 8%;
    }

    .candle-right {
        right: 8%;
    }

    .card-wide .card-illustration:not(.candle-cluster-wide) {
        width: 140px;
        height: 80px;
    }

    .candle-cluster-wide {
        width: 180px;
        height: 80px;
    }
}

/* ===========================
   MOBILE (<768px)
   =========================== */
@media (max-width: 768px) {
    .grid-field {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-column: span 1;
    }

    .candle-pair {
        display: none;
    }

    .fade-reveal {
        transform: translateY(20px) scale(0.98);
    }

    .canopy-title {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .interstitial-text {
        font-size: clamp(1.2rem, 5vw, 1.8rem);
    }

    .card-wide .card-illustration {
        width: 100% !important;
        max-width: 200px;
    }

    .candle-cluster-wide {
        width: 180px;
    }

    .closing-glow {
        padding: 5rem 1.5rem 4rem;
    }

    .nav-toggle {
        top: 16px;
        right: 16px;
    }
}

/* ===========================
   SMALL MOBILE (<480px)
   =========================== */
@media (max-width: 480px) {
    .card-content {
        padding: 1rem 1.5rem 1.5rem;
    }

    .card-body {
        font-size: 0.95rem;
    }

    .grid-field {
        padding: 1.5rem 1rem;
    }
}
