/* ============================================================
   diplomatic.bar — inflated-3d street diplomacy
   Palette: aurora-gradient

   Implementation notes:
   - Reveals use Intersection Observer with `threshold: 0.2`
     and `rootMargin: '-10% 0px'` per DESIGN.md.
   - Spine uses Intersection Observer. The aurora gradient
     immediately begins its perpetual downward flow animation.
   ============================================================ */

:root {
    --indigo: #0A0A14;
    --facade: #1A1A2E;
    --cyan: #00E5FF;
    --purple: #7B2FBE;
    --rose: #FF2E63;
    --gray: #8A8FA3;
    --frost: #F0F0F5;

    --font-display: 'Barlow Condensed', 'Inter', sans-serif;
    --font-body: 'DM Sans', 'Inter', sans-serif;
    --font-mono: 'Share Tech Mono', 'Space Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
    background: var(--indigo);
}

body {
    background: var(--indigo);
    color: var(--frost);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(0, 229, 255, 0.05), transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(255, 46, 99, 0.06), transparent 55%),
        radial-gradient(ellipse at 50% 50%, rgba(123, 47, 190, 0.04), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   Vertical Line Rain (background)
   ============================================================ */

.line-rain {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.rain-line {
    position: absolute;
    width: 1px;
    top: -100%;
    will-change: transform;
}

.storm-line {
    opacity: 0 !important;
    animation-duration: 12s !important;
    transition: opacity 900ms ease-out;
}

body.rooftop-active .storm-line {
    opacity: 0.12 !important;
}

@keyframes rain-fall {
    from { transform: translateY(-100%); }
    to { transform: translateY(220vh); }
}

/* ============================================================
   Main / Ascent container
   ============================================================ */

.ascent {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* ============================================================
   Floor 0 - Opening Sequence
   ============================================================ */

.floor-zero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.seal-stage {
    text-align: center;
    position: relative;
    width: 100%;
    padding: 0 2rem;
}

.diplomatic-seal {
    position: relative;
    width: min(60vw, 480px);
    height: min(60vw, 480px);
    margin: 0 auto;
    transform-style: preserve-3d;
    perspective: 800px;
    opacity: 0;
    animation: seal-enter 800ms 400ms cubic-bezier(0.16, 1, 0.3, 1) forwards,
               seal-rotate 12s 1200ms ease-in-out infinite alternate;
}

@keyframes seal-enter {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes seal-rotate {
    from { transform: perspective(800px) rotateY(-15deg) rotateX(2deg); }
    to { transform: perspective(800px) rotateY(15deg) rotateX(-2deg); }
}

.seal-ring {
    position: absolute;
    border-radius: 50%;
    inset: 0;
}

.seal-ring-outer {
    background:
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 50%),
        conic-gradient(from 0deg, var(--purple), var(--cyan), var(--rose), var(--purple));
    box-shadow:
        0 0 80px rgba(123, 47, 190, 0.55),
        0 30px 60px rgba(0, 0, 0, 0.5),
        inset 0 -20px 40px rgba(0, 0, 0, 0.4),
        inset 0 20px 40px rgba(255, 255, 255, 0.12);
}

.seal-ring-mid {
    inset: 12%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.2), transparent 55%),
        linear-gradient(135deg, var(--cyan), var(--purple) 60%, var(--rose));
    box-shadow:
        inset 0 0 30px rgba(0, 0, 0, 0.5),
        inset 0 -10px 25px rgba(0, 0, 0, 0.35),
        inset 0 10px 25px rgba(255, 255, 255, 0.18),
        0 0 40px rgba(0, 229, 255, 0.3);
}

.seal-ring-inner {
    inset: 26%;
    background:
        radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.25), transparent 60%),
        linear-gradient(160deg, var(--facade), var(--indigo));
    box-shadow:
        inset 0 0 25px rgba(0, 0, 0, 0.7),
        inset 0 -8px 18px rgba(0, 0, 0, 0.5),
        inset 0 8px 18px rgba(123, 47, 190, 0.4);
}

.seal-star {
    position: absolute;
    inset: 36%;
    background: linear-gradient(135deg, var(--frost), var(--cyan));
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.8));
}

.seal-glow {
    position: absolute;
    inset: -10%;
    background: radial-gradient(circle, rgba(123, 47, 190, 0.25), transparent 60%);
    filter: blur(20px);
    z-index: -1;
}

