/* =========================================================
   Design tokens
   Rink Ice   #EAF4F6  -- page background
   Rink Deep  #0F3B4D  -- ice-section headings, dark UI
   Clay       #B54A2C  -- motorsports accent / links
   Anthracite #191D1F  -- primary text
   Paper      #FFFFFF  -- cards
   Signal Green #2E7D4F -- "open / year-round"
   Signal Amber  #9A6B00 -- "verify / caution" (on light bg, meets contrast)
   Signal Slate  #45535A -- "seasonal / neutral"
   Signal Red    #A3291D -- "closed"
   ========================================================= */

:root {
  --ice: #EAF4F6;
  --ice-deep: #0F3B4D;
  --clay: #B54A2C;
  --clay-deep: #8E3A21;
  --ink: #191D1F;
  --paper: #FFFFFF;
  --line: #D7E3E6;
  --green: #2E7D4F;
  --amber: #8A5B00;
  --slate: #45535A;
  --red: #A3291D;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --radius: 10px;
  --wrap: 1180px;

  /* theme-able surfaces (overridden under dark mode below) */
  --surface-asphalt: #F7EFE9;
  --surface-a11y: #F2F8F9;
  --card-shadow: 0 1px 2px rgba(15, 59, 77, 0.06);
  --card-shadow-hover: 0 10px 24px rgba(15, 59, 77, 0.12);
  --chip-open-bg: #E4F1E9;
  --chip-seasonal-bg: #E9EDF0;
  --chip-caution-bg: #FBF0DC;
  --chip-closed-bg: #F6E1DD;

  /* fixed brand bars -- deliberately constant across light/dark so the
     banner and footer read as one consistent identity either way */
  --banner-bg: #0F3B4D;
  --banner-text: #EFF7F9;
  --banner-text-muted: #BFE0E8;
  --footer-bg: #14181A;
  --footer-text: #C9D3D5;

  /* active filter chip -- solid fill, always paired with a text color
     chosen for contrast against that fill (flipped explicitly in dark mode
     below, since --ice-deep/--clay swap from dark fills to light fills) */
  --chip-active-ice-bg: #0F3B4D;
  --chip-active-ice-text: #FFFFFF;
  --chip-active-clay-bg: #B54A2C;
  --chip-active-clay-text: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ice: #0B1F27;
    --ice-deep: #7FD3E8;
    --clay: #E68A5C;
    --clay-deep: #F0A87C;
    --ink: #EAF2F3;
    --paper: #12303B;
    --line: #234450;
    --green: #6FD79C;
    --amber: #E6B84D;
    --slate: #9FB4BA;
    --red: #F09488;

    --surface-asphalt: #241811;
    --surface-a11y: #0E2530;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    --card-shadow-hover: 0 10px 26px rgba(0, 0, 0, 0.45);
    --chip-open-bg: #163B29;
    --chip-seasonal-bg: #223138;
    --chip-caution-bg: #3B2E0E;
    --chip-closed-bg: #3B1F1A;

    --chip-active-ice-bg: #7FD3E8;
    --chip-active-ice-text: #0B1F27;
    --chip-active-clay-bg: #E68A5C;
    --chip-active-clay-text: #241811;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ice);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ice-deep);
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

a {
  color: var(--clay-deep);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
a:hover { color: var(--clay); }

/* Visible focus for every interactive element -- keyboard accessibility */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--ice-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.wrap--narrow { max-width: 780px; }

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--banner-bg);
  color: #fff;
  padding: 0.75em 1.25em;
  z-index: 100;
  font-family: var(--font-body);
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

/* Status strip */
.status-strip {
  background: var(--banner-bg);
  color: var(--banner-text);
}
.status-strip p {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0.65em 1.5rem;
  font-size: 0.9rem;
}
.status-strip strong { color: #fff; }
.status-strip__updated {
  display: inline-block;
  margin-left: 0.5em;
  font-family: var(--font-mono);
  font-size: 0.85em;
  color: var(--banner-text-muted);
}

/* Header */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.02em;
}
.wordmark span { color: var(--clay); }
.topnav { display: flex; gap: 1.5rem; }
.topnav a {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.topnav a:hover,
.topnav a:focus-visible { border-bottom-color: var(--clay); color: var(--ink); }

/* Hero */
.hero { padding: 3.25rem 1.5rem 2.5rem; }
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 0.75em;
}
.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 16ch;
}
.hero__lede {
  font-size: 1.15rem;
  max-width: 62ch;
  color: #2B3538;
}

