/* ============================================
   loves.day - Cottagecore HUD Overlay
   Colors: #1A0A0F #2C1810 #5C1A2A #8B3A4A #B8736A #D4A574 #F5E6D3 #FAF3EB
   Fonts: EB Garamond, Cormorant Garamond
   ============================================ */

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

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

body {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    line-height: 1.75;
    color: #F5E6D3;
    background: #1A0A0F;
    overflow-x: hidden;
}

/* ============================================
   NAVIGATION THREAD
   ============================================ */

#nav-thread {
    position: fixed;
    right: 0;
    top: 0;
    width: 16px;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#nav-thread-svg {
    position: absolute;
    top: 10%;
    height: 80%;
    width: 16px;
}

#nav-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #D4A574;
    box-shadow: 0 0 12px #D4A574, 0 0 24px rgba(212, 165, 116, 0.4);
    transition: top 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    top: 10%;
    z-index: 1001;
}

.nav-waypoint {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(184, 115, 106, 0.4);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.nav-waypoint:hover {
    background: #B8736A;
    transform: scale(1.5);
}

.nav-waypoint[data-section="0"] { top: 10%; }
.nav-waypoint[data-section="1"] { top: 36.67%; }
.nav-waypoint[data-section="2"] { top: 63.33%; }
.nav-waypoint[data-section="3"] { top: 90%; }

/* ============================================
   SCENES - COMMON
   ============================================ */

.scene {
    position: relative;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-heading {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 500;
    font-size: clamp(2rem, 4.5vw, 3.5rem);
    letter-spacing: 0.03em;
    color: #F5E6D3;
    margin-bottom: 0.5em;
}

/* ============================================
   BOKEH LAYERS
   ============================================ */

.bokeh-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    will-change: transform;
}

.bokeh-bg {
    z-index: 0;
    transform: translateZ(-3px);
}

.bokeh-mid {
    z-index: 1;
    transform: translateZ(-1px);
}

.bokeh-fg {
    z-index: 2;
    transform: translateZ(1px);
}

/* Bokeh orb base styles */
.bokeh-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.bokeh-orb-large {
    background: radial-gradient(circle, rgba(139, 58, 74, 0.12) 0%, transparent 70%);
    animation: bokeh-drift linear infinite;
}

.bokeh-orb-medium {
    background: radial-gradient(circle, rgba(139, 58, 74, 0.10) 0%, transparent 70%);
    animation: bokeh-drift-alt linear infinite;
}

.bokeh-orb-small {
    background: radial-gradient(circle, rgba(212, 165, 116, 0.08) 0%, transparent 70%);
    animation: bokeh-flicker ease-in-out infinite;
}

/* Light variant for morning section */
.bokeh-light .bokeh-orb-large {
    background: radial-gradient(circle, rgba(92, 26, 42, 0.08) 0%, transparent 70%);
}

.bokeh-light .bokeh-orb-medium {
    background: radial-gradient(circle, rgba(184, 115, 106, 0.06) 0%, transparent 70%);
}

.bokeh-light .bokeh-orb-small {
    background: radial-gradient(circle, rgba(212, 165, 116, 0.10) 0%, transparent 70%);
}

@keyframes bokeh-drift {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -20px) scale(1.05); }
    50% { transform: translate(-15px, 15px) scale(0.95); }
    75% { transform: translate(20px, 25px) scale(1.02); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes bokeh-drift-alt {
    0% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-20px, 15px) scale(1.03); }
    50% { transform: translate(25px, -10px) scale(0.97); }
    75% { transform: translate(-10px, -20px) scale(1.04); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes bokeh-flicker {
    0%, 100% { opacity: 0.03; }
    50% { opacity: 0.12; }
}

/* ============================================
   SECTION 1: THE HEARTH VIEW
   ============================================ */

#hearth {
    background: linear-gradient(160deg, #1A0A0F 0%, #5C1A2A 40%, #8B3A4A 70%, #2C1810 100%);
}

.hearth-content {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.site-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 500;
    font-style: italic;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: 0.03em;
    color: #F5E6D3;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* HUD Panels - Cardinal positions */
.hud-panel {
    position: absolute;
    padding: 1.2em 1.8em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    transition: transform 0.15s ease-out, border-color 0.6s ease;
    will-change: transform;
    max-width: 260px;
    z-index: 10;
}

.hud-panel .hud-label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-variant: small-caps;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: rgba(184, 115, 106, 0.7);
    display: block;
    margin-bottom: 0.4em;
}

.hud-panel .hud-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    font-style: italic;
    font-size: clamp(0.9rem, 1.4vw, 1.1rem);
    color: rgba(245, 230, 211, 0.7);
    line-height: 1.6;
}

