/* ============================================================
   MERLIN VA -- checkout / claim page
   Same console world as the landing page, deliberately calmer:
   no ambient animation, no scanlines, nothing moving. A page
   where somebody is about to pay should feel still.
   ============================================================ */
:root {
  color-scheme: dark;
  --ground: #08090b;
  --ground-deep: #050506;
  --panel: #101116;
  --raised: #171921;
  --field: #0a0b0f;
  --engrave: #24262f;
  --engrave-hi: #3a3d4a;
  --ink: #eceef2;
  --ink-muted: #a3a7b5;
  --ink-faint: #6b6f7e;
  --phosphor: #f97316;
  --phosphor-hot: #ffb066;
  --phosphor-wash: rgba(249,115,22,0.10);
  --iris: #8b5cf6;
  --signal-ok: #4ade80;
  --signal-info: #38bdf8;
  --signal-warn: #fbbf24;
  --danger: #f87171;
  --rule: 1px solid var(--engrave);
  --f-display: "Chakra Petch", "Bahnschrift", "DIN Alternate", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --shell: 1040px;
  --pad: clamp(18px, 4vw, 36px);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
p { margin: 0; }
a { color: var(--phosphor-hot); }
:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }
.chan {
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-faint);
}
.led {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--phosphor); box-shadow: 0 0 8px 1px rgba(249,115,22,0.7);
  display: inline-block;
}
.led.green { background: var(--signal-ok); box-shadow: 0 0 8px 1px rgba(74,222,128,0.6); }
.led.blue  { background: var(--signal-info); box-shadow: 0 0 8px 1px rgba(56,189,248,0.6); }

/* ---- top rail ---- */
.topbar { border-bottom: var(--rule); background: var(--ground-deep); }
.topbar .wrap { display: flex; align-items: center; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand b { font-family: var(--f-display); font-size: 15px; letter-spacing: 0.06em; }
.brand b span { color: var(--phosphor); }
.back {
  margin-left: auto; font-size: 13px; color: var(--ink-muted);
  text-decoration: none; font-family: var(--f-mono);
}
.back:hover { color: var(--ink); }

/* ---- stepper: three states, and only one is live ---- */
.steps-bar { border-bottom: var(--rule); background: var(--panel); }
.steps-bar .wrap { display: flex; gap: 0; padding-block: 0; }
.stepx {
  flex: 1; padding: 14px 8px; display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-faint); border-bottom: 2px solid transparent;
}
.stepx.on { color: var(--phosphor); border-bottom-color: var(--phosphor); }
.stepx .n {
  width: 20px; height: 20px; border: 1px solid currentColor; flex: none;
  display: grid; place-items: center; font-size: 10px;
}
@media (max-width: 640px) { .stepx span.lbl { display: none; } .stepx { flex: 0 0 auto; } }

/* ---- layout ---- */
.page { padding-block: clamp(30px, 5vw, 52px) 90px; }
.head { margin-bottom: clamp(24px, 4vw, 36px); }
.head h1 { font-size: clamp(1.9rem, 4.4vw, 2.7rem); line-height: 1.05; }
.head p { margin-top: 12px; color: var(--ink-muted); max-width: 58ch; }

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.85fr);
  gap: clamp(20px, 3vw, 34px);
  align-items: start;
}
/* The "not selling yet" notice is injected by claim.js as a sibling of the
   form, which makes it a grid ITEM: it took cell 1, pushed the form into
   column 2 and the order summary into row 2 -- where it began below a
   1000px-tall form, roughly a full screen of empty column above it, and its
   position:sticky could never engage. Spanning both columns puts it back
   where it reads as a banner and leaves the two real columns side by side. */
.cols > .waitlist-note { grid-column: 1 / -1; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }

.card { border: var(--rule); background: var(--panel); }
.card-head {
  padding: 15px 20px; border-bottom: var(--rule); background: #0b0c10;
  display: flex; align-items: center; gap: 11px;
}
.card-body { padding: 22px 20px; }

/* ---- form ---- */
.fields { display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

.field { display: grid; gap: 7px; align-content: start; }
.field label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-muted);
}
.field label .opt { color: var(--ink-faint); letter-spacing: 0.06em; text-transform: none; }
.field .hint { font-size: 12.4px; color: var(--ink-faint); line-height: 1.5; }

