/* EK Stack — "assemble your stack"
   Dark, luminous, editorial. Bodoni for voice, Familjen for UI, Martian Mono for data. */

:root {
  --void: #060708;
  --bone: #efe9de;
  --bone-2: rgba(239, 233, 222, 0.72);
  --bone-3: rgba(239, 233, 222, 0.42);
  --line: rgba(239, 233, 222, 0.12);
  --line-2: rgba(239, 233, 222, 0.22);
  --ember: #ff5a2c;
  --ember-2: #ffb08f;
  --ion: #6fd6e6;

  --serif: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --sans: "Familjen Grotesk", "Helvetica Neue", sans-serif;
  --mono: "Martian Mono", ui-monospace, monospace;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: clamp(16px, 3.4vw, 44px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--bone);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ember); color: var(--void); }
:focus-visible { outline: 1px solid var(--ember); outline-offset: 6px; }
kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 3px 6px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  color: var(--bone-2);
  vertical-align: 1px;
}

/* ---------- Atmosphere ---------- */
.lightfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 70% 30%, rgba(111, 214, 230, .10), transparent 70%),
    radial-gradient(50% 40% at 20% 80%, rgba(255, 90, 44, .08), transparent 70%),
    var(--void);
}
.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

/* ---------- Cursor ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  body.has-cursor, body.has-cursor * { cursor: none !important; }
  body.has-cursor input, body.has-cursor textarea { cursor: text !important; }
  .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 100; }
  .cursor-dot, .cursor-ring {
    position: absolute; left: 0; top: 0; border-radius: 50%;
    transform: translate3d(var(--x, -100px), var(--y, -100px), 0) translate(-50%, -50%);
  }
  .cursor-dot { width: 5px; height: 5px; background: var(--ember); }
  .cursor-ring {
    width: 34px; height: 34px;
    border: 1px solid rgba(239, 233, 222, .35);
    transform: translate3d(var(--rx, -100px), var(--ry, -100px), 0) translate(-50%, -50%) scale(var(--s, 1));
    transition: width .35s var(--ease), height .35s var(--ease), border-color .3s, background .3s;
  }
  body.cursor-hover .cursor-ring { width: 64px; height: 64px; border-color: transparent; background: rgba(239, 233, 222, .08); backdrop-filter: blur(2px); }
  body.cursor-text .cursor-ring { width: 4px; height: 26px; border-radius: 2px; border-color: transparent; background: var(--ember); }
  body.cursor-text .cursor-dot { opacity: 0; }
}

/* ---------- Chrome ---------- */
.corner, .foot {
  position: fixed;
  left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--gutter);
  z-index: 20;
  pointer-events: none;
}
.corner { top: 0; }
.corner > *, .foot > * { pointer-events: auto; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  color: var(--bone); text-decoration: none;
}
.brand-mark {
  width: 14px; height: 14px; position: relative;
  background: linear-gradient(var(--bone), var(--bone)) 0 0 / 100% 3px no-repeat,
              linear-gradient(var(--bone-3), var(--bone-3)) 0 5.5px / 100% 3px no-repeat,
              linear-gradient(var(--ember), var(--ember)) 0 11px / 100% 3px no-repeat;
}
.corner-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 300; letter-spacing: .06em; text-transform: uppercase;
  color: var(--bone-2); padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px;
  transition: border-color .3s, color .3s;
}
.corner-link:hover { border-color: var(--line-2); color: var(--bone); }
.corner-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ember); box-shadow: 0 0 0 0 var(--ember); animation: ping 2.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 44, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(255, 90, 44, 0); } }
.foot { bottom: 0; font-family: var(--mono); font-size: 10px; font-weight: 300; letter-spacing: .08em; text-transform: uppercase; color: var(--bone-3); transition: opacity .5s; }
body:not([data-view="intro"]) .foot { opacity: 0; pointer-events: none; }

/* ---------- Views ---------- */
main { position: relative; z-index: 5; min-height: 100%; }
.view {
  position: absolute; inset: 0;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 110px var(--gutter);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .5s var(--ease), visibility 0s .5s;
}
.view:not(.is-active) { height: 100vh; overflow: hidden; }
.view.is-active { position: relative; opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .7s var(--ease) .15s, visibility 0s; }