/* Animated border drawing */
.hud-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid rgba(212, 165, 116, 0.15);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hud-panel.visible::before {
    transform: scaleX(1);
}

.hud-north {
    top: 12%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.hud-east {
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    text-align: right;
}

.hud-south {
    bottom: 12%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.hud-west {
    left: 8%;
    top: 50%;
    transform: translateY(-50%);
    text-align: left;
}

/* ============================================
   SECTION 2: THE GARDEN PATH
   ============================================ */

#garden {
    background: linear-gradient(135deg, #2C1810 0%, #1A0A0F 50%, #5C1A2A 100%);
    align-items: flex-start;
}

.garden-layout {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    min-height: 100vh;
    padding: 6vh 4vw;
}

.garden-content {
    width: 58%;
    padding-right: 4vw;
    padding-top: 8vh;
}

.garden-content p {
    margin-bottom: 1.5em;
    color: rgba(245, 230, 211, 0.9);
}

.botanical-hud {
    width: 40%;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hud-glass-panel {
    background: rgba(26, 10, 15, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 2.5em 2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2em;
    width: 240px;
    transition: transform 0.15s ease-out;
    will-change: transform;
}

.hud-meta {
    text-align: center;
}

.hud-meta .hud-label {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-variant: small-caps;
    letter-spacing: 0.12em;
    font-size: 11px;
    color: rgba(184, 115, 106, 0.7);
    display: block;
    margin-bottom: 0.3em;
}

#hud-section-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-variant: small-caps;
    letter-spacing: 0.12em;
    font-size: 13px;
    color: #B8736A;
}

/* Progress Ring */
.hud-progress-ring {
    position: relative;
    width: 40px;
    height: 40px;
}

.hud-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.hud-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 600;
    font-size: 10px;
    color: #5C1A2A;
}

/* ============================================
   CANDLE GLYPH
   ============================================ */

.candle-glyph {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 40px;
    height: 70px;
}

.candle-body {
    width: 3px;
    height: 24px;
    background: #F5E6D3;
    border-radius: 1px;
    position: absolute;
    bottom: 0;
}

.candle-flame {
    position: absolute;
    bottom: 24px;
    width: 14px;
    height: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    transform-origin: bottom center;
    animation: flame-sway 3s ease-in-out infinite;
    will-change: transform;
}

.flame-inner {
    position: absolute;
    bottom: 0;
    width: 6px;
    height: 14px;
    background: #D4A574;
    border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    filter: blur(1px);
    z-index: 2;
}

.flame-outer {
    position: absolute;
    bottom: -2px;
    width: 12px;
    height: 18px;
    background: rgba(212, 165, 116, 0.4);
    border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    filter: blur(3px);
    z-index: 1;
}

@keyframes flame-sway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* Smoke wisps */
.smoke-wisps {
    position: absolute;
    bottom: 40px;
    width: 20px;
    height: 40px;
    pointer-events: none;
}

.wisp {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: transparent;
    box-shadow: 0 0 6px 3px rgba(245, 230, 211, 0.06),
                0 0 12px 6px rgba(245, 230, 211, 0.03);
    opacity: 0;
    animation: wisp-rise linear infinite;
}

.wisp-1 {
    left: 8px;
    animation-duration: 4s;
    animation-delay: 0s;
}

.wisp-2 {
    left: 10px;
    animation-duration: 5s;
    animation-delay: 1.5s;
}

.wisp-3 {
    left: 12px;
    animation-duration: 6s;
    animation-delay: 3s;
}

@keyframes wisp-rise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.3;
        transform: translateY(-20px) translateX(3px) scale(1.5);
    }
    100% {
        opacity: 0;
        transform: translateY(-40px) translateX(-2px) scale(2);
    }
}

