/* ============================================================
   Design tokens — landing-page-design.md §0, verbatim
   ============================================================ */
:root {
  /* Set 1: Warm Roast (page base) */
  --color-primary:        #D97706; /* fills/graphics/large-display only — not for text-on-white, see below */
  --color-primary-text:   #B45309; /* UX Designer ruling, 2026-09-03: 5.02:1 on white — use for amber TEXT on light backgrounds */
  --color-primary-on:     #FFFFFF;
  --color-secondary:      #F59E0B;
  --color-secondary-on:   #0F172A;
  --color-accent:         #059669;
  --color-accent-on:      #FFFFFF;
  --color-bg:             #FFFBEB;
  --color-fg:             #0F172A;
  --color-card:           #FFFFFF;
  --color-card-fg:        #0F172A;
  --color-muted:          #FCF6F0;
  --color-muted-fg:       #64748B;
  --color-border:         #FAEEE1;
  --color-destructive:    #DC2626;
  --color-destructive-on: #FFFFFF;
  --color-ring:           #D97706;

  --font-display: 'Fredoka', 'Baloo 2', ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display-brutal: 'Lexend Mega', 'Arial Narrow', Impact, sans-serif;
  --font-body-brutal:    'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.375rem;
  --text-2xl:  1.75rem;
  --text-3xl:  2.25rem;
  --text-4xl:  3rem;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;

  --radius-sm:   12px;
  --radius-md:   20px;
  --radius-lg:   28px;
  --radius-pill: 999px;

  --shadow-card:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 20px rgba(217, 119, 6, 0.12);
  --shadow-card-pressed:
    0 1px 1px rgba(15, 23, 42, 0.04),
    0 3px 8px rgba(217, 119, 6, 0.10);
}

/* Set 2: Tough Love Brutalist — scoped to the ladder-demo L2 card only */
.notif-card--l2 {
  --tlb-bg:           #09090B;
  --tlb-fg:            #FAFAFA;
  --tlb-accent:        #DFE104;
  --tlb-accent-on:     #000000;
  --tlb-border:        #3F3F46;
  --tlb-border-width:  2px;
  --tlb-radius:        0px;
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
}

h1, h2, h3, p { margin: 0; }

a { color: var(--color-primary-text); }

img { max-width: 100%; display: block; }

.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;
}

:focus-visible {
  outline: 3px solid var(--color-ring);
  outline-offset: 2px;
}

/* Body only renders once a variant has been assigned & rendered by script.js */
body[data-variant="pending"] #app { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   Layout / rhythm
   ============================================================ */
.site-header,
.page-section,
.site-footer {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .site-header,
  .page-section,
  .site-footer {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

.site-header {
  padding-top: var(--space-5);
  padding-bottom: var(--space-3);
}

main > .page-section + .page-section {
  margin-top: var(--space-8);
}

/* full-bleed band (consent line) — keeps the same side padding/max-width
   for its text via the shared .page-section rule, only the background
   escapes the column */
.consent-section {
  max-width: none;
  background: var(--color-muted);
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
}
.consent-section > .section-inner {
  max-width: 680px;
  margin: 0 auto;
}

/* ============================================================
   Header / wordmark
   ============================================================ */
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-primary-text);
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-4);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding-top: var(--space-7);
  padding-bottom: var(--space-7);
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: 1.2;
  color: var(--color-fg);
  margin-top: var(--space-4);
}

@media (min-width: 768px) {
  .hero-headline { font-size: var(--text-4xl); }
}

.hero-lead {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  color: var(--color-muted-fg);
  max-width: 52ch;
  margin-top: var(--space-4);
}

/* ============================================================
   Ladder rail
   ============================================================ */
.ladder-rail {
  position: relative;
  height: 32px;
  margin: 0 0 var(--space-5);
}
.ladder-rail::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 50%;
  height: 2px;
  background: var(--color-border);
  transform: translateY(-50%);
}
.rail-dot {
  position: absolute;
  top: 50%;
  width: 10px; height: 10px;
  background: var(--color-secondary);
  border: 2px solid var(--color-bg);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.rail-dot::after {
  content: attr(data-time);
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: var(--text-xs);
  color: var(--color-muted-fg);
  white-space: nowrap;
}
.rail-dot--peak { background: var(--tlb-bg, var(--color-fg)); width: 12px; height: 12px; }
.rail-dot--resolve { background: var(--color-accent); }

/* Peak and resolve timestamps sit only ~1% apart on the rail (10:30 -> 10:32) --
   stack the peak label above the line and resolve below so they don't overlap. */
.rail-dot--peak::after { top: auto; bottom: 14px; }

/* ============================================================
   Notification cards
   ============================================================ */
.notif-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.notif-card {
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease-out, transform 400ms ease-out, box-shadow 150ms ease-out;
}
.notif-card:active { box-shadow: var(--shadow-card-pressed); }
.notif-card.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .notif-card { transition: none; opacity: 1; transform: none; }
}

@media (min-width: 768px) {
  .notif-card { max-width: 440px; margin-left: auto; margin-right: auto; }
}

.notif-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.notif-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-fg);
}
.notif-time {
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
}
.notif-body {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  line-height: 1.2;
  font-weight: 500;
  color: var(--color-fg);
}

/* L1 — slight warmth increase */
.notif-card--l1 {
  background: color-mix(in srgb, var(--color-secondary) 8%, var(--color-card));
  border-width: 2px;
}

