/* windreach-game.com, one stylesheet for every page.

   Colours come from the game: the wordmark's cream and ink, the UIKit gold
   (COL_ACCENT #F2C259) and the dusk sky the screenshots share.
   No web fonts and nothing from another host. The privacy policy promises the
   site makes no third-party requests, and the Content-Security-Policy in
   vercel.json enforces it. Headings use the visitor's own heaviest sans
   (the game's UI face has no confirmed web licence; the logo is an image). */

:root {
  color-scheme: dark;
  --ink: #0b0e14;
  --ink-2: #111622;
  --ink-3: #182031;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --cream: #f6efe0;
  --text: #e8e5de;
  --muted: rgba(232, 229, 222, 0.7);
  --faint: rgba(232, 229, 222, 0.45);
  --gold: #f2c259;
  --gold-hi: #ffd678;
  --gold-ink: #241a06;
  --dusk: #3a2a52;
  --mauve: #9a6a96;
  --peach: #eea48e;
  --sea: #2f7fa3;

  --display: "Segoe UI Black", "Arial Black", "Helvetica Neue", Arial, system-ui, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --radius: 14px;
  --header-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--ink);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(154, 106, 150, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(47, 127, 163, 0.10), transparent 60%);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------ type */

h1, h2, h3 { margin: 0; line-height: 1.1; }
.display {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--cream);
}
h2.display { font-size: clamp(1.9rem, 4.2vw, 3.2rem); }
h3.display { font-size: clamp(1.35rem, 2.4vw, 1.9rem); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 700 0.78rem/1 var(--sans);
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--gold); border-radius: 2px; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }
p { margin: 0 0 1rem; }

/* ---------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 48px; padding: 0 1.4rem;
  border-radius: 999px; border: 1px solid transparent;
  font: 800 0.92rem/1 var(--sans); letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 8px 30px rgba(242, 194, 89, 0.28); }
.btn-gold:hover { background: var(--gold-hi); color: var(--gold-ink); }
.btn-ghost { background: rgba(11, 14, 20, 0.35); color: var(--cream); border-color: rgba(246, 239, 224, 0.45); backdrop-filter: blur(6px); }
.btn-ghost:hover { border-color: var(--cream); color: var(--cream); background: rgba(11, 14, 20, 0.55); }
.btn.is-soon { cursor: default; }
.btn.is-soon:hover { transform: none; background: var(--gold); }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: 0.78rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ----------------------------------------------------------- header */

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  transition: background-color 0.25s ease, border-color 0.25s ease, backdrop-filter 0.25s ease;
  border-bottom: 1px solid transparent;
}
.topbar.is-solid, .topbar.is-page {
  background: rgba(11, 14, 20, 0.86);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}
.topbar .wrap { height: 100%; display: flex; align-items: center; gap: 1.5rem; }
.topbar .brand { display: block; flex: none; }
.topbar .brand img { width: 168px; height: auto; }
.topbar nav { display: flex; gap: 1.6rem; margin-left: auto; }
.topbar nav a {
  color: var(--cream); text-decoration: none; opacity: 0.82;
  font: 700 0.82rem/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase;
}
.topbar nav a:hover, .topbar nav a[aria-current="page"] { opacity: 1; color: var(--gold); }
@media (max-width: 760px) {
  .topbar .brand img { width: 128px; }
  .topbar nav a.wide-only { display: none; }
  .topbar nav { gap: 1rem; }
  .topbar .btn { display: none; }
}

/* ------------------------------------------------------------- hero */