/* Small candle glyph for wick lines */
.candle-glyph-small {
    display: inline-block;
    position: relative;
    width: 3px;
    height: 12px;
    background: #F5E6D3;
    border-radius: 1px;
    vertical-align: middle;
}

.candle-glyph-small::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 8px;
    background: #D4A574;
    border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    filter: blur(0.5px);
    animation: flame-sway 3s ease-in-out infinite;
}

/* Tiny candle for breadcrumb */
.candle-glyph-tiny {
    display: inline-block;
    position: relative;
    width: 2px;
    height: 8px;
    background: #F5E6D3;
    border-radius: 1px;
    vertical-align: middle;
    margin-left: 12px;
}

.candle-glyph-tiny::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 5px;
    background: #D4A574;
    border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    animation: flame-sway 2.5s ease-in-out infinite;
}

/* Wick line */
.wick-line {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1.5em 0 2em;
    position: relative;
}

.wick-line::before,
.wick-line::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(184, 115, 106, 0.3);
}

.wick-line::before {
    margin-right: 1em;
}

.wick-line::after {
    margin-left: 1em;
}

/* ============================================
   SECTION 3: THE CANDLELIT TABLE
   ============================================ */

#candlelit {
    background: #1A0A0F;
    flex-direction: column;
}

.candlelit-hud-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2em 2em;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 300;
    font-variant: small-caps;
    letter-spacing: 0.12em;
    font-size: 12px;
    gap: 0.5em;
}

.breadcrumb {
    color: rgba(184, 115, 106, 0.4);
    transition: color 0.3s ease;
}

.breadcrumb.active {
    color: #B8736A;
}

.breadcrumb-sep {
    color: rgba(184, 115, 106, 0.2);
}

.candlelit-content {
    position: relative;
    z-index: 10;
    max-width: 640px;
    padding: 4em 2em;
}

.candlelit-content p {
    margin-bottom: 1.5em;
    color: rgba(245, 230, 211, 0.85);
}

.pull-quote {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    color: #D4A574;
    text-align: center;
    padding: 1.5em 1em;
    margin: 2em 0;
    position: relative;
}

.pull-quote::before,
.pull-quote::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: rgba(212, 165, 116, 0.3);
    margin: 0 auto 1em;
}

.pull-quote::after {
    margin: 1em auto 0;
}

/* ============================================
   SECTION 4: THE MORNING WINDOW
   ============================================ */

#morning {
    background: #F5E6D3;
    align-items: flex-start;
}

.morning-layout {
    position: relative;
    z-index: 10;
    display: flex;
    width: 100%;
    min-height: 100vh;
    padding: 10vh 4vw 12vh;
}

.morning-col-left {
    width: 35%;
    margin-left: 15%;
    padding-right: 4vw;
}

.morning-col-right {
    width: 35%;
    margin-left: 5%;
    padding-top: 15vh;
}

.morning-heading {
    color: #2C1810;
}

#morning .wick-line::before,
#morning .wick-line::after {
    background: rgba(44, 24, 16, 0.2);
}

#morning .candle-glyph-small {
    background: #2C1810;
}

#morning .candle-glyph-small::before {
    background: #B8736A;
}

.morning-col-left p {
    color: #2C1810;
    margin-bottom: 1.5em;
}

