/* Angler — reset, fonts, typography, shared primitives.
   Every section stylesheet assumes this file. */

/* ---------- fonts (self-hosted; never a CDN, never a system fallback) ---------- */
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap; }
/* 700 exists only for the #demo lede. Every other display line on the site is 600 —
   this one is a single short statement filled with a photograph, and at 600 the
   counters were thin enough that the image inside them read as noise. */
@font-face { font-family: "Fraunces"; src: url("../assets/fonts/fraunces-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../assets/fonts/outfit-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../assets/fonts/outfit-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Outfit"; src: url("../assets/fonts/outfit-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* overflow-x: clip, NOT hidden. `hidden` would make this a scroll container, which
   silently breaks `position: sticky` in the hero stage. `clip` crops without that. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; padding: 0; }
ul[role="list"], ol[role="list"] { list-style: none; }
img, picture, svg, canvas, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-soft);
  background: var(--vellum);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--sec-y); position: relative; }

/* Signature paper grain. Cheap, and very characteristic of the app. */
.grain::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    radial-gradient(rgba(25, 22, 18, 0.028) 1px, transparent 1px),
    radial-gradient(rgba(25, 22, 18, 0.016) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 1px;
}
.section > .wrap { position: relative; z-index: 1; }

/* ---------- typography ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 14px;
  font-family: var(--mono); font-weight: 500;
  font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dawn-deep);
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.eyebrow--center { justify-content: center; }
.eyebrow--center::after { display: none; }

.h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2.6rem, 5.2vw, 4rem);
  line-height: 1.02; letter-spacing: -0.02em;
  color: var(--lake);
}
.h2 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.08; letter-spacing: -0.02em;
  color: var(--lake);
}
.h3 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(1.15rem, 1.5vw, 1.35rem);
  line-height: 1.25; letter-spacing: -0.01em;
  color: var(--ink);
}
.lead {
  font-size: clamp(1.02rem, 1.25vw, 1.16rem);
  line-height: 1.55; color: var(--ink-soft); max-width: 58ch;
}
.small { font-size: 14px; line-height: 1.5; color: var(--muted); }
/* --muted, not --faint: --faint measures 2.25:1 on cream and is a rule colour. */
.fine  { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.mono  { font-family: var(--mono); font-weight: 500; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: var(--r-cta);
  font-family: var(--sans); font-size: 15.5px; font-weight: 500; line-height: 1;
  transition: background-color .18s var(--ease-nav), color .18s var(--ease-nav),
              transform .18s var(--ease-house), box-shadow .28s var(--ease-house);
  will-change: transform;
}
.btn--primary { background: var(--lake); color: var(--vellum); box-shadow: var(--sh-cta); }
.btn--primary:active { transform: translateY(0); }
.btn--onDark { background: rgba(255,255,255,.95); color: var(--ink); box-shadow: 0 8px 26px -12px rgba(0,0,0,.6); }
.btn svg { flex: none; }

/* ---------- hover gating ----------
   Every transform-driven hover on this site is gated here. A touch device has no
   hover, but it still MATCHES :hover on tap and then holds it until you tap something
   else — so an ungated lift meant a tapped Download button stayed raised and darkened
   for the rest of the visit. Colour-only hovers are left ungated on purpose: a stuck
   colour reads as "selected", a stuck transform reads as broken. */
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { background: var(--lake-dark); transform: translateY(-1px);
    box-shadow: 0 10px 24px -10px rgba(25, 92, 106, .78); }
  .btn--onDark:hover { background: #fff; transform: translateY(-1px); }
}

/* ---------- focus ---------- */
/* Two-tone ring. A single gold outline drops to 1.9–2.7:1 against the lake plates in
   the hero and the closing CTA; the dark halo guarantees one edge always clears 3:1
   whatever is behind the control. */
:where(a, button, input, [tabindex]):focus-visible {
  outline: 2.5px solid var(--dawn-deep);
  outline-offset: 2px;
  border-radius: 3px;
  box-shadow: 0 0 0 5px rgb(25 22 18 / 0.55);
}
@media (prefers-contrast: more) {
  :where(a, button, input, [tabindex]):focus-visible { outline-width: 3px; }
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: 8px; left: 8px; z-index: 200; transform: translateY(-160%);
  background: var(--lake); color: var(--vellum); padding: 10px 16px; border-radius: var(--r-field);
}
.skip-link:focus { transform: none; }

/* ---------- scroll reveal (Fora's move: translateY + fade, nothing more) ----------
   Gated on .js-ready, which 00-engine.js sets on <html> at boot. Without that gate a
   visitor with JS disabled gets a blank page — the reveal never fires and all 54
   .reveal elements stay at opacity 0. Unstyled-until-JS is the correct failure mode
   here: no JS means no animation, not no content. */
.js-ready .reveal { opacity: 0; transform: translateY(24px); }
.js-ready .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .62s var(--ease-house), transform .62s var(--ease-house);
}
.js-ready .reveal[data-delay="1"].is-in { transition-delay: .07s; }
.js-ready .reveal[data-delay="2"].is-in { transition-delay: .14s; }
.js-ready .reveal[data-delay="3"].is-in { transition-delay: .21s; }
.js-ready .reveal[data-delay="4"].is-in { transition-delay: .28s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 1ms !important; animation-iteration-count: 1 !important;
    transition-duration: 1ms !important; scroll-behavior: auto !important;
  }
  .js-ready .reveal { opacity: 1; transform: none; }
}
