/* scaff3d landing. Colours and type follow the app (apps/web/src/styles.css, tokens.css): dark first, amber accent, Inter + IBM Plex Mono. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;
  --base: #171b1f;
  --panel: #20252a;
  --raised: #292f35;
  --field: #191e23;
  --line: #343b42;
  --line-strong: #4a535b;
  --ink: #edf0f2;
  --muted: #9da8b2;
  --accent: #f5ad32;
  --accent-fill: #f5ad32;
  --accent-fill-hover: #ffc15b;
  --accent-ink: #2b210f;
  --accent-soft: rgba(245, 173, 50, 0.11);
  --accent-line: rgba(245, 173, 50, 0.45);
  --ok: #91b9a2;
  --danger: #f08a78;
  --danger-soft: rgba(240, 138, 120, 0.12);
  --grid: rgba(118, 129, 139, 0.1);
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --font-ui: 'Inter', Arial, system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', Consolas, ui-monospace, monospace;
  --r-ctl: 6px;
  --r-float: 8px;
  --r-dialog: 12px;
  --gutter: 24px;
  --tap: 44px;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --base: #e4e8eb;
    --panel: #f8f9fa;
    --raised: #e8edf0;
    --field: #ffffff;
    --line: #d1d8df;
    --line-strong: #b4bec7;
    --ink: #22303b;
    --muted: #566775;
    --accent: #965700;
    --accent-ink: #30220d;
    --accent-soft: rgba(245, 173, 50, 0.14);
    --accent-line: rgba(150, 87, 0, 0.45);
    --ok: #356b55;
    --danger: #b4321f;
    --danger-soft: rgba(180, 50, 31, 0.08);
    --grid: rgba(70, 84, 96, 0.1);
    --shadow: 0 24px 60px -28px rgba(34, 48, 59, 0.45);
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--base); color: var(--ink); font: 400 16px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, p, ol, ul, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: 8px; z-index: 30; padding: 10px 14px; border-radius: var(--r-ctl); background: var(--accent-fill); color: var(--accent-ink); font-weight: 600; text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ── type ── */
.eyebrow { font: 500 12px/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
h1 { font-size: clamp(34px, 4.6vw, 58px); line-height: 1.06; font-weight: 600; letter-spacing: -0.03em; }
h1 span { display: block; }
h1 .hl { color: var(--accent); }
h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.lead { font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--muted); max-width: 56ch; }
.sec-p { color: var(--muted); font-size: 17px; max-width: 52ch; }
.fine { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 16px; border: 1px solid transparent; border-radius: var(--r-ctl); font: 600 15px/1.2 var(--font-ui); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color 0.12s, border-color 0.12s, color 0.12s; }
.btn-lg { min-height: 52px; padding: 0 22px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent-fill); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-outline { border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.btn-quiet { color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { border-color: var(--line-strong); background: var(--raised); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn .short { display: none; }

/* ── header ── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--base) 88%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.top-nav { display: flex; align-items: center; gap: 8px; min-width: 0; }
.logo { display: inline-flex; align-items: center; min-height: var(--tap); font: 600 22px/1 var(--font-ui); letter-spacing: -0.03em; color: var(--ink); text-decoration: none; }
.logo b { font-weight: 600; color: var(--accent); }
.logo-sm { font-size: 18px; min-height: 0; }
.lang { display: inline-flex; padding: 2px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--field); }
.lang-btn { min-width: 40px; min-height: 40px; padding: 0 8px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font: 500 13px/1 var(--font-mono); letter-spacing: 0.04em; cursor: pointer; }
.lang-btn[aria-pressed='true'] { background: var(--raised); color: var(--accent); }

/* ── hero ── */
.hero { position: relative; padding: 56px 0 72px; background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px); background-size: 48px 48px; background-position: center top; border-bottom: 1px solid var(--line); }
.hero::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 20% 0%, transparent 30%, var(--base) 100%); pointer-events: none; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
.hero-copy { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
@media (min-width: 1000px) {
  .hero { padding: 72px 0 88px; }
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }
}

.shot { min-width: 0; }
.shot img { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--r-dialog); background: #171b1f; box-shadow: var(--shadow); }
.shot figcaption { margin-top: 12px; font: 400 13px/1.4 var(--font-mono); color: var(--muted); }

/* ── bands ── */
.band { padding: 72px 0; border-bottom: 1px solid var(--line); }
.sec-head { display: grid; gap: 10px; margin-bottom: 32px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-dialog); background: var(--panel); overflow: hidden; }
.card { display: grid; gap: 12px; align-content: start; padding: 28px; border-left: 1px solid var(--line); min-width: 0; }
.card:first-child { border-left: 0; }
.card > p { color: var(--muted); }
.step { display: flex; align-items: baseline; gap: 10px; font: 500 12px/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.card > .step { color: var(--ink); }
.step span:first-child { color: var(--accent); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chips span { padding: 3px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--field); font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
@media (max-width: 860px) {
  .three { grid-template-columns: minmax(0, 1fr); }
  .card { border-left: 0; border-top: 1px solid var(--line); }
  .card:first-child { border-top: 0; }
}

.gallery { display: grid; grid-template-columns: minmax(0, 3.6fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 700px) {
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .shot-phone { max-width: 260px; justify-self: center; }
}

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; }
.split > div { display: grid; gap: 12px; align-content: start; min-width: 0; }
.devices { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.devices li { display: grid; justify-items: center; gap: 8px; min-width: 104px; padding: 16px 14px 12px; border: 1px solid var(--line); border-radius: var(--r-float); background: var(--panel); color: var(--muted); font: 500 13px/1.3 var(--font-ui); }
.devices svg { color: var(--accent); }
.systems { display: grid; gap: 12px; margin-top: 12px; }
.systems li { display: flex; align-items: center; gap: 18px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--r-float); background: var(--panel); }
.systems svg { flex: none; color: var(--accent); }
.systems h3 { font-size: 18px; }
.systems p { color: var(--muted); font-size: 15px; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); gap: 56px; } }

