/* Base */
:root {
  --color-bg: #efebe5;
  --color-surface: #ffffff;
  --color-surface-alt: #e5dfd8;
  --color-text: #161311;
  --color-muted: #5b5048;
  --color-border: #cfc3b6;
  --color-red: #c61622;
  --color-red-dark: #8f1017;
  --color-red-soft: #f3dddd;
  --color-green: #1e7a43;
  --color-green-dark: #14542d;
  --color-gold: #d2b57e;
  --color-gold-dark: #a1834d;
  --color-black: #0b0b0b;
  --color-white: #ffffff;
  --shadow-soft: 0 14px 34px rgba(17, 17, 17, 0.08);
  --radius-sm: 0.4rem;
  --radius-md: 0.65rem;
  --max-width: 72rem;
  --nav-height: 5.2rem;
  --transition-fast: 160ms ease;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Public Sans", sans-serif;
  background:
    linear-gradient(180deg, #e6e0d7 0%, var(--color-bg) 14rem, var(--color-bg) 100%);
  color: var(--color-text);
  line-height: 1.6;
}

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

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-red);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast);
}

a:hover {
  color: var(--color-red-dark);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(180, 17, 24, 0.28);
  outline-offset: 3px;
}

h1,
h2,
h3,
p,
ul {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.1;
}

section[id] {
  scroll-margin-top: calc(var(--nav-height) + 1.25rem);
}

.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;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-white);
  color: var(--color-black);
  border: 1px solid var(--color-black);
}

.skip-link:focus {
  top: 1rem;
}

.container {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
  border-top: 1px solid rgba(11, 11, 11, 0.08);
}

.alt-section {
  background: var(--color-surface-alt);
}

.section-grid {
  display: grid;
  gap: 2rem;
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 1.75rem;
}

.section-heading::before {
  content: "";
  display: block;
  width: 4.5rem;
  height: 0.28rem;
  margin-bottom: 1rem;
  background: var(--color-red);
}

.section-heading h2 {
  font-size: clamp(2rem, 3.2vw, 3rem);
  margin-bottom: 1rem;
}

.section-heading p,
.section-body p,
.detail-list {
  color: var(--color-muted);
}

.section-status {
  margin: 0 0 1rem;
  color: var(--color-muted);
  font-weight: 600;
}

.section-status.is-hidden {
  display: none;
}

.section-status.is-error {
  color: var(--color-red-dark);
}

.record-summary {
  display: inline-flex;
  align-items: baseline;
  gap: 0.85rem;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-red);
  border-radius: var(--radius-sm);
}

.record-summary.is-hidden {
  display: none;
}

.record-label,
.record-value {
  margin-bottom: 0;
}

.record-label {
  color: var(--color-muted);
  font-weight: 700;
}