/* L2 — Tough Love Brutalist, Token Set 2 */
.notif-card--l2 {
  background: var(--tlb-bg);
  color: var(--tlb-fg);
  border: var(--tlb-border-width) solid var(--tlb-border);
  border-radius: var(--tlb-radius);
  box-shadow: none;
}
.notif-card--l2 .notif-title,
.notif-card--l2 .notif-time,
.notif-card--l2 .notif-body { color: var(--tlb-fg); }
.notif-card--l2 .notif-icon-chip {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--tlb-accent);
  border-radius: 2px;
  margin-right: var(--space-2);
}
.notif-card--l2 .notif-body {
  font-family: var(--font-body-brutal);
}
.notif-card--l2 .shout {
  font-family: var(--font-display-brutal);
  font-size: var(--text-2xl);
  color: var(--tlb-accent);
}

/* Success card — resolution, back to Token Set 1, warmer than L0 */
.notif-card--success {
  border-left: 4px solid var(--color-accent);
  box-shadow: var(--shadow-card);
}
.notif-card--success .notif-icon-chip {
  display: inline-block;
  width: 10px; height: 10px;
  background: var(--color-accent);
  border-radius: 50%;
  margin-right: var(--space-2);
}
.notif-card--success.is-visible {
  animation: success-pop 250ms ease-out;
}
@keyframes success-pop {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.01); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .notif-card--success.is-visible { animation: none; }
}

/* ============================================================
   Roast reveal
   ============================================================ */
.roast-reveal { margin-top: var(--space-6); }

.roast-trigger {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: var(--text-base);
  color: var(--color-muted-fg);
  cursor: pointer;
  text-align: left;
}
.roast-trigger-cta {
  color: var(--color-primary-text);
  text-decoration: underline;
}
.roast-trigger:active .roast-trigger-cta { opacity: 0.85; }

.roast-panel {
  margin-top: var(--space-4);
  background: var(--color-card);
  border-left: 3px solid var(--tlb-accent, #DFE104);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  color: #09090B;
  transition: opacity 200ms ease-out;
}
.roast-panel[hidden] { display: none; }
.roast-line { font-size: var(--text-xl); font-weight: 600; }
.roast-caption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
  font-style: italic;
}

/* ============================================================
   Consent line band
   ============================================================ */
.consent-line {
  font-size: var(--text-lg);
  text-align: center;
}

/* ============================================================
   Forms
   ============================================================ */
.signup-form { position: relative; }

.form-step { display: flex; flex-direction: column; gap: var(--space-4); }
.form-step[hidden] { display: none; }
.form-step.is-transitioning { animation: cross-fade 250ms ease-out; }
@keyframes cross-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .form-step.is-transitioning { animation: none; }
}

.input-email {
  width: 100%;
  font-size: 16px; /* exact — prevents iOS Safari auto-zoom */
  font-family: var(--font-body);
  padding: var(--space-4);
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--color-border);
  background: var(--color-card);
  color: var(--color-fg);
}
.input-email:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  width: 20px; height: 20px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}

.btn-primary {
  display: block;
  width: 100%;
  min-height: 48px;
  background: var(--color-primary-text);
  color: var(--color-primary-on);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: box-shadow 150ms ease-out;
}
.btn-primary:active { box-shadow: var(--shadow-card-pressed); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-skip {
  display: block;
  width: 100%;
  background: none;
  border: none;
  color: var(--color-muted-fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  padding: var(--space-2);
  cursor: pointer;
}

.step2-prompt {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  text-align: center;
}

.tier-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.tier-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: var(--space-4);
  cursor: pointer;
  transition: box-shadow 150ms ease-out, border-color 150ms ease-out;
}
.tier-card input[type="radio"] {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  width: 20px; height: 20px;
  accent-color: var(--color-primary);
}
.tier-card:has(input:checked) {
  border: 2px solid var(--color-primary);
}
.tier-card:active { box-shadow: var(--shadow-card-pressed); }

.tier-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-lg);
}
.tier-desc { font-size: var(--text-sm); color: var(--color-muted-fg); }
.tier-example {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-style: italic;
  color: var(--color-fg);
}

.form-confirmation {
  text-align: center;
  padding: var(--space-5) 0;
}
.form-confirmation p:first-child {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
}
.form-confirmation p + p { margin-top: var(--space-2); color: var(--color-muted-fg); }

.form-error {
  color: var(--color-destructive);
  font-size: var(--text-sm);
}
.form-error[hidden] { display: none; }

.form-notice {
  color: var(--color-destructive);
  font-size: var(--text-sm);
  text-align: center;
  background: var(--color-muted);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  text-align: center;
  padding-top: var(--space-6);
  padding-bottom: var(--space-6);
  color: var(--color-muted-fg);
}
.footer-wordmark {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  margin-bottom: var(--space-2);
}
.footer-legal { font-size: var(--text-xs); }
.footer-legal a { color: var(--color-muted-fg); text-decoration: underline; }

/* ============================================================
   Static text pages (privacy.html)
   ============================================================ */
a.hero-eyebrow { text-decoration: none; }

.privacy-content {
  padding-top: var(--space-7);
  padding-bottom: var(--space-8);
}
.privacy-content h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-3xl);
  color: var(--color-fg);
  margin-bottom: var(--space-4);
}
.privacy-content .lede {
  font-style: italic;
  color: var(--color-muted-fg);
  margin-bottom: var(--space-6);
}
.privacy-content h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xl);
  color: var(--color-fg);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}
.privacy-content p,
.privacy-content ul {
  color: var(--color-fg);
  margin-bottom: var(--space-4);
}
.privacy-content ul { padding-left: var(--space-5); }
.privacy-content li { margin-bottom: var(--space-1); }
.privacy-content a { color: var(--color-primary-text); }
