/* ============ tokens ============ */
:root {
  --paper: #F6F1E7;
  --surface: #FCF8EF;
  --surface-2: #EFE8D8;
  --ink: #221E16;
  --muted: #6A6354;       /* darkened from shipped #7A7361 to clear WCAG AA */
  --hairline: #E3DAC7;
  --green-icon: #5F8A4C;  /* large/icon use only */
  --green-text: #4A6E3A;  /* AA-safe for body text */
  --amber-fill: #E0A33A;  /* decorative fills only, never text */
  --bronze: #B8842A;      /* links / focus / accent */
  --medication: #7E5CA8;
  --ramp-1: #DA7A2A;
  --ramp-2: #EDA94A;
  --ramp-3: #9FCB79;
  --ramp-4: #5FB36E;
  --ramp-5: #2E8B57;

  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;

  --wrap: 1120px;
  --wrap-narrow: 680px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14130F;
    --surface: #1E1C16;
    --surface-2: #272419;
    --ink: #F3EEE0;
    --muted: #9A917C;
    --hairline: #322E22;
    --green-icon: #6E9A58;
    --green-text: #8FBB78;
    --amber-fill: #E8B255;
    --bronze: #D4A24A;
    --medication: #9277BE;
  }
}

/* ============ reset ============ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
ul, ol { padding-left: 0; list-style: none; margin: 0; }

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

.skip-link {
  position: absolute; top: -3rem; left: 1rem;
  background: var(--ink); color: var(--paper);
  padding: 0.6rem 1rem; border-radius: 8px; z-index: 100;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--bronze);
  outline-offset: 3px;
  border-radius: 4px;
}

.mono { font-family: var(--font-mono); font-weight: 400; letter-spacing: 0.01em; }
.kicker {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--bronze);
  margin: 0 0 0.75rem;
}
.eyebrow {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.25rem;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: var(--wrap-narrow); margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 1rem;
  text-wrap: balance;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; letter-spacing: -0.01em; }

.body-lg { font-size: 1.1rem; color: var(--ink); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 34rem; }
.fine-print { font-size: 0.85rem; color: var(--muted); }
.stat-line { color: var(--bronze); font-size: 0.95rem; margin-top: 1.5rem; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--bronze); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { border-color: var(--bronze); }
.btn-small { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

/* ============ header ============ */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; }
.brand-word {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em;
  font-size: 1.15rem; color: var(--ink);
}
.site-nav { display: flex; gap: 1.6rem; }
.site-nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; }
.site-nav a:hover { color: var(--ink); }

/* ============ hero ============ */
.hero { padding: 4.5rem 0 5rem; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem; align-items: center;
}
.hero-actions { display: flex; gap: 0.9rem; margin-top: 1.75rem; flex-wrap: wrap; }

.hero-visual { display: flex; justify-content: center; }
.crescent-wrap { position: relative; width: 240px; height: 240px; }
.crescent { position: absolute; inset: 0; margin: auto; color: var(--bronze); }
.crescent-ring { fill: none; stroke: var(--hairline); stroke-width: 2; }
.crescent-bite {
  fill: var(--paper);
  stroke: var(--bronze);
  stroke-width: 2;
  transform-origin: 100px 100px;
  animation: breathe 7s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: rotate(0deg) scale(1); opacity: 0.9; }
  50% { transform: rotate(8deg) scale(1.03); opacity: 1; }
}

.glyph-arc {
  position: absolute; inset: 0;
}
.glyph {
  position: absolute;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1.5px solid var(--hairline);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.5);
  animation: pop-in 6s ease-in-out infinite;
}
.glyph-1 { top: 4%; left: 50%; margin-left: -20px; color: var(--ramp-3); animation-delay: 0.2s; }
.glyph-2 { top: 28%; left: 88%; color: var(--ramp-2); animation-delay: 0.9s; }
.glyph-3 { top: 72%; left: 82%; color: var(--bronze); animation-delay: 1.6s; }
.glyph-4 { top: 86%; left: 18%; color: var(--medication); opacity: 0.85; animation-delay: 2.3s; }
.glyph-5 { top: 28%; left: 8%; color: var(--medication); animation-delay: 3s; }

@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.5); }
  12% { opacity: 1; transform: scale(1); }
  85% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.85); }
}

@media (prefers-reduced-motion: reduce) {
  .crescent-bite { animation: none; }
  .glyph { animation: none; opacity: 1; transform: scale(1); }
}

/* ============ sections ============ */
.section { padding: 5rem 0; }
.section-alt { background: var(--surface); }
.section-cta { background: var(--surface-2); }

/* ============ steps ============ */
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem; margin-top: 2.5rem;
}
.step-head { display: flex; align-items: baseline; gap: 0.65rem; margin-bottom: 0.4rem; }
.step-num { color: var(--bronze); font-size: 0.85rem; }
.step p { color: var(--muted); margin: 0 0 1.25rem; }

.screenshot-frame { margin: 0; }
.screenshot-slot {
  aspect-ratio: 9 / 19.5;
  max-width: 220px;
  margin: 0 auto;
  border-radius: 32px;
  border: 6px solid var(--ink);
  background: var(--surface-2);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 1rem;
}
.screenshot-slot::before {
  content: "";
  position: absolute;
  top: 10px; left: 50%; transform: translateX(-50%);
  width: 34%; height: 18px;
  background: var(--ink);
  border-radius: 12px;
}
.slot-label { color: var(--muted); font-size: 0.78rem; line-height: 1.5; }

/* ============ signals ============ */
#signals .stat-line { display: block; }

/* ============ quiet / left-out ============ */
.left-out { margin-top: 2.5rem; border-top: 1px solid var(--hairline); padding-top: 2rem; }
.left-out-list { display: grid; gap: 0.75rem; }
.left-out-list li {
  padding-left: 1.4rem;
  position: relative;
  color: var(--muted);
}
.left-out-list li::before {
  content: "–";
  position: absolute; left: 0;
  color: var(--bronze);
}

/* ============ privacy / boundary ============ */
.boundary {
  display: flex; align-items: center; gap: 1rem;
  margin: 2.5rem 0 0.5rem;
}
.boundary-line {
  flex: 1;
  height: 1px;
  background: var(--hairline);
}
.boundary-caption { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

/* ============ citations ============ */
.citations { display: grid; gap: 1.5rem; margin: 2rem 0; }
.cite-mark { color: var(--bronze); margin-right: 0.4rem; }

/* ============ waitlist form ============ */
.waitlist-form {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  margin-top: 2rem; max-width: 30rem;
}
.email-input {
  flex: 1; min-width: 12rem;
  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.email-input:focus { border-color: var(--bronze); }
.form-message {
  margin-top: 0.9rem;
  font-size: 0.9rem;
  color: var(--green-text);
  min-height: 1.2em;
}

/* ============ footer ============ */
.site-footer { padding: 3rem 0; border-top: 1px solid var(--hairline); }
.footer-row { display: grid; gap: 0.6rem; }
.footer-word { font-family: var(--font-display); color: var(--muted); }
.footer-legal { max-width: 44rem; }
.footer-note { color: var(--muted); }
.footer-row a { text-decoration: underline; text-decoration-color: var(--hairline); }

/* ============ responsive ============ */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; margin-bottom: 1rem; }
  .steps { grid-template-columns: 1fr; gap: 3rem; }
  .site-nav { display: none; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero { padding: 3rem 0 3.5rem; }
  .section { padding: 3.5rem 0; }
  .waitlist-form { flex-direction: column; align-items: stretch; }
}
