/*
 * Henry site — layout + components.
 *
 * Tokens come from the canonical design system (web/styles/tokens.css —
 * mirror of design-system/colors_and_type.css). Do not redefine token values
 * here; use the design-system variables.
 *
 * Variable cheatsheet (from design-system):
 *   --bg, --card, --raised, --sunken            (surfaces)
 *   --ink-1, --ink-2, --ink-3, --on-accent      (text)
 *   --border-subtle, --border-strong, --focus
 *   --feed-vivid / --pump-vivid / --pee-vivid / --poop-vivid (activity primaries)
 *   --success / --warning / --danger / --encouragement
 *   --xs / --sm / --md / --lg / --xl / --2xl / --3xl  (spacing)
 *   --r-control / --r-card / --r-modal / --r-pill     (radii)
 *   --e0 / --e1 / --e2 / --e3                          (elevation)
 *   --font-display / --font-body / --font-mono        (type families)
 */

@import url("./tokens.css");

* { box-sizing: border-box; }

html { text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; }

/* ---------- Links ---------- */

a {
  color: var(--feed-vivid);
  text-decoration: none;
  border-bottom: 1px solid var(--border-subtle);
  transition: border-color var(--d-quick) var(--ease-out);
}
a:hover { border-bottom-color: var(--feed-vivid); }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection { background: var(--feed-vivid); color: var(--on-accent); }

/* ---------- Layout ---------- */

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--lg);
}

main > section {
  padding: var(--3xl) 0;
  border-bottom: 1px solid var(--border-subtle);
}
main > section:last-of-type { border-bottom: none; }

/* ---------- Top nav ---------- */

.site-nav {
  padding: var(--md) 0;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg);
}
.site-nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--lg);
}
.site-nav .brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--feed-ink);
  border-bottom: none;
  letter-spacing: -0.2px;
  font-variation-settings: 'opsz' 72, 'SOFT' 40;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--md) var(--lg);
}
.site-nav ul a {
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  border-bottom: none;
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] { color: var(--ink-1); }

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

.hero {
  padding: var(--3xl) 0 var(--2xl);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 56px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: -0.5px;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  margin: 0 0 var(--lg);
  max-width: 18ch;
  color: var(--ink-1);
}
.hero .lede {
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-2);
  max-width: 38ch;
  margin: 0 0 var(--xl);
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--md);
  margin-bottom: var(--2xl);
}

.hero-illustration {
  margin-top: var(--xl);
  height: 240px;
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  font-size: 14px;
  font-style: italic;
  box-shadow: var(--e1);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 var(--xl);
  border-radius: var(--r-control);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--d-quick) var(--ease-out);
}
.btn-primary {
  background: var(--feed-vivid);
  color: var(--on-accent);
  border-bottom: none;
}
.btn-primary:hover {
  background: var(--feed-ink);
  border-bottom: none;
}
.btn-primary[aria-disabled="true"] {
  background: var(--sunken);
  color: var(--ink-3);
  cursor: not-allowed;
  border: 1px solid var(--border-subtle);
}
.btn-ghost {
  background: transparent;
  color: var(--ink-1);
  border: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--card);
  border-color: var(--ink-2);
  border-bottom-color: var(--ink-2);
}

/* ---------- Feature sections ---------- */

.feature h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.2px;
  font-variation-settings: 'opsz' 72, 'SOFT' 40;
  margin: 0 0 var(--md);
  color: var(--ink-1);
  max-width: 22ch;
}
.feature .lede {
  font-size: 17px;
  line-height: 25px;
  color: var(--ink-2);
  max-width: 42ch;
  margin: 0;
}
.feature-visual {
  margin-top: var(--xl);
  padding: var(--xl);
  border-radius: var(--r-card);
  background: var(--card);
  border: 1px solid var(--border-subtle);
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  font-style: italic;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--e1);
}

.feature-visual.feed   { border-left: 4px solid var(--feed-vivid); }
.feature-visual.pump   { border-left: 4px solid var(--pump-vivid); }
.feature-visual.pee    { border-left: 4px solid var(--pee-vivid); }
.feature-visual.poop   { border-left: 4px solid var(--poop-vivid); }
.feature-visual.privacy { border-left: 4px solid var(--ink-2); }

/* ---------- Closing band + footer ---------- */

.closing {
  padding: var(--3xl) 0;
}
.closing p {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  font-variation-settings: 'opsz' 72;
  color: var(--ink-2);
  max-width: 36ch;
  font-style: italic;
  margin: 0;
}

footer {
  padding: var(--xl) 0 var(--2xl);
  border-top: 1px solid var(--border-subtle);
  color: var(--ink-3);
  font-size: 14px;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--md) var(--lg);
}
footer a {
  color: var(--ink-2);
  border-bottom: none;
}
footer a:hover { color: var(--ink-1); }

/* ---------- Language selector (footer) ---------- */

.lang-selector {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  align-items: center;
}
.lang-selector a {
  color: var(--ink-3);
  border-bottom: none;
  padding: 2px 4px;
}
.lang-selector a:hover { color: var(--ink-1); }
.lang-selector a[aria-current="page"] {
  color: var(--ink-1);
  font-weight: 700;
}
.lang-selector .sep {
  color: var(--border-strong);
  user-select: none;
}
.lang-note {
  font-size: 12px;
  color: var(--ink-3);
  font-style: italic;
  margin-top: var(--sm);
  flex-basis: 100%;
}

/* ---------- Document pages (privacy, terms, support, press) ---------- */

.doc {
  padding: var(--2xl) 0 var(--3xl);
}
.doc .updated {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: var(--xl);
}
.doc h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: -0.5px;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
  margin: 0 0 var(--lg);
  color: var(--ink-1);
}
.doc h2 {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 30px;
  font-weight: 500;
  letter-spacing: -0.2px;
  font-variation-settings: 'opsz' 72, 'SOFT' 40;
  margin: var(--2xl) 0 var(--md);
  color: var(--ink-1);
}
.doc h3 {
  font-size: 18px;
  font-weight: 600;
  margin: var(--xl) 0 var(--sm);
  color: var(--ink-1);
  letter-spacing: -0.1px;
}
.doc p {
  margin: 0 0 var(--md);
  color: var(--ink-1);
}
.doc p.lede {
  font-size: 18px;
  line-height: 28px;
  color: var(--ink-2);
}
.doc p.muted { color: var(--ink-2); }
.doc ul, .doc ol {
  padding-left: var(--lg);
  margin: 0 0 var(--md);
}
.doc li { margin-bottom: var(--xs); }
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--md) 0 var(--lg);
  font-size: 14px;
}
.doc th, .doc td {
  padding: var(--sm) var(--md);
  border-bottom: 1px solid var(--border-subtle);
  text-align: left;
  vertical-align: top;
}
.doc blockquote {
  margin: var(--lg) 0;
  padding: var(--md) var(--lg);
  border-left: 3px solid var(--feed-vivid);
  background: var(--card);
  border-radius: 0 var(--r-control) var(--r-control) 0;
  color: var(--ink-2);
  font-style: italic;
}
.doc code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--sunken);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ink-1);
}

/* FAQ accordion (no JS — uses <details>) */
details.faq {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--md) 0;
}
details.faq summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--ink-1);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--md);
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+";
  color: var(--ink-3);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}
details.faq[open] summary::after { content: "−"; }
details.faq summary:hover { color: var(--feed-vivid); }
details.faq > *:not(summary) {
  margin-top: var(--md);
  color: var(--ink-2);
}
