/* ==========================================================================
   Zappy Co. — 2026
   Typeface: Atkinson Hyperlegible (Braille Institute) — letterforms designed to
   be distinguishable by readers with low vision. Chosen because this site's
   audience is people losing sight and cognition, and those who care for them.
   Brand teal #3DC0CE is a SURFACE colour: white on it is 2.18:1 and fails AA.
   ========================================================================== */

/* ---------- tokens ---------- */
:root {
  color-scheme: light;

  --brand:   #3DC0CE;
  /* Softer teal for large surfaces: #3DC0CE at full strength reads heavy
     as a block. #B4E4E9 keeps the hue, drops the weight. Text on it is
     --on-soft (10.7:1) and --on-soft-mut (6.9:1). */
  --brand-soft: #B4E4E9;
  --on-soft:     #1E2A2D;
  --on-soft-mut: #2F4A4E;
  --ink:     #121617;

  --teal-50:#F3FBFC; --teal-100:#E7F7F8; --teal-200:#D0EDF0; --teal-300:#ABDDE3;
  --teal-400:#78CFD9; --teal-500:#3BBFCE; --teal-600:#27A2B0; --teal-700:#1B828D;
  --teal-800:#12646E; --teal-900:#0E484E; --teal-950:#0A2F33;

  --n-0:#FFFFFF; --n-25:#FAFCFC; --n-50:#F6F9FA; --n-100:#EEF3F4; --n-200:#E1E9EA;
  --n-300:#CBD6D7; --n-400:#9FB0B2; --n-500:#738A8C; --n-600:#56696C;
  --n-700:#3F4E50; --n-800:#2A3537; --n-900:#1A2223; --n-950:#121717;

  --bg:        var(--n-0);
  --bg-sunk:   var(--teal-50);
  --text:      var(--n-900);
  --muted:     var(--n-600);
  --rule:      var(--n-200);
  --rule-firm: var(--n-300);
  --link:      var(--teal-800);

  --zy-ink:   var(--ink);
  --zy-iris:  var(--brand);
  --zy-pupil: var(--ink);   /* never inverts — it is a pupil */

  /* type: perfect fourth, fluid */
  --fs-xs:   0.8125rem;
  --fs-sm:   0.9375rem;
  --fs-base: clamp(1.0625rem, 0.99rem + 0.36vw, 1.1875rem);
  --fs-md:   clamp(1.1875rem, 1.09rem + 0.46vw, 1.375rem);
  --fs-lg:   clamp(1.4375rem, 1.27rem + 0.82vw, 1.875rem);
  --fs-xl:   clamp(1.875rem, 1.55rem + 1.55vw, 2.875rem);
  --fs-2xl:  clamp(2.375rem, 1.73rem + 3.05vw, 4.25rem);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 0.8rem + 2.2vw, 3rem);
  --max: 72rem;

  --sp-section: clamp(4.5rem, 3rem + 7vw, 9rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg:        #0B1012;
    --bg-sunk:   #121A1C;
    --text:      #E9F0F1;
    --muted:     #9FB0B2;
    --rule:      #223034;
    --rule-firm: #2E3E42;
    --link:      var(--teal-300);
    --zy-ink:    #E9F0F1;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0B1012; --bg-sunk:#121A1C; --text:#E9F0F1; --muted:#9FB0B2;
  --rule:#223034; --rule-firm:#2E3E42; --link:var(--teal-300); --zy-ink:#E9F0F1;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible", ui-sans-serif, system-ui,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
h1,h2,h3,h4 { line-height: 1.12; margin: 0; font-weight: 700; letter-spacing: -0.021em; }
p { margin: 0; }
a { color: var(--link); }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--teal-700);
  outline-offset: 3px;
  border-radius: 2px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :where(a,button,[tabindex]):focus-visible { outline-color: var(--teal-300); }
}

.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}
.skip {
  position:absolute; left:var(--gutter); top:-4rem; z-index:100;
  background:var(--text); color:var(--bg); padding:.7rem 1rem;
  border-radius:6px; font-weight:700; text-decoration:none;
  transition: top .18s ease;
}
.skip:focus { top:.75rem; }

.wrap { width:100%; max-width:var(--max); margin-inline:auto; padding-inline:var(--gutter); }

