@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("Silkscreen-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Silkscreen";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("Silkscreen-Bold.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --ink: #f7f0d6;
  --muted: #d2dcde;
  --cyan: #62d2cc;
  --orange: #f4a340;
  --panel: #10232c;
  --line: #31505a;
  --background: #071117;
  --play-green: #00ffb5;
  --play-purple: #e005f6;
}

* { box-sizing: border-box; }

html { background: var(--background); }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 5%, rgb(25 106 122 / 35%), transparent 34rem),
    linear-gradient(150deg, #071117, #0b1b22 65%, #122c30);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.65;
  min-height: 100vh;
  overflow-wrap: break-word;
}

a { color: var(--cyan); min-height: 2.75rem; }
a:hover { color: #9af0e9; }
a:focus-visible { border-radius: .15rem; outline: 3px solid var(--orange); outline-offset: 4px; }

.skip-link {
  background: var(--ink);
  color: var(--background);
  left: 1rem;
  padding: .75rem 1rem;
  position: fixed;
  top: 1rem;
  transform: translateY(-200%);
  z-index: 10;
}

.skip-link:focus { color: var(--background); transform: none; }

.site-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 72rem;
  padding: 1.25rem clamp(1rem, 4vw, 3rem);
}

.header-tools { align-items: flex-end; display: flex; flex-direction: column; gap: .8rem; max-width: 100%; min-width: 0; }

.brand {
  color: var(--orange);
  font-size: clamp(1.5rem, 3vw, 3rem);
  font-weight: 900;
  letter-spacing: .12em;
  line-height: 1;
  text-decoration: none;
}

.brand, h1, h2, h3, nav, .eyebrow, .action, .facts, .language-selector, footer {
  font-family: "Silkscreen", monospace;
}

nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
nav a { align-items: center; display: inline-flex; font-weight: 700; text-underline-offset: .35rem; }
nav a[aria-current="page"] { color: var(--ink); text-decoration-thickness: .2rem; }

.language-selector { align-items: center; display: flex; flex-wrap: wrap; font-size: .72rem; gap: .2rem .75rem; }
.language-selector span { color: var(--muted); }
.language-selector a { align-items: center; display: inline-flex; }
.language-selector a[aria-current="true"] { color: var(--ink); font-weight: 700; }

main { margin: 0 auto; max-width: 72rem; padding: clamp(3rem, 8vw, 7rem) clamp(1rem, 4vw, 3rem); }

.hero {
  align-items: center;
  display: grid;
  gap: clamp(2rem, 7vw, 7rem);
  grid-template-columns: minmax(0, 1fr) auto;
}

.hero-copy { max-width: 48rem; }
.app-icon {
  border: 1px solid rgb(247 240 214 / 28%);
  border-radius: 22%;
  box-shadow: 0 2rem 5rem rgb(0 0 0 / 42%);
  display: block;
  height: auto;
  width: clamp(13rem, 24vw, 22rem);
}
.hero h1, .document h1 { font-size: clamp(2.8rem, 7vw, 5.8rem); line-height: 1; margin: .25rem 0 1.5rem; }
.lead { color: var(--muted); font-size: clamp(1.2rem, 3vw, 1.6rem); }
.eyebrow { color: var(--cyan); font-size: .8rem; font-weight: 800; letter-spacing: .18em; }

.game-info {
  align-items: start;
  border-block: 1px solid var(--line);
  display: grid;
  gap: 1.5rem 3rem;
  grid-template-columns: minmax(14rem, .8fr) minmax(18rem, 1.2fr);
  grid-template-rows: max-content max-content 1fr;
  margin-top: clamp(4rem, 10vw, 8rem);
  padding: 2.5rem 0;
}

.game-info h2 { color: var(--orange); font-size: clamp(1.5rem, 3vw, 2.25rem); margin: .4rem 0 0; }
.game-info > p { color: var(--muted); margin: 0; }
.game-info > :first-child { grid-column: 1; grid-row: 1; }
.game-info > .action { grid-column: 1; grid-row: 3; }

.coastline-showcase { grid-column: 2; grid-row: 1 / span 3; min-width: 0; }
.coastline-intro { color: var(--muted); margin: 0 0 1.25rem; }
.circuit-slider { min-width: 0; position: relative; }
.circuit-slider:focus-visible { border-radius: .25rem; outline: 3px solid var(--orange); outline-offset: 5px; }
.circuit-slide { margin: 0; }
.circuit-slide figure { margin: 0; }
.circuit-slide img { aspect-ratio: 16 / 9; display: block; height: auto; margin-inline: auto; object-fit: contain; width: 100%; }
.circuit-slide h3 { color: var(--ink); font-size: clamp(1.3rem, 3vw, 2rem); margin: 1rem 0; }
.circuit-stats { display: grid; gap: .75rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.circuit-stats div { border: 1px solid var(--line); padding: .8rem; }
.circuit-stats dt { color: var(--muted); font-size: .78rem; }
.circuit-stats dd { color: var(--ink); font-family: "Silkscreen", monospace; font-size: 1.1rem; margin: .35rem 0 0; }
.circuit-controls {
  align-items: center;
  aspect-ratio: 16 / 9;
  display: none;
  inset: 0 0 auto;
  justify-content: space-between;
  padding: 0 1rem;
  pointer-events: none;
  position: absolute;
}
.slider-ready .circuit-controls { display: flex; }
.circuit-controls button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--cyan);
  cursor: pointer;
  height: 3rem;
  padding: 0;
  pointer-events: auto;
  position: relative;
  width: 3rem;
  z-index: 1;
}
.circuit-controls button::before {
  border-bottom: .2rem solid currentColor;
  border-left: .2rem solid currentColor;
  content: "";
  height: .65rem;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-35%, -50%) rotate(45deg);
  width: .65rem;
}
.circuit-controls [data-circuit-next]::before { transform: translate(-65%, -50%) rotate(225deg); }
.circuit-controls button:hover { border-color: var(--cyan); color: var(--ink); }
.circuit-controls button:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.circuit-position {
  background: rgb(7 17 23 / 78%);
  bottom: .75rem;
  color: var(--muted);
  font-family: "Silkscreen", monospace;
  font-size: .7rem;
  margin: 0;
  padding: .2rem .35rem;
  position: absolute;
  right: .75rem;
}

