/* ============================================================
   Poise — Design System: "The Plumb Line" (second edition)
   Tokens sourced from DESIGN.md / Poise Visual Identity v2.

   REVIEW PASS — changes from the previous build:
   01  Ember de-escalated from 18 elements to 2 (hero CTA, form
       button). Eyebrows, stat numerals, walk-numbers, claim-card
       border and founder initial no longer take the action colour.
   02  Stat numerals set in Bone. Ember never paints a decline.
   04  Device tilt removed — nothing on this page is off-plumb. The
       screenshots now sit in an upright phone bezel (.phone).
   05  Inputs get a real focus ring matching the buttons.
   06  h2 raised to a genuine second step (40px); h3 unified as
       Newsreader 500 and .headline-sm retired.
   07  .walk-row--solo added for rows with no screenshot.
   09  .hero::before ember gradient deleted. Sage given the
       already-true claims. .btn-bone put to work in the hero.
   10  .moment-close set upright — italic is reserved for speech.
   12  Radius scale aligned to the guide: controls 10, cards 14,
       chips pill. Unclassed links now have a defined colour.
   ============================================================ */

:root {
  /* Colors */
  --ink: #1A1512;
  --surface: #241D17;
  --line: #4A3F34;
  --line-strong: #70614F;
  --bone: #ECE7DD;
  --bone-hover: #DAD3C6;
  --mute: #A89F92;
  --mute-dim: #8D8474;
  --ember: #DE6B47;
  --ember-hover: #C95D3A;
  --sage: #74A892;

  /* Type */
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Libre Franklin", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* Shape — per Visual Identity v2 "Shape": controls 10, cards 14 */
  --r-control: 10px;
  --r-card: 14px;
  --r-pill: 999px;

  /* Space */
  --sp-xs: 8px;
  --sp-sm: 16px;
  --sp-md: 24px;
  --sp-lg: 48px;
  --sp-xl: 96px;

  /* Motion — the one curve for everything */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 240ms;

  --content-max: 1120px;
  --prose-max: 640px;
}

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

/* Classed links (logo, buttons) own their colour. Anything unclassed —
   an inline prose link added later — gets the brand link treatment. */
a { color: inherit; }
a:not([class]) { color: var(--ember); text-decoration: none; }
a:not([class]):hover { color: var(--bone); text-decoration: underline; }
a:not([class]):focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

.wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

.prose { max-width: var(--prose-max); }

/* ---------- Type scale ---------- */

h1, h2, h3, .display, .headline {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
}

h1 { font-size: clamp(2.25rem, 5.5vw, 3.5rem); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.18; letter-spacing: -0.015em; }
h3 { font-size: 1.375rem; line-height: 1.3; letter-spacing: -0.01em; color: var(--bone); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* Mono labels sit at Mute Dim (4.8:1) — never the action colour. */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute-dim);
  margin-bottom: var(--sp-sm);
}

/* Sage marks what is already true and earned. */
.eyebrow.sage { color: var(--sage); }

.lede {
  font-size: 1.0625rem;
  color: var(--mute);
  max-width: var(--prose-max);
}

.settled { color: var(--sage); font-weight: 600; }

.mono { font-family: var(--font-mono); }

/* ---------- Buttons ---------- */

.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 14px 28px;
  border-radius: var(--r-control);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

/* Ember: the single most important action per viewport (One Ember Rule).
   Used exactly twice on this page — hero CTA and form submit — and the
   two are never in frame together. */
.btn-ember { background: var(--ember); color: var(--ink); }
.btn-ember:hover { background: var(--ember-hover); }
.btn-ember:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
.btn-ember:disabled { background: var(--line); color: var(--mute); cursor: not-allowed; }

/* Bone: the neutral default primary */
.btn-bone { background: var(--bone); color: var(--ink); }
.btn-bone:hover { background: var(--bone-hover); }
.btn-bone:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

/* Ghost: tertiary actions, Line Strong border (3:1) */
.btn-ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--line-strong);
  padding: 13px 27px;
}
.btn-ghost:hover { border-color: var(--bone); }
.btn-ghost:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

.btn-sm { padding: 9px 18px; font-size: 0.9375rem; }

