/* ============================================================================
   GAME PAGE — the layout every game page shares, modelled on the Shotoshot page.
   Structure only: each game sets its own tokens (colours, fonts) in its own
   css/style.css, loaded after this file, and adds its signature touches there.
     --bg --panel --line --text --muted   ground, cards, rules, type
     --accent      marks: links, buttons, the underline, the asterisks
     --soft        the quieter second line of a heading
     --sans --mono
   Clips are framed and kept near their native 800 px: never a background.
   ============================================================================ */

:root{
  color-scheme: dark;
  --bg: #0d1117;
  --panel: #161b22;
  --line: #283039;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #58a6ff;
  --on-accent: #0d1117;
  --soft: var(--muted);
  --sans: system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: Consolas, ui-monospace, monospace;
  --showcase-max: 848px;
  --clip-ratio: 16 / 9;
}

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

html{ scroll-behavior: smooth; scroll-padding-top: 32px; -webkit-text-size-adjust: 100%; }

body{
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

h1,h2,h3,p{ margin-top: 0; }
img{ display: block; max-width: 100%; height: auto; }
a{ color: inherit; text-underline-offset: 5px; }
a:focus-visible{ outline: 3px solid var(--accent); outline-offset: 6px; }
::selection{ background: var(--accent); color: var(--on-accent); }

.wrap{ width: min(1240px, calc(100% - 96px)); margin-inline: auto; }

.skip{ position: absolute; top: -100px; left: 20px; z-index: 10; background: var(--panel); color: var(--text); padding: 12px; }
.skip:focus{ top: 10px; }

/* ---------- Header ---------- */

.nav{
  display: flex;
  align-items: center;
  gap: 40px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav nav{ display: flex; gap: 30px; margin-left: auto; }
.nav nav a{ font-size: 14px; text-decoration: none; }
.nav nav a:hover{ color: var(--accent); }

/* ---------- Buttons ---------- */

.button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 17px 24px;
  border-radius: 7px;
  font-weight: 650;
  font-size: 15px;
  line-height: 1.3;
  text-decoration: none;
}
.button.small{ padding: 12px 17px; font-size: 13px; }
.button.light{ background: var(--panel); border: 1px solid var(--line); }
.button.light:hover{ border-color: var(--accent); }
.button.primary{ background: var(--accent); color: var(--on-accent); }
.button.primary:hover{ filter: brightness(1.1); }

/* ---------- Hero ---------- */

.hero{ padding-top: 22px; }

.eyebrow{
  margin: 0 0 16px;
  font: 500 11px/1.6 var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.status-dot{
  display: inline-block;
  width: 7px; height: 7px;
  margin-right: 9px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

.hero-heading{
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  gap: 0 48px;
  align-items: end;
  margin-bottom: 20px;
}
.hero-heading > .eyebrow{ grid-column: 2; grid-row: 1; white-space: nowrap; }
.hero-title{ grid-column: 1; grid-row: 1 / 3; }
.hero-aside{ grid-column: 2; grid-row: 2; max-width: 395px; }
.hero-aside{ display: flex; flex-wrap: wrap; gap: 10px; align-content: start; }
.hero-aside .hero-note{ flex-basis: 100%; }

h1{
  margin-bottom: 0;
  font-size: clamp(46px, 4.4vw, 64px);
  font-weight: 600;
  line-height: 1.07;
  letter-spacing: -.03em;
}

.marked{ position: relative; white-space: nowrap; color: var(--accent); }
.marked svg{
  position: absolute;
  left: -1%; bottom: -13px;
  width: 102%; height: 18px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
}

.hero-lead{ margin: 16px 0 0; font-size: 17px; line-height: 1.65; }
.hero-note{ margin: 15px 0 0; font-size: 15px; color: var(--muted); }
.hero-aside .hero-note{ font-size: 13px; margin-top: 14px; }

/* ---------- Showcase: the one clip under the title ---------- */

/* Never wider than its native size, never taller than what leaves the title in view. */
.showcase{
  max-width: min(var(--showcase-max), calc((100svh - 280px) * 16 / 9 + 48px));
  margin: 0 auto;
  padding-top: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 25px 70px #0003;
}
.showcase .frame{ margin-inline: 24px; }
.showcase-bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  max-width: none;
  margin: 0;
  padding: 16px 24px;
  font-size: 13px;
  color: var(--text);
}
.showcase-bottom .mono{ margin: 0; white-space: nowrap; }

.mono{ font: 10px var(--mono); letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }

/* A clip and its frame. A game may draw over .frame::after (Shepherd's viewfinder). */
.frame{ position: relative; border-radius: 6px; overflow: hidden; background: var(--bg); }
.frame img{ width: 100%; aspect-ratio: var(--clip-ratio); object-fit: cover; }
.tag{
  position: absolute;
  top: 12px; left: 12px;
  padding: 2px 8px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  color: var(--accent);
  font: 10px var(--mono);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.qualities{
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0 54px;
  font: 11px var(--mono);
  color: var(--muted);
}
.qualities span::before{ content: "✳"; margin-right: 10px; color: var(--accent); }

/* ---------- Sections ---------- */

.section{ padding-block: 104px; border-top: 1px solid var(--line); }

.section-heading{
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0 90px;
  align-items: end;
}
.section-heading .eyebrow{ grid-column: 1 / -1; margin-bottom: 25px; color: var(--muted); }
.section-heading > p:last-child{ max-width: 390px; margin-bottom: 6px; font-size: 17px; line-height: 1.75; color: var(--muted); }

h2{
  margin-bottom: 0;
  font-size: clamp(36px, 3.8vw, 55px);
  font-weight: 550;
  line-height: 1.12;
  letter-spacing: -.035em;
}
.soft{ color: var(--soft); }

/* Two clips side by side, each with its caption. */
.clips{ display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 60px; }
.clips figure{ margin: 0; }
.clip .frame{ border: 1px solid var(--line); border-radius: 10px; }
/* Four small ones in a row: a series (skies, species), two per row on a tablet. */
.clips--four{ grid-template-columns: repeat(4, 1fr); gap: 20px; }
.clips--four figcaption{ margin-top: 10px; font-size: 13px; }

figcaption{ max-width: 470px; margin-top: 14px; font-size: 14px; color: var(--muted); }
figcaption strong{ color: var(--text); font-weight: 550; }
figcaption .mono{ display: block; margin-top: 8px; }

/* Text on one side, a clip on the other. */
.split{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 70px;
  align-items: center;
}
.split > figure{ margin: 0; }
/* The picture goes left; in the markup the words still come first, so a phone reads them first. */
.split--flip > figure{ order: -1; }
.split .lead{ margin: 22px 0 0; max-width: 470px; font-size: 17px; line-height: 1.7; color: var(--muted); }

.feature-list{ list-style: none; padding: 0; margin: 30px 0 0; }
.feature-list li{ border-top: 1px solid var(--line); padding: 16px 0 0; margin-bottom: 18px; }
.feature-list strong{ display: block; margin-bottom: 4px; font-weight: 500; }
.feature-list span{ display: block; font-size: 14px; color: var(--muted); }

/* The fact sheet: prose on the left, a list of plain facts on the right. */
.facts{ display: grid; grid-template-columns: .9fr 1.1fr; gap: 80px; }
.facts p:not(.eyebrow){ max-width: 470px; color: var(--muted); }
.facts h2{ margin-bottom: 26px; }
.fact-list{ margin: 0; border-top: 1px solid var(--line); }
.fact-list div{
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.fact-list dt{ padding-top: 3px; font: 11px var(--mono); letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); }
.fact-list dd{ margin: 0; font-size: 15px; }

/* ---------- Footer ---------- */

.footer{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px 30px;
  padding-block: 28px 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
.footer .brand{ font-size: 19px; }
.footer a:not(.brand){ color: var(--muted); }
.footer a:not(.brand):hover{ color: var(--accent); }

/* ---------- Narrower screens ---------- */

@media (max-width: 1000px){
  .wrap{ width: calc(100% - 48px); }
  .nav{ gap: 20px; }
  .nav nav{ gap: 16px; }
  .hero-heading{ column-gap: 35px; }
  .section-heading{ gap: 25px; }
  .qualities{ flex-wrap: wrap; gap: 16px; }
  .split, .facts{ gap: 40px; }
  .clips--four{ grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px){
  .wrap{ width: calc(100% - 32px); }
  .nav{ flex-wrap: wrap; gap: 15px; min-height: 0; padding-block: 18px; }
  .nav nav{ order: 3; width: 100%; justify-content: space-between; margin: 5px 0 0; }
  .nav > .button{ margin-left: auto; }
  .brand{ font-size: 19px; }
  .hero{ padding-top: 38px; }
  .hero-heading{ grid-template-columns: 1fr; grid-template-rows: none; gap: 30px; margin-bottom: 35px; }
  .hero-heading > .eyebrow, .hero-title, .hero-aside{ grid-column: auto; grid-row: auto; white-space: normal; }
  .hero-heading > .eyebrow{ margin: 0; }
  .hero-aside{ max-width: none; }
  h1{ font-size: clamp(40px, 10vw, 56px); }
  .hero-lead{ font-size: 16px; }
  .showcase{ padding-top: 10px; }
  .showcase .frame{ margin-inline: 10px; }
  .showcase-bottom{ padding: 14px; font-size: 12px; }
  .showcase-bottom .mono{ display: none; }
  .qualities{ display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 25px 0 38px; font-size: 10px; }
  .section{ padding-block: 64px; }
  .section-heading{ grid-template-columns: 1fr; gap: 0; }
  .section-heading > p:last-child{ margin-top: 22px; }
  .clips{ grid-template-columns: 1fr; gap: 34px; margin-top: 36px; }
  .split, .facts{ grid-template-columns: 1fr; gap: 36px; }
  .split--flip > figure{ order: 0; }
  .clips--four{ gap: 24px 14px; }
  .fact-list div{ grid-template-columns: 1fr; gap: 4px; }
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
}
