/*
 * gatherfall.com — "Night and sinew" (2026-11-20).
 *
 * Dark on purpose, and the reason is written down because our sites start light (web-design §0): the game's own brand
 * is stone letters bound by red sinew on a blue-black night (youtube-gatherfall/brand, chosen by the owner
 * 2026-11-08), the game is a serious horror survival game, and the site's first image is that logo. The night here
 * is sampled from the logo's own background, so the picture has no edge.
 *
 * One signature: the sinew — a red fill with fine fibres. It appears in exactly two places: the build progress bar and
 * the short rule under each title. Nowhere else.
 *
 * Every contrast pair is measured from these tokens by test/palette.test.js; no ratio is written here by hand.
 */
:root {
  color-scheme: dark;
  --night: #0B141B;        /* page; the logo image's edge */
  --night-raised: #111E27; /* the progress band */
  --track: #1E2C37;        /* an empty bar */
  --line: #2A3A46;         /* hairlines, card edges */
  --bone: #ECE6DA;         /* text, the stone of the letters */
  --ash: #A8A296;          /* secondary text */
  --blood: #A31F28;        /* planes only: buttons and the play dot — never text */
  --sinew: #D9443F;        /* the signature's fill: brighter than --blood so a bar stands off its empty track (≥ 3:1) */
  --sinew-fibre: #8A1A20;  /* the sinew's fibres */
  --blood-ink: #F07A72;    /* red as text on the night (links on hover, the big numbers) */
  --focus: #F2C14E;        /* focus ring: must not be mistaken for the red */

  --font-display: 'Oswald var', 'Arial Narrow', Impact, sans-serif;
  --font-body: 'Inter var', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shell: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@font-face {
  font-family: 'Inter var';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  /* The owner's name and Wroclaw need these letters. */
  font-family: 'Inter var';
  src: url('/assets/fonts/inter-latin-ext.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  /* Oswald, the channel's brand face (banner and avatar). Variable, SIL OFL 1.1. */
  font-family: 'Oswald var';
  src: url('/assets/fonts/oswald-var.ttf') format('truetype-variations');
  font-weight: 200 700; font-style: normal; font-display: swap;
}

html, body { background: var(--night); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  color: var(--bone);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--bone); text-decoration-color: var(--blood); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--blood-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

.shell { width: min(100% - 2 * var(--gutter), var(--shell)); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -48px; z-index: 10;
  padding: 10px 16px; background: var(--bone); color: var(--night); font-weight: 600;
}
.skip:focus { top: 16px; }

/* ---- Header ---- */
.top { position: sticky; top: 0; z-index: 5; background: rgba(11, 20, 27, .92); border-bottom: 1px solid var(--line); }
@supports (backdrop-filter: blur(8px)) { .top { background: rgba(11, 20, 27, .8); backdrop-filter: blur(8px); } }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: .08em;
  text-transform: uppercase; text-decoration: none;
}
.top nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.top nav a:not(.btn) { text-decoration: none; font-size: 15px; color: var(--ash); padding-block: 12px; }
.top nav a:not(.btn):hover { color: var(--bone); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  background: var(--blood); color: var(--bone); border: 0; border-radius: var(--radius);
  font: 600 16px/1 var(--font-body); letter-spacing: .01em; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s var(--ease);
}
.btn:hover { background: #B8252F; color: var(--bone); }
.btn:active { transform: scale(.98); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-wide { width: 100%; margin-top: 20px; }
.btn[aria-disabled="true"] { background: var(--track); color: var(--ash); cursor: default; pointer-events: none; }
.link-arrow { font-weight: 600; text-decoration: none; padding-block: 12px; }
.link-arrow::after { content: " →"; }
.link-arrow:hover { text-decoration: underline; text-decoration-color: var(--blood); }

/* ---- Hero ---- */
.hero { padding-bottom: clamp(56px, 8vw, 104px); }
.hero-logo {
  width: min(100%, 1100px); margin: clamp(8px, 2vw, 24px) auto 0;
  /* Fades the picture's own edge into the page, so the logo reads as part of the night, not a rectangle on it. */
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 78%, transparent 100%);
          mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 78%, transparent 100%);
}
.hero-copy { text-align: center; margin-top: clamp(-40px, -3vw, -12px); }
.eyebrow {
  margin: 0 0 16px; color: var(--ash); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 72px); letter-spacing: .01em; max-width: 16ch; margin-inline: auto; text-wrap: balance; }
.lead { max-width: 56ch; margin: 20px auto 0; color: var(--ash); font-size: clamp(17px, 1.6vw, 19px); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 28px; margin-top: 32px; }

/* ---- Sections ---- */
section { padding-block: clamp(56px, 8vw, 104px); }
.hero { padding-top: 0; }
h2 { font-size: clamp(30px, 4.4vw, 52px); letter-spacing: .01em; }
h3 { font-size: 24px; letter-spacing: .04em; }
.section-lead { color: var(--ash); max-width: 60ch; margin: 16px 0 0; }
.band { background: var(--night-raised); border-block: 1px solid var(--line); }
.fine { color: var(--ash); font-size: 14px; line-height: 1.55; margin-top: 16px; margin-bottom: 0; } /* not `margin:` — it would undo .shell's centring */