/* ---------- Mark ---------- */

.mark {
  flex-shrink: 0;
  display: block;
  width: 20px;
  height: 28px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  padding-top: 18px;
  padding-bottom: 18px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  color: var(--bone);
  text-decoration: none;
}

.logo:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; }

.header-tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mute-dim);
  letter-spacing: 0.04em;
  display: none;
}

@media (min-width: 720px) {
  .header-tagline { display: block; }
}

/* ---------- Hero ---------- */

.hero {
  padding: var(--sp-xl) 0 var(--sp-lg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--sp-lg); }
}

.hero-copy h1 { margin-bottom: var(--sp-md); }
.hero-copy .lede { margin-bottom: var(--sp-md); }

.hero-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.4375rem;
  line-height: 1.45;
  color: var(--bone);
  border-left: 1px solid var(--line);
  padding-left: var(--sp-md);
  margin: var(--sp-md) 0;
}

.hero-cta-row {
  display: flex;
  gap: var(--sp-sm);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--sp-md);
}

.hero-microcopy {
  font-size: 0.9375rem;
  color: var(--mute);
  margin-top: var(--sp-sm);
}

.hero-visual { position: relative; }

/* ---------- Device frame ---------- */

/* Phone bezel around true mobile captures of the live app. Height is
   driven by the screenshot, so the device is exactly as tall as its
   screen — no letterboxing, no dead space, no distortion. The status
   bar is drawn here because the captures start below it. */
.phone {
  position: relative;
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  background: #0E0B0A;
  border: 1px solid var(--line-strong);
  border-radius: 42px;
  padding: 9px;
}

.phone-screen {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  background: var(--ink);
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 22px 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.02em;
}

.phone-signal {
  display: flex;
  align-items: center;
  gap: 3px;
}

.phone-signal i {
  display: block;
  width: 3px;
  background: var(--mute);
  border-radius: 1px;
}
.phone-signal i:nth-child(1) { height: 4px; }
.phone-signal i:nth-child(2) { height: 6px; }
.phone-signal i:nth-child(3) { height: 8px; }
.phone-signal b {
  display: block;
  width: 16px;
  height: 8px;
  margin-left: 4px;
  border: 1px solid var(--mute);
  border-radius: 2px;
  position: relative;
}
.phone-signal b::after {
  content: "";
  position: absolute;
  inset: 1.5px;
  right: 6px;
  background: var(--mute);
  border-radius: 1px;
}

.phone-notch {
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  width: 74px;
  height: 17px;
  background: #070505;
  border-radius: var(--r-pill);
  z-index: 2;
}

.phone-content img { display: block; width: 100%; }

/* Floats over the app's own tab bar, as it does on a real device. */
.phone-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 4px;
  border-radius: var(--r-pill);
  background: rgba(236, 231, 221, 0.45);
  z-index: 2;
}

.device-caption {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mute-dim);
  text-align: center;
  margin-top: var(--sp-md);
  letter-spacing: 0.04em;
}

/* ---------- Sections (generic) ---------- */

section { padding: var(--sp-xl) 0 var(--sp-md); }

.section-head { margin-bottom: var(--sp-lg); max-width: 760px; }
.section-head h2 { margin-bottom: var(--sp-sm); }

/* ---------- The Moment (stat numerals) ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
  border-top: 1px solid var(--line);
  padding-top: var(--sp-lg);
}

@media (max-width: 760px) {
  .stat-row { grid-template-columns: 1fr; gap: var(--sp-md); }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

/* Bone, not ember: these are the problem, not the call to action. */
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  color: var(--bone);
  font-weight: 500;
  line-height: 1;
}

.stat-label { color: var(--bone); font-weight: 600; font-size: 0.9375rem; }
.stat-source { font-family: var(--font-mono); font-size: 0.75rem; color: var(--mute-dim); }

.moment-close {
  margin-top: var(--sp-lg);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.75rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: var(--prose-max);
}

/* ---------- Positioning ---------- */

.positioning-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--sp-lg);
  align-items: start;
}

@media (max-width: 860px) {
  .positioning-grid { grid-template-columns: 1fr; }
}

