/*
 * Shared styles used by every page.
 *
 * The color variables below are the easiest place to change the site's theme.
 * After editing a CSS file, increase its ?v= number in the matching HTML file
 * so browsers and Cloudflare load the new version.
 */

/* ---------- Fonts ---------- */

@font-face {
  font-family: Plex;
  src: url("/assets/plex-semibold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Plex;
  src: url("/assets/plex-italic.ttf") format("truetype");
  font-style: italic;
  font-display: swap;
}

/* ---------- Site colors and reusable values ---------- */

:root {
  color-scheme: dark;

  --background: #282a2d;
  --panel: #1e1e1e;
  --accent: #e5a00d;       /* Plex yellow */
  --accent-soft: #f5c767;
  --extralife: #1d9ed6;
  --success: #1bb053;      /* Green emphasis */
  --danger: #e05252;       /* Red emphasis */
  --text: #ffffff;
  --muted: #c8c8c8;
  --radius: 0.75rem;
}

/* ---------- Basic page defaults ---------- */

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--background);
  color: var(--text);
  font-family: Plex, system-ui, sans-serif;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--accent-soft);
  outline-offset: 4px;
}

/* ---------- Reusable text colors ---------- */

.accent {
  color: var(--accent);
}

.success {
  color: var(--success);
}

.danger {
  color: var(--danger);
}

.muted {
  color: var(--muted);
}

.extralife {
  color: var(--extralife);
}

/* ---------- Shared page components ---------- */

.brand {
  color: var(--accent);
  font-size: clamp(2rem, 7vw, 2.5rem);
}

.divider {
  width: 3rem;
  margin: 1.25rem auto;
  border: 0;
  border-top: 2px solid var(--accent);
}

.site-nav,
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
}

.site-nav {
  font-size: clamp(1.25rem, 4vw, 1.6rem);
}

.site-footer {
  font-size: 0.85rem;
}

.site-nav a,
.site-footer a {
  text-decoration: none;
}

.site-nav a:hover,
.site-footer a:hover {
  text-decoration: underline;
}

/* Visually hidden text that remains available to screen readers. */
.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;
}

/* Reduce movement for visitors who request it in their device settings. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

