/* ============================================================
   PPUZZL.bid — Aurora-Candle Broken-Grid Stylesheet
   Palette:
     #3B1F6B  deep aurora violet
     #6B3FA0  mid violet (brand)
     #2D9B8A  aurora teal
     #7EDFC0  mint aurora
     #C77DFF  electric violet
     #F7C948  amber-gold (candle core)
     #FFF3CC  candle warm white
     #FF8C42  warm coral ember
     #0D0E2B  deep space navy (bg)
     #F5F3FF  ghost lavender
   Fonts: Nunito (display 800), Quicksand (body 400/600), Comfortaa (numerals 700)
   ============================================================ */

:root {
    --c-violet-deep: #3B1F6B;
    --c-violet-mid: #6B3FA0;
    --c-teal: #2D9B8A;
    --c-mint: #7EDFC0;
    --c-electric: #C77DFF;
    --c-amber: #F7C948;
    --c-warm-white: #FFF3CC;
    --c-coral: #FF8C42;
    --c-bg: #0D0E2B;
    --c-ghost: #F5F3FF;

    --font-display: "Nunito", "Inter", system-ui, sans-serif;
    --font-body: "Quicksand", "Inter", system-ui, sans-serif;
    --font-num: "Comfortaa", "Nunito", system-ui, sans-serif;

    --shadow-warm: 0 8px 32px rgba(247, 201, 72, 0.15),
                   0 2px 8px rgba(59, 31, 107, 0.3);
    --shadow-warm-hover: 0 14px 44px rgba(247, 201, 72, 0.28),
                         0 4px 12px rgba(59, 31, 107, 0.4);

    --aurora-gradient: linear-gradient(135deg,
        #3B1F6B 0%,
        #6B3FA0 25%,
        #2D9B8A 55%,
        #7EDFC0 80%,
        #C77DFF 100%);

    --cursor-default: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'><path d='M2 2 L8 2 Q8 0 10 0 Q12 0 12 2 L18 2 L18 8 Q20 8 20 10 Q20 12 18 12 L18 18 L12 18 Q12 20 10 20 Q8 20 8 18 L2 18 Z' fill='%237EDFC0' fill-opacity='0.85' stroke='%23FFF3CC' stroke-width='1'/></svg>") 10 10, auto;

    --cursor-interactive: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22' style='transform: rotate(90deg);'><g transform='rotate(90 11 11)'><path d='M2 2 L8 2 Q8 0 10 0 Q12 0 12 2 L18 2 L18 8 Q20 8 20 10 Q20 12 18 12 L18 18 L12 18 Q12 20 10 20 Q8 20 8 18 L2 18 Z' fill='%23F7C948' stroke='%23FFF3CC' stroke-width='1.2'/></g></svg>") 11 11, pointer;
}

/* ============================================================
   Reset & Base
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--c-bg);
    color: var(--c-ghost);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    cursor: var(--cursor-default);
    min-height: 100vh;
    position: relative;
}

a, button, [data-magnetic="true"], .card, .mosaic__cell, .hero__cta {
    cursor: var(--cursor-interactive);
}

/* ============================================================
   Aurora background canvas (fixed, full viewport)
   ============================================================ */
#aurora-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease-out;
    background: var(--aurora-gradient);
    filter: blur(1px) saturate(1.05);
}

#aurora-canvas.is-ready {
    opacity: 1;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(107, 63, 160, 0.35) 0%, transparent 55%),
                radial-gradient(ellipse at 100% 100%, rgba(247, 201, 72, 0.10) 0%, transparent 50%),
                linear-gradient(180deg, rgba(13, 14, 43, 0.55) 0%, rgba(13, 14, 43, 0.85) 100%);
    pointer-events: none;
    z-index: 1;
}

/* ============================================================
   Decorative floating puzzle pieces (background layer)
   ============================================================ */
.piece-overlay {
    position: fixed;
    pointer-events: none;
    z-index: 2;
    opacity: 0.25;
    animation: drift 24s ease-in-out infinite;
}

.piece-overlay svg {
    width: 100%;
    height: 100%;
}