.rejects { display: flex; flex-direction: column; }

.reject-row {
  padding: var(--sp-sm) 0;
  border-bottom: 1px solid var(--line);
}

.reject-row:first-child { padding-top: 0; }

.reject-row .tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mute-dim);
  display: block;
  margin-bottom: 4px;
}

.reject-row p { color: var(--mute); font-size: 0.9375rem; }

.claim-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-card);
  padding: var(--sp-lg);
}

.claim-card h3 { font-size: clamp(1.5rem, 3vw, 1.875rem); margin-bottom: var(--sp-sm); }
.claim-card p { color: var(--bone); }
.claim-card .rival-note {
  margin-top: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--mute);
}

/* ---------- How it works ---------- */

.walk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
  padding: var(--sp-lg) 0;
  border-top: 1px solid var(--line);
}

.walk-row:first-of-type { border-top: none; }

.walk-row.reverse .walk-visual { order: -1; }

/* Rows with no screenshot run as a single measured column rather than
   leaving half the grid empty. */
.walk-row--solo { grid-template-columns: 1fr; }
.walk-row--solo .walk-copy { max-width: var(--prose-max); }

@media (max-width: 860px) {
  .walk-row, .walk-row.reverse { grid-template-columns: 1fr; gap: var(--sp-md); }
  .walk-row.reverse .walk-visual { order: initial; }
}

.walk-num {
  font-family: var(--font-mono);
  color: var(--mute-dim);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-xs);
  display: block;
}

.walk-copy h3 { margin-bottom: var(--sp-sm); }
.walk-copy p { color: var(--mute); }

.wip-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute-dim);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  margin-bottom: var(--sp-sm);
}

/* ---------- Trust / not-therapy ---------- */

.trust-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-lg);
}

@media (max-width: 860px) {
  .trust-grid { grid-template-columns: 1fr; gap: var(--sp-md); }
}

.trust-item .eyebrow { margin-bottom: var(--sp-xs); }
.trust-item p { color: var(--mute); font-size: 0.9375rem; }

.crisis-note {
  margin-top: var(--sp-lg);
  padding: var(--sp-md);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  font-size: 0.9375rem;
  color: var(--mute);
}

/* ---------- Founder ---------- */

.founder-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--sp-lg);
}

.founder-quote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.4375rem, 2.6vw, 1.9rem);
  line-height: 1.4;
  color: var(--bone);
  margin-bottom: var(--sp-md);
}

.founder-byline {
  font-size: 0.9375rem;
  color: var(--mute);
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

/* Surface with a Line Strong ring — an initial is an identifier,
   not an action. */
.founder-initial {
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  background: var(--ink);
  border: 1px solid var(--line-strong);
  color: var(--bone);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- Signup ---------- */

.signup-band {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.signup-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--sp-xl);
  align-items: start;
}

@media (max-width: 860px) {
  .signup-inner { grid-template-columns: 1fr; }
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

/* Netlify honeypot field — present for bot-catching, invisible to people. */
.hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.field-row { display: flex; gap: var(--sp-sm); flex-wrap: wrap; }
.field-row .field { flex: 1; min-width: 180px; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mute-dim);
  margin-bottom: 6px;
}

.field input {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-control);
  padding: 13px 16px;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  transition: border-color var(--dur) var(--ease);
}

.field input::placeholder { color: var(--mute-dim); }

/* A real focus ring, matching the buttons — not a hairline hue change. */
.field input:focus-visible {
  border-color: var(--ember);
  outline: 2px solid var(--bone);
  outline-offset: 2px;
}

.signup-submit-row {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-top: 6px;
}

.form-status {
  font-size: 0.9375rem;
  color: var(--sage);
  min-height: 1.2em;
}

.form-fineprint {
  font-size: 0.9375rem;
  color: var(--mute);
  margin-top: var(--sp-sm);
}

/* ---------- Footer ---------- */

footer {
  padding: var(--sp-lg) 0;
  border-top: 1px solid var(--line);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--mute-dim);
}

.footer-disclaimer {
  margin-top: var(--sp-md);
  padding-top: var(--sp-md);
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--mute);
  max-width: 720px;
}