/* ---------- Intro ---------- */
.view--intro { align-items: center; text-align: center; }
.ask {
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(46px, 9.4vw, 148px);
  line-height: .95;
  letter-spacing: -0.035em;
  color: var(--bone);
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  transition: transform .9s var(--ease);
  max-width: 11ch;
}
.ask-text { display: inline; }
.ask em { font-style: italic; font-weight: 400; }
.ch {
  display: inline-block;
  will-change: transform, opacity, filter;
  animation: chIn 1.2s var(--ease) both;
  animation-delay: calc(var(--i) * 32ms + 250ms);
}
em .ch, .ch.is-em {
  background: linear-gradient(100deg, var(--ember-2) 0%, var(--ember) 45%, var(--bone) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: chIn 1.2s var(--ease) both, sheen 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * 32ms + 250ms), 2s;
}
@keyframes chIn { from { opacity: 0; transform: translateY(.45em) rotate(4deg); filter: blur(12px); } }
@keyframes sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }
.ask.is-leaving .ch {
  animation: chOut .7s cubic-bezier(.6, 0, .8, .4) both;
  animation-delay: calc(var(--r) * 260ms);
}
@keyframes chOut { to { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); filter: blur(16px); } }
.ask:focus-visible { outline: none; }
.ask:focus-visible .ask-text { text-decoration: underline 1px var(--ember); text-underline-offset: .18em; }
.hint {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 46px 0 0;
  font-family: var(--mono); font-size: 11px; font-weight: 300; letter-spacing: .08em; text-transform: uppercase;
  color: var(--bone-3);
  animation: fade 1.2s var(--ease) 1.6s both;
}
.hint-pulse { width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--ember); position: relative; }
.hint-pulse::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--ember); animation: ring 2s var(--ease) infinite; }
@keyframes ring { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* ---------- The stack ---------- */
.stack {
  position: fixed;
  z-index: 3;
  right: 9vw;
  top: 50%;
  width: 230px;
  height: 230px;
  margin-top: -170px;
  perspective: 1400px;
  opacity: 0;
  transform: translateY(40px) scale(.94);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease), right 1s var(--ease);
  pointer-events: none;
  --gap: 34px;
}
body[data-view="flow"] .stack, body[data-view="form"] .stack, body[data-view="done"] .stack { opacity: 1; transform: none; }
body[data-view="form"] .stack { right: 7vw; }
.stack-tilt {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateX(60deg) rotateZ(-42deg);
  animation: drift 14s ease-in-out infinite;
}
@keyframes drift { 0%, 100% { transform: rotateX(60deg) rotateZ(-42deg); } 50% { transform: rotateX(56deg) rotateZ(-36deg); } }
.slab {
  --z: calc(var(--i, 0) * var(--gap));
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: translateZ(var(--z));
  border-radius: 6px;
  background: linear-gradient(135deg, rgba(239, 233, 222, .16), rgba(239, 233, 222, .03) 60%, rgba(111, 214, 230, .06));
  border: 1px solid rgba(239, 233, 222, .22);
  box-shadow: inset 0 0 40px rgba(239, 233, 222, .04);
  transition: transform .9s var(--ease), background .6s, border-color .6s, opacity .5s;
}
.slab::before, .slab::after { content: ""; position: absolute; background: rgba(239, 233, 222, .07); border: 1px solid rgba(239, 233, 222, .12); }
.slab::after { left: -1px; top: 100%; width: calc(100% + 2px); height: 12px; transform-origin: top; transform: rotateX(-90deg); }
.slab::before { left: 100%; top: -1px; width: 12px; height: calc(100% + 2px); transform-origin: left; transform: rotateY(90deg); }
.slab.is-new { animation: drop 1.1s var(--spring) both; }
@keyframes drop { from { transform: translateZ(calc(var(--z) + 260px)); opacity: 0; } 40% { opacity: 1; } }
.slab.is-top {
  background: linear-gradient(135deg, rgba(255, 90, 44, .42), rgba(255, 90, 44, .08) 65%, rgba(255, 176, 143, .12));
  border-color: rgba(255, 140, 100, .7);
  box-shadow: 0 0 60px rgba(255, 90, 44, .25), inset 0 0 30px rgba(255, 176, 143, .15);
}
.slab.is-top::before, .slab.is-top::after { background: rgba(255, 90, 44, .25); border-color: rgba(255, 140, 100, .4); }
.slab--base {
  --i: -0.6;
  background: transparent;
  border: 1px dashed rgba(239, 233, 222, .18);
}
.slab--base::before, .slab--base::after { display: none; }
.base-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(239, 233, 222, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(239, 233, 222, .07) 1px, transparent 1px);
  background-size: 23px 23px;
  mask: radial-gradient(circle, #000 30%, transparent 75%);
}
.slab--ghost {
  background: transparent;
  border: 1px dashed rgba(255, 140, 100, .55);
  opacity: 0;
}
.slab--ghost::before, .slab--ghost::after { display: none; }
.slab--ghost.is-on { opacity: 1; }
.slab-label {
  position: absolute; left: 14px; right: 14px; bottom: 12px;
  display: grid; gap: 4px;
  transform: translateZ(1px);
}
.slab-label i { font-style: normal; font-family: var(--mono); font-size: 8px; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-3); }
.slab-label b { font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: -.01em; color: var(--bone); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slab.is-top .slab-label i { color: var(--ember-2); }
.slab-label { transition: opacity .4s; }
.slab:not(.is-top):not(.slab--ghost) .slab-label { opacity: 0; }
.stack-tilt:has(.slab--ghost.is-on) .slab.is-top .slab-label { opacity: 0; }
.stack-caption {
  position: absolute; left: 50%; top: calc(100% + 110px); transform: translateX(-50%);
  width: 260px; margin: 0;
  font-family: var(--mono); font-size: 10px; font-weight: 300; letter-spacing: .12em; text-transform: uppercase; color: var(--bone-3);
}
.stack-count { color: var(--ember); }
.stack-legend { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 7px; }
.stack-legend li { display: grid; grid-template-columns: 26px 72px 1fr; gap: 8px; letter-spacing: .06em; animation: fade .7s var(--ease) both; }
.stack-legend li span:last-child { color: var(--bone-2); text-transform: none; letter-spacing: 0; font-family: var(--sans); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stack-legend li:last-child span:first-child { color: var(--ember); }
@media (max-height: 860px) { .stack-legend { display: none; } }
body[data-view="done"] .stack { --gap: 4px !important; }
body[data-view="done"] .slab:not(.slab--base) { border-color: rgba(255, 140, 100, .6); background: linear-gradient(135deg, rgba(255, 90, 44, .3), rgba(255, 90, 44, .05)); }
body[data-view="done"] .slab-label { opacity: 0; }

/* ---------- Flow ---------- */
.view--flow { align-items: flex-start; padding-left: max(var(--gutter), 8vw); }
.progress { position: fixed; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.progress-bar { display: block; height: 100%; width: 0; background: linear-gradient(90deg, transparent, var(--ember)); box-shadow: 0 0 12px var(--ember); transition: width .9s var(--ease); }
.stage { width: 100%; max-width: 620px; }

.eyebrow {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 26px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 300; letter-spacing: .14em; text-transform: uppercase;
  color: var(--bone-3);
}
.eyebrow b { color: var(--ember); font-weight: 400; }
.eyebrow .rule { flex: 0 0 38px; height: 1px; background: var(--line-2); }
.question {
  margin: 0 0 42px;
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 72px);
  line-height: 1;
  letter-spacing: -0.03em;
}
.question em { font-style: italic; }
.question em .q-word {
  background: linear-gradient(100deg, var(--ember-2), var(--ember));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: .03em;
}
.q-mask { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .12em 0; margin-bottom: -.12em; }
.q-word { display: inline-block; animation: wordIn 1s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
@keyframes wordIn { from { transform: translateY(105%); opacity: 0; } }
.step.is-leaving { animation: stepOut .32s cubic-bezier(.6, 0, .9, .5) both; }
@keyframes stepOut { to { opacity: 0; transform: translateY(-18px); filter: blur(8px); } }
.step.is-leaving.is-back { animation-name: stepOutBack; }
@keyframes stepOutBack { to { opacity: 0; transform: translateY(18px); filter: blur(8px); } }

.options { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.options li { animation: rowIn .9s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 220ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(16px); } }
.option {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  padding: 19px 4px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  overflow: hidden;
  color: var(--bone-2);
  transition: color .35s;
}
.option::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 90, 44, .14), transparent);
  transform: translateX(-100%);
  transition: transform .9s var(--ease);
}
.option .key { font-family: var(--mono); font-size: 10px; font-weight: 300; color: var(--bone-3); transition: color .3s; }
.option .label { font-family: var(--sans); font-size: clamp(18px, 2vw, 23px); font-weight: 400; letter-spacing: -.01em; transition: transform .6s var(--ease); }
.option .arrow {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--line-2); border-radius: 50%;
  font-size: 13px; color: var(--bone);
  opacity: 0; transform: scale(.6) rotate(-45deg);
  transition: opacity .35s, transform .6s var(--spring), background .3s, border-color .3s;
}
.option:hover, .option:focus-visible { color: var(--bone); outline: none; }
.option:hover::before, .option:focus-visible::before { transform: translateX(100%); }
.option:hover .label, .option:focus-visible .label { transform: translateX(12px); }
.option:hover .key, .option:focus-visible .key { color: var(--ember); }
.option:hover .arrow, .option:focus-visible .arrow { opacity: 1; transform: none; }
.option.is-picked { color: var(--bone); }
.option.is-picked .key { color: var(--ember); }
.option.is-picked .label { transform: translateX(12px); }
.option.is-picked .arrow { opacity: 1; transform: none; background: var(--ember); border-color: var(--ember); color: var(--void); }
.option.is-picked::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--ember); transform-origin: left; animation: line .5s var(--ease) both; }
@keyframes line { from { transform: scaleX(0); } }