.piece-overlay--a {
    top: 8%;
    right: 6%;
    width: 140px;
    height: 140px;
    transform: rotate(18deg);
    animation-delay: 0s;
}

.piece-overlay--b {
    top: 55%;
    left: 4%;
    width: 110px;
    height: 110px;
    transform: rotate(-22deg);
    animation-delay: -8s;
}

.piece-overlay--c {
    top: 30%;
    left: 60%;
    width: 90px;
    height: 90px;
    transform: rotate(8deg);
    animation-delay: -16s;
}

@keyframes drift {
    0%, 100% { transform: rotate(var(--rot, 0deg)) translateY(0); }
    50% { transform: rotate(calc(var(--rot, 0deg) + 6deg)) translateY(-18px); }
}

.piece-overlay--a { --rot: 18deg; }
.piece-overlay--b { --rot: -22deg; }
.piece-overlay--c { --rot: 8deg; }

/* ============================================================
   Section eyebrow + title shared styles
   ============================================================ */
.section__eyebrow {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-amber);
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid rgba(247, 201, 72, 0.35);
    border-radius: 999px;
    background: rgba(13, 14, 43, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.section__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.05;
    letter-spacing: 0.02em;
    color: var(--c-ghost);
    margin-top: 18px;
    text-transform: uppercase;
}

