/* Base layout, typography, buttons, reveal. Extracted from landing.html. */

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html, body { margin: 0; padding: 0; max-width: 100vw; }
/* overflow-x: clip lets us still hide horizontal overflow without breaking
   position: sticky. overflow-x: hidden on html/body would establish a
   scrolling ancestor and disable sticky on the nav. */
html { overflow-x: clip; scroll-behavior: smooth; }
/* Section-level scroll-margin so anchor jumps (e.g. the hero CTA pointing
 * at #early-access) don't tuck the section heading under the sticky nav.
 * Tom 2026-05-22. */
section[id] { scroll-margin-top: calc(72px * var(--s, 1)); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body { overflow-x: clip; }
img, svg, video { max-width: 100%; height: auto; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: calc(17px * var(--s, 1));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Layout */
.wrap { max-width: calc(1240px * var(--s, 1)); margin: 0 auto; padding: 0 calc(32px * var(--s, 1)); }
@media (max-width: 600px) { .wrap { padding: 0 calc(20px * var(--s, 1)); } }
section { position: relative; }

/* Type */
.eyebrow {
  font-family: var(--display); font-size: calc(15px * var(--s, 1)); letter-spacing: 0;
  text-transform: none; font-weight: 600; color: var(--coral-ink, #FF5B3E);
}
.h-display {
  font-family: var(--sans);
  font-size: clamp(calc(40px * var(--s, 1)), calc(5.6vw * var(--s, 1)), calc(87px * var(--s, 1)));
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 700;
  margin: 0;
}
.h-display em {
  font-family: var(--display);
  font-style: normal;
  font-weight: 400;
  color: var(--ink-3, #8B8B85);
}
/* Section headlines: Plus Jakarta Sans 800, the app's heading face
   (FANTENNA-2054). The grey phrase after it (.h-1 em, below) keeps its own
   face, weight and style. balance stops a headline ending on one word. */
.h-1 {
  font-family: var(--display);
  font-size: var(--fs-section-h1, clamp(calc(32px * var(--s, 1)), calc(3.6vw * var(--s, 1)), calc(52px * var(--s, 1))));
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0;
  text-wrap: balance;
}
/* Two-tone marketing heading: Plus Jakarta 800 ink + Plus Jakarta 400
   grey, on the SAME LINE (Tom 2026-05-19, Figma reference). Replaces
   the earlier italic + accent treatment used across all marketing
   sections. Section files may re-tint the em colour where they need
   the secondary phrase to inherit a section accent instead of grey. */
.h-1 em {
  font-family: var(--display);
  font-style: normal;
  font-weight: 400;
  color: var(--ink-3, #8B8B85);
}
/* Where the copy breaks the line before the grey phrase (some locales do),
   balance that phrase on its own, so it cannot end on a single word. */
.h-1 br + em { display: inline-block; text-wrap: balance; }
.lede {
  font-size: clamp(calc(18px * var(--s, 1)), calc(1.5vw * var(--s, 1)), calc(22px * var(--s, 1)));
  line-height: 1.5; color: var(--ink-2); font-weight: 400;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: calc(8px * var(--s, 1));
  height: calc(48px * var(--s, 1)); padding: 0 calc(20px * var(--s, 1));
  border-radius: calc(999px * var(--s, 1));
  border: 0; cursor: pointer;
  font-size: calc(15px * var(--s, 1)); font-weight: 600;
  background: var(--ink); color: var(--bg);
  transition: transform 0.15s, opacity 0.15s, background 0.15s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); opacity: 0.92; }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); opacity: 1; }
.btn--coral { background: var(--coral-fill); color: var(--on-coral); }
.btn--lg { height: calc(56px * var(--s, 1)); padding: 0 calc(28px * var(--s, 1)); font-size: calc(16px * var(--s, 1)); }
.btn--sm { height: calc(36px * var(--s, 1)); padding: 0 calc(14px * var(--s, 1)); font-size: calc(13.5px * var(--s, 1)); }

.arrow { display: inline-block; transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- A11y primitives (Tom 2026-05-26) ---------- */
/* Visually hidden helper for skip-link / sr-only content. Standard
   pattern: removed from flow but reachable by screen readers; the
   :focus variant pulls the skip-link back into view when tabbed to. */
.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-link {
  position: absolute;
  top: calc(-100px * var(--s, 1)); left: calc(8px * var(--s, 1));
  z-index: 1000;
  background: var(--ink);
  color: var(--bg);
  padding: calc(10px * var(--s, 1)) calc(16px * var(--s, 1));
  border-radius: calc(8px * var(--s, 1));
  font-weight: 600;
  font-size: calc(14px * var(--s, 1));
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: calc(8px * var(--s, 1));
  outline: 2px solid var(--coral);
  outline-offset: 2px;
}

/* Global focus-visible. The earlier rules stripped outlines on inputs
   and never put one back on buttons / links, so keyboard users had no
   focus indicator. WCAG 2.4.7 / 2.4.11 require a visible focus marker
   with non-text contrast >=3:1. We use a 2px solid ring + offset that
   reads on both light and dark backgrounds. Section CSS can override
   colour where the default doesn't contrast (early-access dark uses
   --sun via its own input rule). */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--coral-ink, #FF5B3E);
  outline-offset: 2px;
  border-radius: calc(4px * var(--s, 1));
}
.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.btn--coral:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s, transform 0.7s; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Reduced-motion: kill transforms and animations across the v2 surface.
   The reveal-on-scroll, stage hover lift, agent hover translate-rotate,
   nav-mobile-in keyframe etc. all violate WCAG 2.3.3 (Animation from
   Interactions) for users who've opted out of motion. We leave opacity
   transitions in (no vestibular effect) but drop transforms and
   keyframe animations. Tom 2026-05-26 (a11y pass). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}

/* Fantenna wordmark logo. Inline SVG asset at /images/logos/fantenna.svg.
   The mark height drives nav sizing; width auto. Footer instance is larger. */
.logo { display: inline-flex; align-items: center; }
.logo__mark { display: block; width: auto; height: 64px; }
.foot__col .logo__mark { height: 36px; }
@media (max-width: 720px) {
  .logo__mark { height: 48px; }
  .foot__col .logo__mark { height: 28px; }
}

/* Hand-built Fantenna wordmark — text-with-arcs treatment used in nav
   on legal/blog pages where an <img> isn't loaded. Without these rules
   the SVG block element breaks the inline text into multiple rows. */
.fanlogo {
  font-family: "Inter", -apple-system, sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
  display: inline-block;
  color: var(--ink, #0A0A0A);
}
.fanlogo__t {
  position: relative;
  display: inline-block;
}
.fanlogo__arcs {
  position: absolute;
  left: 50%;
  bottom: 0.93em;
  transform: translateX(-50%);
  width: 0.557em;
  pointer-events: none;
  display: block;
}
.fanlogo__arcs svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

/* A finger needs 44px (site review, FANTENNA-2824 follow-up). */
.skip-link { display: inline-flex; align-items: center; min-height: calc(44px * var(--s, 1)); box-sizing: border-box; }