.record-value {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.detail-list {
  padding-left: 1.2rem;
  margin-bottom: 0;
}

.detail-list li + li {
  margin-top: 0.5rem;
}

/* Header */
.site-header {
  position: relative;
  background:
    linear-gradient(180deg, #080808 0%, #121212 100%);
  color: var(--color-white);
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 11, 11, 0.96);
  backdrop-filter: blur(8px);
}

.nav-inner {
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--color-white);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.brand-name {
  font-size: 1.05rem;
}

.brand:hover {
  color: var(--color-white);
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-list a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 600;
}

.nav-list a[aria-current="page"] {
  color: var(--color-white);
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

.nav-list a:hover,
.nav-list a:focus-visible {
  color: var(--color-white);
}

.page-intro {
  padding: 3.5rem 0 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.page-intro h1 {
  margin-bottom: 1rem;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.page-intro p {
  max-width: 42rem;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at top right, rgba(198, 22, 34, 0.28), transparent 34%),
    linear-gradient(135deg, #090909 0%, #121212 52%, #1a1717 100%);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(11, 11, 11, 0.82) 0%, rgba(11, 11, 11, 0.6) 45%, rgba(11, 11, 11, 0.42) 100%);
}

.hero-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 4.75rem 0 5.5rem;
}

.hero-content {
  max-width: 40rem;
}

.hero-meta {
  font-size: 0.98rem;
  font-weight: 600;
  color: #f0c9cd;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  margin-bottom: 1rem;
}

.hero-copy {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
  max-width: 33rem;
}

.hero-support {
  max-width: 35rem;
  color: rgba(255, 255, 255, 0.84);
  margin-bottom: 2rem;
}

.hero-brand-panel {
  justify-self: center;
  width: min(100%, 29rem);
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.hero-logo {
  width: 100%;
  height: auto;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.95rem;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
  transition:
    color var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast);
}

.button-primary {
  background: var(--color-red);
  color: var(--color-white);
}

.button-primary:hover {
  background: var(--color-red-dark);
  color: var(--color-white);
}

.button-secondary {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--color-white);
}

.button-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
}

.intro-section {
  background: var(--color-surface);
  border-top: 0;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-red);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.data-table {
  width: 100%;
  min-width: 40rem;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.data-table thead th {
  background: #181412;
  color: var(--color-white);
  font-size: 0.95rem;
}

.data-table thead th[aria-sort="ascending"],
.data-table thead th[aria-sort="descending"] {
  background: #241b18;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.sort-button:hover {
  color: #f5d2d5;
}

.sort-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.9rem;
  padding: 0.15rem 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sort-button[data-direction="none"] .sort-indicator::before {
  content: "Sort";
}

.sort-button[data-direction="asc"] .sort-indicator::before {
  content: "Asc";
}

.sort-button[data-direction="desc"] .sort-indicator::before {
  content: "Desc";
}

.data-table tbody th {
  font-weight: 600;
}

.data-table tbody tr:nth-child(even) {
  background: #faf8f5;
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr.is-team-row {
  background: #f7ece2;
}

.data-table tbody tr.is-team-row th,
.data-table tbody tr.is-team-row td {
  font-weight: 700;
}

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

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

.result-win {
  color: var(--color-green-dark);
  font-weight: 800;
}

.result-loss {
  color: var(--color-red-dark);
  font-weight: 800;
}

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

.stats-section-first {
  margin-top: 0;
}

.stats-heading {
  max-width: 42rem;
  margin-bottom: 1rem;
}

.stats-heading h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.stats-heading p {
  color: var(--color-muted);
  margin-bottom: 0;
}

.stats-sort-note {
  margin: 0 0 0.85rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

/* Season preview */
.season-preview-grid {
  display: grid;
  gap: 2rem;
}

.season-preview-column {
  min-width: 0;
}

.season-preview-heading {
  margin-bottom: 1.25rem;
}

.season-preview-heading-compact {
  margin-bottom: 0;
}

.season-preview-panel-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.25rem;
}

.schedule-preview-list {
  display: grid;
  gap: 0.8rem;
}

.schedule-preview-item {
  display: grid;
  grid-template-columns: minmax(4.75rem, 5.5rem) minmax(0, 1fr) auto;
  gap: 0.9rem 1.1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-red);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
}

.schedule-preview-item:hover {
  color: var(--color-red-dark);
  border-color: #bba999;
}

.schedule-page-list {
  gap: 1rem;
}

.schedule-page-item {
  grid-template-columns: minmax(5.25rem, 6rem) minmax(0, 1fr) auto;
  padding: 1.15rem 1.25rem;
  background: var(--color-surface);
}

.schedule-page-item .schedule-preview-opponent {
  font-size: 1.18rem;
}

.schedule-page-item .schedule-preview-venue {
  margin-top: 0.22rem;
}

.schedule-preview-date {
  display: grid;
  gap: 0.2rem;
}

.schedule-preview-date-label {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--color-text);
}

.schedule-preview-time-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-muted);
}

.schedule-preview-content {
  min-width: 0;
}