.section__title em {
    font-style: normal;
    background: linear-gradient(120deg, var(--c-mint) 0%, var(--c-electric) 60%, var(--c-amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================================
   HERO (100vh)
   ============================================================ */
.hero {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    padding: clamp(60px, 8vh, 110px) clamp(24px, 5vw, 88px) 60px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hero__bgnumber {
    position: absolute;
    top: -30px;
    right: -10px;
    font-family: var(--font-num);
    font-weight: 700;
    font-size: clamp(180px, 28vw, 320px);
    line-height: 1;
    color: var(--c-electric);
    opacity: 0.08;
    pointer-events: none;
    user-select: none;
    z-index: -1;
}

.hero__inner {
    flex: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: clamp(20px, 4vw, 60px);
    align-items: center;
    position: relative;
}

.hero__wordmark {
    position: relative;
    z-index: 4;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.8s,
                opacity 1.1s ease-out 0.8s;
}

.hero.is-loaded .hero__wordmark {
    transform: translateY(0);
    opacity: 1;
}

.hero__eyebrow {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-mint);
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid rgba(126, 223, 192, 0.3);
    border-radius: 999px;
    background: rgba(13, 14, 43, 0.55);
    margin-bottom: 28px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(64px, 12vw, 144px);
    line-height: 0.92;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 32px;
    color: var(--c-ghost);
    text-shadow: 0 6px 28px rgba(199, 125, 255, 0.35);
}

.hero__title-line {
    display: block;
}

.hero__title-line--a {
    background: linear-gradient(120deg, #FFF3CC 0%, #7EDFC0 45%, #C77DFF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    transform: rotate(-1.5deg);
    transform-origin: left center;
}

.hero__title-line--b {
    font-size: 0.45em;
    color: var(--c-amber);
    letter-spacing: 0.05em;
    margin-top: 8px;
    transform: rotate(1deg);
    transform-origin: left center;
    display: inline-block;
}

.hero__lede {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.65;
    color: rgba(245, 243, 255, 0.78);
    max-width: 540px;
    margin-bottom: 38px;
}

.hero__cta-row {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    background: linear-gradient(120deg, var(--c-amber) 0%, var(--c-coral) 100%);
    color: var(--c-bg);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: var(--shadow-warm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}

.hero__cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--cta-x, 50%) var(--cta-y, 50%),
        rgba(255, 255, 255, 0.4) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero__cta:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-warm-hover);
}

.hero__cta:hover::before {
    opacity: 1;
}

.hero__cta-arrow {
    transition: transform 0.3s ease;
}

.hero__cta:hover .hero__cta-arrow {
    transform: translateX(6px);
}

.hero__meta {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(245, 243, 255, 0.55);
}

/* Hero piece cluster (right side) */
.hero__cluster {
    position: relative;
    height: clamp(360px, 50vw, 520px);
    transform: translateX(60px);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1s,
                opacity 1.2s ease-out 1s;
}

.hero.is-loaded .hero__cluster {
    transform: translateX(0);
    opacity: 1;
}

.hero__piece {
    position: absolute;
    width: 38%;
    aspect-ratio: 1;
    filter: drop-shadow(0 12px 28px rgba(247, 201, 72, 0.18))
            drop-shadow(0 4px 12px rgba(59, 31, 107, 0.35));
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__piece--1 {
    top: 4%;
    left: 14%;
    transform: rotate(-12deg);
    animation: float-piece 8s ease-in-out infinite;
}

.hero__piece--2 {
    top: 12%;
    right: 8%;
    transform: rotate(15deg);
    animation: float-piece 9s ease-in-out 0.6s infinite;
}

.hero__piece--3 {
    bottom: 16%;
    left: 4%;
    width: 32%;
    transform: rotate(8deg);
    animation: float-piece 10s ease-in-out 1.2s infinite;
}

.hero__piece--4 {
    bottom: 6%;
    right: 18%;
    width: 34%;
    transform: rotate(-6deg);
    animation: float-piece 7.5s ease-in-out 0.9s infinite;
}

@keyframes float-piece {
    0%, 100% { transform: var(--base-rotate, rotate(0)) translateY(0); }
    50% { transform: var(--base-rotate, rotate(0)) translateY(-14px); }
}

.hero__piece--1 { --base-rotate: rotate(-12deg); }
.hero__piece--2 { --base-rotate: rotate(15deg); }
.hero__piece--3 { --base-rotate: rotate(8deg); }
.hero__piece--4 { --base-rotate: rotate(-6deg); }

/* ============================================================
   Candle in lower-right corner
   ============================================================ */
.candle {
    position: absolute;
    right: clamp(24px, 5vw, 56px);
    bottom: clamp(24px, 4vh, 56px);
    width: 80px;
    height: 180px;
    z-index: 5;
    pointer-events: none;
}

.candle__glow {
    position: absolute;
    inset: -120px -160px -60px -160px;
    background: radial-gradient(circle at 50% 60%,
        rgba(247, 201, 72, 0.32) 0%,
        rgba(247, 201, 72, 0.16) 25%,
        rgba(255, 140, 66, 0.08) 50%,
        transparent 70%);
    filter: blur(8px);
    animation: glow-shift 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes glow-shift {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.88; }
    50% { transform: translate(3px, -2px) scale(1.04); opacity: 1; }
}

.candle__svg {
    position: relative;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 16px rgba(247, 201, 72, 0.45));
}

.candle__flame {
    transform-origin: 40px 60px;
    animation: flicker 0.15s cubic-bezier(0.5, 0, 0.5, 1) infinite alternate;
    filter: blur(0.8px);
}

@keyframes flicker {
    0%   { transform: scale(0.97, 1.03); opacity: 0.92; }
    20%  { transform: scale(1.02, 0.98); opacity: 1; }
    40%  { transform: scale(0.95, 1.05); opacity: 0.88; }
    60%  { transform: scale(1.04, 0.96); opacity: 0.98; }
    80%  { transform: scale(0.98, 1.02); opacity: 0.93; }
    100% { transform: scale(1.03, 0.97); opacity: 1; }
}

/* Hero scroll hint */
.hero__scrollhint {
    position: absolute;
    bottom: 28px;
    left: clamp(24px, 5vw, 88px);
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(245, 243, 255, 0.45);
    opacity: 0;
    animation: fade-up 1.2s ease-out 2s forwards;
}

.hero__scrollhint-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-mint);
    box-shadow: 0 0 12px var(--c-mint);
    animation: pulse-dot 1.6s ease-in-out infinite;
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.6); opacity: 0.45; }
}

/* ============================================================
   Collage / Intro section
   ============================================================ */
.collage {
    position: relative;
    z-index: 3;
    padding: clamp(80px, 12vh, 140px) clamp(24px, 5vw, 88px);
    overflow: hidden;
}

