/* Wingpost Studios: hand-written, no framework, no scripts, nothing loaded from other sites.
   Layout concept: one studio, two elements. A harbour/sky split runs through the page; status is told with
   real signals (signal flag P, the Blue Peter, "about to sail"; a steady green light, "cleared for take-off").
   Type: Barlow Condensed for instrument-placard headings, Barlow for reading. Both self-hosted (fonts/OFL.txt).
   Colour: cool sailcloth and harbour navy, the logo's wing orange as the one accent, signal-flag colours only
   inside the flags themselves. Text pairs checked at 4.5:1 or better in both themes. */

@font-face { font-family: "Barlow"; src: url("/fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("/fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #eef2f5;          /* sailcloth */
  --surface: #ffffff;
  --ink: #0f1d2a;         /* harbour navy */
  --muted: #4a5a69;
  --rule: #c9d3dc;
  --accent: #b4410f;      /* wing orange, darkened for text */
  --accent-fill: #ff7a45; /* the logo's wing: marks and large shapes only */
  --go: #1d7a4b;          /* steady green */
  --go-glow: rgba(46, 204, 120, .45);
  --flag-blue: #1d4f9c;
  --flag-white: #ffffff;
  --panel: #0f1d2a;       /* the contact band stays navy in both themes */
  --on-panel: #e9eef3;
  --on-panel-muted: #a9b8c6;
  --btn-bg: #0f1d2a;
  --btn-ink: #ffffff;
  --confirm-bg: #fff1a8;
  --confirm-ink: #3d2f00;
  --focus: #0b63ce;
  --shadow: 0 1px 2px rgba(15, 29, 42, .06), 0 14px 34px rgba(15, 29, 42, .12);

  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1520;        /* night harbour */
    --surface: #111f2d;
    --ink: #e6ecf1;
    --muted: #9fb0bf;
    --rule: #24384b;
    --accent: #ff9466;
    --accent-fill: #ff7a45;
    --go: #4cc38a;
    --go-glow: rgba(76, 195, 138, .5);
    --flag-blue: #2c63bd;
    --panel: #142638;
    --on-panel: #e9eef3;
    --on-panel-muted: #a9b8c6;
    --btn-bg: #ff9466;
    --btn-ink: #0a1520;
    --confirm-bg: #5c4a00;
    --confirm-ink: #fff3b8;
    --focus: #8cc4ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 14px 34px rgba(0, 0, 0, .4);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 var(--sans);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--btn-bg); color: var(--btn-ink); padding: 8px 14px; z-index: 10; border-radius: 3px;
}
.skip:focus { top: 8px; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: .005em; margin: 0 0 .45em; text-wrap: balance; }
h1 { font-size: clamp(44px, 8.4vw, 96px); text-transform: uppercase; letter-spacing: .01em; }
h2 { font-size: clamp(32px, 4.6vw, 52px); text-transform: uppercase; }
h3 { font-size: clamp(28px, 3.2vw, 38px); }
p { margin: 0 0 1em; }
.lede { font-size: clamp(19px, 2.1vw, 22px); line-height: 1.5; color: var(--muted); max-width: 36em; }

/* instrument-placard label */
.label {
  display: inline-flex; align-items: center; gap: 10px;
  font: 600 14px/1.3 var(--display); letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.label::before { content: ""; width: 26px; height: 3px; background: var(--accent-fill); }

section { padding-block: 64px; }
@media (min-width: 720px) { section { padding-block: 96px; } }

/* ---------- header ---------- */
.site-head { border-bottom: 1px solid var(--rule); background: var(--bg); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 14px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand img { width: 40px; height: 40px; }
.brand span { font: 700 22px/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.brand small { display: block; font: 500 12px/1.2 var(--sans); letter-spacing: .04em; text-transform: none; color: var(--muted); margin-top: 5px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a { color: var(--ink); text-decoration: none; font: 600 16px/1 var(--display); letter-spacing: .12em; text-transform: uppercase; padding: 8px 0; border-bottom: 3px solid transparent; display: inline-block; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--accent-fill); }

/* ---------- studio hero: headline, then the harbour/sky split ---------- */
.hero { padding-block: 48px 0; }
@media (min-width: 720px) { .hero { padding-block: 80px 0; } }
.hero h1 { max-width: 13ch; margin-bottom: .3em; }
.hero h1 .split { color: var(--accent); }
.hero .lede { margin-bottom: 36px; }

.horizon { display: grid; grid-template-columns: 1fr; gap: 4px; margin: 0; }
@media (min-width: 760px) { .horizon { grid-template-columns: 1fr 1fr; } }
.horizon figure { margin: 0; position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--rule); max-width: 100%; }
.horizon img { width: 100%; height: 100%; object-fit: cover; }
.horizon figcaption {
  position: absolute; left: 0; bottom: 0; margin: 0;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 14px 12px; background: var(--panel); color: var(--on-panel);
  font: 600 13px/1.2 var(--display); letter-spacing: .18em; text-transform: uppercase;
}
.horizon figcaption b { font: 700 24px/1 var(--display); letter-spacing: .03em; text-transform: none; }
.horizon a { color: inherit; text-decoration: none; display: block; height: 100%; }
.horizon a:hover img { transform: scale(1.02); }
.hero-foot { display: flex; flex-wrap: wrap; gap: 6px 28px; padding-block: 18px 0; margin: 0; list-style: none; padding-left: 0;
  font: 600 14px/1.4 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-foot li { display: inline-flex; align-items: center; gap: 10px; }
.hero-foot li::before { content: ""; width: 8px; height: 8px; background: var(--accent-fill); transform: rotate(45deg); }

/* ---------- games: one wide row per game ---------- */
.games-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 12px 32px; margin-bottom: 40px; }
.games-head h2 { margin: 0; }
.games-head p { margin: 0; max-width: 30em; color: var(--muted); }
.game-row { display: grid; gap: 24px 48px; grid-template-columns: 1fr; align-items: center; }
.game-row + .game-row { margin-top: 64px; padding-top: 64px; border-top: 1px solid var(--rule); }
@media (min-width: 900px) {
  .game-row { grid-template-columns: 7fr 5fr; }
  .game-row.flip { grid-template-columns: 5fr 7fr; }
  .game-row.flip > figure { order: 2; }
}
.game-row > figure { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; box-shadow: var(--shadow); max-width: 100%; }
.game-row > figure img { width: 100%; height: 100%; object-fit: cover; }
.game-row .body { min-width: 0; }
.game-row h3 { font-size: clamp(40px, 5vw, 60px); text-transform: uppercase; margin-bottom: .2em; }
.game-row .kind { font: 600 15px/1.3 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.game-row .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 22px; }
.manifest { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; font-size: 15px; color: var(--muted); }
.manifest li { padding: 3px 10px; border: 1px solid var(--rule); }

/* status signals */
.signal { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.signal .flag { width: 44px; height: 30px; flex: none; border: 1px solid var(--rule); }
.signal .lamp { width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--go); box-shadow: 0 0 0 4px var(--go-glow); margin: 0 8px 0 4px; }
.signal strong { display: block; font: 700 18px/1.15 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.signal span { display: block; font-size: 14px; line-height: 1.35; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--btn-bg); color: var(--btn-ink); text-decoration: none;
  font: 700 17px/1 var(--display); letter-spacing: .1em; text-transform: uppercase;
  padding: 14px 20px; border-radius: 2px; border: 2px solid var(--btn-bg);
}
.btn:hover { filter: brightness(1.15); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); filter: none; }
.ext::after { content: "\2197"; font-family: var(--sans); }

/* ---------- hands on: the two control panels ---------- */
.hands { background: var(--surface); border-block: 1px solid var(--rule); }
.hands .intro { max-width: 40em; margin-bottom: 40px; }
.panels { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 860px) { .panels { grid-template-columns: 1fr 1fr; gap: 40px; } }
.panels figure { margin: 0; min-width: 0; }
.panels img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; max-width: 100%; }
.panels figcaption { padding-top: 16px; }
.panels figcaption b { display: block; font: 700 22px/1.1 var(--display); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.controls { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.controls li {
  font: 600 13px/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
  padding: 7px 10px; border: 1px solid var(--rule); color: var(--ink); background: var(--bg);
}

.ways { display: grid; gap: 28px; grid-template-columns: 1fr; margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--rule); }
@media (min-width: 760px) { .ways { grid-template-columns: repeat(3, 1fr); gap: 40px; } }
.ways h3 { font-size: 26px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .35em; }
.ways p { margin: 0; color: var(--muted); font-size: 17px; }

/* ---------- contact band ---------- */
.contact-band { background: var(--panel); color: var(--on-panel); }
.contact-band .label { color: var(--on-panel-muted); }
.contact-band h2 { color: var(--on-panel); }
.contact-band p { color: var(--on-panel-muted); max-width: 34em; }
.contact-band a { color: var(--on-panel); }
.contact-mail { font: 700 clamp(28px, 5vw, 48px)/1.1 var(--display); letter-spacing: .02em; margin: 8px 0 18px; }
.contact-mail a { text-decoration-thickness: 2px; text-underline-offset: .14em; }
.contact-mail a:hover { color: var(--accent-fill); }

/* ---------- shared two-column ---------- */
.two-col { display: grid; gap: 28px; }
@media (min-width: 860px) { .two-col { grid-template-columns: 1fr 1fr; gap: 56px; } }
.two-col > div { min-width: 0; }

/* ---------- game page (Tug & Tide) ---------- */
.game-hero { padding-block: 40px 0; }
.game-hero h1 { font-size: clamp(52px, 10vw, 112px); }
.game-hero .logo-h1 { margin: 6px 0 22px; line-height: 0; }
.game-hero .logo-h1 img { display: block; width: min(760px, 100%); height: auto; }
.game-hero .shot { margin: 36px 0 0; overflow: hidden; box-shadow: var(--shadow); }
.status {
  display: inline-flex; align-items: center; gap: 12px;
  font: 700 15px/1 var(--display); letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink); margin-bottom: 18px;
}
.status::before { /* the Blue Peter: signal flag P, "about to sail" */
  content: ""; width: 33px; height: 22px; flex: none; border: 1px solid var(--rule);
  background:
    linear-gradient(var(--flag-white), var(--flag-white)) center / 38% 40% no-repeat,
    var(--flag-blue);
}
.game-hero + section, .game-hero ~ section { border-top: 1px solid var(--rule); }

.prose { max-width: 42em; }
.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .features { grid-template-columns: 1fr 1fr; gap: 18px 40px; } }
.features li { padding-left: 30px; position: relative; }
.features li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 9px; height: 9px; background: var(--accent-fill); transform: rotate(45deg); }