/* ---------- the wordmark ---------- */
.wordmark { display:block; height:auto; overflow:visible; }
.zy-ink  { fill: var(--zy-ink); }
.zy-iris { fill: var(--zy-iris); }
.zy-pup  { fill: var(--zy-pupil); }
.zy-hi   { fill: #fff; }
.zy-lid  { fill: var(--zy-ink); transform: translateY(0); }

/* lids rest fully above the socket; JS drives the blink */
.zy-lid { transition: transform 90ms cubic-bezier(.4,0,.6,1); }
.zy-pupil { transition: transform 110ms linear; }

.wordmark--hero { width:100%; }
.wordmark--nav  { width:clamp(6.5rem, 5.4rem + 3.4vw, 8.5rem); }
.wordmark--foot { width:clamp(7.5rem, 6rem + 4vw, 10rem); margin-bottom:1.1rem; }

@media (prefers-reduced-motion: reduce) {
  .zy-lid, .zy-pupil { transition: none !important; }
}

/* ---------- masthead ---------- */
.masthead {
  position:sticky; top:0; z-index:40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.3);
  border-bottom:1px solid var(--rule);
}
@supports not (backdrop-filter: blur(2px)) { .masthead { background: var(--bg); } }
.masthead__in {
  display:flex; align-items:center; justify-content:space-between;
  gap:1.5rem; min-height:4.25rem;
}
.masthead a.brand { display:inline-flex; align-items:center; line-height:0; }
.nav { display:flex; align-items:center; gap:clamp(.9rem,.4rem + 1.4vw,1.9rem); }
.nav a {
  color:var(--text); text-decoration:none; font-size:var(--fs-sm); font-weight:700;
  padding-block:.4rem; border-bottom:2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--brand); }
.nav .nav__cta {
  background:var(--text); color:var(--bg); border-bottom:0;
  padding:.5rem .9rem; border-radius:999px;
}
.nav .nav__cta:hover { background:var(--teal-800); color:#fff; }
@media (max-width: 34rem) { .nav__hide { display:none; } }

/* ---------- hero ---------- */
.hero { padding-block: clamp(2.5rem,1.5rem + 4vw,5rem) clamp(3rem,2rem + 5vw,6rem); }
.hero__line { max-width: 56rem; }
/* the logo is a word in the sentence */
.hero__word { display:block; width:min(92%, 30rem); margin-bottom:clamp(.9rem, .5rem + 1.5vw, 1.4rem); }
.hero__rest {
  display:block; font-size:var(--fs-2xl); font-weight:700;
  line-height:1.03; letter-spacing:-0.03em; margin:0;
  text-wrap:balance;
}
.hero__sub {
  margin-top:1.6rem; max-width:var(--measure);
  font-size:var(--fs-md); color:var(--muted);
}

.status {
  margin-top:clamp(2.5rem, 1.8rem + 3vw, 4rem);
  display:grid; gap:.5rem 2.5rem;
  grid-template-columns: minmax(0,1fr);
  max-width:46rem;
  background:var(--brand-soft); color:var(--on-soft);
  padding:clamp(1.25rem, 1rem + 1.2vw, 1.9rem) clamp(1.25rem, 1rem + 1.4vw, 2rem);
}
.status__when, .status__what { color:var(--on-soft); }
@media (min-width: 46rem) { .status { grid-template-columns: 7.5rem minmax(0,1fr); gap:1rem 2.5rem; } }
.status__when { font-weight:700; font-size:var(--fs-sm); }
.status__what { font-size:var(--fs-md); max-width:30rem; }
.status__what b { font-weight:700; }

/* ---------- generic section ---------- */
.section { padding-block: var(--sp-section); border-top:1px solid var(--rule); }
.section--sunk { background: var(--bg-sunk); border-top-color: transparent; }
.section__head { max-width: var(--measure); margin-bottom: clamp(2.5rem,1.8rem + 3vw,4rem); }
.section__head h2 { font-size: var(--fs-xl); }
.section__head p { margin-top:1rem; color:var(--muted); font-size:var(--fs-md); }

/* ---------- what we're building ---------- */
.builds { display:grid; gap:clamp(2rem,1.2rem + 3vw,3.5rem); }
@media (min-width: 52rem) { .builds { grid-template-columns: repeat(3, 1fr); } }
.build h3 { font-size: var(--fs-lg); }
.build p { margin-top:.65rem; color:var(--muted); max-width:24rem; }
.build__key {
  display:block; width:2.75rem; height:3px; background:var(--brand);
  margin-bottom:1.1rem;
}

/* ---------- the log ---------- */
.log { border-top:1px solid var(--rule-firm); }
.log__row {
  display:grid; gap:.35rem 2.5rem; padding-block:clamp(1.4rem,1rem + 1.2vw,2rem);
  border-bottom:1px solid var(--rule); align-items:start;
  grid-template-columns: minmax(0,1fr);
}
@media (min-width: 46rem) { .log__row { grid-template-columns: 7.5rem minmax(0,1fr); } }
.log__when { font-weight:700; color:var(--muted); font-variant-numeric:tabular-nums; }
.log__what { max-width:40rem; }
.log__what strong { font-weight:700; }
.log__row--live {
  background:var(--brand-soft);
  padding-inline:clamp(1rem, .7rem + 1vw, 1.5rem);
  margin-inline:calc(-1 * clamp(1rem, .7rem + 1vw, 1.5rem));
  border-bottom-color:transparent;
}
.log__row--live .log__when,
.log__row--live .log__what { color:var(--on-soft); }

/* ---------- approach ---------- */
.approach { display:grid; gap:clamp(2rem,1.4rem + 2.6vw,3.5rem); }
@media (min-width: 54rem) { .approach { grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); align-items:start; } }
.approach__lede {
  font-size: var(--fs-lg); font-weight:700; line-height:1.24;
  letter-spacing:-0.022em; max-width:24rem; margin:0; text-wrap:balance;
}
@media (min-width: 54rem) { .approach__lede { position:sticky; top:7rem; } }
.approach__body > * + * { margin-top:1.1rem; }
.approach__body p { color:var(--muted); max-width:var(--measure); }
.approach__name { color:var(--text) !important; font-weight:700; }

