:root {
  --navy: #071421;
  --navy-deep: #040b14;
  --ink: #e8eef7;
  --muted: #a7b8cf;
  --faint: #7087a5;
  --accent: #95b9ed;
  --line: rgba(164, 196, 232, .25);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: rgba(149,185,237,.3); }
.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 14px; transform: translateY(-170%);
  background: var(--navy); border: 1px solid var(--accent);
}
.skip-link:focus { transform: none; }
.case-header {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: clamp(24px,4vw,64px);
  min-height: 84px; padding: 18px clamp(24px,5vw,76px);
  background: linear-gradient(to bottom, rgba(4,11,20,.94), rgba(4,11,20,.72) 68%, transparent);
}
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { display: block; width: auto; height: 30px; }
.case-header nav { display: flex; align-items: center; gap: clamp(22px,2.7vw,42px); }
.case-header nav a {
  position: relative; padding: 10px 0;
  font-size: 14px; letter-spacing: .025em;
  color: var(--muted); transition: color .2s ease;
}
.case-header nav a:hover, .case-header nav .current { color: var(--ink); }
.case-header nav .current::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 5px;
  height: 1px; background: var(--accent);
}
.header-note {
  margin-left: auto; color: var(--faint);
  font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
}
.story { position: relative; isolation: isolate; }
.story-stage {
  position: sticky; top: 0; z-index: 0;
  overflow: hidden; height: 100svh; min-height: 560px;
  background:
    radial-gradient(ellipse at 73% 47%, rgba(25,57,88,.52), transparent 39%),
    linear-gradient(115deg, #071626 10%, #0b1d32 56%, #081728 100%);
}
.story-stage::before {
  content: ""; position: absolute; z-index: 2; inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(4,11,20,.7), rgba(4,11,20,.26) 38%, transparent 68%);
}
.scene-filters { position: absolute; width: 0; height: 0; overflow: hidden; }
.scene-glow {
  position: absolute; width: 75vw; height: 75vw; max-width: 1000px; max-height: 1000px;
  right: -13vw; top: -20vw; pointer-events: none;
  background: radial-gradient(circle, rgba(100,141,189,.13), transparent 65%);
}
.scene-grid {
  position: absolute; inset: 48% -24% -62%;
  opacity: .26; pointer-events: none;
  transform: perspective(560px) rotateX(64deg);
  transform-origin: center top;
  background-image:
    linear-gradient(rgba(113,157,207,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113,157,207,.22) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 57%, transparent 94%);
}
.machine-frame {
  --machine-x: 0vw; --machine-y: 0vh; --machine-scale: .88;
  position: absolute; z-index: 1; left: 71%; top: 50%;
  width: min(41vw, 550px, calc(76svh * .714));
  aspect-ratio: 5 / 7;
  transform: translate(calc(-50% + var(--machine-x)), calc(-50% + var(--machine-y))) scale(var(--machine-scale));
  transform-origin: 50% 50%;
  will-change: transform;
  filter: drop-shadow(0 26px 46px rgba(0,0,0,.28));
}
.machine-frame picture, .machine-frame img { display: block; width: 100%; height: 100%; }
.machine-frame picture { position: absolute; inset: 0; }
.machine-frame img { object-fit: contain; }
.render--full { opacity: var(--render-full, 1); }
.render--stripped-one { opacity: var(--render-one, 0); }
.render--stripped-two { opacity: var(--render-two, 0); }
.render--magnets { opacity: var(--render-magnets, 0); }
.render--motors { opacity: var(--render-motors, 0); }
.render--stoessel { opacity: var(--render-stoessel, 0); }
.render--passive { opacity: var(--render-passive, 0); }
.render--passive img { filter: url(#armature-black-key); }
.machine-frame--passive { z-index: 2; pointer-events: none; }
.machine-frame--labels { z-index: 3; filter: none; pointer-events: none; }
.story-step.story-step--reassembly {
  min-height: 150svh; display: block;
  padding-top: 0; padding-bottom: 0;
}
.story-step--reassembly .step-content {
  position: sticky; top: 44svh; width: min(100%, 450px);
}
.story-step.story-step--reassembly h2 {
  font-family: var(--sans); font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 400; letter-spacing: .025em; line-height: 1.2;
}
.point {
  position: absolute; z-index: 3; display: flex; align-items: center; gap: 10px;
  color: #eaf3ff; opacity: 0; transform: translateY(8px);
  white-space: nowrap; pointer-events: none;
  transition: opacity .36s ease, transform .5s cubic-bezier(.22,1,.36,1);
}
.point i {
  position: relative; width: 8px; height: 8px; flex: none;
  border: 1px solid white; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 6px rgba(149,185,237,.16);
}
.point::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 48px; height: 1px;
  transform: translateX(-100%); background: rgba(202,224,251,.52);
}
.point em {
  padding: 8px 10px; border: 1px solid var(--line);
  background: rgba(5,17,30,.76); backdrop-filter: blur(8px);
  font-style: normal; font-size: 11px; letter-spacing: .075em; text-transform: uppercase;
}
.point-shell { left: 72%; top: 28%; }
.point-magnet { left: 62%; top: 14%; }
.point-drive { left: 55%; top: 42%; }
.point-anchor { left: 52%; top: 13%; }
.point-secondary { left: 60%; top: 39%; }
.story-stage[data-step="0"] .point-shell,
.story-stage[data-step="2"] .point-drive,
.story-stage[data-step="3"] .point-magnet,
.story-stage[data-step="5"] .point-anchor,
.story-stage[data-step="5"] .point-secondary { opacity: 1; transform: translateY(0); }
.stage-bottom {
  position: absolute; z-index: 4; left: clamp(24px,5vw,76px); right: clamp(24px,5vw,76px); bottom: 25px;
  display: flex; align-items: center; gap: 22px;
  font-size: 11px; letter-spacing: .17em; color: var(--muted);
}
.stage-id { white-space: nowrap; }
.stage-progress { display: block; height: 1px; flex: 1; background: var(--line); }
.stage-progress span {
  display: block; height: 2px; width: 0%; margin-top: -1px;
  background: var(--accent); transition: width .07s linear;
}
.stage-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.story-steps { position: relative; z-index: 3; margin-top: -100svh; pointer-events: none; }
.story-step {
  min-height: 100svh; display: flex; align-items: center;
  padding: 124px clamp(24px,5vw,76px) 100px;
}
.step-content { width: min(100%, 470px); pointer-events: auto; opacity: .32; transform: translateY(18px); }
.story-step.is-active .step-content { opacity: 1; transform: translateY(0); }
#reassembly:not(.is-active) .step-content { opacity: 0; visibility: hidden; }
.motion-ready .step-content { transition: opacity .5s ease, transform .65s cubic-bezier(.22,1,.36,1); }
.eyebrow {
  margin: 0 0 24px; color: var(--accent); font-size: 11px;
  font-weight: 500; letter-spacing: .19em; text-transform: uppercase;
}
.eyebrow span { color: var(--faint); }
h1, h2, p { text-wrap: pretty; }
h1, .story-step h2, .case-end h2 {
  margin: 0; font-family: var(--serif); font-weight: 400;
  letter-spacing: -.025em; line-height: 1.04;
  text-shadow: 0 4px 26px rgba(3,9,18,.28);
}
h1 { font-size: clamp(51px,5.6vw,92px); }
h1 em { font-weight: 400; color: #d7e4f5; }
.story-step h2 { font-size: clamp(46px,5vw,80px); }
.step-lede {
  max-width: 40ch; margin: 30px 0 0;
  color: #d2dfed; font-size: clamp(17px,1.3vw,20px); line-height: 1.55;
  text-shadow: 0 1px 16px rgba(3,9,18,.8);
}
.step-aside {
  width: fit-content; max-width: 44ch; margin: 34px 0 0; padding-top: 14px;
  border-top: 1px solid var(--line); color: var(--muted);
  font-size: 13px; line-height: 1.55; letter-spacing: .012em;
}
.scroll-hint {
  display: flex; align-items: center; gap: 14px; margin: 58px 0 0;
  color: var(--accent); font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
}
.scroll-hint > span:first-child { font-size: 24px; line-height: 1; font-family: var(--serif); }
.case-end {
  position: relative; z-index: 3; min-height: 68svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 110px clamp(24px,8vw,140px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 78% 54%, rgba(39,75,111,.17), transparent 55%),
    #071421;
}
.case-end h2 { font-size: clamp(46px,5vw,76px); }
.case-end > p:not(.eyebrow) {
  max-width: 51ch; margin: 28px 0 42px; color: var(--muted);
  font-size: clamp(16px,1.2vw,19px); line-height: 1.6;
}
.case-citation { max-width: 60ch; margin: 0 0 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.case-citation-label { margin: 0 0 8px; color: var(--accent); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.case-citation p:last-child { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.case-citation cite { font-style: normal; }
.case-citation a { color: #eaf3ff; border-bottom: 1px solid var(--line); }
.case-citation a:hover { border-color: var(--accent); }
.end-links { display: flex; flex-wrap: wrap; gap: 28px 42px; }
.end-links a {
  padding: 12px 0; border-bottom: 1px solid var(--line);
  color: var(--accent); font-size: 15px;
  transition: color .2s ease, border-color .2s ease;
}
.end-links a:hover { color: white; border-color: var(--accent); }
.end-links a { display: inline-flex; align-items: center; gap: 8px; }
.end-links .arrow { width: 14px; height: 14px; flex: none; transition: transform .25s ease; }
.end-links a:hover .arrow { transform: translate(4px, -4px); }
@media (max-width: 900px) {
  .header-note { display: none; }
  .machine-frame { left: 70%; width: min(52vw, 480px, calc(70svh * .714)); }
  .story-step { align-items: flex-end; }
  .story-step--reassembly .step-content { top: 69svh; }
  .step-content { width: min(44vw, 420px); }
  .story-step h2 { font-size: clamp(39px,5vw,62px); }
  h1 { font-size: clamp(44px,6vw,70px); }
  .point em { font-size: 10px; }
}
@media (max-width: 650px) {
  .case-header { min-height: 70px; padding: 12px 20px; justify-content: space-between; gap: 16px; }
  .brand img { height: 25px; }
  .case-header nav { gap: 17px; }
  .case-header nav a { font-size: 12px; }
  .case-header nav .home-link { display: none; }
  .story-stage { min-height: 0; }
  .story-stage::before {
    background: linear-gradient(to bottom, transparent 19%, rgba(4,11,20,.05) 43%, rgba(4,11,20,.58) 70%, rgba(4,11,20,.88) 100%);
  }
  .scene-grid { inset: 55% -65% -45%; opacity: .18; }
  .machine-frame { top: 27%; left: 50%; width: min(78vw, calc(57svh * .714)); }
  .point { gap: 7px; }
  .point em { padding: 5px 6px; font-size: 8px; letter-spacing: .03em; }
  .point::before { width: 20px; }
  .point i { width: 6px; height: 6px; box-shadow: 0 0 0 4px rgba(149,185,237,.16); }
  .point-shell { left: 72%; top: 29%; }
  .point-magnet { left: 52%; top: 15%; }
  .point-drive { left: 55%; top: 42%; }
  .point-anchor { left: 43%; top: 13%; }
  .point-secondary { left: 52%; top: 41%; }
  .story-step { align-items: flex-start; padding: 60svh 24px 100px; }
  #overview { padding-top: 49svh; }
  .story-step.story-step--reassembly { min-height: 140svh; padding: 0 24px; }
  .story-step--reassembly .step-content { top: 69svh; }
  .step-content { width: min(100%, 430px); }
  h1 { font-size: clamp(44px,11vw,67px); }
  .story-step h2 { font-size: clamp(34px,9vw,54px); overflow-wrap: anywhere; }
  .story-step.story-step--reassembly h2 { font-size: clamp(22px, 6vw, 28px); }
  .eyebrow { margin-bottom: 14px; font-size: 10px; }
  .step-lede { max-width: 42ch; margin-top: 15px; font-size: 15px; line-height: 1.5; }
  .step-aside { margin-top: 14px; padding-top: 9px; font-size: 11px; }
  .scroll-hint { margin-top: 12px; }
  .stage-bottom { left: 24px; right: 24px; bottom: 8px; gap: 10px; font-size: 9px; }
  .case-end { min-height: 62svh; padding: 80px 24px; }
  .case-end h2 { font-size: 48px; }
}
@media (max-width: 350px) and (max-height: 600px) {
  .stage-bottom { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .machine-frame, .step-content, .point, .stage-progress span { transition: none !important; }
  .step-content { opacity: 1; transform: none; }
}

.case-legal { display: flex; gap: 24px; margin-top: 56px; color: var(--faint); font-size: 13px; }
.case-legal a { text-decoration: underline; text-underline-offset: 4px; }
.case-legal a:hover { color: var(--ink); }
