/* ============================================================
   Air&Ember — Scrollytelling & Parallax design education page
   The page itself is the demo: a scroll-driven journey from
   dusk (hero) through the techniques, ending at a CTA sunrise.
   All motion is transform/opacity only; one rAF drives scroll
   effects; prefers-reduced-motion switches everything off.
   ============================================================ */

@font-face {
    font-family: 'Playfair Display';
    src: url(../assets/fonts/PlayfairDisplay-ExtraBold.ttf) format('truetype');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'ZT Neue Ralewe';
    src: url(../assets/fonts/ZTNeueRalewe-Regular.ttf) format('truetype');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'ZT Neue Ralewe';
    src: url(../assets/fonts/ZTNeueRalewe-Medium.ttf) format('truetype');
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: 'ZT Neue Ralewe';
    src: url(../assets/fonts/ZTNeueRalewe-ExtraBold.ttf) format('truetype');
    font-weight: 800;
    font-display: swap;
}

@font-face {
    font-family: 'Caviar Dreams';
    src: url(../assets/fonts/CaviarDreams.ttf) format('truetype');
    font-display: swap;
}

/* Registered so the pinned scene's sky gradient can animate
   between phases (without @property it switches instantly). */
@property --sky-top {
    syntax: '<color>';
    inherits: true;
    initial-value: #7ec8e8;
}

@property --sky-low {
    syntax: '<color>';
    inherits: true;
    initial-value: #f4e7c5;
}

:root {
    --pine: #172c16;
    --cream: #f4e7c5;
    --ember: #A74918;
    --ember-bright: #ff7a2f;
    --ink: #080511;
    --display: 'Playfair Display', Georgia, serif;
    --body: 'ZT Neue Ralewe', 'Segoe UI', sans-serif;
    --label: 'Caviar Dreams', 'Segoe UI', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body);
    line-height: 1.7;
    background: var(--ink);
    color: var(--cream);
    overflow-x: hidden;
}

code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.9em;
    background: rgba(255, 122, 47, 0.14);
    color: var(--ember-bright);
    padding: 0.05em 0.35em;
    border-radius: 4px;
}

.sc-essay code,
.sc-pin code {
    background: rgba(167, 73, 24, 0.12);
    color: var(--ember);
}

/* ---------- Scroll progress bar ---------- */
.sc-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: rgba(244, 231, 197, 0.12);
    z-index: 1000;
}

.sc-progress__bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, var(--ember) 0%, var(--ember-bright) 100%);
    transform: scaleX(0);
    transform-origin: left center;
    will-change: transform;
}

/* ---------- Back to Designs ---------- */
.returnCont {
    position: fixed;
    top: 1.1rem;
    left: 1.1rem;
    z-index: 999;
}

.Return {
    font-family: var(--label);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--cream);
    text-decoration: none;
    background: rgba(8, 5, 17, 0.65);
    border: 1px solid rgba(244, 231, 197, 0.35);
    border-radius: 999px;
    padding: 0.45rem 1.1rem;
    backdrop-filter: blur(4px);
    transition: background-color 0.25s ease, color 0.25s ease;
}

.Return:hover,
.Return:focus-visible {
    background: var(--ember-bright);
    color: var(--ink);
}

/* ---------- Shared bits ---------- */
.sc-eyebrow {
    font-family: var(--label);
    font-size: 0.82rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--ember-bright);
}

.sc-eyebrow--dark {
    color: var(--ember);
}

.sc-caption {
    max-width: 46rem;
    margin: 1.8rem auto 0;
    padding: 1rem 1.3rem;
    font-size: 0.95rem;
    color: rgba(244, 231, 197, 0.85);
    border-left: 3px solid var(--ember-bright);
    background: rgba(244, 231, 197, 0.05);
    border-radius: 0 10px 10px 0;
}

.sc-caption strong {
    color: var(--ember-bright);
}

.sc-caption--onCream {
    color: rgba(23, 44, 22, 0.85);
    background: rgba(23, 44, 22, 0.05);
    border-left-color: var(--ember);
}

.sc-caption--onCream strong {
    color: var(--ember);
}

.sc-caption--hero {
    margin: -4.5rem auto 0;
    position: relative;
    z-index: 5;
    width: min(46rem, calc(100% - 2.5rem));
    background: rgba(8, 5, 17, 0.85);
    border-radius: 10px;
    border-left: 3px solid var(--ember-bright);
}

