/* Luma Media referral page.
 * Tokens lifted from the marketing landing page so this reads as the same brand.
 * Light surface on purpose: the page sits in an iframe on a light Showit page,
 * and a dark panel there reads as a hole punched in the layout.
 */

:root {
  --bg:        #F6F5F4;   /* Luma Studio Light */
  --bg-raise:  #FFFFFF;
  --bg-sink:   #EFEEEC;

  --text:      #0a0a0a;   /* Luma True Black */
  --muted:     rgba(38, 38, 38, 0.66);
  --faint:     rgba(38, 38, 38, 0.52);

  --line:      rgba(38, 38, 38, 0.13);
  --line-2:    rgba(38, 38, 38, 0.26);

  /* Lavender is the one accent. Never the #48388e violet. */
  --accent:      #b8abd4;
  --accent-deep: #6b5b9a;   /* darkened lavender — for text that must pass AA */
  --accent-ink:  #0a0a0a;
  --accent-wash: rgba(184, 171, 212, 0.16);
  --accent-line: rgba(184, 171, 212, 0.55);

  --ok:      #1e7a4d;
  --err:     #a12020;
  --err-bg:  rgba(161, 32, 32, 0.06);

  --r: 2px;                /* the brand rounds almost nothing */
  --pad: clamp(20px, 5vw, 34px);
  --maxw: 560px;           /* narrow on purpose — a short form, not a document */
  --display: "Poppins", Arial, sans-serif;
  --sans: "Host Grotesk", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --label-ls: 0.09em;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

/* Any author rule that sets `display` outranks the browser's built-in
 * [hidden] { display: none }. .btn sets display, so without this the
 * conditionally-hidden handoff buttons still render. Keep this rule. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(26px, 6vw, 44px) var(--pad) clamp(32px, 7vw, 52px);
}

h1, h2, h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin: 0;
  font-weight: 700;
}
h1 { font-size: clamp(27px, 6.2vw, 36px); letter-spacing: -0.04em; }
h3 { font-size: 16px; letter-spacing: -0.02em; }

p { margin: 0; }

.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--text); color: var(--bg);
  padding: 10px 16px; z-index: 10; text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ─────────────────────────── header ─────────────────────────── */

.head { margin-bottom: 26px; }

.lede {
  font-size: clamp(16px, 2.8vw, 18px);
  line-height: 1.5;
  color: var(--muted);
  margin-top: 10px;
}
.lede strong { color: var(--text); font-weight: 600; }

/* The three tiers, as a glanceable ladder instead of a table. */
.ladder {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
}
.ladder li {
  flex: 1 1 0;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 11px 10px;
  text-align: center;
}
.ladder .pct {
  display: block;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ladder .when {
  display: block;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--faint);
  margin-top: 3px;
}

/* ─────────────────────────── form ─────────────────────────── */

form { margin: 0; }

fieldset { border: 0; margin: 0; padding: 0; }

legend {
  font-size: 14.5px;
  font-weight: 500;
  padding: 0;
  margin-bottom: 10px;
}

.field { margin-bottom: 16px; }

label {
  display: block;
  font-size: 14.5px;
  font-weight: 500;
  margin-bottom: 6px;
}

.opt { font-weight: 400; font-size: 12.5px; color: var(--faint); margin-left: 5px; }

/* Two fields side by side once there's room. */
.row { display: grid; gap: 0; }
@media (min-width: 480px) {
  .row { grid-template-columns: 1fr 1fr; gap: 14px; }
}

input[type="text"], textarea {
  width: 100%;
  font: 400 16px/1.5 var(--sans);   /* 16px keeps iOS from zooming on focus */
  color: var(--text);
  background: var(--bg-raise);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  padding: 12px 13px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { resize: vertical; min-height: 80px; }

input:hover, textarea:hover { border-color: rgba(38, 38, 38, 0.4); }

input:focus-visible, textarea:focus-visible, .btn:focus-visible,
summary:focus-visible, a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent-deep);
  outline-offset: 2px;
  border-radius: var(--r);
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-deep);
  box-shadow: 0 0 0 3px var(--accent-wash);
}
.chip input:focus-visible + span { outline: 2px solid var(--accent-deep); outline-offset: 2px; }

input.has-err, textarea.has-err { border-color: var(--err); }

::placeholder { color: rgba(38, 38, 38, 0.34); }

/* "Referring as Jane Doe · Not you?" — replaces two fields for most visitors. */
.as-you {
  font-size: 14px;
  color: var(--muted);
  background: var(--accent-wash);
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  padding: 11px 13px;
  margin-bottom: 18px;
}
.as-you strong { color: var(--text); font-weight: 600; }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  margin-left: 6px;
  font: inherit;
  font-size: 13px;
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.linkish:hover { color: var(--text); }

/* ─────────────────────────── chips ─────────────────────────── */

.chips-set { margin: 4px 0 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.has-err { outline: 1px solid var(--err); outline-offset: 6px; border-radius: var(--r); }

.chip { margin: 0; cursor: pointer; }
.chip input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
}
.chip span {
  display: inline-block;
  font-size: 14px;
  line-height: 1.3;
  padding: 10px 14px;
  background: var(--bg-raise);
  border: 1px solid var(--line-2);
  border-radius: 100px;
  color: var(--muted);
  transition: background .12s var(--ease), border-color .12s var(--ease),
              color .12s var(--ease), transform .08s var(--ease);
  user-select: none;
}
.chip:hover span { border-color: rgba(38, 38, 38, 0.45); color: var(--text); }
.chip span:active { transform: scale(0.97); }

