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

:root {
    --cream: #fdf6ee;
    --cocoa: #2e1a0e;
    --strawberry: #e8456b;
    --tangerine: #f5a623;
    --pistachio: #7ec8a0;
    --lavender: #b8a0d8;
    --blueberry: #4a6fa5;
    --caramel: #3d2b1a;
    --gold: #f0c040;
    --flame-orange: #e8875a;
    --flame-white: #fef9ef;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    color: var(--cocoa);
    background-color: var(--cream);
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, .section-header {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 5.5rem);
    letter-spacing: 0.12em;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
}

.ghost-number {
    font-family: 'Abril Fatface', serif;
    font-size: clamp(4rem, 10vw, 12rem);
    line-height: 0.9;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.15;
    color: var(--blueberry);
    pointer-events: none;
    z-index: 0;
}

/* === ZONES === */
.zone {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 4rem 1.5rem;
}

.zone-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    width: 100%;
    text-align: center;
}

/* === OPENING === */
.site-title {
    opacity: 0;
    animation: fadeInTitle 2s ease forwards;
}

@keyframes fadeInTitle {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.site-title::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--strawberry);
    margin: 0.5rem auto 0;
    animation: drawLine 2s ease 0.5s forwards;
}

@keyframes drawLine {
    to { width: 100%; }
}

.tagline {
    font-size: clamp(1.1rem, 1.5vw, 1.4rem);
    margin-top: 1.5rem;
    opacity: 0;
    animation: fadeIn 1.5s ease 1.5s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* === CANDLE === */
.candle {
    position: relative;
    display: inline-block;
    margin: 2rem 0;
}

.candle-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,166,35,0.4) 0%, transparent 70%);
    animation: glowPulse 4s ease-in-out infinite;
    pointer-events: none;
}

.candle-glow-large {
    width: 200px;
    height: 200px;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Flame animation */
.flame-outer {
    animation: flame-dance 0.8s ease-in-out infinite;
}

.flame-mid {
    animation: flame-dance 0.8s ease-in-out infinite 0.1s;
}

.flame-inner {
    animation: flame-dance 0.8s ease-in-out infinite 0.2s;
}

@keyframes flame-dance {
    0% { transform: scaleX(1) translateY(0); }
    25% { transform: scaleX(0.85) translateY(-2px); }
    50% { transform: scaleX(1.1) translateY(-1px); }
    75% { transform: scaleX(0.9) translateY(-3px); }
    100% { transform: scaleX(1) translateY(0); }
}

/* === STORY CARDS === */
.story-card {
    background: var(--cream);
    border-radius: 24px;
    padding: 2.5rem;
    position: relative;
    text-align: left;
    border: 2px solid var(--strawberry);
    animation: border-cycle 12s linear infinite;
}

@keyframes border-cycle {
    0% { border-color: var(--strawberry); }
    20% { border-color: var(--tangerine); }
    40% { border-color: var(--pistachio); }
    60% { border-color: var(--lavender); }
    80% { border-color: var(--blueberry); }
    100% { border-color: var(--strawberry); }
}

.story-card .chapter-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--tangerine);
}

.story-card h2 {
    margin: 0.5rem 0 1rem;
}

.story-card p {
    margin-bottom: 0.75rem;
}

/* === ZONE: METHOD (Duo cards) === */
.zone-content-duo {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
}

@media (min-width: 768px) {
    .zone-content-duo {
        grid-template-columns: 1fr 1fr;
    }
}

/* === WAX DRIP DIVIDER === */
.wax-drip-divider {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 2;
}

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

/* === BLOB GALLERY === */
.section-header {
    margin-bottom: 3rem;
}

.blob-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .blob-gallery {
        grid-template-columns: repeat(3, 1fr);
        max-width: 720px;
    }
}

.blob-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.blob-item:hover {
    transform: scale(1.12);
}

.blob-item:hover .blob-shape path {
    stroke: var(--gold);
    stroke-width: 2;
}

.blob-shape {
    width: 120px;
    height: 120px;
}

.blob-shape path {
    transition: stroke 0.3s ease, stroke-width 0.3s ease;
    stroke: transparent;
    stroke-width: 0;
}

.blob-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    width: 40px;
    height: 40px;
}

.blob-label {
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.5rem;
}

/* === CLOSING ZONE === */
.zone-closing {
    background-color: var(--caramel);
    color: var(--cream);
}

.closing-title {
    color: var(--cream);
    margin-top: 1.5rem;
}

.closing-text {
    color: var(--cream);
    opacity: 0.9;
    margin-top: 1rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* === NAVIGATION BLOBS === */
#blob-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.nav-blob {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: all;
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: blobFloat 6s ease-in-out infinite;
}

.nav-blob:hover {
    opacity: 1;
    transform: scale(1.12);
}

.nav-blob:hover svg path {
    stroke: var(--gold);
    stroke-width: 2;
}

.nav-blob svg {
    width: 100%;
    height: 100%;
}

.nav-blob svg path {
    transition: stroke 0.3s ease;
    stroke: transparent;
}

.nav-blob:nth-child(1) { top: 10%; left: 3%; fill: var(--strawberry); animation-delay: 0s; }
.nav-blob:nth-child(2) { top: 25%; right: 3%; fill: var(--tangerine); animation-delay: 1s; }
.nav-blob:nth-child(3) { top: 45%; left: 2%; fill: var(--pistachio); animation-delay: 2s; }
.nav-blob:nth-child(4) { top: 60%; right: 2%; fill: var(--lavender); animation-delay: 3s; }
.nav-blob:nth-child(5) { top: 78%; left: 4%; fill: var(--blueberry); animation-delay: 4s; }
.nav-blob:nth-child(6) { top: 88%; right: 4%; fill: var(--gold); animation-delay: 5s; }

@keyframes blobFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* === COMPASS ROSE === */
#compass-rose {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 101;
    transition: transform 0.5s ease;
}

/* === CONFETTI === */
.confetti-particle {
    position: fixed;
    top: -10px;
    opacity: 0.2;
    pointer-events: none;
    z-index: 0;
    animation: confettiFall linear infinite;
}

@keyframes confettiFall {
    from { transform: translateY(-10px) rotate(0deg); }
    to { transform: translateY(calc(100vh + 20px)) rotate(360deg); }
}

/* === DOTTED PATH === */
.dotted-path-1 {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 80px;
    background-image: repeating-linear-gradient(
        to bottom,
        rgba(46,26,14,0.15) 0px,
        rgba(46,26,14,0.15) 3px,
        transparent 3px,
        transparent 15px
    );
    transform: translateX(-50%);
}

/* === ZONE VISIBILITY ANIMATIONS === */
.zone-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.zone.is-visible .zone-content {
    opacity: 1;
    transform: translateY(0);
}

/* === COLLECTION ZONE === */
#zone-collection {
    min-height: 120vh;
}

#zone-method {
    min-height: 120vh;
}

/* === MOBILE ADJUSTMENTS === */
@media (max-width: 767px) {
    #blob-nav {
        display: none;
    }

    .zone {
        padding: 3rem 1rem;
    }
}