/* ── demo form ── */
.demo { background: var(--panel); }
.demo-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.demo-copy { display: grid; gap: 14px; }
.form-card { border: 1px solid var(--line); border-radius: var(--r-dialog); background: var(--base); padding: 28px; min-width: 0; }
form { display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
label { font-size: 14px; font-weight: 500; }
.req { color: var(--accent); }
.opt { color: var(--muted); font-weight: 400; }
.req-note { margin-bottom: -6px; }
input, select, textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--field); color: var(--ink); font: 400 16px/1.4 var(--font-ui); }
textarea { min-height: 112px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 14px) 21px; background-size: 6px 6px; background-repeat: no-repeat; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
[aria-invalid='true'] { border-color: var(--danger); }
.err { color: var(--danger); font-size: 14px; line-height: 1.35; }
.alert { padding: 12px 14px; border: 1px solid var(--danger); border-radius: var(--r-ctl); background: var(--danger-soft); color: var(--danger); font-size: 15px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done { display: grid; gap: 12px; justify-items: start; padding: 20px 0; }
.done svg { color: var(--ok); }
.done p { color: var(--muted); }
.done:focus { outline: none; }
@media (max-width: 860px) { .demo-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 560px) { .row2 { grid-template-columns: minmax(0, 1fr); } .form-card { padding: 20px 16px; } }

/* ── footer ── */
.foot { padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); }
.foot-row { display: flex; flex-wrap: wrap; gap: 16px 48px; align-items: flex-start; justify-content: space-between; }
.foot-text { display: grid; gap: 6px; max-width: 62ch; color: var(--muted); font-size: 14px; }

/* ── phone ── */
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .hero { padding: 36px 0 48px; }
  .band { padding: 52px 0; }
  .top-row { gap: 8px; }
  .top-nav .btn { padding: 0 12px; }
  .top-nav .btn .long { display: none; }
  .top-nav .btn .short { display: inline; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 100%; }
  .card { padding: 22px 18px; }
}