.schedule-preview-opponent {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text);
}

.schedule-preview-venue {
  display: block;
  margin-top: 0.15rem;
  color: var(--color-muted);
  font-size: 0.92rem;
}

.schedule-preview-state {
  justify-self: end;
  font-weight: 800;
  color: var(--color-muted);
  text-align: right;
}

.schedule-preview-state.is-complete {
  color: var(--color-red-dark);
}

.schedule-preview-state.result-win {
  color: var(--color-green-dark);
}

.schedule-preview-state.result-loss {
  color: var(--color-red-dark);
}

.preview-table-wrap {
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-red);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.preview-table {
  width: 100%;
  border-collapse: collapse;
}

.preview-table th,
.preview-table td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: middle;
}

.preview-table thead th {
  background: #181412;
  color: var(--color-white);
  font-size: 0.84rem;
  letter-spacing: 0.04em;
}

.preview-table tbody tr:last-child th,
.preview-table tbody tr:last-child td {
  border-bottom: 0;
}

.preview-table tbody tr:nth-child(even) {
  background: #faf8f5;
}

.preview-table tbody tr.is-team-row {
  background: #f7ece2;
}

.preview-table tbody tr.is-team-row th,
.preview-table tbody tr.is-team-row td {
  font-weight: 700;
}

.preview-table-player {
  min-width: 0;
}

.preview-table-subtext {
  color: var(--color-muted);
  font-size: 0.88rem;
}

.season-preview-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.season-preview-tab {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.14em;
}

.season-preview-tab:hover,
.season-preview-tab[aria-selected="true"] {
  color: var(--color-text);
  text-decoration-color: currentColor;
}

.season-preview-cta {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
  min-height: 3.35rem;
  padding: 0.85rem 1.1rem;
  background: var(--color-gold);
  color: #332417;
  border: 1px solid var(--color-gold-dark);
  border-radius: var(--radius-md);
  font-weight: 800;
  text-decoration: none;
}

.season-preview-cta:hover {
  background: #dbc38f;
  color: #26170d;
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-red);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}

.hub-grid {
  align-items: stretch;
}

.hub-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 100%;
}

.hub-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0;
}

.hub-card p {
  margin-bottom: 0;
  color: var(--color-muted);
}

.inline-action {
  margin-top: auto;
  font-weight: 700;
}

/* Sponsors */
.sponsors-grid img {
  width: 100%;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  background: #f7f3ed;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  margin-bottom: 1rem;
}

.sponsor-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.sponsor-card p {
  color: var(--color-muted);
}

/* Footer */
.site-footer {
  background: #121212;
  color: rgba(255, 255, 255, 0.82);
  border-top: 3px solid var(--color-red);
  padding: 1.5rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  align-items: center;
}

.site-footer p {
  margin-bottom: 0;
}

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

@media (min-width: 48rem) {
  .hero-shell {
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
  }

  .section-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .season-preview-grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: start;
  }
}

@media (min-width: 64rem) {
  .section {
    padding: 5.5rem 0;
  }

  .card-grid.hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .card-grid.sponsors-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 47.99rem) {
  .nav-inner {
    padding: 0.85rem 0;
    align-items: flex-start;
  }

  .brand {
    gap: 0.7rem;
  }

  .brand-mark {
    width: 2.75rem;
    height: 2.75rem;
  }

  .brand-name {
    font-size: 0.98rem;
  }

  .nav-list {
    width: 100%;
    justify-content: flex-start;
  }

  .hero {
    min-height: auto;
  }

  .hero-shell {
    padding: 3.75rem 0 4.5rem;
  }

  .season-preview-panel-header {
    align-items: flex-start;
  }

  .schedule-preview-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-page-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-item-with-chevron::after {
    display: none;
  }

  .schedule-preview-state {
    justify-self: start;
    text-align: left;
  }

  .season-preview-tabs {
    gap: 0.8rem;
  }

  .data-table {
    min-width: 34rem;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}