.collage__bgnumber,
.mosaic__bgnumber,
.interlude__bgnumber,
.closing__bgnumber {
    position: absolute;
    top: 20px;
    right: 30px;
    font-family: var(--font-num);
    font-weight: 700;
    font-size: clamp(160px, 24vw, 280px);
    line-height: 1;
    color: var(--c-electric);
    opacity: 0.08;
    pointer-events: none;
    user-select: none;
    z-index: -1;
}

.collage__heading,
.mosaic__heading,
.closing__heading {
    max-width: 720px;
    margin-bottom: clamp(48px, 8vh, 88px);
}

.collage__grid {
    display: grid;
    grid-template-columns: repeat(16, 1fr);
    gap: 20px;
    position: relative;
}

/* Card base */
.card {
    background: rgba(245, 243, 255, 0.04);
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(126, 223, 192, 0.18);
    border-radius: 18px;
    padding: 28px 28px 32px;
    color: var(--c-ghost);
    box-shadow: var(--shadow-warm);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease,
                border-color 0.25s ease,
                opacity 0.7s ease-out;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) rotate(var(--rot-current, 0deg));
}

.card.is-visible {
    opacity: 1;
}

.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
        rgba(247, 201, 72, 0.18) 0%, transparent 40%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.4s ease-out, opacity 0.4s ease;
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px) rotate(var(--rot-current, 0deg));
    box-shadow: var(--shadow-warm-hover);
    border-color: rgba(247, 201, 72, 0.35);
}

.card:hover::after {
    transform: scale(3);
    opacity: 1;
}

.card--odd { --rot-base: -2.5deg; --rot-current: -2.5deg; }
.card--even { --rot-base: 1.8deg; --rot-current: 1.8deg; }
.card--accent {
    --rot-base: -4deg;
    --rot-current: -4deg;
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.12) 0%, rgba(199, 125, 255, 0.08) 100%);
    border-color: rgba(247, 201, 72, 0.35);
}

.card__index {
    font-family: var(--font-num);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.18em;
    color: var(--c-amber);
    margin-bottom: 18px;
}

.card__title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(22px, 2.2vw, 28px);
    line-height: 1.15;
    color: var(--c-warm-white);
    margin-bottom: 14px;
    letter-spacing: 0.01em;
}

.card__body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(245, 243, 255, 0.75);
    margin-bottom: 22px;
}

.card__tag {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-mint);
    padding-top: 16px;
    border-top: 1px dashed rgba(126, 223, 192, 0.3);
}

/* Card positions in 16-column broken grid */
.card-1 {
    grid-column: 1 / span 6;
    margin-top: 10px;
    z-index: 3;
}

.card-2 {
    grid-column: 8 / span 7;
    margin-top: 48px;
    margin-left: -16px;
    z-index: 2;
}

.card-3 {
    grid-column: 2 / span 5;
    margin-top: -32px;
    margin-left: 24px;
    z-index: 4;
}

.card-4 {
    grid-column: 9 / span 6;
    margin-top: -24px;
    z-index: 3;
}

.card-5 {
    grid-column: 4 / span 7;
    margin-top: 16px;
    margin-left: 12px;
    z-index: 2;
}

/* Wax-drip divider */
.divider--drip {
    margin: clamp(48px, 8vh, 80px) 0 0;
    height: 60px;
    opacity: 0.6;
}

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

/* ============================================================
   Mosaic — 4x3 fractured grid
   ============================================================ */
.mosaic {
    position: relative;
    z-index: 3;
    padding: clamp(80px, 12vh, 140px) clamp(24px, 5vw, 88px);
    overflow: hidden;
}

.mosaic__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 20px;
    position: relative;
}

.mosaic__cell {
    background: rgba(245, 243, 255, 0.04);
    border: 1px solid rgba(199, 125, 255, 0.2);
    border-radius: 16px;
    padding: 26px;
    color: var(--c-ghost);
    box-shadow: var(--shadow-warm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease,
                border-color 0.25s ease,
                opacity 0.6s ease-out;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) rotate(var(--rot-current, 0deg));
}

.mosaic__cell.is-visible {
    opacity: 1;
}

.mosaic__cell::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--ripple-x, 50%) var(--ripple-y, 50%),
        rgba(126, 223, 192, 0.22) 0%, transparent 40%);
    opacity: 0;
    transform: scale(0);
    transition: transform 0.4s ease-out, opacity 0.4s ease;
    pointer-events: none;
}

