:root {
  color-scheme: dark;
  --bg: hsl(225 24% 7%);
  --surface: hsl(225 20% 11%);
  --text: hsl(45 35% 96%);
  --muted: hsl(220 12% 68%);
  --accent: hsl(151 100% 55%);
  --line: hsl(220 18% 24%);
}

* { box-sizing: border-box; }
html { font-size: 62.5%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font: 1.6rem/1.6 system-ui, sans-serif;
}
button { font: inherit; }
.site-nav { position: fixed; z-index: 50; top: 1.6rem; left: 50%; display: flex; width: min(calc(100% - 3.2rem), 112rem); min-height: 5.6rem; align-items: center; justify-content: space-between; gap: 2rem; padding: 1rem 1.4rem; border: 1px solid hsl(0 0% 100% / .1); border-radius: 999px; background: hsl(225 24% 7% / .74); box-shadow: 0 1rem 4rem hsl(225 30% 2% / .3); backdrop-filter: blur(1.8rem); transform: translateX(-50%); }
.brand { color: var(--text); font-weight: 950; letter-spacing: -.04em; text-decoration: none; }
.brand span { color: var(--accent); font: 700 1.4rem/1 ui-monospace, monospace; letter-spacing: .1em; }
.nav-status { display: flex; align-items: center; gap: .7rem; color: var(--muted); font: 700 1.4rem/1 ui-monospace, monospace; text-transform: uppercase; }
.nav-status i { width: .7rem; aspect-ratio: 1; border-radius: 50%; background: var(--accent); box-shadow: 0 0 1.4rem var(--accent); }
.wrap { width: min(100% - 3.2rem, 112rem); margin-inline: auto; }
.intro { position: relative; min-height: 72svh; display: grid; place-items: center; overflow: hidden; padding-block: 10rem 6rem; }
.intro::before { content: ""; position: absolute; width: 70rem; aspect-ratio: 1; right: -30rem; top: -36rem; border: 1px solid hsl(151 100% 55% / .2); border-radius: 50%; box-shadow: inset 0 0 10rem hsl(151 100% 55% / .05); }
.intro::after { content: "SCROLL / CONTROL"; position: absolute; right: 3vw; bottom: 3rem; color: hsl(0 0% 100% / .16); font: 800 1.4rem/1 ui-monospace, monospace; letter-spacing: .2em; writing-mode: vertical-rl; }
.outro { min-height: 100svh; display: grid; place-items: center; padding-block: 8rem; }
.intro h1 { max-width: 12ch; margin: 0; font-size: clamp(4.4rem, 10vw, 10rem); line-height: .94; letter-spacing: -.06em; }
.intro p, .controls p { max-width: 62rem; color: var(--muted); }
.eyebrow { color: var(--accent) !important; font-size: 1.3rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.start-link { display: inline-flex; min-height: 4.8rem; align-items: center; margin-top: 2rem; padding: .8rem 1.8rem; border-radius: 999px; background: var(--accent); color: var(--bg); font-weight: 800; text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.start-link:hover { transform: translateY(-2px); box-shadow: 0 1rem 3rem hsl(151 100% 55% / .2); }
.controls { padding-block: 4rem; border-block: 1px solid var(--line); background: var(--surface); }
.controls h2, .outro h2 { margin: 0; font-size: clamp(3rem, 6vw, 6rem); line-height: 1; }
.button-group { display: flex; flex-wrap: wrap; gap: 1rem; margin-block: 2.4rem; }
.button-group button { min-height: 4.4rem; padding: .8rem 1.8rem; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.button-group button:hover { transform: translateY(-2px); border-color: var(--accent); }
.button-group button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--bg); }
pre { max-width: 100%; overflow-x: auto; padding: 1.6rem; border: 1px solid var(--line); border-radius: 1.2rem; background: var(--bg); color: var(--accent); }
.pin-scene { min-height: 100svh; overflow: hidden; background: radial-gradient(circle at 50% 45%, hsl(151 80% 20% / .16), transparent 35%), hsl(230 28% 5%); }
.scene-content { min-height: 100svh; display: grid; align-content: center; gap: 5rem; padding: 2.4rem; }
.scene-index { position: absolute; top: 9rem; left: max(2.4rem, calc((100% - 112rem) / 2)); color: var(--muted); font: 800 1.4rem/1 ui-monospace, monospace; letter-spacing: .16em; }
.scene-index--dark { color: hsl(225 24% 8% / .55); }
.scene-status { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.scene-status span { color: var(--accent); font-size: 1.2rem; font-weight: 900; letter-spacing: .14em; }
.scene-status strong { color: var(--muted); font-weight: 500; }
#motion-progress { min-width: 4ch; color: var(--accent); font-weight: 900; }
.track { position: relative; width: min(calc(70vw + 7.2rem), 92vw); margin-inline: auto; height: .2rem; background: repeating-linear-gradient(90deg, var(--line) 0 4rem, transparent 4rem 4.8rem); }
.track::before, .track::after { content: ""; position: absolute; top: 50%; width: .8rem; aspect-ratio: 1; border: 1px solid var(--accent); border-radius: 50%; transform: translateY(-50%); }
.track::before { left: 0; }
.track::after { right: 0; }
.mover { position: absolute; left: 0; top: 50%; display: grid; width: 7.2rem; aspect-ratio: 1; place-items: center; border-radius: 1.8rem; background: var(--accent); color: var(--bg); font-size: 2rem; font-weight: 900; transform: translateY(-50%); box-shadow: 0 0 4rem hsl(151 100% 55% / .24); }
.scene-note { margin: 0; color: var(--muted); text-align: center; }
.breather { min-height: 76svh; display: grid; align-items: center; padding-block: 8rem; border-top: 1px solid hsl(0 0% 100% / .08); background: hsl(225 24% 7%); }
.breather--light { background: hsl(42 36% 92%); color: hsl(225 24% 9%); }
.breather--accent { background: var(--accent); color: hsl(225 24% 7%); }
.breather-grid { display: grid; gap: 3rem; }
.breather h2 { max-width: 12ch; margin: 0; font-size: clamp(4rem, 8vw, 9rem); line-height: .94; letter-spacing: -.055em; }
.breather p:not(.chapter) { max-width: 54rem; color: inherit; opacity: .72; }
.chapter { margin: 0; font: 800 1.2rem/1.2 ui-monospace, monospace; letter-spacing: .16em; text-transform: uppercase; }
.type-scene, .product-scene, .depth-scene { position: relative; min-height: 100svh; overflow: hidden; }
.type-scene { background-color: hsl(42 36% 92%); background-image: linear-gradient(hsl(225 24% 8% / .06) 1px, transparent 1px), linear-gradient(90deg, hsl(225 24% 8% / .06) 1px, transparent 1px); background-size: 6rem 6rem; color: hsl(225 24% 8%); }
.type-stage { position: relative; min-height: 100svh; display: grid; place-items: center; }
.type-line { position: absolute; margin: 0; white-space: nowrap; font-size: clamp(7rem, 15vw, 20rem); font-weight: 950; line-height: .8; letter-spacing: -.08em; }
.type-line--one { top: 18%; left: 8%; }
.type-line--two { right: 8%; bottom: 16%; }
.type-center { position: relative; z-index: 2; display: grid; width: 18rem; aspect-ratio: 1; place-items: center; border: 1px solid currentColor; border-radius: 50%; background: hsl(42 36% 92% / .76); box-shadow: 0 0 0 1.6rem hsl(42 36% 92% / .5); text-align: center; backdrop-filter: blur(1rem); }
.type-center span, .depth-caption span { font: 900 1.2rem/1 ui-monospace, monospace; }
.type-center p { margin: 0; font-size: 1.4rem; line-height: 1.3; }
.product-scene { display: grid; align-items: center; padding: 2.4rem; background: radial-gradient(circle at 72% 58%, hsl(186 90% 65% / .48), transparent 28%), linear-gradient(135deg, hsl(198 80% 32%), hsl(186 66% 43%)); color: hsl(42 36% 96%); }
.product-copy { position: relative; z-index: 2; }
.product-copy h2 { max-width: 9ch; margin: 1.8rem 0; font-size: clamp(5rem, 10vw, 12rem); line-height: .86; letter-spacing: -.07em; }
.product-copy code { font-size: 1.3rem; text-transform: uppercase; }
.product-orbit { position: absolute; inset: 0; display: grid; place-items: end center; padding-bottom: 10vh; }
.product-orbit::before { content: ""; position: absolute; width: min(72vw, 72rem); aspect-ratio: 1; border: 1px solid hsl(0 0% 100% / .28); border-radius: 50%; }
.product-object { position: relative; display: grid; width: clamp(15rem, 24vw, 32rem); aspect-ratio: .74; align-content: space-between; overflow: hidden; padding: 2.4rem; border: 1px solid hsl(0 0% 100% / .12); border-radius: 3rem; background: linear-gradient(145deg, hsl(225 24% 13%), hsl(225 28% 6%)); box-shadow: 0 4rem 8rem hsl(225 40% 10% / .3); }
.product-object::after { content: ""; position: absolute; width: 14rem; aspect-ratio: 1; right: -5rem; bottom: -5rem; border: 1px solid hsl(151 100% 55% / .5); border-radius: 50%; box-shadow: 0 0 5rem hsl(151 100% 55% / .12); }
.product-object span { font-size: clamp(5rem, 8vw, 10rem); font-weight: 950; line-height: .8; letter-spacing: -.08em; }
.product-object small { font: 700 1.1rem/1.2 ui-monospace, monospace; letter-spacing: .12em; }
.depth-scene { background: radial-gradient(circle at 80% 20%, hsl(225 80% 28% / .18), transparent 32%), hsl(225 24% 6%); }
.depth-grid { position: absolute; inset: 0; opacity: .24; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 8rem 8rem; transform: perspective(60rem) rotateX(58deg) scale(1.5); transform-origin: center bottom; }
.depth-word { position: absolute; white-space: nowrap; font-weight: 950; line-height: .8; letter-spacing: -.07em; }
.depth-word--back { top: 18%; left: -15vw; color: hsl(218 18% 36%); font-size: clamp(7rem, 13vw, 16rem); }
.depth-word--mid { top: 42%; left: -30vw; color: hsl(42 36% 94%); font-size: clamp(8rem, 16vw, 20rem); }
.depth-word--front { bottom: 5%; left: -45vw; color: var(--accent); font-size: clamp(9rem, 20vw, 25rem); }
.depth-caption { position: absolute; z-index: 3; top: 8%; right: 7%; padding-left: 2rem; border-left: 1px solid var(--accent); color: var(--text); }
.depth-caption p { margin: 1rem 0 0; color: var(--muted); }
.outro { position: relative; overflow: hidden; }
.outro::after { content: "04"; position: absolute; right: -2vw; bottom: -12vw; color: hsl(0 0% 100% / .025); font-size: 55vw; font-weight: 950; line-height: .7; pointer-events: none; }
.outro .wrap { position: relative; z-index: 1; }
.outro-copy { max-width: 58rem; color: var(--muted); }
.study-notes { padding-block: 8rem; border-block: 1px solid hsl(0 0% 100% / .08); background: hsl(225 22% 9%); }
.study-notes--light { background: hsl(42 30% 88%); color: hsl(225 24% 9%); }
.study-notes--blue { background: hsl(198 76% 24%); }
.notes-grid { display: grid; gap: 2.4rem; }
.notes-intro h2 { margin: 1.2rem 0; font-size: clamp(3.2rem, 5vw, 5.8rem); line-height: .98; letter-spacing: -.045em; }
.notes-intro > p:last-child { max-width: 56rem; margin-bottom: 0; color: currentColor; opacity: .7; }
.code-card, .tips-card { min-width: 0; border: 1px solid hsl(0 0% 100% / .1); border-radius: 2rem; background: hsl(225 25% 5%); box-shadow: 0 2rem 6rem hsl(225 30% 2% / .18); }
.code-card { overflow: hidden; }
.code-card--light { border-color: hsl(225 24% 9% / .15); }
.code-head { display: flex; min-height: 4.8rem; align-items: center; justify-content: space-between; gap: 2rem; padding: 1rem 1.6rem; border-bottom: 1px solid hsl(0 0% 100% / .08); color: var(--text); font: 800 1.4rem/1 ui-monospace, monospace; letter-spacing: .12em; text-transform: uppercase; }
.code-head small { color: var(--accent); font: inherit; }
.code-card pre { margin: 0; border: 0; border-radius: 0; background: transparent; line-height: 1.65; }
.tips-card { padding: 2rem; background: hsl(151 100% 55% / .07); }
.tips-card--dark { border-color: hsl(225 24% 9% / .14); background: hsl(225 24% 9%); color: var(--text); }
.tips-card h3 { margin: 0 0 1.6rem; font-size: 1.7rem; }
.tips-card ul { display: grid; gap: 1.2rem; margin: 0; padding-left: 2rem; color: currentColor; opacity: .78; }
.tips-card li::marker { color: var(--accent); }

@media (min-width: 480px) { .wrap { width: min(100% - 4rem, 112rem); } }
@media (min-width: 768px) { .scene-content { padding-inline: 6rem; } }
@media (min-width: 768px) { .breather-grid { grid-template-columns: 1fr 3fr; align-items: start; } }
@media (min-width: 992px) { .notes-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); } .tips-card { grid-column: 2; } }
@media (min-width: 992px) { .scene-content { padding-inline: 8rem; } }
@media (min-width: 1024px) { .scene-content { padding-inline: 10rem; } }
@media (min-width: 1440px) { .scene-content { width: min(100%, 144rem); margin-inline: auto; } }
@media (max-width: 479px) { .nav-status { display: none; } .type-center { width: 13rem; } .scene-index { top: 8rem; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