.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center;
  overflow: hidden; isolation: isolate;
  padding: calc(var(--header-h) + 2rem) 0 6rem;
}
.hero-media, .hero-media img, .hero-media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero-media { z-index: -2; }
.hero-media video { opacity: 0; transition: opacity 1.2s ease; }
.hero-media video.is-playing { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(11, 14, 20, 0.55) 0%, rgba(11, 14, 20, 0.05) 28%, rgba(11, 14, 20, 0.12) 62%, var(--ink) 100%),
    radial-gradient(ellipse at center, transparent 45%, rgba(11, 14, 20, 0.45) 100%);
}
.hero-content { text-align: center; padding: 0 var(--gutter); }
.hero-logo { width: min(760px, 88vw); height: auto; margin: 0 auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.45)); }
.hero-hook {
  margin: 1.4rem auto 0; max-width: 34ch;
  font: italic 400 clamp(1.15rem, 2.2vw, 1.6rem)/1.4 var(--serif);
  color: var(--cream); text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
.hero-actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.hero-note {
  margin-top: 1.1rem; font-size: 0.85rem; letter-spacing: 0.08em; color: rgba(246, 239, 224, 0.75);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}
.scroll-cue {
  position: absolute; left: 50%; bottom: 1.6rem; translate: -50% 0;
  width: 26px; height: 42px; border: 2px solid rgba(246, 239, 224, 0.6); border-radius: 14px;
}
.scroll-cue::after {
  content: ""; position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--cream); animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* ------------------------------------------------------- wind rule */

.wind { display: block; width: min(520px, 80%); height: 40px; margin: 0 auto; color: var(--gold); opacity: 0.85; }

/* ------------------------------------------------------------ about */

section { position: relative; }
.about { padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem); text-align: center; }
.about h2 { margin: 0 auto 1.4rem; max-width: 24ch; }
.about .lede { max-width: 62ch; margin: 0 auto; }
.facts {
  list-style: none; margin: clamp(2.5rem, 5vw, 3.5rem) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.facts li { background: var(--ink-2); padding: 1.6rem 1.2rem; text-align: center; }
.facts b {
  display: block; font: 900 clamp(2rem, 4vw, 2.8rem)/1 var(--display);
  color: var(--gold); margin-bottom: 0.55rem;
}
.facts span { font-size: 0.95rem; color: var(--muted); }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------------- features */

.features { padding: clamp(3rem, 7vw, 5rem) 0; }
.features > .wrap > header { text-align: center; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.feature {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(1.75rem, 4vw, 4rem);
  align-items: center; margin-bottom: clamp(3.5rem, 8vw, 6.5rem);
}
.feature:last-child { margin-bottom: 0; }
/* of-type, not child: the section header is the wrap's first child. */
.feature:nth-of-type(even) { grid-template-columns: 5fr 7fr; }
.feature:nth-of-type(even) .feature-media { order: 2; }
.feature-media {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--ink-3); border: 1px solid var(--line-strong);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.feature-media::before {
  content: ""; position: absolute; inset: -30%; z-index: -1;
  background: radial-gradient(closest-side, rgba(154, 106, 150, 0.35), transparent);
}
.feature-media video, .feature-media img { width: 100%; height: 100%; object-fit: cover; }
.feature-num {
  display: block; font: 900 0.85rem/1 var(--display); letter-spacing: 0.2em;
  color: var(--gold); margin-bottom: 0.9rem;
}
.feature h3 { margin-bottom: 1rem; }
.feature p { color: var(--muted); }
.feature p:last-child { margin-bottom: 0; }
@media (max-width: 860px) {
  .feature, .feature:nth-of-type(even) { grid-template-columns: 1fr; }
  .feature:nth-of-type(even) .feature-media { order: 0; }
}

/* ---------------------------------------------------------- dusk band */

.band {
  margin: clamp(2rem, 5vw, 3rem) 0;
  padding: clamp(3rem, 7vw, 5rem) 0;
  background:
    linear-gradient(100deg, rgba(58, 42, 82, 0.95), rgba(154, 106, 150, 0.85) 55%, rgba(238, 164, 142, 0.85));
  border-block: 1px solid rgba(255, 255, 255, 0.12);
}
.band .wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: center; }
.band h2 { color: var(--cream); }
.band p { color: rgba(246, 239, 224, 0.92); margin: 0; font-size: 1.08rem; }
.skills { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; margin: 0; }
.skills li {
  padding: 0.35rem 0.75rem; border-radius: 999px;
  background: rgba(11, 14, 20, 0.28); border: 1px solid rgba(246, 239, 224, 0.28);
  font-size: 0.85rem; color: var(--cream);
}
@media (max-width: 860px) { .band .wrap { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ media */

.media-section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.media-section > .wrap > header { text-align: center; margin-bottom: clamp(2rem, 5vw, 3rem); }
.trailer {
  position: relative; display: block; width: 100%; padding: 0; border: 0; cursor: pointer;
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink-3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); border: 1px solid var(--line-strong);
  color: var(--cream); text-decoration: none;
}
.trailer img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, filter 0.3s ease; filter: brightness(0.82); }
.trailer:hover img { transform: scale(1.025); filter: brightness(0.95); }
.trailer .play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: clamp(72px, 9vw, 104px); aspect-ratio: 1;
  border-radius: 50%; background: var(--gold); color: var(--gold-ink);
  box-shadow: 0 0 0 10px rgba(242, 194, 89, 0.25), 0 12px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease;
}
.trailer:hover .play { transform: scale(1.06); }
.trailer .play svg { width: 38%; height: 38%; margin-left: 6%; }
.trailer .label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem 1.4rem;
  background: linear-gradient(transparent, rgba(11, 14, 20, 0.85));
  font: 800 0.9rem/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; text-align: left;
}
.yt-note { margin: 0.7rem 0 0; font-size: 0.82rem; color: var(--faint); text-align: center; }
.yt-note a { color: var(--muted); }
.gallery {
  list-style: none; padding: 0; margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(8px, 1.2vw, 14px);
}
.gallery a {
  display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden;
  background: var(--ink-3); border: 1px solid var(--line);
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.3s ease; }
.gallery a:hover img { transform: scale(1.06); filter: brightness(1.08); }
@media (max-width: 960px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------------- final cta */

.finale { position: relative; overflow: hidden; isolation: isolate; text-align: center; padding: clamp(6rem, 14vw, 10rem) 0; }
.finale > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.finale::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(var(--ink) 0%, rgba(11, 14, 20, 0.35) 30%, rgba(11, 14, 20, 0.45) 70%, var(--ink) 100%);
}
.finale h2 { max-width: 20ch; margin: 0 auto 1.6rem; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5); }