/* ============================================================
   1 ── HERO: layered scroll parallax
   ============================================================ */
.sc-hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    min-height: 540px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sc-hero__sky {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
        var(--ink) 0%,
        #1d0f24 34%,
        #57203a 58%,
        var(--ember) 78%,
        var(--ember-bright) 100%);
}

.sc-hero__layer {
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -6%;
    top: 0;
    background-image: url(../assets/images/designAssets/treeline.png);
    background-repeat: repeat-x;
    background-position: bottom center;
    pointer-events: none;
    will-change: transform;
}

.sc-hero__layer--far {
    background-size: auto 30%;
    filter: brightness(0) invert(0.22) sepia(0.6) saturate(2.5) hue-rotate(-22deg);
    opacity: 0.55;
}

.sc-hero__layer--mid {
    background-size: auto 44%;
    filter: brightness(0) invert(0.1) sepia(0.8) saturate(3) hue-rotate(-18deg);
    opacity: 0.8;
}

.sc-hero__layer--near {
    background-size: auto 62%;
    filter: brightness(0);
}

.sc-hero__copy {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 1.5rem;
    max-width: 52rem;
    margin-top: -8vh;
    will-change: transform, opacity;
}

.sc-hero__title {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.5rem, 7vw, 5rem);
    line-height: 1.05;
    margin: 0.9rem 0 1.1rem;
    text-shadow: 0 4px 30px rgba(8, 5, 17, 0.6);
}

.sc-hero__sub {
    max-width: 36rem;
    margin: 0 auto;
    font-size: 1.05rem;
    color: rgba(244, 231, 197, 0.9);
}

.sc-hero__sub em {
    color: var(--ember-bright);
    font-style: normal;
    font-weight: 800;
}

.sc-hero__cue {
    margin-top: 2.2rem;
    font-family: var(--label);
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: rgba(244, 231, 197, 0.75);
}

.sc-hero__chev {
    display: block;
    font-size: 1.3rem;
    animation: sc-bob 1.6s ease-in-out infinite;
}

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

/* ============================================================
   2 ── Essay
   ============================================================ */
.sc-essay {
    background: var(--cream);
    color: var(--pine);
    margin: 4.5rem auto;
    width: min(52rem, calc(100% - 2.5rem));
    padding: clamp(2rem, 5vw, 3.8rem);
    border-radius: 18px;
}

.sc-essay h2 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.9rem, 4.5vw, 3rem);
    margin: 0.5rem 0 1.4rem;
    color: var(--pine);
}

.sc-essay p {
    margin-bottom: 1.2rem;
}

.sc-essay em {
    color: var(--ember);
}

.sc-pull {
    margin: 2rem 0 0.4rem;
    padding-left: 1.2rem;
    border-left: 4px solid var(--ember-bright);
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.15rem, 2.6vw, 1.5rem);
    line-height: 1.4;
    color: var(--ember);
}

/* ============================================================
   3a ── Parallax Lab
   ============================================================ */
.sc-lab {
    width: min(58rem, calc(100% - 2.5rem));
    margin: 5rem auto;
    text-align: center;
}

.sc-lab h2,
.sc-reveal h2 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    margin: 0.5rem 0 1rem;
}

.sc-lab__intro,
.sc-reveal__intro {
    max-width: 42rem;
    margin: 0 auto 2rem;
    color: rgba(244, 231, 197, 0.88);
}

