/* tend — workshop-site shared stylesheet
 *
 * Canonical tokens from TendKit/Sources/TendPalette.swift, mirrored by the
 * Design System brief (Tend.zip Ed. 2026.04). Ivory, never white;
 * one glowing accent; no gradients. Radii whitelist: 6/10/14/20.
 *
 * Light mode is the site default — matches email clients and the brief's
 * "warm eggshell, never sterile white" stance for marketing surfaces.
 */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@800&display=swap');

:root {
  /* Palette — canonical */
  --bg:            #F6F1EA;   /* warm eggshell */
  --bg-alt:        #EFE9DF;   /* hover surface */
  --card:          #FDFBF7;   /* ivory card */
  --ink:           #1A1815;   /* charcoal */
  --text:          #1A1815;
  --text-muted:    #5A544B;
  --text-subtle:   #8A8275;
  --border:        #E6DFD1;
  --border-strong: #D4CBB8;
  --accent:        #B5542A;   /* burnt sienna — light-mode accent */
  --accent-hover:  #9A4620;
  --amber:         #E8A33D;   /* for decorative accents only */
  --sage:          #5F7F62;   /* semantic: stable / close */
  --terracotta:    #B94A3A;   /* semantic: warning / cooling */

  /* Type stacks */
  --serif:   "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --rounded: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  --mono:    ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wordmark: "Bricolage Grotesque", ui-rounded, -apple-system, "SF Pro Rounded", system-ui, sans-serif;

  /* Radii whitelist */
  --r-6:  6px;
  --r-10: 10px;
  --r-14: 14px;
  --r-20: 20px;

  /* Motion budget */
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  color: var(--text);
  font-family: var(--rounded);
  background: var(--bg);
  min-height: 100vh;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
a:hover { color: var(--accent); }

.page {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0 96px;
}

/* Site chrome — shared header + footer ----------------------------------- */

.home-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.home-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid rgba(230, 223, 209, 0.72);
}

.home-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 12px;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.home-brand img,
.home-footer__mark {
  display: block;
  width: auto;
  height: 26px;
}

.home-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.home-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 140ms var(--ease);
}

.home-nav a:hover,
.home-nav a.active {
  color: var(--accent);
}

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

.hero { margin-bottom: 40px; }
.eyebrow {
  font-family: var(--rounded);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-subtle); font-weight: 600;
  margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 16px;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .sub {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 24px;
  max-width: 52ch;
}

.hero-note {
  margin: -4px 0 0;
  max-width: 54ch;
  color: var(--text-subtle);
  font-size: 13px;
  line-height: 1.55;
}

/* Rhythm chart ------------------------------------------------------------ */

.rhythm {
  margin: 40px 0;
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-20);
}
.rhythm__label {
  font-family: var(--rounded);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-subtle); font-weight: 600;
  margin-bottom: 18px;
}
.rhythm__bar {
  display: flex;
  height: 14px;
  width: 100%;
  border-radius: var(--r-6);
  overflow: hidden;
  background: var(--bg-alt);
}
.rhythm__seg {
  height: 100%;
  transition: filter 140ms var(--ease);
}
.rhythm__seg:hover { filter: brightness(1.08); }
.rhythm__seg.is-close       { background: var(--sage);       }
.rhythm__seg.is-connected   { background: var(--accent);     }
.rhythm__seg.is-cooling     { background: var(--amber);      }
.rhythm__seg.is-missing     { background: var(--terracotta); opacity: 0.8; }
.rhythm__seg.is-lost        { background: var(--text-subtle); }
.rhythm__legend {
  display: flex; flex-wrap: wrap; gap: 14px 20px;
  margin-top: 16px;
  font-family: var(--rounded);
  font-size: 12px;
  color: var(--text-muted);
}
.rhythm__legend-item { display: inline-flex; align-items: center; gap: 7px; }
.rhythm__swatch {
  width: 10px; height: 10px; border-radius: var(--r-6);
  display: inline-block;
}
.rhythm__swatch.is-close     { background: var(--sage); }
.rhythm__swatch.is-connected { background: var(--accent); }
.rhythm__swatch.is-cooling   { background: var(--amber); }
.rhythm__swatch.is-missing   { background: var(--terracotta); opacity: 0.8; }
.rhythm__swatch.is-lost      { background: var(--text-subtle); }
.rhythm__legend-count { color: var(--text-subtle); font-variant-numeric: tabular-nums; }
.rhythm__caption {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  font-style: italic;
}

/* Why now · loneliness infographic ---------------------------------------- */

.whynow {
  margin: 56px 0 40px;
  padding: 44px 0;
  position: relative;
}
.whynow__eyebrow {
  font-family: var(--rounded);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-subtle); font-weight: 600;
  margin: 0 0 10px;
}
.whynow__title {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 3.4vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 28px;
}
.whynow__title em { font-style: italic; color: var(--accent); }