.brand-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 0.25em;
    text-transform: lowercase;
    color: var(--frost);
    margin-top: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: brand-rise 600ms 1200ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
    text-shadow:
        0 0 30px rgba(0, 229, 255, 0.3),
        0 0 60px rgba(123, 47, 190, 0.2);
}

@keyframes brand-rise {
    to { opacity: 1; transform: translateY(0); }
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gray);
    margin-top: 1.2rem;
    opacity: 0;
    animation: brand-rise 600ms 1600ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.chevron {
    position: absolute;
    bottom: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 18px;
    opacity: 0;
    animation: chevron-in 600ms 2000ms cubic-bezier(0.16, 1, 0.3, 1) forwards,
               chevron-bounce 2.4s 2600ms ease-in-out infinite;
}

@keyframes chevron-in {
    from { opacity: 0; transform: translate(-50%, -10px); }
    to { opacity: 0.7; transform: translate(-50%, 0); }
}

@keyframes chevron-bounce {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 8px); }
}

.chevron-line {
    position: absolute;
    width: 22px;
    height: 2px;
    background: var(--gray);
    top: 50%;
    border-radius: 2px;
}

.chevron-left {
    left: 0;
    transform: rotate(35deg);
    transform-origin: right center;
}

.chevron-right {
    right: 0;
    transform: rotate(-35deg);
    transform-origin: left center;
}

/* ============================================================
   Spine wrapper / vertical timeline
   ============================================================ */

.spine-wrapper {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 4px 1fr;
    column-gap: 0;
    row-gap: 12vh;
    padding: 6vh 0 0 0;
    max-width: 1400px;
    margin: 0 auto;
}

.spine {
    grid-column: 2;
    grid-row: 1 / span 7;
    width: 4px;
    background: linear-gradient(
        180deg,
        var(--cyan) 0%,
        var(--purple) 33%,
        var(--rose) 66%,
        var(--cyan) 100%
    );
    background-size: 100% 300%;
    animation: spine-flow 20s linear infinite;
    border-radius: 2px;
    box-shadow:
        0 0 14px rgba(0, 229, 255, 0.5),
        0 0 30px rgba(123, 47, 190, 0.3);
    clip-path: inset(100% 0 0 0);
    transition: clip-path 1200ms cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.spine.revealed {
    clip-path: inset(0 0 0 0);
}

@keyframes spine-flow {
    from { background-position: 0% 0%; }
    to { background-position: 0% 300%; }
}

/* ============================================================
   Floor blocks
   ============================================================ */

.floor-block {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 80vh;
    padding: 4vh 0;
}

.side-left {
    grid-column: 1;
    justify-content: flex-end;
    text-align: right;
}

.side-right {
    grid-column: 3;
    justify-content: flex-start;
    text-align: left;
}

.content-block {
    max-width: 42ch;
    padding: 2.4rem 2.6rem;
    background: linear-gradient(160deg, rgba(26, 26, 46, 0.85), rgba(10, 10, 20, 0.7));
    border: 1px solid rgba(138, 143, 163, 0.18);
    border-radius: 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: relative;
    opacity: 0;
    will-change: transform, opacity;
}

.side-left .content-block {
    margin-right: 3vw;
    border-right: 2px solid rgba(0, 229, 255, 0.25);
}

.side-right .content-block {
    margin-left: 3vw;
    border-left: 2px solid rgba(255, 46, 99, 0.25);
}

.reveal-left {
    transform: translateX(-60px);
    transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    transform: translateX(60px);
    transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1),
                transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.content-block.in-view {
    opacity: 1;
    transform: translateX(0);
}

/* Grid background motif */
.grid-bg {
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(138, 143, 163, 0.04) 0 1px, transparent 1px 40px),
        repeating-linear-gradient(90deg, rgba(138, 143, 163, 0.04) 0 1px, transparent 1px 40px);
    pointer-events: none;
    z-index: -1;
    mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

.grid-bg-left {
    transform: rotate(12deg) scale(1.3);
}

.grid-bg-right {
    transform: rotate(-12deg) scale(1.3);
}

/* Floor labels */
.floor-label {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    margin-bottom: 1.4rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid rgba(138, 143, 163, 0.3);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 400ms 200ms ease-out;
}

.in-view .floor-label {
    opacity: 1;
}

/* Floor titles */
.floor-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 7vw, 6rem);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    line-height: 0.95;
    margin-bottom: 1.6rem;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.floor-connector {
    position: absolute;
    top: 50%;
    width: calc(3vw + 34px);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.7), rgba(255, 46, 99, 0.4));
    opacity: 0;
    transition: opacity 400ms 200ms ease-out, transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.floor-connector::after {
    content: '';
    position: absolute;
    top: -6px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--indigo);
    border: 2px solid var(--cyan);
    box-shadow: 0 0 18px rgba(0, 229, 255, 0.65), inset 0 0 8px rgba(123, 47, 190, 0.8);
}

.floor-connector span {
    position: absolute;
    top: -2.2rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: var(--gray);
    white-space: nowrap;
}

.side-left .floor-connector {
    right: calc(-3vw - 34px);
    transform: translateX(-20px);
}

.side-left .floor-connector::after {
    right: -7px;
}

.side-left .floor-connector span {
    right: -1rem;
}

.side-right .floor-connector {
    left: calc(-3vw - 34px);
    transform: translateX(20px) rotate(180deg);
}

.side-right .floor-connector::after {
    right: -7px;
}

.side-right .floor-connector span {
    right: -1rem;
    transform: rotate(180deg);
}

.in-view .floor-connector {
    opacity: 1;
}

.side-left .in-view .floor-connector {
    transform: translateX(0);
}

.side-right .in-view .floor-connector {
    transform: translateX(0) rotate(180deg);
}

.tone-cyan {
    background-image: linear-gradient(135deg, var(--cyan), #66f4ff 60%, var(--cyan));
    filter: drop-shadow(0 0 18px rgba(0, 229, 255, 0.35));
}

.tone-purple {
    background-image: linear-gradient(135deg, var(--purple), #b061f0 60%, var(--purple));
    filter: drop-shadow(0 0 18px rgba(123, 47, 190, 0.4));
}

.tone-rose {
    background-image: linear-gradient(135deg, var(--rose), #ff6f95 60%, var(--rose));
    filter: drop-shadow(0 0 18px rgba(255, 46, 99, 0.4));
}

.floor-body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.15rem);
    line-height: 1.65;
    letter-spacing: 0.01em;
    color: var(--gray);
}

.floor-meta {
    display: flex;
    gap: 0.9rem;
    margin-top: 1.6rem;
    flex-wrap: wrap;
}

.side-left .floor-meta {
    justify-content: flex-end;
}

.meta-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gray);
    padding: 0.3rem 0.7rem;
    border: 1px dashed rgba(138, 143, 163, 0.35);
    border-radius: 2px;
}

/* ============================================================
   Inflated 3D Icons
   ============================================================ */

.inflated-icon {
    position: relative;
    margin-bottom: 1.8rem;
    transform: scale(0.7);
    opacity: 0;
    transition: transform 800ms cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 600ms ease-out;
}

.in-view .inflated-icon {
    transform: scale(1);
    opacity: 1;
}

.side-right .inflated-icon {
    margin-right: auto;
}

.side-left .inflated-icon {
    margin-left: auto;
}

/* Subway Token (Floor 2) */
.icon-token {
    width: 160px;
    height: 160px;
}

.token-body {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 30%;
    background:
        radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.4), transparent 50%),
        linear-gradient(135deg, var(--cyan), var(--purple) 50%, var(--rose));
    box-shadow:
        0 0 50px rgba(0, 229, 255, 0.4),
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 -10px 20px rgba(0, 0, 0, 0.4),
        inset 0 10px 20px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.token-emboss {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 0.15em;
    color: var(--indigo);
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.3),
        0 -1px 0 rgba(0, 0, 0, 0.4);
    z-index: 2;
    position: absolute;
    top: 18%;
    left: 0;
    right: 0;
    text-align: center;
}

.token-hole {
    position: absolute;
    width: 32%;
    height: 32%;
    border-radius: 50%;
    background: var(--indigo);
    box-shadow:
        inset 0 5px 12px rgba(0, 0, 0, 0.7),
        inset 0 -3px 8px rgba(123, 47, 190, 0.3);
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
}

/* Traffic Signal (Floor 4) */
.icon-signal {
    width: 100px;
    height: 220px;
    position: relative;
}

.signal-housing {
    width: 100px;
    height: 200px;
    background:
        linear-gradient(160deg, var(--facade), var(--indigo));
    border-radius: 18px;
    padding: 14px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        inset 0 -4px 10px rgba(0, 0, 0, 0.4),
        inset 0 4px 10px rgba(255, 255, 255, 0.06);
}

.signal-light {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    position: relative;
}

.signal-cyan {
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.5), transparent 50%),
        radial-gradient(circle, var(--cyan), #007e8c 80%);
    box-shadow:
        0 0 24px rgba(0, 229, 255, 0.55),
        inset 0 -3px 8px rgba(0, 0, 0, 0.4);
}