.facts { display: flex; gap: clamp(1rem, 3vw, 2rem); grid-column: 1; grid-row: 2; margin: .5rem 0 0; }
.facts div { display: grid; gap: .2rem; }
.facts dt { color: var(--ink); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; }
.facts dd { color: var(--muted); font-size: .78rem; margin: 0; }

.platform {
  align-items: center;
  background: linear-gradient(90deg, #1c1628 0%, #0a080d 100%);
  border: 1px solid #5f3a70;
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  grid-template-columns: minmax(12rem, .75fr) minmax(18rem, 1.25fr);
  margin-top: 4rem;
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 3.5rem);
  position: relative;
}

.platform::before {
  background: linear-gradient(90deg, #00ffb5 0%, #e005f6 100%);
  content: "";
  height: .3rem;
  inset: 0 0 auto;
  position: absolute;
}

.platform-media { align-items: center; display: flex; flex-direction: column; gap: 1.75rem; }
.play-logo { display: block; height: auto; max-width: 19rem; width: 100%; }
.device-render { display: block; height: auto; max-width: 20rem; width: 100%; }
.platform h2 { color: white; font-size: clamp(1.55rem, 3vw, 2.4rem); line-height: 1.25; }
.platform p { color: #f1edf4; }
.platform strong { color: var(--play-green); }
.platform-links { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.platform a { align-items: center; color: var(--play-green); display: inline-flex; font-family: "Silkscreen", monospace; font-weight: 700; }
.platform a:hover { color: white; }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 4rem;
}

.cards article {
  background: rgb(16 35 44 / 82%);
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.cards h2 { margin-top: 0; }
.action { display: inline-block; font-weight: 800; overflow-wrap: anywhere; }

.document { max-width: 52rem; }
.document, .document * { min-width: 0; }
.document h1 { font-size: clamp(2.25rem, 6vw, 4.25rem); hyphens: auto; max-width: 100%; overflow-wrap: anywhere; }
.document h2 { color: var(--orange); font-size: 1.35rem; margin-top: 2.8rem; }
.document p { color: var(--muted); }
.document li { color: var(--muted); margin-block: .7rem; }

.instruction-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, 1fr); }
.instruction-grid section { border: 1px solid var(--line); padding: 1rem; }
.instruction-grid h3 { color: var(--ink); margin: 0; }

.controls { border-block: 1px solid var(--line); }
.controls p { align-items: baseline; display: flex; gap: 1rem; justify-content: space-between; margin: 0; padding: .8rem 0; }
.controls p + p { border-top: 1px solid rgb(49 80 90 / 55%); }
.controls strong { color: var(--ink); }
.controls span { text-align: right; }

footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 2rem 1rem 3rem;
  text-align: center;
}

footer p { margin: .25rem 0; }
footer a { align-items: center; display: inline-flex; }

@media (max-width: 44rem) {
  .site-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .header-tools { align-items: flex-start; width: 100%; }
  nav { flex-wrap: wrap; }
  .hero { align-items: flex-start; display: flex; flex-direction: column; width: 100%; }
  .hero-copy { max-width: 100%; min-width: 0; width: 100%; }
  .hero h1 { font-size: clamp(2.25rem, 12vw, 3.5rem); overflow-wrap: anywhere; }
  .lead { font-size: 1.05rem; }
  .app-icon { order: -1; width: 10rem; }
  .game-info { grid-template-columns: 1fr; }
  .game-info > :first-child, .coastline-showcase, .facts, .game-info > .action { grid-column: auto; grid-row: auto; }
  .circuit-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts, .game-info > .action { grid-column: auto; }
  .facts { flex-wrap: wrap; }
  .platform { grid-template-columns: 1fr; }
  .device-render { max-width: 14rem; }
  .cards { grid-template-columns: 1fr; }
  .instruction-grid { grid-template-columns: 1fr; }
  .controls p { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .controls span { text-align: left; }
}

@media (max-width: 22rem) {
  main { padding-inline: .75rem; }
  .site-header { padding-inline: .75rem; }
  .brand { letter-spacing: .06em; }
  .hero h1, .document h1 { font-size: 2.25rem; overflow-wrap: anywhere; }
  .platform { padding-inline: 1rem; }
  .circuit-controls button { height: 2.75rem; width: 2.75rem; }
}

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

@media print {
  body { background: white; color: black; }
  .site-header, .skip-link, footer { display: none; }
  .document { max-width: none; padding: 0; }
  .document h1, .document h2, .document p, .eyebrow { color: black; }
}