.text-step { display: grid; gap: 26px; animation: rowIn .9s var(--ease) .25s both; }
.line-wrap { position: relative; display: block; }
.line-wrap::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--ember); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease);
}
.line-wrap:focus-within::after { transform: scaleX(1); }
.line-input {
  width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  padding: 10px 0 14px;
  font-family: var(--sans); font-weight: 400; font-size: clamp(22px, 3vw, 32px); letter-spacing: -.015em;
  color: var(--bone); caret-color: var(--ember);
  resize: none;
}
.line-input::placeholder { color: var(--bone-3); opacity: .55; }
.line-input:focus { outline: none; }
.text-label { display: block; margin-bottom: 2px; font-family: var(--mono); font-size: 10px; font-weight: 300; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-3); }
.step-actions { display: flex; align-items: center; gap: 22px; margin-top: 10px; flex-wrap: wrap; }
.step-error { margin: 0; font-family: var(--mono); font-size: 11px; color: var(--ember); }

/* Pill button with a rising fill */
.pill {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; gap: 14px;
  padding: 15px 18px 15px 24px;
  border-radius: 99px;
  background: var(--bone); color: var(--void);
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: -.005em;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  transition: transform .5s var(--ease), color .4s;
}
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ember);
  border-radius: 50% 50% 0 0;
  transform: translateY(101%);
  transition: transform .6s var(--ease), border-radius .6s var(--ease);
}
.pill:hover::before, .pill:focus-visible::before { transform: none; border-radius: 0; }
.pill i { font-style: normal; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--void); color: var(--bone); font-size: 12px; transition: transform .5s var(--spring); }
.pill:hover i { transform: rotate(-45deg); }
.pill kbd { border-color: rgba(6, 7, 8, .25); color: rgba(6, 7, 8, .6); }
.pill[disabled] { opacity: .5; pointer-events: none; }

