/* ============================================
   lovely.day — Mid-Century Horizontal Scroll
   Compliance anchors: (300 Mono" (Google IntersectionObserver. IntersectionObserver` `threshold: [0 `threshold` values `0
   ============================================ */

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

:root {
    --midnight-abyss: #0b1128;
    --midnight-blue: #162044;
    --amber-hour: #e8a63a;
    --atomic-teal: #2ec4b6;
    --coral-blush: #e07a5f;
    --frosted-white: #f0eff4;
    --terrazzo-cream: #f5f0e8;
    --deep-indigo: #060a1a;
    --near-black: #0a0e1f;
    --glass-bg: rgba(240, 239, 244, 0.06);
    --glass-bg-light: rgba(240, 239, 244, 0.10);
    --glass-border: rgba(240, 239, 244, 0.12);
    --glass-inset: rgba(240, 239, 244, 0.08);
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--midnight-abyss);
    color: var(--frosted-white);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    line-height: 1.65;
}

/* ---- Scroll Wrapper ---- */
.scroll-wrapper {
    display: flex;
    flex-direction: row;
    height: 100vh;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.scroll-wrapper::-webkit-scrollbar {
    display: none;
}

/* ---- Glass Utility ---- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(6, 10, 26, 0.4), inset 0 1px 0 var(--glass-inset);
    will-change: transform, filter;
}
.glass--deep {
    z-index: 1;
    transform: scale(0.92);
    opacity: 0.7;
}
.glass--mid {
    z-index: 2;
    transform: scale(0.96);
    opacity: 0.85;
}
.glass--front {
    z-index: 3;
    transform: scale(1.0);
    transition: transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.glass--front:hover {
    transform: translateY(-4px) scale(1.02);
}

/* ---- Typography ---- */
.hero-word {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(3rem, 10vw, 9rem);
    letter-spacing: 0.02em;
    font-variation-settings: 'opsz' 72;
    color: var(--frosted-white);
    display: flex;
    gap: 0.02em;
}

.section-heading {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.02em;
    font-variation-settings: 'opsz' 36;
    color: var(--amber-hour);
    line-height: 1.2;
}

.body-text {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.65;
    color: rgba(240, 239, 244, 0.9);
}

.mono-label {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--atomic-teal);
}

