/*
 * Rotaract brand: colors and type shared by every page. Load this first.
 *
 * Colors are from Rotary's brand center: Rotaract Cranberry (PMS 214C) leads,
 * with Rotary Royal Blue and Rotary Gold as accents. Status colors stay
 * plain green, amber, and red so they never read as brand decoration.
 *
 * Type is Open Sans, Rotary's free substitute for Frutiger, with JetBrains
 * Mono for codes so they look the same on every device. Both are served from
 * here rather than Google Fonts so scanners on bad Wi-Fi don't wait on them.
 */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/lib/fonts/open-sans-latin.woff2) format("woff2");
  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: "Open Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/lib/fonts/open-sans-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/lib/fonts/jetbrains-mono-latin.woff2) format("woff2");
  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;
}

:root {
  --font: "Open Sans", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;

  --bg: #f6f6f8;
  --panel: #fff;
  --text: #1b1c20;
  --muted: #5c5f66;
  --line: #dcdce2;
  --accent: #d41367; /* Rotaract Cranberry, white text 5.1:1 */
  --accent-text: #fff;
  --accent-ink: #d41367; /* the accent as text or outline on --bg */
  --gold: #f7a81b; /* Rotary Gold, decoration only */

  --ok: #1d7a3a;
  --ok-bg: #e3f3e7;
  --warn: #a35c00;
  --warn-bg: #fbeedb;
  --bad: #b3261e;
  --bad-bg: #fbe4e2;
  --wait-bg: #ebebef;

  /* People and passports on the sign-in station. */
  --person: #17458f; /* Rotary Royal Blue */
  --person-text: #fff;
  --pass-bg: #fff;
  --pass-free: #6b7079;
  --pass-linked: #1d7a3a;
  --pass-held: #b26a00;
  --pass-void: #8e8e8e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161a;
    --panel: #212228;
    --text: #eeeef1;
    --muted: #a9abb3;
    --line: #383a42;
    --accent: #b8115a; /* deeper, so a full-width bar doesn't glare */
    --accent-ink: #ec5a96;

    --ok: #4cb36b;
    --ok-bg: #16301e;
    --warn: #e0a040;
    --warn-bg: #33270f;
    --bad: #f07067;
    --bad-bg: #3a1a18;
    --wait-bg: #2a2b31;

    --person: #8ab0e0;
    --person-text: #10131f;
    --pass-bg: #262730;
    --pass-free: #9aa0a8;
    --pass-linked: #4cb36b;
    --pass-held: #e8a33d;
    --pass-void: #666;
  }
}

body { font-family: var(--font); }
a { color: var(--accent-ink); }

/* Confetti (/lib/confetti.js): station milestones and new passport stamps. */
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 10; }
.confetti i {
  position: absolute;
  top: -1rem;
  width: 0.55rem;
  height: 0.9rem;
  border-radius: 0.1rem;
  animation: confetti-fall linear forwards;
}
@keyframes confetti-fall {
  to { transform: translate(var(--drift), 110vh) rotate(var(--spin)); }
}
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } }
