/* Hands Off Network · handsoff.network
   Tokens: :root is direction A dark. Light remaps sit under [data-theme="light"].
   Colours are fixed by the build brief §2. */

/* ---------- tokens ---------- */
:root {
  /* A dark (default) */
  --bg: #0C0D0F;
  --surface: #15171A;
  --ink: #EDEBE6;
  --muted: #A29E96;
  --line: #2A2D33;
  --accent: #FFC845;      /* A: route yellow, fills and strokes only */
  --on-accent: #0C0D0F;
  --focus: #FFC845;
  --field: #A29E96;       /* input boundary, 3:1 or better against --bg */
  --limit: var(--accent);
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --display-stretch: 112%;
  --display-weight: 720;
  --radius: 4px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #F5F3EE;
  --surface: #FFFFFF;
  --ink: #131416;
  --muted: #57534C;
  --line: #D9D4CA;
  --accent: #F0B21A;
  --on-accent: #131416;
  --focus: #131416;
  --field: #57534C;
  color-scheme: light;
}

/* Without JavaScript there is no data-theme: follow the system. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #F5F3EE; --surface: #FFFFFF; --ink: #131416; --muted: #57534C; --line: #D9D4CA;
    --accent: #F0B21A; --on-accent: #131416; --focus: #131416; --field: #57534C; color-scheme: light;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 700px) { body { font-size: 17px; } }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
strong { font-weight: 650; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 700px) { .wrap { padding-inline: 32px; } }
@media (min-width: 1100px) { .wrap { padding-inline: 48px; } }
.wrap.narrow { max-width: 824px; }

h1, h2, h3 { font-family: var(--sans); line-height: 1.08; overflow-wrap: break-word; }
h2 { font-size: clamp(28px, 4.6vw, 44px); font-weight: 700; font-stretch: 108%; letter-spacing: -0.015em; margin-bottom: 20px; }
h3 { font-size: 20px; font-weight: 680; margin-bottom: 12px; }
p + p { margin-top: 14px; }

.label, .eyebrow, .chip, .opt, .demo-banner {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.label, .eyebrow { color: var(--muted); display: block; margin-bottom: 14px; }

.skip { position: absolute; left: 8px; top: -100px; z-index: 20; background: var(--ink); color: var(--bg); padding: 10px 14px; }
.skip:focus { top: 8px; }

.demo-banner { margin: 0; padding: 10px 16px; text-align: center; background: var(--ink); color: var(--bg); }

/* ---------- nav ---------- */
.nav { border-bottom: 1px solid var(--line); }
/* One row from 320 px up. The chip sits in the free space and, when it doesn't fit there,
   wraps onto a second line that the fixed height clips, whatever the font's width. */
.nav-in { display: flex; align-items: center; min-height: 64px; padding-block: 8px; }
.wordmark { flex: none; font-weight: 760; font-stretch: 115%; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.nav-space { flex: 1 1 0; min-width: 0; height: 44px; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; margin-left: 12px; }
.nav-space::before { content: ""; width: 0; height: 44px; }
.nav-space .chip { margin-right: 12px; }
.nav-apply { flex: none; font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding-inline: 4px; white-space: nowrap; }
.nav-apply:hover { text-decoration: underline; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); white-space: nowrap; line-height: 1.3; }

.theme-switch { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; background: transparent; padding: 0; cursor: pointer; border-radius: 50%; flex: none; margin-left: 12px; }
/* Narrow phones: wordmark, link and switch alone need about 330 px at full size, so they
   tighten; the switch keeps its 44 px target, its disc aligned to the gutter. */
@media (max-width: 400px) {
  .wordmark { font-size: 15px; font-stretch: 100%; }
  .nav-space { margin-left: 8px; }
  .nav-apply { font-size: 15px; padding-inline: 0; }
  .theme-switch { margin-left: 4px; margin-right: -11px; }
}
.theme-switch .disc { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink); background: linear-gradient(90deg, var(--ink) 0 50%, var(--bg) 50% 100%); transition: transform .25s ease; }
:root[data-theme="light"] .theme-switch .disc { transform: rotate(180deg); }

