/* Fridgeworthy — shared design system (landing, support, join, legal) */

/* ---------- Tokens ---------- */
:root {
  /* warm neutrals */
  --cream: #F5F3EF;
  --cream-deep: #EDEAE3;
  --paper: #FCFBF8;
  --ink: #23201B;
  --body: #4A4A46;
  --faint: #6B6B66;
  --hairline: #E2DDD3;

  /* brand */
  --sage: #5E8064;          /* fills, decorative */
  --sage-ink: #46624B;      /* text links, buttons (AA on cream) */
  --sage-press: #3A5340;
  --sage-tint: #EDF5EE;
  --sage-band: #4C6851;     /* full-bleed band bg */
  --terracotta: #C4775A;
  --terracotta-ink: #925035;   /* AA on cream (5.5:1) + tint (5.2:1) */
  --terracotta-tint: #F7E9E2;
  --butter: #FFDE73;        /* logo yellow — magnet dots, small doses */
  --slate: #4A5A6A;
  --amber-tint: #FBF1DB;

  /* type */
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  /* Signature curve — same as the app's Easing.bezier(0.19, 1, 0.22, 1).
     Fast attack, long settle. Use for anything that "lands" (cards, chips). */
  --ease-swift: cubic-bezier(0.19, 1, 0.22, 1);

  /* space */
  --gutter: clamp(20px, 5vw, 48px);
  --measure: 62ch;
}

/* ---------- Base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--body);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { color: var(--ink); font-weight: 600; }

a { color: var(--sage-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--sage-press); }

::selection { background: var(--butter); color: var(--ink); }

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

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

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- Header / footer ---------- */
.site-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--gutter);
  max-width: 1120px; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-size: 21px; font-weight: 600;
  font-variation-settings: 'opsz' 40;
  color: var(--ink); text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand svg { width: 26px; height: 26px; flex: none; }

.site-foot {
  border-top: 1px solid var(--hairline);
  margin-top: clamp(56px, 10vw, 120px);
}
.site-foot .inner {
  max-width: 1120px; margin: 0 auto; padding: 32px var(--gutter) 44px;
  display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: baseline; justify-content: space-between;
  font-size: 14px; color: var(--faint);
}
.site-foot nav { display: flex; gap: 24px; }
.site-foot a { color: var(--faint); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-size: 16px; font-weight: 560;
  padding: 13px 24px; border-radius: 10px;
  border: none; cursor: pointer; text-decoration: none;
  transition: background-color 150ms ease, transform 160ms var(--ease-out), color 150ms ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--sage-ink); color: #fff; }
.btn-primary:hover { background: var(--sage-press); color: #fff; }
.btn-quiet { background: transparent; color: var(--sage-ink); box-shadow: inset 0 0 0 1px var(--hairline); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--sage-ink); background: var(--sage-tint); }

/* ---------- Notify form ---------- */
.notify { max-width: 460px; }
.notify .row { display: flex; gap: 10px; }
/* `display: flex` above outranks the UA [hidden] rule — restore it so the JS
   can hide the input row while the confirmation shows. */
.notify .row[hidden] { display: none; }
.notify input[type='email'] {
  flex: 1; min-width: 0;
  font: inherit; color: var(--ink);
  padding: 13px 16px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  transition: border-color 150ms ease;
}
.notify input[type='email']::placeholder { color: #726F64; }   /* AA on paper (4.9:1) */
.notify input[type='email']:focus { border-color: var(--sage-ink); }
/* Drop the outline only for pointer focus; keyboard focus keeps the global ring. */
.notify input[type='email']:focus:not(:focus-visible) { outline: none; }
.notify .aside {
  margin-top: 10px; font-size: 13.5px; color: var(--faint);
}
.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notify .done { padding: 12px 0; }
.notify .done-line {
  display: flex; align-items: center; gap: 10px;
  font-size: 16.5px; color: var(--sage-ink); font-weight: 520;
}
.notify .done-line svg { flex: none; }
.notify .again {
  margin-top: 8px; margin-left: 30px;
  background: none; border: none; padding: 4px 0; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--faint);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  transition: color 150ms ease;
}
.notify .again:hover { color: var(--sage-ink); }
.notify .err { margin-top: 10px; font-size: 13.5px; color: var(--terracotta-ink); }

/* ---------- Prose (legal, support) ---------- */
.prose { max-width: 68ch; }
.prose h1 {
  font-family: var(--display); font-variation-settings: 'opsz' 80;
  font-size: clamp(30px, 5vw, 40px); line-height: 1.12;
  letter-spacing: -0.01em; margin-bottom: 8px;
}
.prose .updated { font-size: 14px; color: var(--faint); margin-bottom: 36px; }
.prose h2 {
  font-family: var(--display); font-variation-settings: 'opsz' 40;
  font-size: 21px; margin: 36px 0 10px;
}
.prose h3 { font-size: 16.5px; margin: 22px 0 6px; }
.prose p, .prose li { font-size: 16px; line-height: 1.65; margin-bottom: 12px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose table { width: 100%; border-collapse: collapse; margin: 16px 0 20px; font-size: 14.5px; }
.prose th, .prose td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.prose th { font-weight: 600; color: var(--ink); }
.prose strong { color: var(--ink); font-weight: 600; }

/* table scroll guard on small screens */
.table-scroll { overflow-x: auto; }

/* ---------- Reveal on scroll ---------- */
/* Hidden state is gated on `.js`, set by an inline script before paint. With no
   JS (or a broken script) content renders normally — nothing depends on the
   observer to become visible. */
.js .reveal { opacity: 0; transform: translateY(8px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
  transition-delay: var(--d, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  .js .reveal.in { transition: none; }
}