.mosaic__cell:hover {
    transform: translateY(-4px) rotate(var(--rot-current, 0deg));
    box-shadow: var(--shadow-warm-hover);
    border-color: rgba(247, 201, 72, 0.45);
}

.mosaic__cell:hover::after {
    transform: scale(3);
    opacity: 1;
}

.mosaic__cell--empty {
    background: transparent;
    border: 1px dashed rgba(199, 125, 255, 0.15);
    box-shadow: none;
    opacity: 1;
}

.mosaic__cell--empty:hover {
    transform: none;
    box-shadow: none;
}

.mosaic__cell--diag {
    grid-column: span 2;
}

.mosaic__cell--stamp {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(247, 201, 72, 0.18) 0%, rgba(255, 140, 66, 0.08) 100%);
    border-color: rgba(247, 201, 72, 0.45);
}

.mosaic__cell-stamp-text {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(56px, 6vw, 84px);
    line-height: 1;
    color: var(--c-amber);
    letter-spacing: 0.06em;
    transform: rotate(-90deg);
    transform-origin: center;
}

.mosaic__cell-stamp-sub {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(255, 243, 204, 0.65);
    margin-top: 18px;
}

.mosaic__cell-num {
    font-family: var(--font-num);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.18em;
    color: var(--c-mint);
    margin-bottom: 14px;
}

.mosaic__cell-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(18px, 1.8vw, 22px);
    line-height: 1.2;
    color: var(--c-warm-white);
    margin-bottom: 12px;
    letter-spacing: 0.01em;
}

.mosaic__cell-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(245, 243, 255, 0.72);
}

/* Cell-specific rotations and offsets (broken-grid) */
.mosaic__cell--a { --rot-base: -2deg; --rot-current: -2deg; margin-top: 8px; }
.mosaic__cell--b { --rot-base: 1.5deg; --rot-current: 1.5deg; }
.mosaic__cell--c { --rot-base: -3deg; --rot-current: -3deg; margin-top: -10px; }
.mosaic__cell--d { --rot-base: 4deg; --rot-current: 4deg; margin-top: 18px; }
.mosaic__cell--e { --rot-base: -1.8deg; --rot-current: -1.8deg; margin-top: -16px; }
.mosaic__cell--f { --rot-base: 2.5deg; --rot-current: 2.5deg; margin-top: 6px; }
.mosaic__cell--g { --rot-base: -2.8deg; --rot-current: -2.8deg; }
.mosaic__cell--h { --rot-base: 3.5deg; --rot-current: 3.5deg; margin-top: -12px; }
.mosaic__cell--i { --rot-base: -1.5deg; --rot-current: -1.5deg; margin-top: 14px; }

/* ============================================================
   Aurora Interlude (80vh ripple canvas)
   ============================================================ */
.interlude {
    position: relative;
    z-index: 3;
    height: 80vh;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--c-bg) 0%, #161834 50%, var(--c-bg) 100%);
    border-top: 1px solid rgba(126, 223, 192, 0.12);
    border-bottom: 1px solid rgba(126, 223, 192, 0.12);
}

#ripple-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    cursor: var(--cursor-interactive);
    opacity: 0.85;
}

.interlude__content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    height: 100%;
    margin: 0 auto;
    padding: clamp(60px, 8vh, 100px) clamp(24px, 5vw, 88px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    pointer-events: none;
}

.interlude__eyebrow {
    margin-bottom: 18px;
    align-self: flex-start;
}

.interlude__title {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(44px, 7.5vw, 96px);
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--c-warm-white);
    margin-bottom: 24px;
    text-shadow: 0 6px 32px rgba(199, 125, 255, 0.4);
}

.interlude__title em {
    font-style: normal;
    background: linear-gradient(120deg, var(--c-mint) 0%, var(--c-electric) 60%, var(--c-amber) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.interlude__body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(16px, 1.4vw, 19px);
    line-height: 1.6;
    color: rgba(245, 243, 255, 0.78);
    max-width: 520px;
    margin-bottom: 32px;
}

.interlude__hint {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-mint);
    padding: 10px 18px;
    border: 1px solid rgba(126, 223, 192, 0.35);
    border-radius: 999px;
    background: rgba(13, 14, 43, 0.5);
    align-self: flex-start;
}

