/* Real Terms waitlist. Calm, minimal, mobile-first. Tokens first; components only use tokens. */

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-latin-var.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F6F2;
  --surface: #FFFFFF;
  --surface-2: #EFF0EB;
  --text: #0F1B2D;
  --muted: #4A5568;
  --border: #DDE0DA;
  --accent: #0E6B63;
  --accent-hover: #0A5650;
  --accent-ink: #FFFFFF;
  --accent-soft: #E1F0EE;
  --nominal: #A5ADB8;
  --danger: #B42318;
  --ok: #0E6B63;
  --ring: #0E6B63;
  --ph-bg: #FFF1BF;
  --ph-text: #6B4A00;
  --ph-border: #C48A00;

  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 24px rgba(15, 27, 45, .06);
  --gutter: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1621;
    --surface: #152131;
    --surface-2: #1B2A3D;
    --text: #E8EDF3;
    --muted: #A7B3C2;
    --border: #26364C;
    --accent: #4FD1C0;
    --accent-hover: #7ADDD0;
    --accent-ink: #052A26;
    --accent-soft: #123331;
    --nominal: #5B6B80;
    --danger: #FF8A80;
    --ok: #4FD1C0;
    --ring: #4FD1C0;
    --ph-bg: #3A2D08;
    --ph-text: #F6D58A;
    --ph-border: #B8892A;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  --bg: #0E1621; --surface: #152131; --surface-2: #1B2A3D; --text: #E8EDF3; --muted: #A7B3C2;
  --border: #26364C; --accent: #4FD1C0; --accent-hover: #7ADDD0; --accent-ink: #052A26; --accent-soft: #123331;
  --nominal: #5B6B80; --danger: #FF8A80; --ok: #4FD1C0; --ring: #4FD1C0;
  --ph-bg: #3A2D08; --ph-text: #F6D58A; --ph-border: #B8892A;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 3px; border-radius: 4px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); padding: 10px 14px; border-radius: var(--radius-sm); z-index: 20; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.wordmark { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.0625rem; min-height: 44px; }
.wordmark:hover { color: var(--text); }
.mark { width: 22px; height: 22px; }
.mark-nominal { fill: var(--nominal); }
.mark-real { fill: var(--accent); }
.header-link { font-weight: 500; font-size: .9375rem; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 2px; }

/* Hero */
.hero-grid { display: grid; gap: 24px; padding-top: 24px; padding-bottom: 12px; }
.eyebrow { color: var(--muted); font-size: .875rem; font-weight: 500; letter-spacing: .01em; margin-bottom: 12px; }
h1 { font-size: clamp(2.125rem, 9vw, 3.5rem); font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
.accent { color: var(--accent); }
.lede { margin-top: 14px; font-size: 1.0625rem; color: var(--muted); max-width: 34em; }
.hero .hero-cta { margin-top: 24px; display: none; } /* phones: the header link is enough; keep the reveal near the top */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: background-color .18s var(--ease), transform .12s var(--ease);
  touch-action: manipulation;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-primary:active { transform: scale(.98); }
.btn-block { width: 100%; }
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }
.spinner { display: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.btn[aria-busy="true"] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 18px; }
.card-title { font-size: 1.25rem; font-weight: 600; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 0; padding: 0; margin: 0; }
label, legend { font-weight: 500; font-size: .9375rem; }
legend { padding: 0; margin-bottom: 4px; line-height: 1.4; }
.optional { font-weight: 400; color: var(--muted); font-size: .8125rem; margin-left: 4px; }
input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; font-size: 1rem; /* 16px stops iOS zooming on focus */
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  min-height: 48px; padding: 10px 12px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { resize: vertical; min-height: 88px; line-height: 1.45; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input[aria-invalid="true"] { border-color: var(--danger); }
.help { color: var(--muted); font-size: .8125rem; }
.field-error { color: var(--danger); font-size: .875rem; font-weight: 500; }
.suffix-input { position: relative; }
.suffix-input input { padding-right: 34px; }
.suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }

/* Reveal toy */
.reveal { display: flex; flex-direction: column; gap: 16px; }
.reveal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-amount, .reveal-form .field-error { grid-column: 1 / -1; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: .875rem; font-weight: 500; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  min-height: 40px; padding: 0 14px; cursor: pointer; touch-action: manipulation;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }

