/*
  Clarke Sports — brand system
  Navy base (site chrome), Lacrosse Red (Orillia Kings), Hockey Gold (North
  Central Predators). Mobile-first, no framework, no external fonts/CDNs.
*/

:root {
  --navy-950: #060f22;
  --navy-900: #0b1f3a;
  --navy-800: #12294c;
  --navy-700: #1b3a68;
  --navy-100: #dbe4f3;
  --ink: #0b1220;
  --paper: #f6f8fc;
  --paper-card: #ffffff;
  --line: #d9e0ee;
  --muted: #55617a;

  --lacrosse-red: #c8102e;
  --lacrosse-red-dark: #8f0b21;
  --lacrosse-red-tint: #fdecef;

  --hockey-gold: #b8891a;
  --hockey-gold-dark: #7d5c0f;
  --hockey-gold-tint: #fbf2df;

  --focus-ring: #ffb703;
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-700);
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 6px 0;
}

.skip-link:focus {
  left: 0;
}

/* Header / nav */

.site-header {
  background: var(--navy-900);
  color: #fff;
}

.site-header__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
}

.brand__mark {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand__sub {
  font-size: 0.8rem;
  color: var(--navy-100);
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--navy-100);
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.site-nav a[aria-current='page'] {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Layout */

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.hero {
  padding: 1.75rem 0 0.5rem;
}

.hero h1 {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
}

.hero p {
  color: var(--muted);
  margin: 0;
  max-width: 55ch;
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.team-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem;
  text-decoration: none;
  color: var(--ink);
  display: block;
  border-top: 5px solid var(--navy-700);
}

.team-card--lacrosse {
  border-top-color: var(--lacrosse-red);
}

.team-card--hockey {
  border-top-color: var(--hockey-gold);
}

.team-card h2 {
  margin: 0 0 0.15rem;
  font-size: 1.15rem;
}

.team-card .team-card__meta {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0 0 0.6rem;
}

.team-card .team-card__teaser {
  font-size: 0.92rem;
  margin: 0;
}

/* Team page header */

.team-header {
  border-radius: var(--radius);
  padding: 1.25rem;
  color: #fff;
  background: var(--navy-900);
}

.team-header--lacrosse {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--lacrosse-red-dark) 130%);
}

.team-header--hockey {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--hockey-gold-dark) 130%);
}

.team-header h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.team-header__meta {
  margin: 0;
  color: var(--navy-100);
  font-size: 0.95rem;
}

.record-badge {
  display: inline-block;
  margin-top: 0.75rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.3rem 0.85rem;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Section */

section.games {
  margin-top: 2rem;
}

section.games h2 {
  font-size: 1.2rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.4rem;
}

.team-page--lacrosse section.games h2 {
  border-bottom-color: var(--lacrosse-red);
}

.team-page--hockey section.games h2 {
  border-bottom-color: var(--hockey-gold);
}

.game-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.game-card {
  background: var(--paper-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1.05rem;
}

.game-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.game-card__date {
  font-weight: 700;
  font-size: 0.95rem;
}

.game-card__result {
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
}

.game-card__result--win {
  background: #e3f6e8;
  color: #146c2e;
}

.game-card__result--loss {
  background: #fbe7e9;
  color: #a3172c;
}

.game-card__result--tie {
  background: #eef1f7;
  color: var(--navy-800);
}

.game-card__opponent {
  margin: 0.3rem 0 0.15rem;
  font-size: 1.02rem;
  font-weight: 600;
}

.game-card__details {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.game-card__notes {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--paper);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.badge--canceled {
  background: #fbe7e9;
  color: #a3172c;
}

.badge--tbd {
  background: #eef1f7;
  color: var(--navy-800);
}

.badge--stale {
  background: #fff3cd;
  color: #7a5b00;
}

.badge--auth {
  background: #fbe7e9;
  color: #a3172c;
}

/* Video */

.game-media {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.6rem;
}

.game-media video {
  width: 100%;
  border-radius: 8px;
  background: #000;
}

.video-launch {
  min-height: 8rem;
  width: 100%;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background-color: var(--navy-900);
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font: inherit;
  font-weight: 800;
  text-shadow: 0 1px 3px #000;
}

.video-launch:hover { background-color: var(--navy-700); }

.video-launch__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  padding-left: 0.15rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgba(6, 15, 34, 0.65);
  font-size: 1.15rem;
}

.game-media__fallback {
  font-size: 0.85rem;
}

.empty-state {
  background: var(--paper-card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  margin-top: 1rem;
}

/* Notice banners (stale/auth-expired/error) */

.notice {
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
}

.notice--stale {
  background: #fff8e6;
  border-color: #f0d68a;
  color: #7a5b00;
}

.notice--error {
  background: #fbe7e9;
  border-color: #f0acb5;
  color: #7a1220;
}

/* Footer */

.site-footer {
  background: var(--navy-950);
  color: var(--navy-100);
  margin-top: 3rem;
}

.site-footer__inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}

.site-footer a {
  color: var(--navy-100);
}

/* 404 */

.not-found {
  text-align: center;
  padding: 3rem 1rem;
}

.not-found h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.button {
  display: inline-block;
  margin-top: 1rem;
  background: var(--navy-900);
  color: #fff;
  text-decoration: none;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
}

.button:hover {
  background: var(--navy-700);
}

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