:root {
  --ink: #0e1a24;
  --ice: #e8f1f6;
  --snow: #f7fafc;
  --steel: #243b4a;
  --gold: #c4a035;
  --gold-bright: #e0b93a;
  --crimson: #8b1e2d;
  --muted: #5a7080;
  --line: rgba(14, 26, 36, 0.12);
  --shadow: 0 18px 40px rgba(14, 26, 36, 0.18);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Source Sans 3", Georgia, sans-serif;
  --radius: 10px;
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--snow);
  line-height: 1.5;
  position: relative;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(196, 160, 53, 0.28), transparent 55%),
    radial-gradient(ellipse 60% 45% at 100% 0%, rgba(139, 30, 45, 0.18), transparent 50%),
    linear-gradient(180deg, #d9e8f0 0%, var(--snow) 42%, #eef4f8 100%);
}

a {
  color: var(--crimson);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--ink);
}

.site-header,
.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem 1.25rem 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--ink), var(--steel));
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow);
}

.brand-crest {
  width: 3.4rem;
  height: 3.4rem;
  object-fit: contain;
  background: #000;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
  color: var(--ink);
}

.brand-sub {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
}

.nav a {
  color: var(--steel);
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav a.is-active,
.nav a:hover {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

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

.hero {
  display: grid;
  gap: 1.25rem;
  padding: 1.5rem 0 2rem;
  animation: rise 0.7s ease-out both;
}

@media (min-width: 800px) {
  .hero {
    grid-template-columns: 1.2fr 0.8fr;
    align-items: end;
    min-height: min(70vh, 34rem);
  }
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 12vw, 6.5rem);
  line-height: 0.9;
  letter-spacing: 0.03em;
  margin: 0;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.4);
}

.hero-tag {
  margin: 0.75rem 0 0;
  max-width: 28rem;
  font-size: 1.15rem;
  color: var(--steel);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.hero-panel {
  background: linear-gradient(160deg, var(--ink), var(--steel));
  color: var(--ice);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
  animation: rise 0.9s ease-out 0.1s both;
}

.hero-panel h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
  color: var(--gold-bright);
}

.hero-panel p {
  margin: 0.35rem 0;
}

/* Full-bleed home hero */
.page-home {
  background: #071018;
}

.page-home .site-footer {
  color: rgba(232, 241, 246, 0.7);
}

.page-home .site-footer a {
  color: rgba(232, 241, 246, 0.85);
}

.main-flush {
  max-width: none;
  padding: 0;
}

.main-flush > .section,
.main-flush > .atmosphere-band {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.main-flush > .atmosphere-band {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.site-header-over-hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  max-width: none;
  padding: 1rem 1.25rem;
  background: linear-gradient(180deg, rgba(7, 16, 24, 0.75), transparent);
}

.site-header-over-hero .brand-name,
.site-header-over-hero .nav a {
  color: #f2f7fb;
}

.site-header-over-hero .brand-sub {
  color: rgba(232, 241, 246, 0.75);
}

.site-header-over-hero .nav a.is-active,
.site-header-over-hero .nav a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

.hero-bleed {
  position: relative;
  min-height: min(92vh, 44rem);
  display: grid;
  align-items: end;
  color: #f4f8fb;
  overflow: hidden;
}

.hero-bleed-media {
  position: absolute;
  inset: 0;
}

.hero-bleed-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  transform: scale(1.04);
  animation: heroZoom 14s ease-out forwards;
}

.hero-bleed-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 16, 24, 0.35) 0%, rgba(7, 16, 24, 0.55) 45%, rgba(7, 16, 24, 0.92) 100%),
    linear-gradient(90deg, rgba(139, 30, 45, 0.28), transparent 55%);
}

.hero-bleed-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 6.5rem 1.25rem 2.75rem;
  animation: rise 0.85s ease-out both;
}

.hero-crest {
  width: clamp(7rem, 22vw, 12rem);
  height: auto;
  margin-bottom: 0.5rem;
  object-fit: contain;
  animation: crestIn 0.9s ease-out 0.15s both;
}

.hero-kicker {
  margin: 0;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--gold-bright);
}

.hero-bleed-brand {
  font-family: var(--font-display);
  font-size: clamp(4rem, 16vw, 8rem);
  line-height: 0.88;
  letter-spacing: 0.03em;
  margin: 0.2rem 0 0;
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.45);
}

