/* ==========================================================================
   Brookings Bobcats — "Scoreboard & Chalk"
   These are DEFAULTS. Admin > Design overrides them at runtime via Firestore.
   Palette and type live here. Change --accent / --ink to reskin the site.
   ========================================================================== */

:root {
  --ink: #141416;
  --field: #1d1e22;
  --panel: #24262b;
  --chalk: #f4f2ed;
  --chalk-dim: #c9c7c1;
  --steel: #8e9299;
  --accent: #c8102e;
  --accent-lift: #ef3e52;
  --highlight: #f5a524;
  --line: rgba(244, 242, 237, 0.14);
  --line-solid: #33353b;

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", system-ui, sans-serif;
  --data: "JetBrains Mono", ui-monospace, monospace;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 68ch;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-lift); }

:focus-visible {
  outline: 3px solid var(--highlight);
  outline-offset: 3px;
}

.wrap {
  width: min(1180px, 100% - (var(--gutter) * 2));
  margin-inline: auto;
}

/* --- Chalk rule: field-marking divider ---------------------------------- */
.chalk-rule {
  border: 0;
  height: 5px;
  background:
    linear-gradient(var(--line-solid), var(--line-solid)) top / 100% 1px no-repeat,
    linear-gradient(var(--line-solid), var(--line-solid)) bottom / 100% 1px no-repeat;
  margin: 0;
}

/* --- Header ------------------------------------------------------------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 0.85rem;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--chalk);
  margin-right: auto;
}

.wordmark__paw {
  width: 34px;
  height: 34px;
  flex: none;
}

.wordmark__text {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

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

.nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--data);
  font-size: 0.72rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav a {
  color: var(--chalk-dim);
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--chalk);
  border-bottom-color: var(--accent);
}

.nav__cta {
  color: var(--ink) !important;
  background: var(--accent);
  padding: 0.5rem 0.95rem !important;
  border-radius: 2px;
  border-bottom: 0 !important;
  font-weight: 600;
}

.nav__cta:hover { background: var(--accent-lift); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--chalk);
  font-family: var(--data);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(2rem, 4vw, 3rem);
  overflow: hidden;
}

.hero::after {
  /* field yard-lines, very faint */
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0 calc(10% - 1px),
    rgba(244, 242, 237, 0.045) calc(10% - 1px) 10%
  );
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--data);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--highlight);
  margin: 0 0 1.1rem;
}

.hero__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(4rem, 17vw, 12.5rem);
  line-height: 0.82;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin: 0;
}

.hero__title em {
  font-style: normal;
  display: block;
  color: var(--accent);
}

.hero__sub {
  max-width: 46ch;
  margin: 1.75rem 0 0;
  font-size: 1.12rem;
  color: var(--chalk-dim);
}

/* --- Signature: the scoreboard strip ------------------------------------ */
.scoreboard {
  background: #0b0b0d;
  border-block: 1px solid var(--line-solid);
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.scoreboard__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat {
  padding: 1.5rem var(--gutter);
  border-right: 1px solid var(--line-solid);
}

.stat:last-child { border-right: 0; }

.stat__num {
  font-family: var(--data);
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  font-weight: 700;
  color: var(--highlight);
  line-height: 1;
  display: block;
  text-shadow: 0 0 22px rgba(245, 165, 36, 0.28);
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-family: var(--data);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 0.6rem;
  display: block;
}

/* --- Sections ----------------------------------------------------------- */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }

.section--light {
  background: var(--chalk);
  color: var(--ink);
}

.section--light .section__kicker { color: var(--accent); }
.section--light .lede { color: #4a4a4f; }

.section__head { margin-bottom: 2.75rem; }

.section__kicker {
  font-family: var(--data);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--highlight);
  margin: 0 0 0.9rem;
}

.section__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0;
  max-width: 20ch;
}

.lede {
  max-width: var(--measure);
  font-size: 1.1rem;
  color: var(--chalk-dim);
  margin: 1.4rem 0 0;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.15rem; }
.prose h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 2.4rem 0 0.8rem;
}

/* --- Card grid ---------------------------------------------------------- */
.grid {
  display: grid;
  gap: 1px;
  background: var(--line-solid);
  border: 1px solid var(--line-solid);
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.section--light .grid {
  background: #d9d6cf;
  border-color: #d9d6cf;
}

.card {
  background: var(--field);
  padding: 2rem 1.75rem;
}

.section--light .card { background: var(--chalk); }

.card__index {
  font-family: var(--data);
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  display: block;
  margin-bottom: 1rem;
}

.card__title {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.6rem;
  line-height: 1.05;
}

.card p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--chalk-dim);
}

.section--light .card p { color: #55555b; }

/* --- Split feature ------------------------------------------------------ */
.split {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  align-items: start;
}

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

.pull {
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* --- Season / list rows ------------------------------------------------- */
.rows { border-top: 1px solid var(--line-solid); }

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line-solid);
}

.row__season {
  font-family: var(--data);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--highlight);
  min-width: 6.5rem;
}

.row__sports { color: var(--chalk-dim); font-size: 0.97rem; }

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  font-family: var(--data);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.85rem 1.6rem;
  border-radius: 2px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-lift); }

.btn--ghost {
  border-color: var(--line-solid);
  color: var(--chalk);
  background: none;
}

.btn--ghost:hover { border-color: var(--accent); color: var(--accent-lift); }

.section--light .btn--ghost { border-color: #cbc8c1; color: var(--ink); }

/* --- Footer ------------------------------------------------------------- */
.footer {
  background: #0b0b0d;
  padding-block: 3rem 2.5rem;
  border-top: 1px solid var(--line-solid);
  font-size: 0.92rem;
  color: var(--steel);
}

.footer__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 2.5rem;
}

.footer h4 {
  font-family: var(--data);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--chalk);
  margin: 0 0 0.9rem;
}

.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.45rem; }
.footer a { color: var(--steel); text-decoration: none; }
.footer a:hover { color: var(--accent-lift); }

.footer__base {
  border-top: 1px solid var(--line-solid);
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-family: var(--data);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

/* --- Mobile ------------------------------------------------------------- */
@media (max-width: 780px) {
  .nav-toggle { display: block; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--field);
    border-bottom: 1px solid var(--line-solid);
    padding: 0.5rem var(--gutter) 1.25rem;
  }

  .nav[data-open="true"] { display: flex; }
  .nav a { padding-block: 0.85rem; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-top: 0.9rem; text-align: center; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line-solid); }
}

/* --- Notification banners ---------------------------------------------- */
/* Injected at the top of <body> by theme.js. Colors come from the same
   tokens as everything else, so retheming carries them along. */

.banners { position: relative; z-index: 60; }

.banner {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.85rem var(--gutter);
  font-size: 0.95rem;
  line-height: 1.45;
  border-bottom: 1px solid rgba(0, 0, 0, 0.28);
}

.banner__inner { flex: 1; }
.banner__inner strong { margin-right: 0.5rem; }
.banner a { color: inherit; text-decoration: underline; }

.banner__x {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0 0.25rem;
  cursor: pointer;
  opacity: 0.7;
  flex: none;
}

.banner__x:hover { opacity: 1; }

.banner--info { background: var(--accent); color: #fff; }
.banner--notice { background: var(--highlight); color: #1a1408; }
.banner--warn { background: #f2a413; color: #241a05; }
.banner--alert { background: #b3261e; color: #fff; }
.banner--good { background: #2f7d4f; color: #fff; }
