:root {
  --bg: #070708;
  --bg-2: #0d0d0f;
  --ink: #f2efe9;
  --muted: #8d8983;
  --dim: #55524d;
  --line: rgba(242, 239, 233, .09);
  --ember: #ff5a1f;
  --fire: linear-gradient(90deg, #ffde96 0%, #ffa840 40%, #f66c1e 72%, #ce3a12 100%);
  --display: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --pad: clamp(16px, 5vw, 72px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--display); font-size: 17px; line-height: 1.55; letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 4px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Film grain: one static tile, no animation (cheap on phones). */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  margin: 0 0 clamp(20px, 3vw, 36px); font-family: var(--mono); font-size: 12px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 12px;
}
.eyebrow b { font-weight: 500; color: var(--ember); }
.eyebrow::after { content: ''; flex: 0 0 48px; height: 1px; background: var(--line); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) var(--pad) 16px;
  opacity: 0; transform: translateY(-8px); transition: opacity 1s var(--ease), transform 1s var(--ease);
}
.signed .nav { opacity: 1; transform: none; }
.nav::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--bg) 10%, rgba(7, 7, 8, 0)); opacity: var(--nav-bg, 0); transition: opacity .4s;
}
.nav-mark { font-weight: 800; font-stretch: 125%; font-size: 15px; letter-spacing: .06em; }
.nav-mark span { color: var(--ember); margin: 0 .12em; font-weight: 300; }
.nav-links { display: flex; gap: clamp(18px, 3vw, 36px); }
.nav-links a {
  position: relative; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  padding: 10px 0; transition: color .3s;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--ember);
  transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; isolation: isolate;
  padding: 96px var(--pad) 120px;
}
/* The flame lights the room: a warm pool that follows the pen. */
.hero-glow {
  position: absolute; left: 0; top: 0; z-index: -1; width: 90vmin; height: 90vmin; margin: -45vmin 0 0 -45vmin; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 110, 36, .26), rgba(255, 70, 10, .08) 45%, rgba(255, 60, 0, 0));
  opacity: 0; will-change: transform, opacity; pointer-events: none;
}
/* Once the name is finished it smoulders: a slow breathing warmth behind it. */
.hero-ember {
  position: absolute; left: 50%; top: 46%; z-index: -1; width: min(110vw, 1300px); height: min(70vw, 700px); transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(255, 96, 24, .16), rgba(255, 60, 10, .05) 55%, rgba(255, 60, 0, 0));
  opacity: 0; transition: opacity 2.4s var(--ease); pointer-events: none;
}
.signed .hero-ember { opacity: 1; animation: breathe 5.5s ease-in-out 2.4s infinite; }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.hero-smoke { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
/* A shop floor fading into the dark. */
.hero-floor {
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%; z-index: -2; pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(242, 239, 233, .07) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(0deg, rgba(242, 239, 233, .05) 0 1px, transparent 1px 90px);
  transform: perspective(500px) rotateX(62deg); transform-origin: 50% 0;
  -webkit-mask-image: linear-gradient(transparent, #000 35%, transparent 95%); mask-image: linear-gradient(transparent, #000 35%, transparent 95%);
  opacity: .8;
}
.hero::after {
  content: ''; position: absolute; inset: auto 0 0; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(transparent, var(--bg));
}
.sign-wrap { position: relative; display: grid; place-items: center; }
.sign {
  font-size: clamp(56px, min(18vw, 30svh), 300px); line-height: 1.2; color: var(--ink); text-align: center; white-space: pre;
}
/* After the name settles, a flare of heat passes across it. */
.streak {
  position: absolute; left: -30%; right: -30%; top: 50%; height: 120px; margin-top: -60px; pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(255, 244, 220, .95) 50%, transparent) center / 34% 2px no-repeat,
    radial-gradient(closest-side, rgba(255, 190, 110, .35), rgba(255, 190, 110, 0)) center / 30% 34px no-repeat,
    radial-gradient(closest-side, rgba(255, 120, 40, .14), rgba(255, 120, 40, 0)) center / 60% 110px no-repeat;
  mix-blend-mode: screen; opacity: 0; transform: translateX(-70%);
}
.signed .streak { animation: sweep 1.9s .25s cubic-bezier(.55, .1, .35, 1) both; }
@keyframes sweep {
  0% { opacity: 0; transform: translateX(-70%); }
  18%, 70% { opacity: 1; }
  100% { opacity: 0; transform: translateX(70%); }
}

[data-after] { opacity: 0; transform: translateY(14px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.signed [data-after] { opacity: 1; transform: none; }
.kicker {
  position: absolute; left: 0; right: 0; bottom: clamp(96px, 16svh, 150px); margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 18px;
  font-stretch: 125%; font-weight: 500; font-size: clamp(11px, 1.1vw, 13px); letter-spacing: .42em; text-transform: uppercase; color: var(--muted);
  transition-delay: .5s;
}
.kicker i { width: 36px; height: 1px; background: var(--fire); }
.relight {
  position: absolute; right: var(--pad); bottom: max(28px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(13, 13, 15, .6); cursor: pointer;
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  transition: opacity 1.2s var(--ease) .9s, transform 1.2s var(--ease) .9s, color .3s, border-color .3s;
}
.relight svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.relight:hover { color: var(--ink); border-color: rgba(255, 90, 31, .55); }
.relight:hover svg { stroke: var(--ember); }
.scroll-cue {
  position: absolute; left: 50%; bottom: max(28px, env(safe-area-inset-bottom)); width: 44px; height: 44px; margin-left: -22px;
  display: grid; place-items: center; transition-delay: .8s;
}
.scroll-cue span { position: relative; width: 1px; height: 36px; background: var(--line); overflow: hidden; }
.scroll-cue span::after {
  content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ember);
  animation: drip 2.2s var(--ease) infinite;
}
@keyframes drip { to { top: 110%; } }

/* ---------- Story ---------- */
.story { padding: clamp(110px, 18vw, 240px) var(--pad); max-width: 1440px; margin: 0 auto; }
.statement {
  margin: 0; max-width: 18em; font-stretch: 112%; font-weight: 400; font-size: clamp(32px, 5.6vw, 88px); line-height: 1.04; letter-spacing: -.035em;
}
.statement .w { opacity: var(--o, .14); transition: opacity .25s linear; }
.statement .w.hot { background: var(--fire); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Anatomy (pinned, scroll-driven) ---------- */
.anatomy { position: relative; height: 320vh; --p: 0; }
.anatomy-pin {
  position: sticky; top: 0; height: 100svh; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: var(--pad); padding: 0 var(--pad);
  max-width: 1440px; margin: 0 auto;
}
.anatomy-title { margin: 0; font-stretch: 125%; font-weight: 700; font-size: clamp(34px, 4.6vw, 72px); line-height: .98; letter-spacing: -.035em; }
.anatomy-note { margin: 22px 0 0; max-width: 26ch; color: var(--muted); font-size: 16px; }
.assembly { position: relative; display: grid; place-items: center; height: 100%; perspective: 1500px; }
.stage {
  --d: min(40vw, 54svh, 540px); --ry: calc(-12deg - var(--p) * 38deg); --rx: calc(4deg + var(--p) * 8deg);
  position: relative; width: var(--d); height: var(--d); transform-style: preserve-3d;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
}
.layer {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transform: translateZ(calc((var(--i) - 1.2) * (12px + var(--p) * var(--d) * .36)));
}
.layer > svg, .rotor, .rotor svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.l-hub > svg { transform: scale(.94); }
.l-nuts > svg { transform: scale(.94); }
.rotor svg { animation: spin 14s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.l-caliper > svg { filter: drop-shadow(0 10px 18px rgba(255, 70, 20, .25)); }
.anchor { position: absolute; width: 0; height: 0; }
/* Callouts are flat (2D) over the 3D stage, placed on each part's projected anchor by main.js. */
.callouts { position: absolute; inset: 0; pointer-events: none; }
.callout { position: absolute; left: 0; top: 0; opacity: clamp(0, (var(--p) - .3 - var(--i) * .07) * 6, 1); will-change: transform; }
.callout::before { content: ''; position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--bg); box-shadow: 0 0 0 1.5px var(--ember); }
.callout-line { position: absolute; left: 0; width: 1px; height: var(--len, 40px); }
.down .callout-line { top: 4px; background: linear-gradient(rgba(242, 239, 233, .55), rgba(242, 239, 233, .12)); }
.up .callout-line { bottom: 4px; background: linear-gradient(rgba(242, 239, 233, .12), rgba(242, 239, 233, .55)); }
.callout-text {
  position: absolute; left: 0; transform: translateX(-50%); display: flex; gap: 8px; white-space: nowrap;
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
}
.down .callout-text { top: calc(var(--len, 40px) + 10px); }
.up .callout-text { bottom: calc(var(--len, 40px) + 10px); }
.callout-text b { font-weight: 500; color: var(--ember); }
.anatomy-meter { position: absolute; left: var(--pad); right: var(--pad); bottom: max(28px, env(safe-area-inset-bottom)); height: 1px; background: var(--line); }
.anatomy-meter span { position: absolute; inset: 0; background: var(--fire); transform: scaleX(var(--p)); transform-origin: left; }

/* ---------- Record ---------- */
.record { padding: clamp(110px, 16vw, 220px) var(--pad); max-width: 1440px; margin: 0 auto; }
.record-title { margin: 0 0 clamp(40px, 6vw, 80px); font-stretch: 125%; font-weight: 700; font-size: clamp(34px, 5.4vw, 84px); line-height: .98; letter-spacing: -.035em; }
.record-title em { font-style: normal; font-weight: 300; color: var(--muted); }
.spec { margin: 0; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.spec dt { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0; font-size: clamp(18px, 2vw, 26px); letter-spacing: -.02em; }
.pending {
  background: linear-gradient(100deg, var(--dim) 30%, var(--ink) 50%, var(--dim) 70%) 0 0 / 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 3.6s linear infinite;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* ---------- Footer ---------- */
.foot { padding: 40px var(--pad) max(32px, env(safe-area-inset-bottom)); max-width: 1440px; margin: 0 auto; }
.foot-sign { display: grid; place-items: center; min-height: 1.3em; font-size: clamp(120px, 20vw, 260px); line-height: 1.2; }
.foot-line {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; margin: 24px 0 0; padding-top: 22px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
/* The site's maker, kept quiet: on hover or focus the credit turns over to the inquiry address. */
.credit { position: relative; display: inline-grid; justify-items: end; min-height: 44px; align-items: center; font-size: 10px; letter-spacing: .14em; color: var(--dim); overflow: hidden; }
.credit span { grid-area: 1 / 1; transition: transform .6s var(--ease), opacity .6s var(--ease), color .3s; white-space: nowrap; }
.credit-b { transform: translateY(110%); opacity: 0; color: var(--ember); text-transform: none; letter-spacing: .04em; font-size: 11px; }
.credit:hover .credit-a, .credit:focus-visible .credit-a { transform: translateY(-110%); opacity: 0; }
.credit:hover .credit-b, .credit:focus-visible .credit-b { transform: none; opacity: 1; }

/* ---------- Phones ---------- */
@media (max-width: 760px) {
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 11px; letter-spacing: .08em; }
  .kicker { bottom: 112px; gap: 12px; letter-spacing: .32em; }
  .relight span { display: none; }
  .relight { padding: 0 12px; }
  .anatomy { height: 300vh; }
  .anatomy-pin { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; gap: 0; padding-top: 88px; }
  .anatomy-note { display: none; }
  .stage { --d: min(66vw, 40svh); --ry: calc(-10deg - var(--p) * 40deg); }
  .callout-text { font-size: 10px; letter-spacing: .08em; gap: 6px; }
  .spec div { grid-template-columns: 1fr; gap: 6px; padding: 20px 0; }
  .l-caliper > svg { filter: none; }
}

/* Landscape phones: a smaller stage so the callout rows clear the nav. */
@media (max-height: 500px) and (min-width: 761px) {
  .stage { --d: min(40vw, 44svh); }
  .callout-text { font-size: 10px; letter-spacing: .08em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rotor svg, .scroll-cue span::after, .pending { animation: none; }
  .signed .streak { animation: none; }
}