/* ---- The signature: sinew ---- */
/* The fibre fill is written three times, not grouped: a selector list holding a pseudo-element one browser does not
   know (::-webkit-… in Firefox, ::-moz-… in Chrome) is dropped whole, and the rule would vanish from the others. */
.sinew-rule {
  width: 72px; height: 4px; margin-top: 16px; border-radius: 2px;
  background:
    repeating-linear-gradient(100deg, transparent 0 5px, var(--sinew-fibre) 5px 6px),
    var(--sinew);
}
progress.sinew {
  -webkit-appearance: none; appearance: none; display: block;
  width: 100%; height: 14px; margin-top: 12px; border: 0; border-radius: 2px; overflow: hidden;
  background: var(--track); color: var(--sinew);
}
progress.sinew::-webkit-progress-bar { background: var(--track); }
progress.sinew::-webkit-progress-value {
  background:
    repeating-linear-gradient(100deg, transparent 0 5px, var(--sinew-fibre) 5px 6px),
    var(--sinew);
  border-radius: 2px; transition: width .8s var(--ease);
}
progress.sinew::-moz-progress-bar {
  background:
    repeating-linear-gradient(100deg, transparent 0 5px, var(--sinew-fibre) 5px 6px),
    var(--sinew);
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) { progress.sinew::-webkit-progress-value { transition: none; } }

/* ---- Devlog strip ---- */
.strip-wrap { margin-top: 32px; }
.strip {
  list-style: none; margin: 0; padding: 4px max(var(--gutter), calc((100% - var(--shell)) / 2)) 12px;
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100% - var(--shell)) / 2));
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; overscroll-behavior-x: contain;
}
.strip.dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.card { flex: 0 0 clamp(272px, 40vw, 480px); scroll-snap-align: start; }
.card-thumb {
  position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--track);
}
.card-thumb img, .card-thumb iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.play {
  position: absolute; inset: 0; display: grid; place-items: center; width: 100%; padding: 0; border: 0;
  background: transparent; color: var(--bone); cursor: pointer;
}
.play-dot {
  display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  background: var(--blood); transition: transform .15s var(--ease);
}
.play:hover .play-dot { transform: scale(1.06); }
.play:active .play-dot { transform: scale(.98); }
.card-title { margin: 12px 0 0; font-weight: 600; line-height: 1.35; }
.card-date { margin: 2px 0 0; color: var(--ash); font-size: 14px; }
.card-skeleton .card-line { display: block; height: 16px; width: 70%; margin-top: 14px; border-radius: 2px; background: var(--track); }
.card-empty { flex-basis: min(100%, 560px); color: var(--ash); padding: 24px; border: 1px dashed var(--line); border-radius: var(--radius); }
.strip-controls { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.strip-status { margin: 0 0 0 12px; font-size: 15px; color: var(--ash); }
.strip-status a { display: inline-block; padding-block: 12px; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--bone); cursor: pointer;
}
.icon-btn:hover { border-color: var(--ash); }
.icon-btn:active { transform: scale(.96); }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* ---- Meters ---- */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 24px; margin-top: 40px; }
.meter { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--night); scroll-margin-top: 80px; }
.meter-text { color: var(--ash); margin: 8px 0 24px; }
.meter-figure { margin: 0; font-size: 17px; }
.meter-number { font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5vw, 56px); line-height: 1; color: var(--blood-ink); margin-right: 6px; }
.meter-note { margin: 10px 0 0; color: var(--ash); font-size: 15px; }
.fund[data-state="loading"] .meter-number { color: var(--ash); }

/* ---- Stills ---- */
.stills { list-style: none; padding: 0; margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stills img { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 16 / 9; object-fit: cover; }
@media (max-width: 760px) { .stills { grid-template-columns: 1fr; } }

/* ---- Follow ---- */
#follow { padding-top: 0; }
.follow { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 24px; }
.socials { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 28px; }
.socials a { font-weight: 600; text-decoration: none; display: inline-block; padding-block: 10px; }
.socials a span { color: var(--ash); font-weight: 400; }
.socials a:hover span { color: var(--blood-ink); }

/* ---- Footer ---- */
.foot { border-top: 1px solid var(--line); padding-block: 32px 40px; color: var(--ash); font-size: 15px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.foot p { margin: 0; }
.foot a { color: var(--ash); }
.foot a:hover { color: var(--bone); }

/* ---- Text pages (privacy, 404) ---- */
.doc { max-width: 72ch; padding-block: clamp(48px, 7vw, 88px); }
.doc h1 { text-align: left; margin: 0; max-width: none; font-size: clamp(34px, 5vw, 56px); }
.doc h2 { font-size: 24px; letter-spacing: .04em; margin-top: 40px; }
.doc p, .doc li { color: var(--ash); }
.doc strong { color: var(--bone); }

@media (max-width: 520px) {
  .top nav a[href="#progress"] { display: none; }
  .actions .btn { width: 100%; }
}