.morning-aside {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: clamp(0.95rem, 1.6vw, 1.15rem);
    color: rgba(44, 24, 16, 0.75);
    margin-bottom: 1.5em;
    line-height: 1.8;
}

/* Morning HUD bottom bar */
.morning-hud-bottom {
    position: absolute;
    bottom: 4vh;
    left: 0;
    right: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
}

.hud-waypoints {
    display: flex;
    align-items: center;
    gap: 0;
}

.waypoint-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid rgba(44, 24, 16, 0.3);
    background: transparent;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.waypoint-dot.filled {
    background: rgba(44, 24, 16, 0.25);
}

.waypoint-dot.active {
    background: #5C1A2A;
    box-shadow: 0 0 8px rgba(92, 26, 42, 0.3);
}

.waypoint-line {
    width: 40px;
    height: 1px;
    background: rgba(44, 24, 16, 0.2);
}

/* ============================================
   SCENE TRANSITIONS
   ============================================ */

.scene .section-heading,
.scene .garden-content p,
.scene .candlelit-content p,
.scene .candlelit-content .pull-quote,
.scene .morning-col-left p,
.scene .morning-aside {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;
}

.scene.in-view .section-heading,
.scene.in-view .garden-content p,
.scene.in-view .candlelit-content p,
.scene.in-view .candlelit-content .pull-quote,
.scene.in-view .morning-col-left p,
.scene.in-view .morning-aside {
    opacity: 1;
    transform: translateY(0);
}

.hud-panel {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.15s ease-out;
}

.scene.in-view .hud-panel {
    opacity: 1;
}

.scene.in-view .hud-north { transition-delay: 0s; }
.scene.in-view .hud-east { transition-delay: 0.2s; }
.scene.in-view .hud-south { transition-delay: 0.4s; }
.scene.in-view .hud-west { transition-delay: 0.6s; }

.hud-glass-panel {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scene.in-view .hud-glass-panel {
    opacity: 1;
    transform: translateX(0);
}

.candlelit-hud-bar {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.scene.in-view .candlelit-hud-bar {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   BOKEH HALOS ON INTERACTIVE ELEMENTS
   ============================================ */

.hud-panel:hover,
.hud-glass-panel:hover {
    box-shadow: 0 0 30px rgba(184, 115, 106, 0.1), 0 0 50px rgba(184, 115, 106, 0.05);
}

.site-title {
    text-shadow: 0 0 60px rgba(212, 165, 116, 0.2), 0 0 120px rgba(139, 58, 74, 0.1);
}

/* ============================================
   WAX DRIP CORNERS (decorative)
   ============================================ */

.hud-glass-panel::before {
    content: '';
    position: absolute;
    top: -1px;
    right: 16px;
    width: 8px;
    height: 20px;
    background: rgba(245, 230, 211, 0.08);
    border-radius: 0 0 50% 50%;
}

.hud-glass-panel::after {
    content: '';
    position: absolute;
    top: -1px;
    left: 24px;
    width: 5px;
    height: 14px;
    background: rgba(245, 230, 211, 0.06);
    border-radius: 0 0 50% 50%;
}

.hud-glass-panel {
    position: relative;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .garden-layout {
        flex-direction: column;
    }

    .garden-content {
        width: 100%;
        padding-right: 0;
        padding: 4vh 2vw 2vh;
    }

    .botanical-hud {
        width: 100%;
        position: relative;
        height: auto;
        padding: 2em 0;
    }

    .hud-north, .hud-south {
        left: 50%;
        transform: translateX(-50%);
    }

    .hud-east {
        right: 4%;
    }

    .hud-west {
        left: 4%;
    }

    .morning-layout {
        flex-direction: column;
        padding: 6vh 6vw;
    }

    .morning-col-left {
        width: 100%;
        margin-left: 0;
        padding-right: 0;
    }

    .morning-col-right {
        width: 100%;
        margin-left: 0;
        padding-top: 2em;
    }

    #nav-thread {
        display: none;
    }
}