/* ----------------------------------------------------------- dialogs */

dialog {
  padding: 0; border: 0; background: transparent; color: var(--text);
  max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh;
}
dialog::backdrop { background: rgba(5, 7, 10, 0.92); backdrop-filter: blur(4px); }
dialog[open] { display: grid; place-items: center; }
.dlg-body { position: relative; width: min(1600px, 94vw); }
.dlg-body img {
  width: 100%; max-height: 82vh; max-height: 82dvh; object-fit: contain; border-radius: 10px; background: #000;
}
/* The YouTube player: 16:9, as wide as fits under 82% of the height. */
.yt-frame { width: min(100%, calc(82dvh * 16 / 9)); aspect-ratio: 16 / 9; margin: 0 auto; background: #000; border-radius: 10px; overflow: hidden; }
.yt-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.dlg-caption { margin-top: 0.8rem; text-align: center; color: var(--muted); font-size: 0.95rem; min-height: 1.5em; }
.dlg-btn {
  position: fixed; display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(17, 22, 34, 0.8);
  color: var(--cream); cursor: pointer;
}
.dlg-btn:hover { border-color: var(--gold); color: var(--gold); }
.dlg-btn svg { width: 22px; height: 22px; }
.dlg-close { top: 16px; right: 16px; }
.dlg-prev { left: 16px; top: 50%; translate: 0 -50%; }
.dlg-next { right: 16px; top: 50%; translate: 0 -50%; }
@media (max-width: 640px) { .dlg-prev, .dlg-next { top: auto; bottom: 16px; translate: none; } }

/* ------------------------------------------------------------ footer */

.footer { border-top: 1px solid var(--line); background: var(--ink-2); padding: 2.5rem 0 3rem; font-size: 0.9rem; color: var(--faint); }
.footer .wrap { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem 2.5rem; align-items: start; }
.footer img { width: 150px; height: auto; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; justify-content: flex-end; }
.footer nav a { color: var(--muted); text-decoration: none; }
.footer nav a:hover { color: var(--gold); }
.footer p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) { .footer .wrap { grid-template-columns: 1fr; } .footer nav { justify-content: flex-start; } }

/* ----------------------------------------------- text pages (support) */

.page { padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 4rem)) 0 clamp(3rem, 7vw, 5rem); }
.page h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 0.9rem; }
.page h2 { font: 900 1.3rem/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--gold); margin: 2.6rem 0 0.8rem; }
.page h3 { font: 700 1.05rem/1.3 var(--sans); color: var(--cream); margin: 1.8rem 0 0.45rem; }
.page ul, .page ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.page li { margin-bottom: 0.4rem; }
.page li::marker { color: var(--faint); }
.small { font-size: 0.9rem; color: var(--muted); }
.card {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.2rem 1.4rem; margin: 1.3rem 0;
}
.card > :last-child { margin-bottom: 0; }
.contact { border-color: rgba(242, 194, 89, 0.35); background: linear-gradient(rgba(242, 194, 89, 0.08), rgba(242, 194, 89, 0.08)), var(--ink-2); }
.contact .address { display: inline-block; font: 800 1.25rem/1.3 var(--sans); word-break: break-all; margin: 0.15rem 0 0.5rem; }
code, kbd {
  font-family: var(--mono); font-size: 0.88em; background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line); border-radius: 5px; padding: 0.1em 0.35em;
}
code { word-break: break-all; }
pre {
  font-family: var(--mono); font-size: 0.88rem; background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 1rem; overflow-x: auto; margin: 0 0 1rem;
}
dl { margin: 0 0 1rem; }
dt { font-weight: 700; margin-top: 1rem; color: var(--cream); }
dd { margin: 0.25rem 0 0; color: var(--muted); }