.sc-lab__viewport {
    position: relative;
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(244, 231, 197, 0.25);
    background: linear-gradient(180deg, #2a4a63 0%, #6e93a8 55%, #d8c79b 100%);
}

.sc-lab__layer {
    position: absolute;
    bottom: 0;
    left: -460px;
    width: calc(100% + 920px);
    top: 0;
    will-change: transform;
    pointer-events: none;
}

.sc-lab__layer--back {
    background: url(../assets/images/designAssets/treeline.png) repeat-x bottom center;
    background-size: auto 34%;
    filter: brightness(0) invert(0.42) sepia(0.3) saturate(1.4) hue-rotate(150deg);
    opacity: 0.7;
    bottom: 26px;
}

.sc-lab__layer--mid {
    background: url(../assets/images/designAssets/treeline.png) repeat-x bottom center;
    background-size: auto 55%;
    filter: brightness(0) invert(0.16) sepia(0.5) saturate(2) hue-rotate(80deg);
    bottom: 14px;
}

.sc-lab__tree {
    position: absolute;
    bottom: 0;
    height: 72%;
    width: auto;
}

/* The front layer is 920px wider than the viewport (460px of
   off-stage room each side), so props are placed at
   460px + a fraction of the layer, keeping them on stage at
   camera 0 while leaving room to enter/exit as it pans. */
.sc-lab__tree--a { left: calc(460px + 5%); }
.sc-lab__tree--b { left: calc(460px + 52%); height: 58%; }

.sc-lab__birdhouse {
    position: absolute;
    bottom: 0;
    left: calc(460px + 26%);
    height: 52%;
    width: auto;
}

.sc-lab__ground {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 18px;
    background: var(--pine);
}

.sc-lab__controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem 1.6rem;
    margin-top: 1.6rem;
    text-align: left;
}

.sc-lab__control--camera {
    grid-column: 1 / -1;
    background: rgba(244, 231, 197, 0.07);
    border: 1px solid rgba(244, 231, 197, 0.2);
    border-radius: 12px;
    padding: 0.9rem 1.2rem;
}

.sc-lab__control label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--label);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
}

.sc-lab__control output {
    font-family: Consolas, monospace;
    color: var(--ember-bright);
    font-size: 0.9rem;
}

.sc-lab__hint {
    color: rgba(244, 231, 197, 0.6);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
}

.sc-lab__control input[type="range"] {
    width: 100%;
    accent-color: var(--ember-bright);
    cursor: pointer;
}

/* ============================================================
   3b ── Pinned scene + stepper
   ============================================================ */
.sc-pin {
    background: var(--cream);
    color: var(--pine);
    padding: clamp(2.5rem, 6vw, 4.5rem) 0 3rem;
}

.sc-pin__head {
    width: min(52rem, calc(100% - 2.5rem));
    margin: 0 auto 2rem;
    text-align: center;
}

.sc-pin__head h2 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.9rem, 4.5vw, 2.8rem);
    margin: 0.5rem 0 1rem;
}

.sc-pin__intro {
    max-width: 42rem;
    margin: 0 auto;
    color: rgba(23, 44, 22, 0.85);
}

.sc-pin__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2.5rem;
    width: min(68rem, calc(100% - 2.5rem));
    margin: 0 auto;
    align-items: start;
}

.sc-pin__sticky {
    position: sticky;
    top: calc(50vh - 210px);
}

.sc-pin__scene {
    --sky-top: #7ec8e8;
    --sky-low: #f4e7c5;
    position: relative;
    height: 420px;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--pine);
}

.sc-pin__sky {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-low) 100%);
    transition: --sky-top 1.1s ease, --sky-low 1.1s ease;
}

.sc-pin__orb {
    position: absolute;
    top: 14%;
    left: 16%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffd76e;
    box-shadow: 0 0 50px 18px rgba(255, 215, 110, 0.55);
    transition: transform 1.1s ease, background-color 1.1s ease, box-shadow 1.1s ease;
    will-change: transform;
}

.sc-pin__stars {
    position: absolute;
    inset: 0 0 30% 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 22%, var(--cream) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 30% 12%, var(--cream) 50%, transparent 51%),
        radial-gradient(2px 2px at 48% 28%, var(--cream) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 64% 10%, var(--cream) 50%, transparent 51%),
        radial-gradient(2px 2px at 78% 24%, var(--cream) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 90% 14%, var(--cream) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 22% 38%, var(--cream) 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 56% 42%, var(--cream) 50%, transparent 51%);
    opacity: 0;
    transition: opacity 1.1s ease;
}

.sc-pin__trees {
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: 0;
    height: 52%;
    background: url(../assets/images/designAssets/treeline.png) repeat-x bottom center;
    background-size: auto 100%;
    filter: brightness(0.65);
    transition: filter 1.1s ease;
}

.sc-pin__house {
    position: absolute;
    bottom: 4%;
    right: 9%;
    height: 56%;
    width: auto;
    transition: filter 1.1s ease;
}

.sc-pin__glow {
    position: absolute;
    bottom: 26%;
    right: 19%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 200, 90, 0.95) 0%, rgba(255, 122, 47, 0.5) 45%, transparent 72%);
    opacity: 0;
    transition: opacity 1.1s ease;
}

