:root {
  --bg: #efeeeb;
  --text: #0a0a0a;
  --muted: #6b6862;
  --dark: #0e1216;
  --line: color-mix(in srgb, var(--text) 14%, transparent);
  --ink: #0a0a0a;
  --accent: #d12424;           /* the red of the SW logo */
  --sw-accent: var(--accent);
  --font-display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(16px, 3vw, 48px);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: clamp(.9375rem, 1.111vw, 1rem); line-height: 1.55; letter-spacing: -.01em;
  overflow-x: hidden;
  transition: color .5s ease;
}
/* dark steps: the script fades .bg-dark in and switches the text colour once */
body.theme-dark { --text: #efeeeb; --muted: #8d9196; }
.bg-dark {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: var(--dark); opacity: 0; will-change: opacity;
}
a { color: inherit; text-decoration: none; }
h1, h2, p { margin: 0; }
.accent { color: var(--accent); }

.eyebrow {
  display: block;
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .06em;
  color: var(--muted); text-transform: uppercase;
  transition: color .5s ease;
}

/* ---------- icons ---------- */
.icon {
  width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em;
  fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round;
  transition: transform .4s var(--ease);
}

/* ---------- letter wave on hover (same as the main site) ---------- */
.wave { display: inline-flex; align-items: center; gap: .5em; }
.wave-inner { display: inline-flex; overflow: hidden; line-height: 1.25; }
.wave .ch {
  display: inline-block; white-space: pre;
  transition: transform .45s var(--ease);
  transition-delay: calc(var(--i) * 18ms);
  text-shadow: 0 1.25em 0 currentColor;
}
.wave:hover .ch, .wave:focus-visible .ch { transform: translateY(-1.25em); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 18px var(--pad);
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500; letter-spacing: .04em;
  background: linear-gradient(rgba(239, 238, 235, .9), rgba(239, 238, 235, 0));
  transition: background .5s ease;
}
body.theme-dark .nav { background: linear-gradient(rgba(14, 18, 22, .9), rgba(14, 18, 22, 0)); }
.logo { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; letter-spacing: .12em; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-transform: uppercase; }

/* ---------- 3D scene ---------- */
.scene {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0;
  transition: opacity .6s ease;
}
.scene.faded { opacity: .15; }

/* ---------- story ---------- */
main { position: relative; z-index: 2; }
.story { position: relative; }
.step {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; gap: 18px;
  max-width: 34rem;
  padding: 110px var(--pad) 60px;
  opacity: 0; transform: translateY(40px);
  transition: opacity .8s var(--ease), transform 1s var(--ease);
}
.step.is-active { opacity: 1; transform: none; }
.step-right { margin-left: auto; text-align: right; align-items: flex-end; }
.step h2 { font-size: clamp(2.6rem, 6.4vw, 6rem); font-weight: 800; letter-spacing: -.05em; line-height: .92; }
.step p { font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.35; color: var(--text); opacity: .8; max-width: 26rem; }
.num {
  font-family: var(--font-mono); font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}

.step-hero { max-width: none; justify-content: flex-end; padding-bottom: 8vh; }
.title {
  font-size: clamp(4rem, 15vw, 15rem); font-weight: 800;
  letter-spacing: -.06em; line-height: .82;
  display: flex; flex-wrap: wrap; column-gap: .2em;
}
.title .line { display: inline-block; animation: rise 1.2s var(--ease) both; }
.title .line + .line { animation-delay: .12s; }
@keyframes rise { from { transform: translateY(40%); opacity: 0; } }
.lead { font-size: clamp(1.2rem, 2vw, 1.8rem); line-height: 1.2; }
.scroll-cue {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.scroll-cue .icon { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ---------- specs ---------- */
.specs {
  position: relative;
  padding: clamp(80px, 12vw, 160px) var(--pad);
  --bg: #efeeeb; --text: #0a0a0a; --muted: #6b6862;
  color: var(--text);
  background: linear-gradient(transparent, #efeeeb 14%);
  display: flex; flex-direction: column; gap: clamp(48px, 7vw, 96px);
}
.spec-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.spec { padding: 28px 24px 28px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.spec + .spec { padding-left: 24px; border-left: 1px solid var(--line); }
.spec-value { font-size: clamp(3.2rem, 7vw, 6.5rem); font-weight: 800; letter-spacing: -.06em; line-height: .9; }
.spec-value small { font-size: .32em; letter-spacing: 0; color: var(--accent); margin-left: 6px; font-weight: 600; }
.spec-label { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.features li {
  display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center;
  padding: 22px; border: 1px solid var(--line); border-radius: 18px;
  background: rgba(255, 255, 255, .45);
  transition: border-color .4s, background .4s, transform .6s var(--ease);
}
.features li:hover { border-color: rgba(209, 36, 36, .45); background: #fff; transform: translateY(-3px); }
.features .icon { grid-row: span 2; width: 34px; height: 34px; stroke-width: 1.5; }
.features strong { font-size: 1.15rem; letter-spacing: -.02em; }
.features span { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

.cta { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px; }
.cta-text { display: flex; flex-direction: column; gap: 16px; max-width: 44rem; }
.cta-text p { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.4; color: #3a3835; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta h2 { font-size: clamp(2.2rem, 5vw, 4.6rem); font-weight: 800; letter-spacing: -.05em; line-height: .95; }
.btn {
  font-family: var(--font-mono); font-size: .8rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em;
  padding: 14px 24px; border-radius: 999px;
  background: var(--accent); color: #fff; border: 1px solid var(--accent);
  transition: background .3s, color .3s;
}
.btn:hover { background: transparent; color: var(--accent); }
.btn:hover .icon { transform: translateX(3px); }
.btn:not(.btn-ghost) { --sw-accent: currentColor; } /* a blue arrow would vanish on the blue button */
.btn-ghost { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 35%, transparent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- footer (same as the main site) ---------- */
.footer { position: relative; z-index: 2; background: var(--ink); color: #efeeeb; padding: clamp(60px, 8vw, 120px) var(--pad) 28px; }
.footer-line { font-size: clamp(1.4rem, 3vw, 2.6rem); letter-spacing: -.03em; color: #bfbab2; }
.footer-big {
  display: inline-flex; max-width: 100%; gap: .25em; margin: 32px 0 80px;
  font-size: clamp(1.6rem, 6.4vw, 7rem); font-weight: 800; letter-spacing: -.05em; line-height: 1.05;
}
.footer-big .icon { width: .7em; height: .7em; stroke-width: 2.2; }
.footer-big:hover { color: var(--accent); }
.footer-big:hover .icon { transform: translate(3px, 0); }
.footer-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  font-family: var(--font-mono); font-size: .75rem; color: #918e89;
  border-top: 1px solid rgba(239, 238, 235, .15); padding-top: 20px;
}
.footer-bottom a:hover { color: #efeeeb; }

@media (max-width: 800px) {
  .nav-mail { display: none; }
  .nav-links { gap: 18px; }
  .step, .step-right { max-width: none; margin: 0; text-align: left; align-items: flex-start; justify-content: flex-end; padding-bottom: 12vh; }
  .step h2 { text-shadow: 0 2px 30px rgba(239, 238, 235, .8); }
  body.theme-dark .step h2 { text-shadow: 0 2px 30px rgba(14, 18, 22, .8); }
  .spec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec:nth-child(3) { border-left: 0; padding-left: 0; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .cta-actions { flex-direction: column; align-items: stretch; width: 100%; gap: 14px; }
  .cta-actions .btn { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .step, .reveal { opacity: 1; transform: none; }
}
