:root {
  color-scheme: light;
  --paper: #f5f2ea;
  --surface: #fbfaf6;
  --surface-sunk: #efebe2;
  --line: #ddd7ca;
  --line-strong: #a9a393;
  --ink: #1d2420;
  --ink-2: #2d3631;
  --muted: #4f5a53;
  --green: #2f5d46;
  --green-hover: #264d3a;
  --green-tint: #e3ece4;
  --ochre: #c08a1e;
  --blue: #2e4f79;
  --brick: #9a3b2e;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--green);
  text-underline-offset: 3px;
}

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

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

.page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.site-header,
.main-content,
.site-footer {
  width: 100%;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

.site-header {
  max-width: 1120px;
  min-height: 84px;
  padding-block: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  min-width: 0;
  display: block;
  line-height: 0;
}

.brand img {
  display: block;
  width: auto;
  height: clamp(30px, 4vw, 40px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}

.nav-link {
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover {
  background: #ece8de;
  color: var(--ink);
}

.stats-short {
  display: none;
}

.main-content {
  flex: 1;
  max-width: 1120px;
  padding-bottom: 56px;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 7vw, 72px);
}

.hero {
  padding-top: clamp(12px, 4vw, 40px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
}

.hero-copy {
  flex: 1 1 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fade-up 600ms both;
}

.hero h1 {
  margin: 0;
  font: 400 clamp(44px, 8vw, 76px) / 1 "Newsreader", Georgia, serif;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.hero h1 em {
  font-style: italic;
}

.hero-copy p {
  max-width: 42ch;
  margin: 0;
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-mascot {
  flex: 0 1 380px;
  min-width: 240px;
  display: flex;
  justify-content: center;
  animation: fade-up 600ms 100ms both;
}

.hero-mascot video {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
}

.section-heading h2,
.section-label,
.week-history h4,
.all-games-card > h3 {
  margin: 0;
  color: var(--muted);
  font: 600 12px / 1.3 "JetBrains Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.heading-dot {
  color: #888b7f;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.countdown {
  color: var(--ink);
  font: 500 13px "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.today-card {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: transform 250ms cubic-bezier(0.2, 1.2, 0.4, 1), border-color 200ms;
}

.today-card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  color: var(--ink);
}

.today-icon {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  color: var(--paper);
}

.today-icon svg {
  width: 40px;
  height: 40px;
}

.today-game {
  min-width: 0;
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.today-title {
  font: 500 22px / 1.1 "Newsreader", Georgia, serif;
  letter-spacing: -0.01em;
}

.today-subtitle {
  color: var(--muted);
  font-size: 14px;
}

.today-status {
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--surface-sunk);
  color: #3f4943;
  font-size: 13px;
  font-weight: 600;
}

.button {
  min-height: 46px;
  padding-inline: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 160ms, color 160ms, border-color 160ms;
}

.button-outline {
  height: 44px;
  flex: none;
  border: 1.5px solid var(--green);
  background: transparent;
  color: var(--green);
}

.button-outline:hover {
  background: var(--green);
  color: #fff;
}

.today-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.games-section,
.stats-section {
  scroll-margin-top: 20px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.game-card {
  min-height: 280px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 20px;
  animation: fade-up 500ms both;
}

.game-card-live {
  position: relative;
  background: var(--green);
  color: var(--paper);
  transition: transform 300ms cubic-bezier(0.2, 1.2, 0.4, 1);
}

.game-card-live:hover {
  transform: translateY(-4px);
}

.game-card-upcoming {
  border: 1.5px dashed var(--line-strong);
  background: var(--surface);
}

.game-card-upcoming:nth-child(2) {
  animation-delay: 80ms;
}

.game-card-upcoming:nth-child(3) {
  animation-delay: 160ms;
}

.game-card-upcoming:nth-child(4) {
  animation-delay: 240ms;
}

.game-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.game-icon {
  width: 56px;
  height: 56px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.game-icon svg {
  width: 42px;
  height: 42px;
}

.game-icon-live {
  background: var(--paper);
  color: var(--green);
}

.game-icon-sure,
.game-icon-deep,
.game-icon-history {
  font-size: 26px;
  font-weight: 600;
}

.game-icon-sure {
  background: var(--ochre);
  color: var(--ink);
}

.game-icon-deep {
  background: var(--blue);
  color: var(--paper);
}

.game-icon-history {
  background: var(--brick);
  color: var(--paper);
}

.status-pill {
  padding: 6px 8px;
  border-radius: 999px;
  font: 600 11px / 1 "JetBrains Mono", monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-live {
  background: var(--paper);
  color: var(--green);
}

.status-upcoming {
  border: 1.5px solid #7d857f;
  color: #3f4943;
}

.game-copy {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.game-card h3 {
  margin: 0;
  font: 500 30px / 1.05 "Newsreader", Georgia, serif;
  letter-spacing: -0.015em;
}

.game-card-upcoming h3 {
  color: var(--ink);
}

.game-copy p {
  margin: 0;
  color: var(--green-tint);
  font-size: 15px;
  line-height: 1.5;
}

.game-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-paper {
  flex: 1 1 110px;
  background: var(--paper);
  color: var(--ink);
}

.button-paper:hover {
  background: #fff;
  color: var(--ink);
}

.button-dark-outline {
  flex: 1 1 90px;
  border: 1.5px solid #9ccbb0;
  color: var(--paper);
}

.button-dark-outline:hover {
  background: var(--green-hover);
  color: var(--paper);
}

.game-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.progress-dashes {
  height: 6px;
  flex: 1;
  border-radius: 999px;
  background: repeating-linear-gradient(90deg, currentColor 0 6px, transparent 6px 12px);
}

.accent-sure {
  color: var(--ochre);
}

.accent-deep {
  color: var(--blue);
}

.accent-history {
  color: var(--brick);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 14px;
}

.stats-card,
.all-games-card {
  min-width: 0;
  padding: 22px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stats-card {
  border: 1.5px solid var(--line);
  background: var(--surface);
}

.stats-game-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.stats-game-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green);
  color: var(--paper);
}

.stats-game-icon svg {
  width: 23px;
  height: 23px;
}

.stats-game-heading h3 {
  margin: 0;
  font: 500 20px "Newsreader", Georgia, serif;
}

.stat-numbers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat strong {
  font: 500 36px / 1 "Newsreader", Georgia, serif;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.week-history {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.week-history h4 {
  font-size: 11px;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day-score {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.day-score > span {
  width: 100%;
  max-width: 40px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--green);
  border-radius: 10px;
  background: var(--green);
  color: var(--paper);
  font-size: 13px;
  font-weight: 600;
  animation: fill-in 400ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.day-score:nth-child(2) > span {
  animation-delay: 60ms;
}

.day-score:nth-child(3) > span {
  animation-delay: 120ms;
}

.day-score:nth-child(4) > span {
  animation-delay: 180ms;
}

.day-score:nth-child(5) > span {
  animation-delay: 240ms;
}

.day-score:nth-child(6) > span {
  animation-delay: 300ms;
}

.day-score:nth-child(7) > span {
  animation-delay: 360ms;
}

.day-score > span:has(i) {
  border-style: dashed;
  border-color: #a9a393;
  background: transparent;
}

.day-score.day-today > span:has(i) {
  border-color: var(--green);
}

.day-score small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.day-score.day-today small {
  color: var(--ink);
}

.week-history p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.all-games-card {
  background: var(--ink);
  color: var(--paper);
  gap: 16px;
}

.all-games-card > h3 {
  color: #c3cac5;
  font-size: 11px;
}

.days-played {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.days-played strong {
  font: 500 64px / 1 "Newsreader", Georgia, serif;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.days-played span {
  color: #c3cac5;
  font-size: 16px;
}

.all-games-progress {
  display: flex;
  gap: 4px;
}

.all-games-progress > * {
  height: 10px;
  flex: 1;
  border-radius: 3px;
}

.all-games-progress > span {
  background: #7fb394;
}

.all-games-progress > i {
  border: 1.5px dashed #6b7670;
}

.all-games-card p {
  margin: 0;
  color: #c3cac5;
  font-size: 14px;
  line-height: 1.5;
}

.site-footer {
  max-width: 1120px;
  padding-block: 24px 32px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 18px "Newsreader", Georgia, serif;
}

.footer-brand img {
  width: auto;
  height: 24px;
}

.site-footer > span:last-child {
  color: var(--muted);
  font-size: 13px;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fill-in {
  from {
    opacity: 0;
    transform: scale(0.3);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1039px) {
  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 599px) {
  .site-header {
    min-height: 72px;
  }

  .brand img {
    height: 30px;
  }

  .games-link {
    display: none;
  }

  .stats-long {
    display: none;
  }

  .stats-short {
    display: inline;
  }

  .hero {
    gap: 22px;
  }

  .hero-copy {
    flex-basis: 100%;
    gap: 14px;
  }

  .hero h1 {
    font-size: clamp(44px, 12vw, 64px);
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-mascot {
    flex: 0 1 260px;
    min-width: 200px;
    margin-inline: auto;
  }

  .today-card {
    gap: 12px;
  }

  .today-game {
    flex-basis: calc(100% - 68px);
  }

  .today-status {
    margin-left: 64px;
  }

  .button-outline {
    margin-left: auto;
  }

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

  .game-card {
    min-height: 250px;
  }

  .site-footer {
    padding-bottom: 24px;
  }
}

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