.sc-pin__phaseTag {
    position: absolute;
    top: 0.8rem;
    right: 0.9rem;
    font-family: var(--label);
    font-size: 0.75rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--cream);
    background: rgba(8, 5, 17, 0.55);
    padding: 0.25rem 0.8rem;
    border-radius: 999px;
}

/* phases */
.sc-pin__scene[data-phase="dusk"] {
    --sky-top: #3a2547;
    --sky-low: #ff7a2f;
}

.sc-pin__scene[data-phase="dusk"] .sc-pin__orb {
    transform: translate3d(40px, 200px, 0) scale(1.15);
    background: var(--ember-bright);
    box-shadow: 0 0 60px 22px rgba(255, 122, 47, 0.5);
}

.sc-pin__scene[data-phase="dusk"] .sc-pin__trees { filter: brightness(0.32); }
.sc-pin__scene[data-phase="dusk"] .sc-pin__house { filter: brightness(0.6); }

.sc-pin__scene[data-phase="night"],
.sc-pin__scene[data-phase="lantern"] {
    --sky-top: #080511;
    --sky-low: #172c16;
}

.sc-pin__scene[data-phase="night"] .sc-pin__orb,
.sc-pin__scene[data-phase="lantern"] .sc-pin__orb {
    transform: translate3d(290px, -8px, 0) scale(0.62);
    background: var(--cream);
    box-shadow: 0 0 34px 10px rgba(244, 231, 197, 0.35);
}

.sc-pin__scene[data-phase="night"] .sc-pin__stars,
.sc-pin__scene[data-phase="lantern"] .sc-pin__stars { opacity: 1; }

.sc-pin__scene[data-phase="night"] .sc-pin__trees,
.sc-pin__scene[data-phase="lantern"] .sc-pin__trees { filter: brightness(0.1); }

.sc-pin__scene[data-phase="night"] .sc-pin__house { filter: brightness(0.28); }
.sc-pin__scene[data-phase="lantern"] .sc-pin__house { filter: brightness(0.45); }
.sc-pin__scene[data-phase="lantern"] .sc-pin__glow { opacity: 1; }

/* steps */
.sc-pin__steps {
    display: flex;
    flex-direction: column;
    gap: 40vh;
    padding: 18vh 0 24vh;
}

.sc-step {
    background: #fffaf0;
    border: 1px solid rgba(23, 44, 22, 0.18);
    border-left: 5px solid rgba(167, 73, 24, 0.35);
    border-radius: 12px;
    padding: 1.4rem 1.6rem;
    box-shadow: 0 10px 28px rgba(23, 44, 22, 0.1);
    opacity: 0.45;
    transition: opacity 0.4s ease, border-color 0.4s ease;
}

.sc-step.is-active {
    opacity: 1;
    border-left-color: var(--ember-bright);
}

.sc-step h3 {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--pine);
}

.sc-pin > .sc-caption--onCream {
    margin-top: 2.2rem;
}

/* ============================================================
   3c ── Reveal choreography
   ============================================================ */
.sc-reveal {
    width: min(58rem, calc(100% - 2.5rem));
    margin: 5rem auto;
    text-align: center;
}

.sc-reveal__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.sc-reveal__mode {
    font-family: var(--label);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: rgba(244, 231, 197, 0.5);
    transition: color 0.25s ease;
}

.sc-reveal__mode.is-active {
    color: var(--ember-bright);
}

.sc-reveal__toggle {
    width: 58px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(244, 231, 197, 0.4);
    background: rgba(244, 231, 197, 0.1);
    cursor: pointer;
    position: relative;
}

.sc-reveal__knob {
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ember-bright);
    transition: transform 0.25s ease;
}

.sc-reveal__toggle[aria-checked="true"] .sc-reveal__knob {
    transform: translateX(28px);
}

.sc-reveal__replay {
    font-family: var(--label);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    color: var(--ink);
    background: var(--cream);
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.sc-reveal__replay:hover {
    background: var(--ember-bright);
}

.sc-reveal__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.1rem;
    text-align: left;
}