/* ---------- buttons ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 12px 22px; border-radius: var(--radius); border: 1.5px solid var(--ink);
  font: 600 16px/1.2 var(--sans); text-decoration: none; cursor: pointer; text-align: center;
  background: transparent; color: var(--ink); transition: background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-quiet:hover { background: var(--surface); }
.btn[disabled] { cursor: not-allowed; background: transparent; color: var(--muted); border-color: var(--line); filter: none; }

/* ---------- sections ---------- */
.section { padding-block: 56px; border-top: 1px solid var(--line); }
@media (min-width: 900px) { .section { padding-block: 96px; } }
.hero { padding-block: 48px 56px; }
@media (min-width: 900px) { .hero { padding-block: 96px 104px; } }

.display {
  font-weight: var(--display-weight);
  font-stretch: var(--display-stretch);
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.lead { font-size: 19px; line-height: 1.45; margin-top: 24px; max-width: 34em; }
@media (min-width: 700px) { .lead { font-size: 22px; } }
.lead + p { max-width: 34em; }

/* ---------- A ---------- */
.hero-a .display { font-size: clamp(44px, 10vw, 112px); }
.hero-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: end; gap: 56px; } }
.readout-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.where { margin-bottom: 16px; }
.where .label { margin: 12px 0 0; }
.cc {
  position: relative; aspect-ratio: 16 / 10; border-radius: 2px; overflow: hidden;
  background-image: radial-gradient(circle, var(--line) 1.3px, transparent 1.6px);
  background-size: 12px 12px; background-position: center;
  display: grid; place-items: center;
}
.cc-code {
  font-family: var(--sans); font-weight: 760; font-stretch: 125%; font-size: clamp(64px, 16vw, 128px);
  line-height: 1; letter-spacing: 0.02em; background: var(--surface); padding: 0 12px;
  opacity: 0; transition: opacity .2s ease;
}
.cc-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.cc.on .cc-code { opacity: 1; }
.cc.on .cc-bar { transform: scaleX(1); }
.map svg circle { fill: var(--line); transition: fill .2s ease; }
.map svg .on { fill: var(--accent); }
.readout { font-size: 15px; line-height: 1.5; }
.readout, .readout * { overflow-wrap: anywhere; }

.principle h2 { max-width: 18em; }
.principle p:not(.label) { max-width: 36em; }
.principle p.label + h2 { margin-top: 0; }

.split-grid { display: grid; gap: 56px; }
@media (min-width: 900px) { .split-grid { grid-template-columns: 1fr 1fr; gap: 72px; } }
.group-h, .limits-h { font-size: clamp(24px, 3.4vw, 34px); }

/* status */
.status { margin-top: 8px; }
.status-h { font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.status-row { display: grid; gap: 10px; padding-block: 18px; border-bottom: 1px solid var(--line); align-items: start; }
@media (min-width: 760px) { .status-row { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; } }
.status-row p { max-width: 40em; }
.status-row .chip { justify-self: start; }
.status-note { color: var(--muted); font-size: 15px; margin-top: 16px; max-width: 40em; }
.status-note + .status-note { margin-top: 6px; }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; flex: none; border: 1.5px solid var(--accent); }
.chip-worked::before { background: var(--accent); }
.chip-qualifying::before { background: linear-gradient(90deg, var(--accent) 0 50%, transparent 50%); }
.chip-testing::before { background: transparent; }
.chip-planned::before { border-style: dashed; border-color: var(--muted); }
.chip-dev::before { border-color: var(--muted); border-style: dashed; }

/* limits and group */
.limits-list li { position: relative; padding: 14px 0 14px 22px; border-top: 1px solid var(--line); }
.limits-list li:last-child { border-bottom: 1px solid var(--line); }
.limits-list li::before { content: ""; position: absolute; left: 0; top: 23px; width: 10px; height: 2px; background: var(--limit); }
.group p { max-width: 34em; }

