/* SpeedXMedia Forms — client-facing. Brand: black / white / cream, F37 Stout Black Compressed display, Nord labels, DM Sans body. */

@font-face { font-family: "F37 Stout"; src: url("/assets/fonts/F37Stout-BlackCompressed.woff2") format("woff2"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Nord"; src: url("/assets/fonts/NordRegular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nord"; src: url("/assets/fonts/NordMedium.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --black: #000;
  --ink: #0b0b0b;
  --panel: #0f0f0f;
  --line: #262626;
  --cream: #f3f1ec;
  --cream-2: #e9e6de;
  --white: #fff;
  --muted: #9a9a9a;
  --dim: #5d5d5d;
  --error: #ff5a4f;
  --ok: #4ade80;
  --display: "F37 Stout", Anton, Impact, "Arial Narrow", sans-serif;
  --label: "Nord", "DM Sans", sans-serif;
  --body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 6px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--white);
  font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Type */
.display {
  font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .9;
  letter-spacing: .005em; margin: 0 0 20px; font-size: clamp(56px, 10vw, 128px); color: var(--white);
}
.display--sm { font-size: clamp(40px, 6vw, 76px); }
.eyebrow {
  font-family: var(--label); font-weight: 500; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px;
}
.mono { font-family: var(--mono); letter-spacing: .08em; }
.lede { font-size: 18px; line-height: 1.6; max-width: 56ch; margin: 0 0 16px; color: #e8e8e8; }
.lede--muted { color: var(--muted); font-size: 16px; }
.footnote { font-family: var(--label); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }

/* ---------- Pills */
.pill {
  display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; padding: 15px 26px;
  font-family: var(--label); font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; border: 1px solid var(--white); color: var(--white); background: transparent;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease), opacity .2s;
}
.pill:hover { background: var(--white); color: var(--black); }
.pill:active { transform: translateY(1px); }
.pill--solid { background: var(--cream); color: var(--black); border-color: var(--cream); }
.pill--solid:hover { background: var(--white); }
.pill--ghost { border-color: var(--line); color: var(--muted); }
.pill--ghost:hover { border-color: var(--white); color: var(--black); }
.pill[disabled] { opacity: .5; cursor: not-allowed; }
.pill .arrow { transition: transform .2s var(--ease); }
.pill:hover .arrow { transform: translateX(3px); }

/* ---------- Hero pages (home / done / closed / error) */
.hero { min-height: 100dvh; display: flex; flex-direction: column; padding: 28px clamp(20px, 5vw, 72px) 32px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand img { height: 22px; width: auto; }
.hero__body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 60px 0; max-width: 980px; }
.hero--small .display { font-size: clamp(52px, 8vw, 110px); }

/* ---------- Form sheet layout */
.sheet { display: grid; grid-template-columns: 300px 1fr; min-height: 100dvh; }
.rail {
  position: sticky; top: 0; height: 100dvh; padding: 28px 28px 24px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 28px; background: var(--black);
}
.rail__meta .eyebrow { margin-bottom: 8px; color: var(--white); }
.rail__client { margin: 0; color: var(--muted); font-size: 14px; }
.rail__client strong { color: var(--cream); font-weight: 500; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow: auto; }
.steps__item {
  display: flex; gap: 14px; align-items: baseline; padding: 10px 12px; border-radius: var(--radius);
  font-size: 14px; color: var(--dim); cursor: pointer; transition: color .2s, background .2s;
}
.steps__item:hover { color: var(--muted); }
.steps__item.is-active { color: var(--white); background: var(--panel); }
.steps__item.is-done { color: var(--muted); }
.steps__item.is-done .steps__num::after { content: " ✓"; color: var(--ok); }
.steps__item.has-error .steps__num { color: var(--error); }
.steps__num { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; min-width: 30px; }
.rail__foot { display: flex; flex-direction: column; gap: 10px; }
.progress { height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--cream); transition: width .4s var(--ease); }
.savestate { margin: 0; font-family: var(--label); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.savestate.is-saving { color: var(--muted); }
.savestate.is-saved { color: var(--ok); }
.savestate.is-error { color: var(--error); }

.stage { padding: clamp(32px, 6vw, 80px) clamp(20px, 6vw, 96px) 80px; }
.panel { max-width: 860px; animation: rise .45s var(--ease) both; }
.panel[hidden] { display: none; }
.panel--cover .display { font-size: clamp(60px, 9vw, 140px); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.panel__nav { display: flex; gap: 12px; align-items: center; margin-top: 40px; flex-wrap: wrap; }

/* ---------- Fields */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px; margin-top: 34px; }
.field, .note { grid-column: 1 / -1; }
.field.is-half, .note.is-half { grid-column: span 1; }
.field[hidden], .note[hidden] { display: none; }
.field__label { display: block; font-weight: 500; font-size: 17px; line-height: 1.35; color: var(--white); margin-bottom: 8px; }
.req { color: var(--cream); opacity: .7; }
.field__help { margin: -2px 0 10px; font-size: 14px; color: var(--muted); }
.field__error { margin: 8px 0 0; font-size: 13px; color: var(--error); min-height: 0; }
.field__error:empty { display: none; }
.note {
  border-left: 2px solid var(--cream); padding: 6px 0 6px 16px; color: var(--muted); font-size: 14px; line-height: 1.6;
}
.note strong { color: var(--cream); font-weight: 500; }

.input {
  width: 100%; background: var(--cream); color: #111; border: 1px solid var(--cream); border-radius: var(--radius);
  padding: 15px 16px; font: 400 16px/1.4 var(--body); outline: none; appearance: none;
  transition: box-shadow .2s, border-color .2s, background .2s;
}
.input::placeholder { color: #8c8a84; }
.input:focus { border-color: var(--white); box-shadow: 0 0 0 3px rgba(255,255,255,.18); background: var(--white); }
.input--area { min-height: 130px; resize: vertical; }
.input--date { max-width: 320px; color-scheme: light; }
.input--other { margin-top: 10px; display: none; }
.input--other.is-on { display: block; }
.has-error .input { border-color: var(--error); }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; border-right: 2px solid #111; border-bottom: 2px solid #111; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select .input { padding-right: 44px; }

.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.choices--row { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 13px 16px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line); color: #ddd; font-size: 15px; line-height: 1.3;
  transition: border-color .2s, background .2s, color .2s;
}
.choice span::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--dim); flex: none; transition: all .2s;
}
.choice--check span::before { border-radius: 4px; }
.choice:hover span { border-color: var(--muted); color: var(--white); }
.choice input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
.choice input:checked + span { background: var(--cream); border-color: var(--cream); color: #111; }
.choice input:checked + span::before { border-color: #111; background: #111; box-shadow: inset 0 0 0 3px var(--cream); }
.choice--check input:checked + span::before { box-shadow: none; background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23f3f1ec' stroke-width='2.2' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E") center/14px no-repeat; }
.has-error .choice span { border-color: rgba(255,90,79,.5); }

.drop {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: center; padding: 22px 22px;
  border: 1px dashed var(--dim); border-radius: var(--radius); background: var(--panel); cursor: pointer; transition: border-color .2s, background .2s;
}
.drop:hover, .drop.is-over { border-color: var(--cream); background: #141414; }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop__icon { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: 18px; color: var(--cream); }
.drop__text { color: var(--muted); font-size: 14px; line-height: 1.45; }
.drop__text strong { color: var(--white); font-weight: 500; }
.drop__list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.drop__list:empty { display: none; }
.drop__list span { font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: #111; background: var(--cream); border-radius: 999px; padding: 6px 12px; }

.global-error { color: var(--error); font-size: 14px; margin-top: 18px; }
.global-error[hidden] { display: none; }

/* ---------- Responsive */
@media (max-width: 900px) {
  .sheet { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 20px 20px 16px; gap: 16px; }
  .steps { flex: none; flex-direction: row; align-items: center; overflow-x: auto; gap: 6px; padding-bottom: 2px; scrollbar-width: none; }
  .steps::-webkit-scrollbar { display: none; }
  .steps__item { flex: none; padding: 8px 12px; font-size: 12px; border: 1px solid var(--line); border-radius: 999px; align-items: center; gap: 8px; }
  .steps__num { min-width: 0; }
  .steps__title { display: none; }
  .steps__item.is-active .steps__title { display: inline; }
  .stage { padding: 32px 20px 60px; }
  .fields { grid-template-columns: 1fr; gap: 22px; }
  .field.is-half, .note.is-half { grid-column: 1 / -1; }
  .panel--cover .display, .display { font-size: clamp(48px, 15vw, 96px); }
  .display--sm { font-size: clamp(38px, 11vw, 60px); }
  .panel__nav { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--black) 30%); padding: 20px 0 12px; margin-top: 28px; }
  .pill { padding: 14px 20px; }
}
@media (prefers-reduced-motion: reduce) { .panel { animation: none; } * { transition: none !important; } }