.gallery { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .gallery { grid-template-columns: 1fr 1fr; gap: 24px; } }
.gallery figure { margin: 0; min-width: 0; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.gallery figcaption { font-size: 15px; color: var(--muted); margin-top: 10px; }
@media (min-width: 720px) {
  .gallery figure:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gallery figure:last-child:nth-child(odd) img { aspect-ratio: 21 / 9; }
}

.facts { width: 100%; border-collapse: collapse; font-size: 17px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 13px 0; border-bottom: 1px solid var(--rule); }
.facts th { font: 600 14px/1.5 var(--display); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); width: 38%; padding-right: 16px; padding-top: 15px; }

.links-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* ---------- long-form pages (privacy, support) ---------- */
.doc { padding-block: 40px 72px; }
.doc h1 { font-size: clamp(40px, 6.4vw, 72px); }
.doc .prose h2 { font-size: 28px; margin-top: 2em; }
.doc .prose h3 { font-size: 22px; text-transform: uppercase; letter-spacing: .06em; margin-top: 1.6em; }
.doc .prose ul { padding-left: 1.2em; }
.doc .prose li { margin-bottom: .4em; }
.updated { font: 600 14px/1.5 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.summary { background: var(--surface); border: 1px solid var(--rule); padding: 18px 22px; margin: 24px 0; }
.summary p:last-child { margin-bottom: 0; }

/* [CONFIRM] markers: deliberately loud so they cannot be missed before upload */
.confirm { background: var(--confirm-bg); color: var(--confirm-ink); padding: 1px 6px; border-radius: 2px; font-weight: 600; }

details { border-bottom: 1px solid var(--rule); padding: 4px 0; }
details:first-of-type { border-top: 1px solid var(--rule); }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
summary:hover { color: var(--accent); }
details > div { padding: 0 0 16px; color: var(--ink); }
details > div p:last-child { margin-bottom: 0; }

.crumbs { font: 600 14px/1.4 var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--rule); padding-block: 32px 40px; font-size: 15px; color: var(--muted); }
.contact-band + .site-foot, main:has(> .contact-band:last-child) + .site-foot { border-top: 0; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
.site-foot p { margin: 0; }

/* ---------- 404 ---------- */
.lost { padding-block: 96px; text-align: left; }
.lost .code { font: 700 16px/1 var(--display); letter-spacing: .24em; color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a { transition: filter .15s, border-color .15s; }
  .horizon img { transition: transform .5s ease; }
}

.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; }