.signal-purple {
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.4), transparent 50%),
        radial-gradient(circle, var(--purple), #3b1660 80%);
    box-shadow:
        0 0 24px rgba(123, 47, 190, 0.5),
        inset 0 -3px 8px rgba(0, 0, 0, 0.4);
}

.signal-rose {
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 50%),
        radial-gradient(circle, var(--rose), #7a0f29 80%);
    box-shadow:
        0 0 24px rgba(255, 46, 99, 0.6),
        inset 0 -3px 8px rgba(0, 0, 0, 0.4);
}

.signal-light.pulsing {
    animation: signal-pulse 3s ease-in-out infinite;
}

@keyframes signal-pulse {
    0%, 100% {
        box-shadow:
            0 0 24px rgba(255, 46, 99, 0.6),
            inset 0 -3px 8px rgba(0, 0, 0, 0.4);
    }
    50% {
        box-shadow:
            0 0 60px rgba(255, 46, 99, 0.95),
            0 0 100px rgba(255, 46, 99, 0.4),
            inset 0 -3px 8px rgba(0, 0, 0, 0.4);
    }
}

.signal-pole {
    width: 8px;
    height: 30px;
    background: linear-gradient(90deg, var(--facade), var(--gray) 50%, var(--facade));
    margin: 0 auto;
    border-radius: 2px;
}

/* Satellite Dish (Floor 6) */
.icon-dish {
    width: 200px;
    height: 200px;
    position: relative;
    transform: perspective(600px) rotateX(40deg) rotateZ(-15deg) scale(0.7);
}

.in-view .icon-dish {
    transform: perspective(600px) rotateX(40deg) rotateZ(-15deg) scale(1);
}

.dish-bowl {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.3), transparent 50%),
        radial-gradient(circle at 50% 50%, var(--purple), var(--indigo) 80%);
    box-shadow:
        inset 0 -20px 40px rgba(0, 0, 0, 0.7),
        inset 0 20px 40px rgba(0, 229, 255, 0.15),
        0 30px 60px rgba(0, 0, 0, 0.5),
        0 0 60px rgba(123, 47, 190, 0.4);
    clip-path: ellipse(50% 50% at 50% 50%);
}

.dish-stem {
    position: absolute;
    width: 14px;
    height: 50px;
    background:
        linear-gradient(90deg, var(--facade), var(--gray) 50%, var(--facade));
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
}

.dish-ring {
    position: absolute;
    inset: 0;
    border: 2px solid var(--cyan);
    border-radius: 50%;
    opacity: 0;
    animation: dish-ping 3s ease-out infinite;
}

.dish-ring-1 { animation-delay: 0s; }
.dish-ring-2 { animation-delay: 1s; }
.dish-ring-3 { animation-delay: 2s; }

@keyframes dish-ping {
    0% { transform: scale(0.4); opacity: 0.8; border-color: var(--cyan); }
    50% { opacity: 0.4; border-color: var(--purple); }
    100% { transform: scale(1.6); opacity: 0; border-color: var(--rose); }
}

/* ============================================================
   Graffiti tags
   ============================================================ */