/* ---------- table ---------- */
.tablewrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
table.data { border-collapse:collapse; width:100%; min-width:40rem; font-size:var(--fs-sm); }
table.data caption { text-align:left; color:var(--muted); font-size:var(--fs-sm); margin-bottom:1rem; max-width:var(--measure); }
table.data th, table.data td { padding:.7rem .85rem; text-align:right; border-bottom:1px solid var(--rule); font-variant-numeric:tabular-nums; }
table.data th[scope="row"], table.data thead th:first-child { text-align:left; font-variant-numeric:normal; }
table.data thead th { border-bottom:2px solid var(--text); font-size:var(--fs-xs); }
table.data tbody tr:last-child td, table.data tbody tr:last-child th { border-bottom:2px solid var(--text); font-weight:700; }
table.data td.grow { color:var(--teal-800); font-weight:700; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) table.data td.grow { color: var(--teal-300); }
}

/* ---------- contact ---------- */
.asks { display:grid; gap:clamp(1.75rem,1.2rem + 2.4vw,3rem); }
@media (min-width: 52rem) { .asks { grid-template-columns: repeat(3,1fr); } }
.ask h3 { font-size:var(--fs-md); }
.ask p { margin-top:.5rem; color:var(--muted); max-width:22rem; }
.ask a { margin-top:.85rem; display:inline-block; font-weight:700; }

.addr { margin-top:clamp(2.5rem,2rem + 2vw,3.5rem); padding-top:1.75rem; border-top:1px solid var(--rule); display:grid; gap:1.5rem 3rem; }
@media (min-width:46rem) { .addr { grid-template-columns:repeat(2,minmax(0,22rem)); } }
.addr h3 { font-size:var(--fs-sm); color:var(--muted); font-weight:700; }
.addr p { margin-top:.4rem; }
.addr address { font-style:normal; margin-top:.4rem; }

/* ---------- footer ---------- */
.foot { border-top:1px solid var(--rule); padding-block:clamp(2.5rem,2rem + 2vw,3.5rem); }
.foot__in { display:flex; flex-wrap:wrap; gap:1.75rem; justify-content:space-between; align-items:flex-end; }
.foot__note { font-size:var(--fs-sm); color:var(--muted); max-width:30rem; margin-top:0; }
.foot__note a { color:var(--muted); }
.foot__links { display:flex; flex-wrap:wrap; gap:1.25rem; font-size:var(--fs-sm); }
.foot__links a { color:var(--text); text-decoration:none; font-weight:700; border-bottom:2px solid transparent; }
.foot__links a:hover { border-bottom-color:var(--brand); }

.disclaimer {
  margin-top:2rem; padding:1.1rem 1.25rem; border-left:3px solid var(--brand);
  background:var(--bg-sunk); color:var(--muted); font-size:var(--fs-sm); max-width:46rem;
}

/* ---------- solid teal blocks ----------
   The band surface is --brand-soft, not full-strength --brand: a wall of
   #3DC0CE is heavy. Text is dark (10.68:1, AAA); white on teal is 2.18:1 at
   any strength and is never used here. These overrides are scoped to the band, so they hold in
   dark mode too — a teal band stays teal and keeps its dark text. */
.band--teal {
  background: var(--brand-soft);
  border-top-color: transparent;
  --text:      #1E2A2D;   /* 10.68:1 on the soft teal */
  --muted:     #2F4A4E;   /* 6.88:1 */
  --link:      #1E2A2D;
  --rule:      rgba(30,42,45,.20);
  --rule-firm: rgba(30,42,45,.34);
  color: var(--text);
}
.band--teal .build__key { background: var(--teal-700); }
.band--teal a { color: var(--on-soft); text-decoration-thickness:2px; text-underline-offset:3px; }
.band--teal a:hover { text-decoration-thickness:3px; }
.band--teal :where(a,button,[tabindex]):focus-visible { outline-color: var(--on-soft); }
.band--teal .disclaimer {
  background: var(--n-0); border-left-color: var(--teal-700); color: var(--n-800);
}
.band--teal .addr h3 { color: var(--muted); }