.interlude__hint-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--c-mint);
    box-shadow: 0 0 14px var(--c-mint);
    animation: pulse-dot 1.8s ease-in-out infinite;
}

.interlude__bgnumber {
    color: var(--c-mint);
    opacity: 0.06;
}

/* ============================================================
   Closing — Puzzle Assembly
   ============================================================ */
.closing {
    position: relative;
    z-index: 3;
    padding: clamp(80px, 12vh, 140px) clamp(24px, 5vw, 88px) 80px;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.closing__heading {
    text-align: center;
    margin: 0 auto clamp(40px, 6vh, 60px);
    max-width: 640px;
}

.closing__heading .section__eyebrow {
    margin-bottom: 14px;
}

.closing__sub {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 16px;
    line-height: 1.6;
    color: rgba(245, 243, 255, 0.65);
    margin-top: 18px;
}

/* Closing stage — pieces assemble into wordmark */
.closing__stage {
    position: relative;
    width: 100%;
    max-width: 880px;
    height: clamp(280px, 42vh, 420px);
    margin: 0 auto;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.closing__wordmark {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: clamp(72px, 14vw, 168px);
    line-height: 1;
    letter-spacing: 0.06em;
    color: var(--c-warm-white);
    text-transform: uppercase;
    text-align: center;
    background: linear-gradient(120deg, #FFF3CC 0%, #7EDFC0 35%, #C77DFF 70%, #F7C948 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    transition: opacity 0.9s ease-out 1.4s;
    position: relative;
    z-index: 1;
    text-shadow: 0 8px 36px rgba(247, 201, 72, 0.25);
}

.closing__stage.is-assembled .closing__wordmark {
    opacity: 1;
}

.closing__piece {
    position: absolute;
    width: clamp(70px, 9vw, 110px);
    height: clamp(70px, 9vw, 110px);
    top: 50%;
    left: 50%;
    /* Start position (far off-screen) is set via custom property --start; */
    /* End position is the centered cluster position via --end. */
    transform: translate(var(--start-x, 0px), var(--start-y, 0px))
               rotate(var(--start-rot, 0deg))
               scale(var(--start-scale, 0.6));
    opacity: 0;
    transition: transform 1.1s cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 0.6s ease-out;
    filter: drop-shadow(0 10px 24px rgba(247, 201, 72, 0.18))
            drop-shadow(0 4px 10px rgba(59, 31, 107, 0.4));
}

.closing__stage.is-assembled .closing__piece {
    transform: translate(var(--end-x, 0px), var(--end-y, 0px))
               rotate(var(--end-rot, 0deg))
               scale(1);
    opacity: 1;
}

/* Starting positions: drift inward from screen edges */
.closing__piece--1 {
    --start-x: -140vw;
    --start-y: -60vh;
    --start-rot: -180deg;
    --end-x: -260px;
    --end-y: -90px;
    --end-rot: -16deg;
    transition-delay: 0.1s;
}
.closing__piece--2 {
    --start-x: 140vw;
    --start-y: -55vh;
    --start-rot: 200deg;
    --end-x: -90px;
    --end-y: -100px;
    --end-rot: 9deg;
    transition-delay: 0.2s;
}
.closing__piece--3 {
    --start-x: -120vw;
    --start-y: 50vh;
    --start-rot: -140deg;
    --end-x: 90px;
    --end-y: -85px;
    --end-rot: -7deg;
    transition-delay: 0.3s;
}
.closing__piece--4 {
    --start-x: 130vw;
    --start-y: 60vh;
    --start-rot: 170deg;
    --end-x: 260px;
    --end-y: -80px;
    --end-rot: 14deg;
    transition-delay: 0.4s;
}
.closing__piece--5 {
    --start-x: -90vw;
    --start-y: -90vh;
    --start-rot: 90deg;
    --end-x: -270px;
    --end-y: 70px;
    --end-rot: 12deg;
    transition-delay: 0.5s;
}
.closing__piece--6 {
    --start-x: 95vw;
    --start-y: -90vh;
    --start-rot: -90deg;
    --end-x: -90px;
    --end-y: 80px;
    --end-rot: -9deg;
    transition-delay: 0.6s;
}
.closing__piece--7 {
    --start-x: -100vw;
    --start-y: 90vh;
    --start-rot: -200deg;
    --end-x: 90px;
    --end-y: 82px;
    --end-rot: 16deg;
    transition-delay: 0.7s;
}
.closing__piece--8 {
    --start-x: 100vw;
    --start-y: 95vh;
    --start-rot: 220deg;
    --end-x: 270px;
    --end-y: 70px;
    --end-rot: -14deg;
    transition-delay: 0.8s;
}

.closing__bgnumber {
    color: var(--c-amber);
    opacity: 0.07;
    top: -20px;
    left: -20px;
    right: auto;
}

.closing__footer {
    margin-top: clamp(40px, 6vh, 80px);
    padding-top: 28px;
    border-top: 1px dashed rgba(199, 125, 255, 0.25);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    font-family: var(--font-body);
}

.closing__footer-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.closing__footer-domain {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 22px;
    color: var(--c-warm-white);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.closing__footer-sub {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: rgba(245, 243, 255, 0.55);
}

.closing__footer-right {
    display: flex;
    gap: 28px;
    font-size: 11px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-mint);
    font-weight: 500;
}

/* ============================================================
   Responsive — tablet / mobile
   ============================================================ */
@media (max-width: 980px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero__cluster {
        height: 320px;
    }

    .candle {
        width: 64px;
        height: 144px;
        right: 24px;
        bottom: 16px;
    }

    .collage__grid,
    .mosaic__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-1, .card-2, .card-3, .card-4, .card-5 {
        grid-column: span 2;
        margin-left: 0;
        margin-top: 0;
    }

    .mosaic__cell--diag {
        grid-column: span 2;
    }

    .closing__piece--1 { --end-x: -130px; --end-y: -60px; }
    .closing__piece--2 { --end-x: -45px; --end-y: -68px; }
    .closing__piece--3 { --end-x: 45px; --end-y: -55px; }
    .closing__piece--4 { --end-x: 130px; --end-y: -50px; }
    .closing__piece--5 { --end-x: -135px; --end-y: 50px; }
    .closing__piece--6 { --end-x: -45px; --end-y: 55px; }
    .closing__piece--7 { --end-x: 45px; --end-y: 60px; }
    .closing__piece--8 { --end-x: 135px; --end-y: 50px; }
}

@media (max-width: 640px) {
    .hero {
        padding: 60px 22px 40px;
    }

    .hero__title {
        font-size: clamp(48px, 14vw, 84px);
    }

    .collage,
    .mosaic,
    .closing {
        padding: 60px 22px;
    }

    .collage__grid,
    .mosaic__grid {
        grid-template-columns: 1fr;
    }

    .mosaic__cell--diag,
    .mosaic__cell--empty {
        grid-column: span 1;
    }

    .mosaic__cell--empty {
        display: none;
    }

    .card, .mosaic__cell {
        --rot-current: 0deg !important;
    }

    .closing__footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .closing__footer-right {
        gap: 16px;
        flex-wrap: wrap;
    }
}

@media (max-width: 460px) {
    .interlude {
        min-height: 480px;
    }

    .closing__stage {
        height: 320px;
    }

    .closing__piece {
        width: 60px;
        height: 60px;
    }

    .closing__piece--1 { --end-x: -100px; --end-y: -50px; }
    .closing__piece--2 { --end-x: -35px; --end-y: -56px; }
    .closing__piece--3 { --end-x: 35px; --end-y: -45px; }
    .closing__piece--4 { --end-x: 100px; --end-y: -40px; }
    .closing__piece--5 { --end-x: -105px; --end-y: 40px; }
    .closing__piece--6 { --end-x: -35px; --end-y: 46px; }
    .closing__piece--7 { --end-x: 35px; --end-y: 50px; }
    .closing__piece--8 { --end-x: 105px; --end-y: 40px; }
}
