/* Sealed, Delivered. — sign-in desk.
   Design handoff 2026-09-03: the stealth site's Classical skin (paper #f3f2f2, gold accent,
   plane red), a bordered card split by a single hairline. Left column = the real flow;
   right column = the seal panel.
   ⚠ The mock's left column was email + password and the right a QR "countersign". Neither
   exists: this product signs in by one-use magic link (src/auth.js) and there is no phone
   countersign to scan. A dead password field on a security product is worse than none, so
   the composition is kept and the columns carry what is actually true. The seal column is
   where a passkey/countersign step lands when the sealed-access work ships. */

:root {
  --bg:          #f3f2f2;
  --text:        #201f1d;
  --accent:      #b68235;
  --accent-700:  #7d5411;
  --plane:       #A33B2E;
  --neutral-300: #d7d3d3;   /* rules, borders, strokes */
  --neutral-500: #9b9797;   /* 2.59:1 on paper — decorative ONLY, never text */
  --neutral-600: #7d7979;   /* 3.85:1 — large text only */
  --muted:       #605d5d;   /* 5.83:1 — every piece of reading text that isn't ink */
  --divider:     color-mix(in srgb, #201f1d 16%, transparent);
  --radius:      4px;
  --font-body:    'Lora', Georgia, serif;
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-type:    'Special Elite', 'Courier New', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: var(--bg); }
body { font-family: var(--font-body); color: var(--text); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-700); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius); }
::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

.sheet { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }

/* ── header ── */
header { display: flex; align-items: center; padding: 28px clamp(20px, 4vw, 48px); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--text); }
.brand svg { flex-shrink: 0; transform: rotate(-8deg); }
.wm { font-family: var(--font-type); font-size: 15px; letter-spacing: 0.08em; white-space: nowrap; }
.wm .pn { color: var(--plane); }

/* ── the card ── */
main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.card {
  display: flex; align-items: stretch;
  border: 1px solid var(--neutral-300); border-radius: var(--radius); background: var(--bg);
  max-width: 100%;
}
.card-rule { width: 1px; background: var(--divider); flex: none; }
.card-col { padding: 44px 48px; }
.card-form { width: 360px; max-width: 100%; }
.card-seal { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }

/* ── the states ── */
.state { display: flex; flex-direction: column; gap: 18px; }
.state[hidden] { display: none; }
h1 { font-family: var(--font-type); font-weight: 400; font-size: 21px; line-height: 1.35; margin-bottom: -4px; }
.lede { font-size: 14px; line-height: 1.65; color: var(--muted); }
.lede strong { color: var(--text); font-weight: 500; }

.state-loading { align-items: center; text-align: center; gap: 14px; padding: 18px 0; }
.loading-mark { width: 42px; }
.loading-mark svg { width: 100%; height: auto; fill: none; stroke: var(--plane); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.loading-mark svg { animation: hover 2.4s ease-in-out infinite; }
@keyframes hover { 0%, 100% { transform: translateY(0) rotate(-8deg); } 50% { transform: translateY(-6px) rotate(-4deg); } }

/* ── forms ── */
.form-stack { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 13px; color: var(--muted); margin-top: 8px; }
input[type="email"], input[type="text"] {
  font-family: var(--font-body); font-size: 15px; padding: 11px 14px; min-height: 44px;
  background: var(--bg); border: 1px solid var(--neutral-300); border-radius: var(--radius); color: var(--text);
  width: 100%;
}
input:focus { border-color: var(--accent); }
.field-help { font-size: 12px; color: var(--muted); margin-top: 2px; }

.button, .text-button {
  font-family: var(--font-body); font-size: 14px; letter-spacing: 0.06em;
  padding: 11px 24px; min-height: 44px; margin-top: 16px; background: transparent;
  border: 1px solid var(--accent); border-radius: var(--radius); color: var(--accent-700);
  cursor: pointer; text-align: center; text-decoration: none; display: inline-block; line-height: 1.2;
  transition: background 160ms ease;
}
.button:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.button[disabled] { opacity: 0.55; cursor: progress; }
.text-button { border-color: transparent; color: var(--muted); padding: 10px 0; min-height: 44px; margin-top: 4px; font-size: 13px; }
.text-button:hover { background: transparent; color: var(--text); text-decoration: underline; }
.plain-link { font-size: 14px; color: var(--accent-700); }

.form-message {
  font-family: var(--font-type); font-size: 12.5px; line-height: 1.55; letter-spacing: 0.02em;
  margin-top: 14px; color: var(--plane);
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.form-message.note { color: var(--muted); }
.form-message[hidden] { display: none; }
.form-message a { font-family: var(--font-body); font-size: 13px; }

/* ── the seal panel ── */
.seal { width: 150px; height: 150px; }
.seal .ring { fill: none; stroke: var(--neutral-300); stroke-width: 1.4; }
.seal .ring.dashed { stroke: var(--accent); opacity: 0.55; stroke-dasharray: 3 7; stroke-linecap: round; }
.seal .plane path { fill: none; stroke: var(--plane); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.seal-copy { text-align: center; max-width: 240px; }
.seal-lede { font-family: var(--font-heading); font-style: italic; font-size: 15px; color: var(--muted); margin-bottom: 4px; }
.seal-sub { font-size: 12px; line-height: 1.55; color: var(--muted); margin-bottom: 10px; }
.seal-stamp { font-family: var(--font-type); font-size: 11.5px; letter-spacing: 0.04em; line-height: 1.5; color: var(--muted); }

/* ── footer ── */
/* build stamp lives bottom-right (CLAUDE.md §Build Versioning), out of the centred line */
footer { position: relative; text-align: center; padding: 0 24px 28px; }
footer .trust { font-family: var(--font-heading); font-style: italic; font-size: 14px; color: var(--muted); }
footer .stamp { position: absolute; right: clamp(16px, 3vw, 28px); bottom: 28px; font-family: var(--font-type); font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted); }
@media (max-width: 520px) { footer .stamp { position: static; display: block; margin-top: 8px; } }

/* ── the card stacks before the two columns get cramped ── */
@media (max-width: 760px) {
  header { padding: 20px; }
  main { padding: 20px 16px 32px; }
  .card { flex-direction: column; width: 100%; max-width: 420px; }
  .card-col { padding: 32px 28px; }
  .card-form { width: 100%; }
  .card-rule { width: auto; height: 1px; }
  .seal { width: 108px; height: 108px; }
}

@media (prefers-reduced-motion: reduce) {
  .loading-mark svg { animation: none; }
}