/* ---- Room Base ---- */
.room {
    flex-shrink: 0;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   ROOM 1: The Overture
   ============================================ */
.overture {
    width: 100vw;
    background: var(--midnight-abyss);
    flex-direction: column;
    gap: 2rem;
}

.overture-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.letter {
    display: inline-block;
    animation: blurFocusIn 800ms ease-out forwards;
    filter: blur(20px);
    opacity: 0;
}

@keyframes blurFocusIn {
    0% { filter: blur(20px); opacity: 0; }
    100% { filter: blur(0); opacity: 1; }
}

.day-card {
    padding: 1rem 3rem;
    box-shadow: 0 40px 60px rgba(6, 10, 26, 0.5), inset 0 1px 0 var(--glass-inset);
    animation: floatUp 1.2s ease-out 1s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes floatUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.day-text {
    font-family: 'Fraunces', serif;
    font-weight: 400;
    font-size: clamp(2rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    font-variation-settings: 'opsz' 72;
    color: var(--amber-hour);
}

.scroll-hint {
    position: absolute;
    right: 3rem;
    top: 50%;
    transform: translateY(-50%);
    animation: hintPulse 1.5s ease-in-out 3;
    opacity: 0.7;
    transition: opacity 600ms ease;
}
.scroll-hint.hidden {
    opacity: 0;
    pointer-events: none;
}

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

.starburst {
    position: absolute;
    animation: spin 120s linear infinite;
    opacity: 0.3;
}
.starburst:hover {
    animation-duration: 30s;
}
.starburst--overture {
    top: 12%;
    left: 15%;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================
   ROOM 2: The Morning Room
   ============================================ */
.morning {
    width: 200vw;
    background: var(--midnight-abyss);
    padding: 0 8vw;
}

.morning-card {
    position: absolute;
    padding: 3rem;
    max-width: 500px;
    transition: filter 600ms ease-out, opacity 600ms ease-out;
}

.morning-card:nth-child(1) {
    left: 10%;
    top: 20%;
    max-width: 600px;
}
.morning-card:nth-child(2) {
    left: 40%;
    top: 30%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.morning-card:nth-child(3) {
    left: 65%;
    top: 35%;
}

.starburst-morning {
    animation: spin 120s linear infinite;
}

/* ============================================
   ROOM 3: The Studio
   ============================================ */
.studio {
    width: 150vw;
    background: var(--midnight-abyss);
    overflow: hidden;
}

.boomerang-divider {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

.studio-tiles {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 0 8vw;
    height: 100%;
}

.studio-tile {
    flex-shrink: 0;
    width: 280px;
    padding: 2rem;
    transform: rotate(var(--rotation)) translateY(var(--offset-y));
    transition: filter 600ms ease-out, opacity 600ms ease-out;
}

.studio-tile .tile-label {
    margin-bottom: 0.75rem;
}

/* ============================================
   ROOM 4: The Terrace
   ============================================ */
.terrace {
    width: 250vw;
    background: var(--terrazzo-cream);
    /* Terrazzo pattern via radial-gradient speckles */
    background-image:
        radial-gradient(circle 4px at 5% 15%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 3px at 12% 70%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 5px at 20% 40%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 3px at 28% 85%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 4px at 35% 25%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 6px at 42% 60%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 3px at 48% 10%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 4px at 55% 80%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 5px at 62% 35%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 3px at 68% 55%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 4px at 75% 20%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 6px at 82% 75%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 3px at 88% 45%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 5px at 95% 65%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 4px at 8% 50%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 3px at 15% 90%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 5px at 22% 8%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 4px at 30% 55%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 3px at 38% 78%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 6px at 45% 30%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 4px at 52% 92%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 3px at 58% 18%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 5px at 65% 68%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 4px at 72% 42%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 3px at 78% 88%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 5px at 85% 12%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 4px at 92% 58%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 3px at 3% 35%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 6px at 17% 22%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 4px at 33% 95%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 3px at 50% 48%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 5px at 67% 5%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 4px at 83% 62%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 3px at 97% 30%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 5px at 10% 42%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 4px at 25% 15%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 6px at 40% 88%, var(--amber-hour) 100%, transparent),
        radial-gradient(circle 3px at 57% 52%, var(--coral-blush) 100%, transparent),
        radial-gradient(circle 4px at 73% 8%, var(--atomic-teal) 100%, transparent),
        radial-gradient(circle 5px at 90% 72%, var(--amber-hour) 100%, transparent);
    background-color: var(--terrazzo-cream);
}

.terrace-beans {
    position: relative;
    width: 100%;
    height: 100%;
}

.bean {
    position: absolute;
    left: var(--bean-x);
    top: var(--bean-y);
    border-radius: 60% 40% 55% 45% / 50% 60% 40% 50%;
    padding: 2rem 2.5rem;
    background: rgba(22, 32, 68, 0.7);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    border: 1px solid rgba(22, 32, 68, 0.3);
    box-shadow: 0 8px 32px rgba(6, 10, 26, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: filter 600ms ease-out, opacity 600ms ease-out, transform 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bean:hover {
    transform: translateY(-4px) scale(1.02);
}

.bean-label {
    color: var(--amber-hour);
}

.mid-century-svg {
    vector-effect: non-scaling-stroke;
}

.tapered-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ============================================
   ROOM 5: The Dusk Coda
   ============================================ */
.coda {
    width: 100vw;
    background: var(--near-black);
    flex-direction: column;
    gap: 2rem;
}

.coda-circle {
    width: clamp(200px, 40vw, 400px);
    height: clamp(200px, 40vw, 400px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: breathe 4s ease-in-out infinite;
    background: rgba(240, 239, 244, 0.06);
}

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

.coda-word {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: clamp(3rem, 8vw, 7rem);
    font-variation-settings: 'opsz' 72;
    color: var(--amber-hour);
    letter-spacing: 0.02em;
}

.coda-subtitle {
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 300;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: rgba(240, 239, 244, 0.8);
    opacity: 0;
    animation: fadeInSubtitle 1s ease-out 2s forwards;
}

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

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: rgba(240, 239, 244, 0.1);
    z-index: 100;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--amber-hour), var(--atomic-teal));
    will-change: width;
    transition: width 50ms linear;
}

/* ============================================
   Blur-Focus System
   ============================================ */
.focus-element {
    filter: blur(12px);
    opacity: 0.3;
    transition: filter 600ms ease-out, opacity 600ms ease-out;
}
.focus-element.in-focus {
    filter: blur(0);
    opacity: 1;
}
.focus-element.out-focus {
    filter: blur(4px);
    opacity: 0.7;
}