.whynow__hero-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-20);
  padding: 32px 30px;
  margin-bottom: 20px;
}
.whynow__timeline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}
.whynow__year {
  font-family: var(--rounded);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-subtle); font-weight: 600;
  margin-bottom: 6px;
}
.whynow__big {
  font-family: var(--serif);
  font-size: clamp(3rem, 6vw, 4.25rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.whynow__big.is-now { color: var(--accent); }
.whynow__arrow {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--text-subtle);
  padding: 0 8px;
  font-style: italic;
}
.whynow__hero-caption {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
  max-width: 58ch;
}
.whynow__hero-caption strong { color: var(--ink); font-weight: 600; }

.whynow__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.whynow__stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  padding: 22px 20px;
}
.whynow__stat-num {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 10px;
}
.whynow__stat-text {
  font-family: var(--rounded);
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0;
}
.whynow__source {
  margin: 24px 0 0;
  font-family: var(--rounded);
  font-size: 12px;
  color: var(--text-subtle);
}
.whynow__source a { color: var(--text-subtle); text-underline-offset: 2px; }
.whynow__source a:hover { color: var(--ink); }

/* Parallax fade-up — elements with .reveal translate in as they enter view.
   JS toggles .is-visible via IntersectionObserver. Respect reduced-motion. */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* How it works + privacy + inline survey ---------------------------------- */

.howit {
  margin: 48px 0 40px;
}
.howit__privacy {
  margin-top: 28px;
  padding: 20px 22px;
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-10);
}
.howit__privacy p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text);
  margin: 0;
  max-width: 62ch;
}
.howit__privacy p em { font-style: normal; color: var(--accent); font-weight: 600; }

.survey {
  margin: 40px 0;
}
.survey__intro {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 20px;
  max-width: 58ch;
}

/* Block sections ---------------------------------------------------------- */

.block { margin: 48px 0; }
.block h2 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 16px;
}
.block h2 em { font-style: italic; color: var(--accent); }
.block p {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--text);
  margin: 0 0 16px;
  max-width: 62ch;
}
.block p.fine {
  font-family: var(--rounded);
  font-size: 13px;
  color: var(--text-subtle);
}

/* CTAs -------------------------------------------------------------------- */

.cta-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: 28px 0 8px;
}
.cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent); color: var(--card);
  padding: 13px 22px; border-radius: var(--r-14);
  font-family: var(--rounded);
  font-weight: 600; font-size: 15px; border: none; cursor: pointer;
  text-decoration: none;
  transition: background 140ms var(--ease), transform 140ms var(--ease);
}
.cta:hover { background: var(--accent-hover); transform: translateY(-1px); color: var(--card); }
.cta.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--border-strong);
}
.cta.ghost:hover { background: var(--bg-alt); color: var(--ink); transform: translateY(-1px); }

/* Cards ------------------------------------------------------------------- */

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-20);
  padding: 24px 26px;
  margin: 20px 0;
}

/* Tiles grid -------------------------------------------------------------- */

.grid-2, .grid-3 {
  display: grid; gap: 14px;
  margin: 20px 0;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-14);
  padding: 18px 20px;
}
.tile .th {
  font-family: var(--rounded);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.tile .td {
  font-family: var(--rounded);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Form (used on /beta/) --------------------------------------------------- */

.field {
  margin: 0 0 20px;
  min-inline-size: 0;
}

fieldset.field {
  padding: 0;
  border: 0;
}

.field legend,
.field label,
.field .fl {
  display: block;
  font-family: var(--rounded);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 8px;
  padding: 0;
}

.field-hint {
  margin: 0 0 12px;
  color: var(--text-subtle);
  font-family: var(--rounded);
  font-size: 13px;
  line-height: 1.45;
}

.field-optional {
  color: var(--text-subtle);
  font-weight: 400;
}

.field input[type="email"],
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-10);
  background: var(--bg);
  font: inherit;
  font-family: var(--rounded);
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.choices { display: flex; gap: 8px; flex-wrap: wrap; }
.choices input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.choices label {
  display: inline-flex; align-items: center;
  padding: 9px 14px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-6);
  font-size: 14px; font-weight: 500;
  color: var(--ink); cursor: pointer; margin: 0;
}
.choices label:hover { border-color: var(--accent); }
.choices input[type="radio"]:checked + label {
  background: var(--accent);
  color: var(--card);
  border-color: var(--accent);
}
.consent-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--rounded);
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 10px;
}
.consent-row input[type="checkbox"] { margin-top: 3px; }
.consent-row:last-of-type { margin-bottom: 0; }
.status {
  min-height: 24px;
  font-size: 14px;
  color: var(--text-muted);
}
.status[data-kind="error"] { color: var(--terracotta); }
.status[data-kind="success"] { color: var(--accent); }

/* Site footer ------------------------------------------------------------- */

.home-footer {
  padding: 22px 0 30px;
  margin-top: 64px;
  border-top: 1px solid var(--border);
}

.home-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
}

.home-footer__line {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.home-footer__line em {
  font-style: italic;
  color: var(--accent);
}

.home-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 14px;
}

.home-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: color 140ms var(--ease);
}

.home-footer__links a:hover {
  color: var(--accent);
}

@media (max-width: 860px) {
  .home-shell {
    width: min(100%, calc(100% - 32px));
  }
  .home-header__inner,
  .home-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .home-nav,
  .home-footer__links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .home-nav {
    flex-wrap: wrap;
    gap: 10px 14px;
  }
}