.graffiti-tag {
    position: absolute;
    width: 220px;
    height: 100px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.tag-floor-3 {
    top: 8%;
    right: 10%;
    transform: rotate(-8deg);
}

.tag-floor-5 {
    bottom: 10%;
    left: 8%;
    transform: rotate(6deg);
}

/* ============================================================
   Rooftop section
   ============================================================ */

.rooftop {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 8vh 2rem;
    overflow: hidden;
}

.starburst {
    position: relative;
    width: 360px;
    height: 360px;
    margin-bottom: 3rem;
    transform: scale(0);
    transition: transform 1000ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.starburst.in-view {
    transform: scale(1);
}

.starburst-conic {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
        var(--cyan), var(--purple), var(--rose), var(--cyan));
    mask: radial-gradient(circle, transparent 30%, #000 32%, #000 49%, transparent 50%);
    -webkit-mask: radial-gradient(circle, transparent 30%, #000 32%, #000 49%, transparent 50%);
    animation: starburst-spin 30s linear infinite;
    filter: drop-shadow(0 0 30px rgba(255, 46, 99, 0.5));
}

.starburst-conic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(from 0deg,
        transparent 0deg 6deg, var(--frost) 6deg 7deg,
        transparent 7deg 18deg, var(--frost) 18deg 19deg,
        transparent 19deg 30deg, var(--frost) 30deg 31deg,
        transparent 31deg 42deg, var(--frost) 42deg 43deg,
        transparent 43deg 54deg, var(--frost) 54deg 55deg,
        transparent 55deg 360deg);
    mask: radial-gradient(circle, transparent 50%, #000 51%);
    -webkit-mask: radial-gradient(circle, transparent 50%, #000 51%);
    opacity: 0.3;
}

.starburst-core {
    position: absolute;
    width: 30%;
    height: 30%;
    top: 35%;
    left: 35%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.6), transparent 55%),
        radial-gradient(circle, var(--rose), var(--purple) 70%);
    box-shadow:
        0 0 60px rgba(255, 46, 99, 0.8),
        0 0 120px rgba(123, 47, 190, 0.5),
        inset 0 -8px 16px rgba(0, 0, 0, 0.4),
        inset 0 8px 16px rgba(255, 255, 255, 0.3);
    animation: core-pulse 4s ease-in-out infinite;
}

@keyframes starburst-spin {
    to { transform: rotate(360deg); }
}

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

.rooftop-content {
    max-width: 1100px;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 800ms 200ms ease-out, transform 800ms 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.rooftop.in-view .rooftop-content {
    opacity: 1;
    transform: translateY(0);
}

.rooftop-label {
    display: inline-block;
    margin-bottom: 1.5rem;
    border-color: rgba(255, 46, 99, 0.4);
    color: var(--rose);
    opacity: 1;
}

.rooftop-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(4rem, 12vw, 10rem);
    letter-spacing: 0.05em;
    line-height: 0.9;
    color: var(--frost);
    margin-bottom: 2.4rem;
    text-shadow:
        0 0 40px rgba(0, 229, 255, 0.3),
        0 0 80px rgba(123, 47, 190, 0.25),
        0 0 120px rgba(255, 46, 99, 0.2);
}

.rooftop-title .dot {
    background: linear-gradient(135deg, var(--cyan), var(--purple), var(--rose));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}

.rooftop-sub {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.4vw, 1.3rem);
    line-height: 1.7;
    color: var(--gray);
    margin-bottom: 2.4rem;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}

.rooftop-stamp {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    color: var(--gray);
    padding: 0.6rem 1.4rem;
    border-top: 1px solid rgba(138, 143, 163, 0.3);
    border-bottom: 1px solid rgba(138, 143, 163, 0.3);
    display: inline-block;
}

/* ============================================================
   Mobile / responsive
   ============================================================ */

@media (max-width: 768px) {
    .spine-wrapper {
        display: block;
        padding: 4vh 1rem 4vh 2.4rem;
        position: relative;
    }

    .spine {
        position: absolute;
        left: 16px;
        top: 0;
        height: 100%;
        width: 4px;
        z-index: 1;
    }

    .floor-block {
        display: block;
        text-align: left !important;
        min-height: auto;
        padding: 4vh 0;
    }

    .side-left,
    .side-right {
        text-align: left;
        justify-content: flex-start;
    }

    .side-left .content-block,
    .side-right .content-block {
        margin: 0;
        max-width: 100%;
        border-left: 2px solid rgba(0, 229, 255, 0.25);
        border-right: 1px solid rgba(138, 143, 163, 0.18);
    }

    .side-left .floor-meta,
    .side-right .floor-meta {
        justify-content: flex-start;
    }

    .inflated-icon {
        margin: 0 auto 1.4rem auto !important;
        max-width: 40vw;
    }

    .icon-token,
    .icon-signal,
    .icon-dish {
        transform-origin: center;
    }

    .icon-token { width: 130px; height: 130px; }
    .icon-signal { width: 80px; height: 180px; }
    .icon-signal .signal-housing { width: 80px; height: 160px; }
    .icon-signal .signal-light { width: 44px; height: 44px; }
    .icon-dish { width: 160px; height: 160px; }

    .floor-title {
        font-size: clamp(2rem, 9vw, 3.5rem);
    }

    .floor-connector {
        display: none;
    }

    .starburst {
        width: 240px;
        height: 240px;
    }

    .rooftop-title {
        font-size: clamp(3rem, 14vw, 6rem);
    }

    .graffiti-tag {
        width: 140px;
        height: 70px;
    }
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .spine {
        animation: spine-flow 30s linear infinite !important;
    }

    .reveal-left,
    .reveal-right {
        transform: none;
    }

    .content-block {
        opacity: 1;
    }

    .inflated-icon {
        opacity: 1;
        transform: scale(1);
    }
}
