/* Waypoint Live Captions – design tokens and fonts, shared by the phone page and the desk.
   From design/handoff/design/tokens.css. Phone themes switch on :root[data-theme]; the desk uses the dark set.
   Contrast figures are WCAG ratios against the background named in each comment. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/fonts/nunito-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/fonts/nunito-sans-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
/* Cyrillic (Ukrainian interface text): only downloaded by pages that show Cyrillic. */
@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/fonts/nunito-sans-cyrillic-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Nunito Sans";
  src: url("/assets/fonts/nunito-sans-cyrillic-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  /* Brand (Waypoint Church Brand Guidelines, 2026) */
  --wp-orange: #d76d47;
  --wp-orange-light: #df8e71;
  --wp-teal: #508686;
  --wp-teal-light: #6a9d9d;
  --wp-grey: #63707b;
  --wp-black: #020202;

  --font-ui: "Avenir Next", Avenir, "Nunito Sans", system-ui, sans-serif;
  --font-caption: "Atkinson Hyperlegible", Roboto, system-ui, sans-serif;

  --target-min: 44px;
  --focus-ring: 3px solid var(--accent);
  --focus-offset: 2px;
  --rule-w: 1px;

  /* ---------- Dark (phone default, and the desk) ---------- */
  --bg: #0e0f10;           /* page */
  --chrome: #141618;       /* desk header, title bar (theme_color) */
  --surface: #17191b;      /* desk cards, phone sheet */
  --surface-2: #1f2225;    /* pills, small buttons, dialogs, idle band */
  --line-soft: #24272a;    /* phone header hairline */
  --line: #2c3034;         /* card borders (decorative) */
  --line-strong: #646c74;  /* control borders: 3.6:1 on --bg */
  --fg: #f1efec;           /* 16.7:1 on --bg (AAA) */
  --muted: #9aa3ab;        /* 7.5:1 on --bg */
  --draft: #8f979e;        /* line being spoken: 6.5:1 on --bg */
  --disabled-fg: #545b62;
  --line-disabled: #3a3f44;
  --accent: #df8e71;       /* light orange: Live dot, focus, phone buttons */
  --on-accent: #020202;    /* 8.1:1 on --accent */
  --live: #df8e71;
  --halo: rgba(223, 142, 113, 0.22);
  --paused: #6a9d9d;       /* light teal */
  --warn: #e6b450;         /* amber: clipping, reconnecting, lost server */
  --danger: #f2786b;       /* red: Stop, Stop confirm, errors */
  --idle: #9aa3ab;
  --scrim: rgba(0, 0, 0, 0.62);
  --chip-bg: #2c3034;
  --chip-fg: #f1efec;
  --sel-bg: #221a17;
  color-scheme: dark;
}

/* ---------- Phone: Light ---------- */
:root[data-theme="light"] {
  --bg: #f4f2ee;
  --surface: #fbfaf8;
  --line-soft: #dcd8d2;
  --line: #cfcac3;
  --line-strong: #7a838b;  /* 3.4:1 */
  --fg: #141516;           /* 16.5:1 (AAA) */
  --muted: #565f68;        /* 5.9:1 */
  --draft: #5b636b;        /* 5.5:1 */
  --accent: #a9502e;       /* deep orange for filled buttons */
  --on-accent: #ffffff;    /* 5.5:1 on --accent */
  --live: #d76d47;         /* dot only */
  --halo: rgba(215, 109, 71, 0.22);
  --paused: #3f7373;
  --warn: #8a5f00;
  --idle: #63707b;
  --scrim: rgba(20, 21, 22, 0.45);
  --chip-bg: #141516;
  --chip-fg: #f4f2ee;
  --sel-bg: #f7e9e3;
  color-scheme: light;
}

/* ---------- Phone: High contrast (pure black and white) ---------- */
:root[data-theme="contrast"] {
  --bg: #000000;
  --surface: #000000;
  --line-soft: #ffffff;
  --line: #ffffff;
  --line-strong: #ffffff;
  --fg: #ffffff;           /* 21:1 */
  --muted: #ffffff;
  --draft: #c4c4c4;        /* 12.6:1 */
  --accent: #ffffff;
  --on-accent: #000000;
  --live: #ffffff;         /* states told apart by glyph shape + word */
  --halo: rgba(255, 255, 255, 0.3);
  --paused: #ffffff;
  --warn: #ffffff;
  --idle: #ffffff;
  --scrim: rgba(0, 0, 0, 0.78);
  --chip-bg: #ffffff;
  --chip-fg: #000000;
  --sel-bg: #000000;
  --rule-w: 2px;
  color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}