.hero-bleed-tag {
  margin: 0.85rem 0 0;
  max-width: 28rem;
  font-size: 1.15rem;
  color: rgba(232, 241, 246, 0.9);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.75);
  color: #fff;
}

.btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}

.section-after-hero {
  margin-top: 0;
  padding-top: 2rem;
  color: #e8f1f6;
}

.page-home .section h2 {
  color: #f4f8fb;
}

.page-home .section-lead,
.page-home .game-meta,
.page-home .muted {
  color: rgba(232, 241, 246, 0.72);
}

.page-home .game-title {
  color: #fff;
}

.page-home .btn-secondary {
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}

.page-home .btn-secondary:hover {
  background: #fff;
  color: var(--ink);
}

.next-game-row {
  display: grid;
  gap: 1rem;
  padding: 1.1rem 0 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  animation: rise 0.7s ease-out 0.2s both;
}

@media (min-width: 700px) {
  .next-game-row {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.atmosphere-band {
  position: relative;
  min-height: 18rem;
  display: grid;
  align-items: center;
  margin: 2.5rem 0 0;
  overflow: hidden;
  color: #fff;
}

.atmosphere-band-media {
  position: absolute;
  inset: 0;
}

.atmosphere-band-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.55);
}

.atmosphere-band-copy {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem 1.25rem;
  animation: rise 0.8s ease-out both;
}

.atmosphere-band-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}

.atmosphere-band-copy p {
  max-width: 32rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.mosaic-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 700px) {
  .mosaic-grid {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.mosaic-grid img {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  display: block;
}

@keyframes heroZoom {
  from {
    transform: scale(1.08);
  }
  to {
    transform: scale(1);
  }
}

@keyframes crestIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.15rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--crimson);
  color: #fff;
}

.btn-primary:hover {
  background: #6e1622;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--ink);
  color: #fff;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: var(--gold-bright);
  color: var(--ink);
}

.btn-small {
  padding: 0.4rem 0.8rem;
  font-size: 0.92rem;
}

.section {
  margin: 2.5rem 0;
  animation: rise 0.6s ease-out both;
}

.section h2 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.04em;
  margin: 0 0 0.35rem;
}

.section-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  max-width: 36rem;
}

.game-list {
  display: grid;
  gap: 0.85rem;
}

.game-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

@media (min-width: 700px) {
  .game-card {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.game-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ice);
  color: var(--steel);
}

.badge-live {
  background: var(--crimson);
  color: #fff;
  animation: pulse 1.6s ease-in-out infinite;
}

.badge-final {
  background: var(--steel);
  color: #fff;
}

.player-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.player-wrap iframe,
.player-wrap > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.player-empty {
  display: grid;
  place-items: center;
  color: var(--ice);
  padding: 1.5rem;
  text-align: center;
}

.highlight-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .highlight-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.highlight-item h3 {
  margin: 0.75rem 0 0.25rem;
  font-size: 1.1rem;
}

.widget-box {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  min-height: 12rem;
  overflow: auto;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-weight: 600;
}

.flash-ok {
  background: #e3f5e8;
  color: #1d5c34;
}

.flash-error {
  background: #fde8ea;
  color: #8b1e2d;
}

.form {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
}

.form-row {
  display: grid;
  gap: 0.35rem;
}

.form-row label {
  font-weight: 700;
  font-size: 0.95rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.form-row textarea {
  min-height: 6rem;
  resize: vertical;
}

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

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

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

table.data th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.admin-body {
  background: #eef2f5;
}

.admin-body .page-bg {
  display: none;
}

.admin-main {
  background: #fff;
  border-radius: var(--radius);
  margin-top: 0.5rem;
  box-shadow: 0 8px 24px rgba(14, 26, 36, 0.08);
}

.admin-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  letter-spacing: 0.04em;
  margin: 0 0 1rem;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.checklist {
  display: grid;
  gap: 0.75rem;
  max-width: 40rem;
}

.checklist li {
  padding: 0.85rem 1rem;
  background: var(--ice);
  border-left: 4px solid var(--gold);
  list-style: none;
}

.checklist {
  padding: 0;
  margin: 0;
}

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

.empty {
  padding: 1.5rem 0;
  color: var(--muted);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.72;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