/* ---------- form ---------- */
.apply h2 { margin-bottom: 28px; }
.apply-form { display: block; }
:root:not([data-js]) .form-body { display: none; }
.field { border: 0; padding: 0; margin: 0 0 26px; min-width: 0; }
.field > label:not(.consent), .field legend { display: block; font-weight: 650; font-size: 17px; margin-bottom: 6px; padding: 0; }
.help { color: var(--muted); font-size: 15px; margin-bottom: 10px; max-width: 36em; }
.opt { color: var(--muted); font-weight: 400; margin-left: 6px; white-space: nowrap; }
input[type="email"], input[type="text"], textarea {
  width: 100%; font: 400 17px/1.45 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--field); border-radius: var(--radius); padding: 12px 14px; min-height: 48px;
}
.field > label + input, .field > label + textarea { margin-top: 4px; }
textarea { resize: vertical; min-height: 120px; }
input:focus-visible, textarea:focus-visible { outline-offset: 2px; }
.choices { display: grid; gap: 2px; margin-top: 6px; }
@media (min-width: 700px) { .choices { grid-template-columns: 1fr 1fr; column-gap: 20px; } }
.choice, .consent { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding-block: 10px; cursor: pointer; }
.choice input, .consent input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.consent span { max-width: 36em; }
.field-consent { padding-top: 6px; }
.err { margin-top: 8px; padding-left: 12px; border-left: 3px solid var(--limit); font-weight: 650; font-size: 15px; }
[aria-invalid="true"] { border-width: 2px; border-color: var(--limit); }
.turnstile { min-height: 70px; margin-bottom: 18px; }
.turnstile:empty { display: none; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.submit-row { margin-top: 8px; }
.submit-row .btn { min-width: 220px; }
@media (max-width: 480px) { .submit-row .btn { width: 100%; } }
.form-status:empty { display: none; }
.form-status { margin-top: 16px; padding-left: 12px; border-left: 3px solid var(--limit); font-weight: 650; }
.closed-note { margin-bottom: 26px; padding-left: 12px; border-left: 3px solid var(--line); font-weight: 600; max-width: 36em; }
.form-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-fields:disabled input, .form-fields:disabled textarea, .form-fields:disabled .choice, .form-fields:disabled .consent { cursor: not-allowed; }
.small { color: var(--muted); font-size: 14px; margin-top: 16px; max-width: 40em; }
.small + .small { margin-top: 8px; }
.noscript { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.pending { padding: 24px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.pending:focus { outline: none; }
.pending:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.pending-h { font-size: clamp(26px, 4vw, 36px); font-stretch: 108%; margin-bottom: 14px; }
.pending-p1, .echo { overflow-wrap: anywhere; }

/* ---------- FAQ ---------- */
.faq-list { border-top: 1px solid var(--line); max-width: 52em; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px; padding-block: 12px; font-weight: 650; font-size: 18px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--mono); font-size: 20px; color: var(--muted); flex: none; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; max-width: 40em; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding-block: 32px 48px; color: var(--muted); font-size: 14px; }
.foot p + p { margin-top: 8px; }

/* ---------- server-rendered pages ---------- */
.page { padding-block: 48px 72px; }
@media (min-width: 900px) { .page { padding-block: 88px 112px; } }
.page-h { font-size: clamp(34px, 6vw, 60px); font-weight: var(--display-weight); font-stretch: var(--display-stretch); letter-spacing: -0.02em; margin-bottom: 20px; }
.page form { margin-top: 24px; }
.page form + p, .page p + form { margin-top: 24px; }
.page .field { margin-top: 32px; }
.record { margin-top: 28px; border-top: 1px solid var(--line); }
.record div { display: grid; gap: 4px; padding-block: 14px; border-bottom: 1px solid var(--line); }
@media (min-width: 700px) { .record div { grid-template-columns: 14em minmax(0, 1fr); gap: 24px; } }
.record dt { color: var(--muted); font-size: 15px; }
.record dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.notice { counter-reset: n; margin-top: 32px; }
.notice li { counter-increment: n; padding-block: 22px; border-top: 1px solid var(--line); }
.notice h2 { font-size: 20px; font-stretch: 100%; letter-spacing: 0; margin-bottom: 8px; }
.notice h2::before { content: counter(n) ". "; font-family: var(--mono); font-size: 15px; color: var(--muted); }
.notice a, .page a { overflow-wrap: anywhere; }
.thanks { padding: 16px; border-left: 4px solid var(--accent); background: var(--surface); }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation-duration: 0s !important; animation-delay: 0s !important; }
}