.chip input:checked + span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 500;
}

.add-note { display: inline-block; margin: 14px 0 0; }
.note-field { margin-top: 12px; margin-bottom: 0; }

/* ─────────────────────────── checkbox ─────────────────────────── */

.field-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 11px;
  align-items: start;
  margin: 22px 0;
}
.field-check input {
  width: 20px; height: 20px;
  margin: 1px 0 0;
  accent-color: var(--accent-deep);
}
.field-check label { margin: 0; font-weight: 400; font-size: 14px; line-height: 1.5; color: var(--muted); }
.field-check .err { grid-column: 1 / -1; }

/* honeypot — off-screen, never focusable, hidden from assistive tech */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ─────────────────────────── errors ─────────────────────────── */

.err { color: var(--err); font-size: 13px; margin-top: 5px; font-weight: 500; }

.err-summary {
  border: 1px solid var(--err);
  background: var(--err-bg);
  border-radius: var(--r);
  padding: 13px 15px;
  margin-bottom: 20px;
}
.err-summary:focus { outline: 2px solid var(--err); outline-offset: 2px; }
.err-summary-title { font-weight: 600; font-size: 14.5px; color: var(--err); }
.err-summary ul { margin: 7px 0 0; padding-left: 17px; }
.err-summary li { font-size: 13.5px; margin-top: 3px; }
.err-summary a { color: var(--err); }

/* ─────────────────────────── buttons ─────────────────────────── */

.btn {
  display: inline-block;
  font: 700 12.5px/1 var(--sans);
  letter-spacing: var(--label-ls);
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  padding: 15px 24px;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s var(--ease), border-color .15s var(--ease), opacity .15s var(--ease);
}

.btn-big { width: 100%; padding: 18px 24px; font-size: 13px; }

.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: #c6bbdd; }
.btn-primary:disabled { opacity: .55; cursor: default; }

.btn-outline { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--text); }

.btn-quiet {
  background: transparent;
  color: var(--muted);
  border-color: var(--line-2);
  padding: 7px 12px;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0.02em;
}
.btn-quiet:hover { color: var(--text); border-color: var(--text); }

.btn.is-disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }

.form-note { font-size: 13.5px; color: var(--faint); margin-top: 10px; }
.form-note.is-error { color: var(--err); font-weight: 500; }

.reassure { margin-top: 12px; font-size: 12.5px; color: var(--faint); text-align: center; }

/* ─────────────────────────── fine print ─────────────────────────── */

.fineprint {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.fineprint h2 {
  font-family: var(--sans);
  font: 700 11px/1.4 var(--sans);
  letter-spacing: var(--label-ls);
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 9px;
}
.fineprint ul { list-style: none; margin: 0; padding: 0; }
.fineprint li {
  position: relative;
  padding: 0 0 6px 13px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--faint);
}
.fineprint li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 4px; height: 1px;
  background: var(--line-2);
}

/* ═════════════════════ confirmation ═════════════════════ */

.block-a:focus { outline: none; }

.eyebrow {
  font: 700 11.5px/1.4 var(--sans);
  letter-spacing: var(--label-ls);
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 12px;
}

.handoff { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
@media (min-width: 480px) {
  .handoff { flex-direction: row; }
  .handoff .btn { flex: 1 1 0; }
}

.handoff-note { margin-top: 12px; font-size: 13px; color: var(--faint); }

.confirm-foot {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

/* copy-the-message fallback */
.draft { margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-raise); }
.draft summary {
  cursor: pointer;
  padding: 12px 15px;
  font-size: 13.5px;
  font-weight: 500;
  list-style-position: inside;
}
.draft[open] summary { border-bottom: 1px solid var(--line); }
.draft-body { padding: 4px 15px 15px; }
.draft-item + .draft-item { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.draft-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 13px 0 8px; }
.draft-meta { font-size: 12.5px; color: var(--faint); margin-bottom: 3px; word-break: break-word; }
.draft-text {
  font: 400 13.5px/1.65 var(--sans);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 10px 0 0;
  padding: 13px;
  background: var(--bg-sink);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  user-select: all;
}

/* ── Block B ────────────────────────────────────────────────────────────────
   Rendered as a quieter, clearly separate module. The visual demotion is
   deliberate: it must not read as part of the referral flow above it. See the
   compliance note in index.html before changing anything here. */

.block-b {
  margin-top: clamp(38px, 8vw, 56px);
  padding: 20px;
  background: var(--bg-sink);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.block-b h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.block-b p { font-size: 14px; color: var(--muted); margin-top: 9px; }

.review-cta { margin-top: 15px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.review-missing { font-size: 12px; color: var(--err); }
.review-missing code { font-family: var(--mono); font-size: 11px; }

.block-b-fine {
  margin-top: 15px !important;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 12.5px !important;
  font-style: italic;
  color: var(--faint) !important;
}

/* ─────────────────────────── motion ─────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