.reveal-out { background: var(--accent-soft); border-radius: var(--radius-sm); padding: 16px; }
.out-lead { color: var(--muted); font-size: .9375rem; }
.out-lead span { color: var(--text); font-weight: 500; }
.out-big { margin-top: 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
#out-real { font-size: clamp(2.5rem, 12vw, 3.25rem); font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; color: var(--accent); }
.out-unit { font-weight: 500; color: var(--text); }
.bars { margin-top: 14px; display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 7.5em 1fr; align-items: center; gap: 10px; font-size: .8125rem; color: var(--muted); }
.bar-track { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--nominal) 22%, transparent); overflow: hidden; }
.bar { display: block; height: 100%; border-radius: 999px; transform-origin: left center; }
.bar-nominal { background: var(--nominal); }
.bar-real { background: var(--accent); transform: scaleX(.372); transition: transform .45s var(--ease); }
.out-why { margin-top: 12px; font-size: .9375rem; }
.basis { font-size: .8125rem; color: var(--muted); line-height: 1.5; }
.basis strong { color: var(--text); font-weight: 600; }

/* Sections */
.section { padding-top: 48px; }
.section-title { font-size: 1.5rem; font-weight: 600; margin-bottom: 18px; }
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; row-gap: 4px; align-content: start; }
.feature .icon { width: 40px; height: 40px; padding: 9px; border-radius: 10px; background: var(--accent-soft); stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 1.0625rem; font-weight: 600; align-self: center; }
.feature p { grid-column: 1 / -1; margin-top: 8px; color: var(--muted); font-size: .9375rem; }
.still-building { margin-top: 16px; color: var(--muted); font-size: .9375rem; }

/* Join */
.join { max-width: 600px; margin: 0 auto; }
#join:focus { outline: none; }
.join-sub { margin-top: 6px; color: var(--muted); }
.signup { margin-top: 20px; display: grid; gap: 18px; }
.price .help { margin-bottom: 4px; }
.radios { display: grid; gap: 8px; }
.radio {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg);
  cursor: pointer; font-weight: 400; transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.radio:hover { border-color: var(--accent); }
.radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { min-height: 1.4em; font-size: .9375rem; font-weight: 500; color: var(--danger); }
.form-status:empty { display: none; }
.fine { color: var(--muted); font-size: .8125rem; text-align: center; margin-top: -8px; }
.success { text-align: center; padding: 18px 4px 6px; }
.success:focus { outline: none; }
.success-icon { width: 48px; height: 48px; stroke: var(--ok); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.success h3 { margin-top: 8px; font-size: 1.25rem; }
.success p { margin-top: 6px; color: var(--muted); }

/* About */
.about p { max-width: 42em; }

/* Placeholders: deliberately loud so they can't ship by accident. */
.placeholder { background: var(--ph-bg); color: var(--ph-text); border: 1px dashed var(--ph-border); border-radius: 4px; padding: 0 4px; font-weight: 500; }

/* Footer */
.site-footer { margin-top: 56px; padding: 36px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface-2); }
.footer-grid { display: grid; gap: 28px; }
.site-footer h2 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.site-footer p, .privacy { font-size: .875rem; color: var(--muted); }
.privacy { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.privacy strong { color: var(--text); font-weight: 600; }
.copyright { margin-top: 28px; font-size: .8125rem; color: var(--muted); }

/* Wider screens */
@media (min-width: 560px) {
  .card { padding: 28px; }
  .lede { font-size: 1.125rem; }
  .radios { grid-template-columns: repeat(3, auto); justify-content: start; }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; align-items: center; gap: 56px; padding-top: 72px; }
  .hero .hero-cta { display: inline-flex; }
  .features { grid-template-columns: 1fr 1fr; gap: 16px; }
  .section { padding-top: 72px; }
  .footer-grid { grid-template-columns: 1fr 1.2fr; gap: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .spinner { animation: none; border-right-color: currentColor; opacity: .5; }
}

@media print {
  .site-header, .skip, .hero-cta, .presets { display: none; }
  body { background: #fff; color: #000; }
}