/* Sections */
.section { padding: 2.5rem 0 3rem; scroll-margin-top: 4.5rem; }
.section--ice { background: var(--ice); border-top: 1px solid var(--line); }
.section--asphalt {
  background: var(--surface-asphalt);
  border-top: 4px solid var(--clay);
  border-bottom: 4px solid var(--clay);
}
.section--about { background: var(--ice); }
.section--accessibility { background: var(--surface-a11y); border-top: 1px solid var(--line); padding-bottom: 3.5rem; }

.section__head { max-width: 72ch; margin-bottom: 1.5rem; }
.section--ice h2::after,
.section--asphalt h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 5px;
  margin-top: 0.4em;
  border-radius: 3px;
}
.section--ice h2::after { background: linear-gradient(90deg, var(--ice-deep), #4E9AB2); }
.section--asphalt h2::after { background: linear-gradient(90deg, var(--clay), #E0A05A); }

.section__intro { font-size: 1.05rem; }
.section__note { font-size: 0.92rem; color: var(--slate); max-width: 72ch; }

.subhead {
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate);
  margin: 2rem 0 0.9rem;
}

/* Filter bar */
.filterbar {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 0.35rem;
}
.chip {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 999px;
  padding: 0.4em 0.95em;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
button.chip:hover { border-color: var(--ice-deep); }
button.chip.is-active {
  background: var(--chip-active-ice-bg);
  border-color: var(--chip-active-ice-bg);
  color: var(--chip-active-ice-text);
}
.section--asphalt button.chip.is-active {
  background: var(--chip-active-clay-bg);
  border-color: var(--chip-active-clay-bg);
  color: var(--chip-active-clay-text);
}
.filter-count {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--slate);
  min-height: 1.2em;
}

/* Card grid */
.cardgrid {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.1rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--card-shadow);
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}
.card:hover,
.card:focus-within {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
  border-color: var(--ice-deep);
}
.section--asphalt .card:hover,
.section--asphalt .card:focus-within { border-color: var(--clay); }
.card--closed { background: var(--chip-closed-bg); }
.card--closed:hover { transform: none; box-shadow: var(--card-shadow); }
.card[hidden] { display: none; }

.card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.card h4 {
  font-size: 1.15rem;
  margin: 0;
  color: var(--ink);
}
.card__akatext {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--slate);
}
.card__meta {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--slate);
  margin-bottom: 0.6rem;
}
.card__note {
  font-size: 0.95rem;
  margin-bottom: 0.9rem;
  flex-grow: 1;
}
.card__cta {
  font-weight: 700;
  font-size: 0.93rem;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  align-self: flex-start;
}

/* Status chips -- shape + text differ, not color alone */
.chip--status {
  flex-shrink: 0;
  border-radius: 6px;
  font-size: 0.75rem;
  padding: 0.3em 0.6em;
  border: none;
  cursor: default;
}
.chip--open { background: var(--chip-open-bg); color: var(--green); }
.chip--seasonal { background: var(--chip-seasonal-bg); color: var(--slate); }
.chip--caution { background: var(--chip-caution-bg); color: var(--amber); }
.chip--closed { background: var(--chip-closed-bg); color: var(--red); }

/* About / accessibility lists */
.a11y-list { padding-left: 1.25rem; }
.a11y-list li { margin-bottom: 0.6rem; }

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0;
  font-size: 0.85rem;
}
.site-footer p { margin: 0 0 0.4em; }
.site-footer time { color: #fff; }
.site-footer a { color: #fff; }

/* Small screens */
@media (max-width: 560px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; }
  .hero { padding-top: 2.25rem; }
}