input[type="text"], input[type="email"], select {
  width: 100%;
  font-family: var(--f-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--engrave);
  padding: 12px 13px;
  border-radius: 0;
  transition: border-color 0.15s, background 0.15s;
  appearance: none;
}
input::placeholder { color: #4a4d59; }
input:focus, select:focus { border-color: var(--phosphor); background: #0d0e13; outline: none; }
input[aria-invalid="true"] { border-color: var(--danger); }
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%),
                    linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
select option { background: #14151b; color: var(--ink); }

.err {
  font-family: var(--f-mono); font-size: 11.5px; color: var(--danger);
  display: none; letter-spacing: 0.02em;
}
.field.bad .err { display: block; }

/* ---- consent ---- */
.checks { display: grid; gap: 14px; margin-top: 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 19px; height: 19px; flex: none; margin-top: 1px;
  border: 1px solid var(--engrave-hi); background: var(--field);
  display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 12px; color: transparent;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.check input:checked + .box { border-color: var(--phosphor); color: var(--phosphor); background: var(--phosphor-wash); }
.check input:focus-visible + .box { outline: 2px solid var(--phosphor); outline-offset: 2px; }
.check .txt { font-size: 13.8px; color: var(--ink-muted); line-height: 1.55; }
.check .txt b { color: var(--ink); font-weight: 550; }
.check.bad .box { border-color: var(--danger); }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-display); font-weight: 600; font-size: 15px;
  letter-spacing: 0.02em; text-decoration: none; padding: 14px 26px;
  border: 1px solid transparent; cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s, opacity 0.16s;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.btn-primary { background: var(--phosphor); color: #140800; }
.btn-primary:hover:not(:disabled) { background: var(--phosphor-hot); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-ghost { border-color: var(--engrave-hi); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--phosphor); color: var(--phosphor-hot); }

/* ---- order summary ---- */
.summary { position: sticky; top: 18px; }
.line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: 14.4px; padding: 11px 0; border-bottom: var(--rule);
}
.line:last-of-type { border-bottom: 0; }
.line .lbl { color: var(--ink-muted); }
.line .val { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.line.total { padding-top: 15px; margin-top: 5px; border-top: 1px solid var(--engrave-hi); }
.line.total .lbl { color: var(--ink); font-weight: 600; }
.line.total .val { font-family: var(--f-display); font-size: 1.85rem; font-weight: 700; color: var(--phosphor); }

.item-name { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; }
.item-no {
  font-family: var(--f-mono); font-size: 12px; color: var(--phosphor-hot);
  letter-spacing: 0.06em; margin-top: 4px;
}
.incl { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.incl li {
  display: flex; gap: 10px; font-size: 13.2px; color: var(--ink-muted); align-items: flex-start;
}
.incl li .k { color: var(--signal-ok); font-family: var(--f-mono); font-size: 11px; line-height: 1.6; flex: none; }

.vat-note {
  margin-top: 14px; font-size: 12.2px; color: var(--ink-faint); line-height: 1.55;
  border-left: 2px solid var(--engrave-hi); padding-left: 11px;
}

/* ---- security strip ---- */
.secure {
  margin-top: 18px; border: 1px solid rgba(74,222,128,0.28);
  background: rgba(74,222,128,0.05); padding: 15px 17px;
}
.secure .chan { color: var(--signal-ok); display: block; margin-bottom: 9px; }
.secure p { font-size: 12.8px; color: var(--ink-muted); line-height: 1.6; }
.secure p + p { margin-top: 8px; }

.scarce {
  border: 1px solid rgba(249,115,22,0.3); background: var(--phosphor-wash);
  padding: 13px 16px; font-family: var(--f-mono); font-size: 12.2px;
  color: var(--ink-muted); margin-bottom: 18px; letter-spacing: 0.02em;
}
.scarce b { color: var(--phosphor-hot); font-weight: 500; }

.fineprint { margin-top: 16px; font-size: 12.2px; color: var(--ink-faint); line-height: 1.6; }

footer { border-top: var(--rule); background: var(--ground-deep); padding-block: 26px 40px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; font-size: 12.4px; color: var(--ink-faint); }
footer a { color: var(--ink-faint); text-decoration: none; }
footer a:hover { color: var(--ink-muted); }
footer .legal { flex-basis: 100%; margin-top: 6px; font-size: 11.6px; line-height: 1.6; }

@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.001ms !important; } }


/* Shown when SALES_OPEN is off: the page is live, the checkout is not.
   Deliberately not styled as an error -- nothing has gone wrong, and a red
   box would say otherwise. */
.waitlist-note {
  margin: 0 0 22px;
  padding: 16px 18px;
  border: 1px solid rgba(167,139,250,.42);
  border-left: 3px solid #a78bfa;
  border-radius: 12px;
  background: rgba(139,92,246,.10);
  font-size: 15px;
  line-height: 1.65;
}
.waitlist-note strong { color: #f6f6f8; }