.ghost {
  font-family: var(--mono); font-size: 10.5px; font-weight: 300; letter-spacing: .12em; text-transform: uppercase;
  color: var(--bone-3); padding: 8px 0;
  transition: color .3s;
}
.ghost:hover, .ghost:focus-visible { color: var(--bone); }
.ghost[hidden] { display: inline-block; visibility: hidden; }
.ghost--skip { display: inline-flex; align-items: center; gap: 10px; }

.flow-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; justify-content: space-between; gap: 16px;
  padding: var(--gutter) var(--gutter) max(var(--gutter), env(safe-area-inset-bottom));
  padding-left: max(var(--gutter), 8vw);
}

/* ---------- Form ---------- */
.view--form { align-items: flex-start; padding-left: max(var(--gutter), 8vw); }
.contact {
  width: 100%; max-width: 640px;
  padding: clamp(24px, 3.5vw, 44px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(239, 233, 222, .06), rgba(239, 233, 222, .015));
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(239, 233, 222, .08);
}
.view--form.is-active .contact { animation: panelIn 1.1s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(30px) scale(.98); filter: blur(10px); } }
.form-title { margin: 0 0 12px; font-family: var(--serif); font-weight: 400; font-size: clamp(32px, 4vw, 52px); line-height: 1; letter-spacing: -.03em; }
.form-title em { font-style: italic; background: linear-gradient(100deg, var(--ember-2), var(--ember)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.form-sub { margin: 0 0 32px; color: var(--bone-2); font-size: 15px; line-height: 1.55; max-width: 48ch; }
.form-sub:empty { display: none; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; }
.field { position: relative; display: grid; gap: 2px; padding: 10px 0 0; }
.field--wide { grid-column: 1 / -1; }
.field > span { font-family: var(--mono); font-size: 9.5px; font-weight: 300; letter-spacing: .14em; text-transform: uppercase; color: var(--bone-3); transition: color .3s; }
.field input, .field select, .field textarea {
  width: 100%;
  font: 400 17px/1.4 var(--sans);
  color: var(--bone);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0;
  padding: 8px 0 10px;
  caret-color: var(--ember);
  appearance: none;
  transition: border-color .3s;
}
.field select {
  padding-right: 26px;
  background-image: linear-gradient(45deg, transparent 50%, var(--bone-3) 50%), linear-gradient(135deg, var(--bone-3) 50%, transparent 50%);
  background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.field select option, .field select optgroup { background: #121416; color: var(--bone); }
.field textarea { resize: vertical; min-height: 64px; }
.field input::placeholder, .field textarea::placeholder { color: var(--bone-3); opacity: .6; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--ember); }
.field:focus-within > span { color: var(--ember); }
.field.is-filled > span::after { content: " ✓"; color: var(--ember); }
.field.is-typing input, .field.is-typing textarea, .field.is-typing select { border-bottom-color: var(--ember); }
.field.is-typing::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--ember-2), transparent);
  animation: scan .8s linear infinite;
}
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.field.is-invalid input { border-bottom-color: var(--ember); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { min-height: 1em; margin: 18px 0 0; font-family: var(--mono); font-size: 11px; color: var(--ember); }
.form-error a { color: inherit; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 18px; }

/* ---------- Done ---------- */
.view--done { align-items: flex-start; padding-left: max(var(--gutter), 8vw); }
.view--done.is-active > * { animation: fade 1.1s var(--ease) both; }
.view--done.is-active > :nth-child(2) { animation-delay: .1s; }
.view--done.is-active > :nth-child(3) { animation-delay: .2s; }
.view--done.is-active > :nth-child(4) { animation-delay: .3s; }
.done-title { margin: 0 0 18px; font-family: var(--serif); font-weight: 400; font-size: clamp(48px, 8vw, 120px); line-height: .95; letter-spacing: -.035em; max-width: 9ch; }
.done-title em { font-style: italic; background: linear-gradient(100deg, var(--ember-2), var(--ember)); -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: .06em; }
.done-sub { margin: 0 0 40px; color: var(--bone-2); font-size: 16px; line-height: 1.55; max-width: 44ch; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .stack { right: 4vw; width: 180px; height: 180px; --gap: 26px; }
  .slab-label b { font-size: 12px; }
}
@media (max-width: 860px) {
  .stack { right: 50%; top: 82px; margin: 0 -60px 0 0; width: 120px; height: 120px; --gap: 12px !important; }
  body[data-view="form"] .stack, body[data-view="done"] .stack { right: 50%; }
  .slab-label, .stack-caption { display: none; }
  .slab::before, .slab::after { width: 6px; height: 6px; }
  .slab::after { width: calc(100% + 2px); }
  .slab::before { height: calc(100% + 2px); }
  .view--flow, .view--done { justify-content: flex-start; padding-top: max(300px, 34vh); padding-left: var(--gutter); }
  .view--form { padding-top: 96px; padding-left: var(--gutter); }
  body[data-view="form"] .stack { opacity: 0; }
  .flow-nav { padding-left: var(--gutter); background: linear-gradient(to top, var(--void) 50%, transparent); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  .ask { font-size: 16.5vw; }
  .option { grid-template-columns: 28px 1fr auto; padding: 16px 2px; }
  .ghost--skip kbd, .hint kbd, .pill kbd { display: none; }
  .contact { padding: 22px 18px; border-radius: 18px; }
  .foot-time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

textarea.line-input { line-height: 1.3; min-height: calc(1.3em + 26px); overflow: hidden; }