.rv-card {
    background: var(--pine);
    border: 1px solid rgba(244, 231, 197, 0.18);
    border-radius: 14px;
    padding: 1.3rem 1.4rem;
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.rv-card.is-shown {
    opacity: 1;
    transform: translateY(0);
}

.rv-card h3 {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--ember-bright);
    margin-bottom: 0.4rem;
}

.rv-card p {
    font-size: 0.92rem;
    color: rgba(244, 231, 197, 0.88);
}

.mode-staggered .rv-card:nth-child(1) { transition-delay: 0ms; }
.mode-staggered .rv-card:nth-child(2) { transition-delay: 90ms; }
.mode-staggered .rv-card:nth-child(3) { transition-delay: 180ms; }
.mode-staggered .rv-card:nth-child(4) { transition-delay: 270ms; }
.mode-staggered .rv-card:nth-child(5) { transition-delay: 360ms; }
.mode-staggered .rv-card:nth-child(6) { transition-delay: 450ms; }

.mode-instant .rv-card { transition-delay: 0ms; }

/* ============================================================
   4 ── CTA
   ============================================================ */
.sc-cta {
    text-align: center;
    background: linear-gradient(160deg, var(--ember) 0%, var(--ember-bright) 100%);
    color: var(--ink);
    width: min(58rem, calc(100% - 2.5rem));
    margin: 5rem auto 7rem;
    padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
    border-radius: 20px;
}

.sc-cta h2 {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(1.8rem, 4.5vw, 2.8rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.sc-cta p {
    max-width: 36rem;
    margin: 0 auto 1.8rem;
}

.sc-cta__btn {
    display: inline-block;
    font-family: var(--label);
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--cream);
    background: var(--ink);
    padding: 0.85rem 2rem;
    border-radius: 999px;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.sc-cta__btn:hover,
.sc-cta__btn:focus-visible {
    transform: translateY(-2px);
    background: var(--pine);
}

/* ---------- Walking character ---------- */
.sc-walker {
    position: fixed;
    bottom: 0;
    left: 0;
    height: 58px;
    width: auto;
    z-index: 998;
    pointer-events: none;
    will-change: transform;
}

/* ---------- Footer ---------- */
.sc-footer {
    background: var(--pine);
    border-top: 3px solid var(--ember);
    padding: 2.5rem 1.5rem 4.5rem;
}

.sc-footer__cols {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem 4.5rem;
    text-align: center;
}

.sc-footer h4 {
    font-family: var(--label);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--ember-bright);
    margin-bottom: 0.4rem;
}

.sc-footer p {
    font-size: 0.92rem;
    color: rgba(244, 231, 197, 0.85);
}

.sc-footer a {
    color: var(--cream);
    text-decoration: underline;
}

.sc-footer a:hover {
    color: var(--ember-bright);
}

.sc-footer__copy {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: rgba(244, 231, 197, 0.55);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
    .sc-pin__layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .sc-pin__sticky {
        position: sticky;
        top: 3.2rem;
        z-index: 5;
    }

    .sc-pin__scene {
        height: 300px;
    }

    .sc-pin__scene[data-phase="night"] .sc-pin__orb,
    .sc-pin__scene[data-phase="lantern"] .sc-pin__orb {
        transform: translate3d(180px, -8px, 0) scale(0.62);
    }

    .sc-pin__steps {
        gap: 34vh;
        padding-top: 8vh;
    }

    .sc-lab__controls {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 540px) {
    .sc-reveal__grid {
        grid-template-columns: 1fr;
    }

    .sc-lab__viewport {
        height: 240px;
    }

    .sc-walker {
        height: 42px;
    }

    .sc-caption--hero {
        margin-top: -2.5rem;
    }
}

/* ============================================================
   Reduced motion: kill all scroll-driven & decorative motion.
   Content (and the phase changes' end states) remain intact.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .sc-hero__layer,
    .sc-hero__copy {
        transform: none !important;
        opacity: 1 !important;
    }

    .sc-hero__chev {
        animation: none;
    }

    .sc-walker {
        display: none;
    }

    .rv-card {
        transition: none;
        opacity: 1;
        transform: none;
    }

    .sc-pin__sky,
    .sc-pin__orb,
    .sc-pin__stars,
    .sc-pin__trees,
    .sc-pin__house,
    .sc-pin__glow,
    .sc-step {
        transition: none;
    }
}
@media screen and (max-width: 480px) {
    .Return {
        visibility: hidden;
    }
}