@font-face {
  font-family: "DM Sans";
  src: url("./assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: Playfair;
  src: url("./assets/playfair.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Playfair;
  src: url("./assets/playfair-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 600;
  font-display: swap;
}

:root {
  --ink: #142b21;
  --pine: #10241d;
  --deep-pine: #0c1d17;
  --paper: #f8f5e9;
  --cream: #fffbee;
  --sage: #e6ecdc;
  --muted: #42564b;
  --muted-on-dark: #c0cfbf;
  --gold: #e9cb83;
  --border: #cdd4c2;
  --line-on-dark: rgb(232 238 215 / 20%);
  --serif: Playfair, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 5px; }
::selection { background: var(--gold); color: var(--deep-pine); }

.wrap { width: min(100% - 96px, 1224px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 5; inset: 12px auto auto 12px; padding: 10px 18px; background: var(--gold); color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header, .hero, .play-section, .footer { color: var(--cream); }
.site-header { background: var(--deep-pine); border-bottom: 1px solid var(--line-on-dark); }
.header-inner { min-height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.header-inner > .button { justify-self: end; }
.brand { width: fit-content; display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 1rem; letter-spacing: -.025em; }
.brand img { border-radius: 50%; flex: none; }
.brand strong { font-weight: 700; }
.navigation { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(18px, 3vw, 42px); }
.navigation a { color: var(--muted-on-dark); padding-block: 10px; text-decoration: none; font-size: .9375rem; font-weight: 600; }
.navigation a:hover { color: var(--cream); text-decoration: underline; text-underline-offset: 5px; }

.button {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 21px;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  line-height: 1.25;
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.button-small { min-height: 42px; padding: 8px 16px; font-size: .875rem; }
.button-outline { border-color: rgb(232 238 215 / 36%); color: var(--cream); }
.button-outline:hover { background: rgb(255 255 255 / 8%); border-color: var(--cream); }
.button-primary { background: var(--gold); color: var(--deep-pine); }
.button-primary:hover { background: #ffe5a8; }
.button-primary:focus-visible { outline-color: var(--cream); }
.play-icon { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

.hero {
  overflow: clip;
  background: radial-gradient(ellipse at 78% 45%, #214c38 0%, #143026 40%, var(--pine) 74%);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, .96fr) minmax(0, 1.04fr); align-items: center; gap: clamp(24px, 4vw, 72px); padding-block: 55px 63px; }
.hero-copy { position: relative; z-index: 1; padding-block: 20px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #426350; font-size: .8125rem; font-weight: 700; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow-line { width: 26px; height: 1px; flex: none; background: currentColor; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { margin-block: 12px 26px; }
.hero-title, .hero-subtitle { display: block; font-family: var(--serif); font-weight: 600; }
.hero-title { font-size: clamp(7rem, 12.4vw, 12.25rem); line-height: .91; letter-spacing: -.09em; }
.hero-subtitle { margin-top: 12px; color: var(--gold); font-style: italic; font-size: clamp(2.1rem, 4vw, 3.8rem); line-height: 1.1; letter-spacing: -.04em; }
.hero-description { color: var(--muted-on-dark); max-width: 34ch; font-size: clamp(1rem, 1.45vw, 1.2rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 29px; }

.board-stage {
  min-width: 0;
  aspect-ratio: 1.13;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding-bottom: 23px;
  border: 1px solid rgb(215 225 188 / 24%);
  border-radius: 10px;
  background-color: #153326;
  background-image:
    radial-gradient(ellipse, rgb(118 155 97 / 28%), transparent 73%),
    radial-gradient(circle, transparent 12px, rgb(204 225 175 / 14%) 13px, transparent 14px),
    radial-gradient(circle, transparent 12px, rgb(204 225 175 / 14%) 13px, transparent 14px);
  background-size: 100% 100%, 58px 44px, 58px 44px;
  background-position: center, 0 0, 29px 22px;
}
.stage-rings { position: absolute; width: 74%; aspect-ratio: 1; border: 1px solid rgb(230 227 174 / 18%); border-radius: 50%; }
.stage-rings::before, .stage-rings::after { content: ""; position: absolute; border: inherit; border-radius: inherit; }
.stage-rings::before { inset: -10%; }
.stage-rings::after { inset: 10%; }
.board-mount {
  width: 73%;
  position: relative;
  padding: clamp(5px, .75vw, 11px);
  border-radius: 5px;
  border: 1px solid #beaa73;
  background: linear-gradient(145deg, #cebb83, #7c6746 42%, #a78c5e 85%);
  box-shadow: 0 7px 0 #4b402c, 2px 8px 0 1px #261f16, 0 20px 28px rgb(0 0 0 / 45%), 0 39px 62px rgb(0 0 0 / 36%);
  transform: perspective(900px) rotateX(14deg) rotateZ(-12deg);
}
.board-mount img { width: 100%; border-radius: 1px; filter: saturate(.82) brightness(.95); }
.board-stage figcaption { position: absolute; right: 15px; bottom: 14px; padding: 5px 10px; border: 1px solid var(--line-on-dark); border-radius: 4px; background: var(--deep-pine); color: #e2eadb; font-size: .8125rem; line-height: 1.45; }

.section { padding-block: clamp(60px, 7.5vw, 112px); }
h2 { font: 600 clamp(2.35rem, 5vw, 4.15rem) / 1.07 var(--serif); letter-spacing: -.05em; text-wrap: balance; }
.section h2 { margin-top: 12px; }
.section-intro { display: grid; grid-template-columns: 1fr .85fr; align-items: end; gap: clamp(25px, 6vw, 84px); }
.section-copy { max-width: 45ch; }
.section-copy p, .creator-copy p:not(.eyebrow), .history-summary { color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.125rem); }
.text-link { display: inline-block; width: fit-content; font-weight: 700; text-underline-offset: .26em; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }
.section-copy .text-link, .creator-copy .text-link { margin-top: 15px; }
.game-facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(35px, 5vw, 62px); border-block: 1px solid var(--border); }
.game-facts > div { display: flex; flex-direction: column; padding: 22px clamp(14px, 3vw, 40px); }
.game-facts > div:first-child { padding-left: 0; }
.game-facts > div + div { border-left: 1px solid var(--border); }
.fact-value { order: -1; font: 600 clamp(1.55rem, 4vw, 2.75rem) / 1.2 var(--serif); letter-spacing: -.04em; }
.game-facts dt { margin-top: 4px; color: var(--muted); }

.board-demo {
  margin-top: clamp(24px, 4vw, 44px);
  padding: clamp(16px, 3.5vw, 40px);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #eeefe2;
}
.board-demo-intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; }
.board-demo-copy h3 { font: 600 clamp(1.65rem, 3.8vw, 3rem)/1.12 var(--serif); letter-spacing: -.045em; }
.board-demo-copy > p { max-width: 54ch; margin-top: 9px; color: var(--muted); }
.board-demo-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.board-demo-picker legend { padding: 0; margin-bottom: 8px; font-size: .875rem; font-weight: 700; }
.board-demo-options { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.board-demo-options label { position: relative; cursor: pointer; }
.board-demo-options input { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); }
.board-demo-options label > span {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  height: 100%;
  padding: 8px 3px;
  border: 1px solid #a0ad9b;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 700;
  text-align: center;
}
.board-demo-options img { width: 30px; height: 30px; object-fit: contain; }
.board-demo-options label:hover > span { border-color: var(--ink); }
.board-demo-options input:checked + span { border-color: var(--pine); background: #dce8d6; box-shadow: inset 0 -2px 0 #375844; }
.board-demo-options input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.board-demo-layout { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1fr); gap: clamp(22px, 4vw, 56px); align-items: center; margin-top: 22px; }
.board-demo-mode .board-demo-options { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 280px; }
.board-demo-mode .board-demo-options label > span { min-height: 43px; }
.board-demo-explanation { margin-top: 18px; }
.board-demo-explanation h4 { margin: 0 0 7px; color: var(--ink); font: 600 clamp(1.45rem, 2.8vw, 2rem)/1.2 var(--serif); letter-spacing: -.035em; }
.board-demo-explanation p { max-width: 40ch; color: var(--muted); }
.board-demo-status { margin-top: 14px; min-height: 2.8em; color: var(--ink); font-size: .9375rem; font-weight: 600; line-height: 1.4; }
.board-demo-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.board-demo-step, .board-demo-reset {
  min-height: 42px;
  padding: 6px 13px;
  border: 1px solid #75907b;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  font: 700 .875rem var(--sans);
  cursor: pointer;
}
.board-demo-step { border-color: var(--pine); background: var(--pine); color: var(--cream); }
.board-demo-step:hover { background: #24503c; }
.board-demo-step:focus-visible { outline-color: var(--pine); }
.board-demo-reset:disabled { color: #576b5b; border-color: #a0ab98; cursor: default; }
.board-demo-reset:hover:not(:disabled) { background: var(--sage); }
.board-demo-surface {
  --board-columns: 7;
  --board-rows: 7;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px 9px;
  padding: clamp(7px, 1.5vw, 18px);
  border: 1px solid #294e3c;
  border-radius: 6px;
  background: radial-gradient(ellipse at center, #254c38 0%, #102920 80%);
  color: #c9d6c4;
  box-shadow: inset 0 0 0 4px rgb(12 29 23 / 35%);
}
.board-demo-caption {
  grid-area: 1 / 1 / 2 / -1;
  justify-self: center;
  margin: 0 0 3px;
  padding: 1px 10px;
  border: 1px solid rgb(233 203 131 / 36%);
  border-radius: 20px;
  color: var(--gold);
  font-size: .875rem;
  font-weight: 700;
}
.board-demo-columns, .board-demo-rows {
  display: grid;
  place-items: center;
  font-size: .8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.board-demo-columns { grid-area: 2 / 2; grid-template-columns: repeat(var(--board-columns), minmax(0, 1fr)); }
.board-demo-rows { grid-area: 3 / 1; grid-template-rows: repeat(var(--board-rows), minmax(0, 1fr)); }
.board-demo-grid {
  grid-area: 3 / 2;
  display: grid;
  grid-template-columns: repeat(var(--board-columns), minmax(0, 1fr));
  grid-template-rows: repeat(var(--board-rows), minmax(0, 1fr));
  place-items: center;
  aspect-ratio: 7 / 5.85;
}
.board-demo-grid > * { grid-area: var(--row) / var(--col); }
.board-demo-cell, .board-demo-target { width: 94%; aspect-ratio: 1; border-radius: 50%; }
.board-demo-cell { border: 1px solid #657e6b; background: rgb(214 228 196 / 12%); }
.board-demo-origin { border-style: dashed; border-color: #e0d8b0; }
.board-demo-target {
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--gold);
  background: #284734;
  color: var(--gold);
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}
.board-demo-target.is-capture { border-color: #f2aa9a; border-style: dashed; background: #3e3230; color: #f2aa9a; }
.board-demo-target::before { content: ""; width: 15%; aspect-ratio: 1; border-radius: 50%; background: currentColor; }
.board-demo-target:hover { background: var(--gold); color: var(--deep-pine); }
.board-demo-target.is-capture:hover { background: #f2aa9a; color: #3e3230; }
.board-demo-target:focus-visible { outline-color: var(--cream); outline-offset: 3px; }
.board-demo-piece { z-index: 1; width: 66%; max-height: 75%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 2px rgb(0 0 0 / 65%)); }
.board-demo [hidden] { display: none; }

.creator { background: #f0eee2; }
.creator-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: center; gap: clamp(28px, 7vw, 100px); }
.creator-portrait {
  display: grid;
  place-items: center;
  padding: clamp(17px, 4vw, 45px);
  border: 1px solid #b9c7b1;
  border-radius: 10px;
  background: radial-gradient(circle, rgb(43 88 56 / 22%) 1px, transparent 1.5px) 0 0 / 16px 16px #dce7d3;
}
.creator-portrait img {
  width: min(100%, 290px);
  border-radius: 5px;
  box-shadow: 0 12px 28px rgb(16 36 29 / 22%);
}
.creator-copy p:not(.eyebrow) { max-width: 48ch; margin-top: 14px; }
.creator-links { display: flex; flex-wrap: wrap; column-gap: 22px; }

.history { background: var(--sage); }
.history-intro h2 { max-width: 13ch; }
.history-summary { max-width: 40ch; }
.history-timeline { display: grid; gap: 16px; margin-top: clamp(26px, 5vw, 52px); }
.history-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 2vw, 22px);
  padding-top: 23px;
}
.history-tabs::before { content: ""; position: absolute; inset: 7px 16% auto; border-top: 1px solid #94a58d; }
.history-tabs button {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 18px 18px;
  border: 1px solid #9eaf9e;
  border-bottom-width: 3px;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font: 700 .875rem/1.3 var(--sans);
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}
.history-tabs button::before {
  content: "";
  position: absolute;
  top: -24px;
  left: calc(50% - 8px);
  width: 16px;
  aspect-ratio: 1;
  border: 2px solid #59745e;
  border-radius: 50%;
  background: var(--sage);
}
.history-tabs button:hover { background: #f1f4e9; border-color: var(--ink); }
.history-tabs button[aria-selected="true"] { background: var(--pine); color: var(--cream); border-color: var(--pine) var(--pine) var(--gold); }
.history-tabs button[aria-selected="true"]::before { background: var(--gold); border-color: var(--pine); box-shadow: inset 0 0 0 2px var(--sage); }
.history-tabs button:focus-visible { outline-color: var(--ink); }
.history-tab-year { font: 600 clamp(1.55rem, 3vw, 2.2rem)/1.08 var(--serif); font-variant-numeric: lining-nums; }
.history-tabs button[aria-selected="true"] .history-tab-label { color: var(--gold); }

.history-panel {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, .68fr) minmax(0, 1fr);
  align-items: stretch;
  overflow: clip;
  border: 1px solid #aabca7;
  border-radius: 9px;
  background: var(--paper);
}
.history-tabs[hidden], .history-panel[hidden] { display: none; }
.history-date {
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  overflow: hidden;
  min-height: 240px;
  background: radial-gradient(ellipse at 35% 50%, #265440, var(--pine) 78%);
  color: var(--gold);
}
.history-date::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -60%;
  background: repeating-radial-gradient(circle at center, transparent 0 35px, rgb(234 223 170 / 17%) 36px 37px);
}
.history-date time {
  font: 600 clamp(3.4rem, 8vw, 7rem)/1 var(--serif);
  font-variant-numeric: lining-nums;
  letter-spacing: -.06em;
}
.history-detail { align-self: center; padding: clamp(22px, 4.7vw, 66px); }
.history-detail h3 { margin-bottom: 12px; font: 600 clamp(1.55rem, 3vw, 2.5rem)/1.13 var(--serif); letter-spacing: -.035em; }
.history-detail p { max-width: 47ch; color: var(--muted); }
.history-detail .text-link { margin-top: 13px; font-size: .875rem; }
.history-timeline[data-ready] .history-panel:not([hidden]) .history-detail { animation: milestone-in 220ms ease-out both; }

@keyframes milestone-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.play-section { background: radial-gradient(ellipse at 95% 50%, #25523b 0%, var(--pine) 68%); }
.play-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; padding-block: clamp(46px, 6vw, 79px); }
.play-inner h2 { font-size: clamp(2.2rem, 4vw, 3.5rem); }
.play-inner p { margin-top: 7px; color: var(--muted-on-dark); }
.footer { background: var(--deep-pine); border-top: 1px solid var(--line-on-dark); }
.footer-inner { min-height: 84px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 16px; }
.footer p { color: var(--muted-on-dark); font-size: .875rem; }
.footer p a { text-underline-offset: .2em; }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 64px); }
  .hero-title { font-size: clamp(6rem, 13vw, 9rem); }
  .hero-inner { gap: 25px; }
  .board-demo-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 730px) {
  .wrap { width: calc(100% - 40px); }
  .header-inner { grid-template-columns: 1fr auto; gap: 0 10px; padding-top: 9px; }
  .navigation { grid-row: 2; grid-column: 1 / -1; justify-content: space-between; gap: 8px 12px; }
  .navigation a { padding-block: 12px; }
  .hero-inner { grid-template-columns: 1fr; align-items: start; gap: 24px; padding-block: 30px; }
  .hero-copy { padding-block: 12px 0; }
  .hero h1 { margin-block: 10px 18px; }
  .hero-title { font-size: clamp(5.8rem, 20vw, 8.75rem); }
  .hero-subtitle { font-size: clamp(2rem, 8vw, 3.5rem); }
  .hero-actions { margin-top: 21px; }
  .board-stage { width: min(100%, 490px); }
  .section-intro, .board-demo-layout, .creator-inner { grid-template-columns: 1fr; }
  .board-demo-status { min-height: 0; }
  .creator-portrait { width: min(100%, 460px); }
  .creator-portrait img { width: min(100%, 240px); }
  .history-intro { gap: 14px; }
  .history-tabs button { padding: 11px 9px 13px; }
  .history-panel { grid-template-columns: 1fr; }
  .history-date { min-height: 110px; }
}

@media (max-width: 415px) {
  .wrap { width: calc(100% - 32px); }
  .hero-actions .button { min-height: 46px; padding: 10px 13px; font-size: .875rem; }
  .hero-actions { gap: 8px; }
  .board-stage { padding-bottom: 27px; }
  .board-stage figcaption { right: 8px; bottom: 8px; }
  .game-facts > div { padding: 15px 8px; }
  .game-facts dt { font-size: .875rem; line-height: 1.4; }
  .board-demo-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .history-tabs button, .board-demo-target { transition: none; }
  .history-timeline[data-ready] .history-panel:not([hidden]) .history-detail { animation: none; }
}
