/* The Last Train. The game's own night, type and gold, so the page reads as
   the game and not as a template the studio put it in. */

@font-face { font-family: "Rye"; src: url("../assets/fonts/rye.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlow-condensed-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../assets/fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --night: #17100C;
  --deep: #1C130E;
  --panel: #241811;
  --well: #2E2018;
  --edge: #6B5140;
  --gold: #C89B4A;
  --gold-hi: #E2B865;
  --on-gold: #23170F;
  --ink: #F3E4C8;
  --ink-soft: #E8C79A;
  --ink-faint: #C4A279;
  --good: #8DB36A;
  --gutter: clamp(16px, 4vw, 40px);
  --west: "Rye", Georgia, serif;
  --body: "Barlow Condensed", "Avenir Next Condensed", "Arial Narrow", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--night); color: var(--ink-soft);
  font: 400 20px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); }
::selection { background: var(--gold); color: var(--on-gold); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.caps {
  font: 500 12px/1.2 var(--mono); letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
}

/* ---------- Header ---------- */
.top { position: relative; z-index: 2; padding: 20px 0; }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.studio { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink-soft); }
.studio img { width: 26px; height: 26px; image-rendering: pixelated; }
.studio span { font: 500 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.top nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.top nav a { font: 500 18px/1 var(--body); text-decoration: none; color: var(--ink-soft); }
.top nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 520px) { .top nav .optional { display: none; } }

/* ---------- Hero ----------
   The sky is the icon's: hard sunset bands, no smooth gradient, because the
   game is pixels and a soft blend would be a different game. */
.hero { position: relative; isolation: isolate; margin-top: -66px; padding: 120px 0 0; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 520px; z-index: -1;
  background:
    radial-gradient(ellipse 60% 45% at 50% 62%, rgba(232, 161, 76, .28), rgba(232, 161, 76, 0) 70%),
    linear-gradient(180deg,
      #1A1120 0 16%, #261628 16% 32%, #3A1C2A 32% 48%, #55262A 48% 62%,
      #74352C 62% 75%, #8E4A31 75% 87%, #A15F38 87% 100%);
  -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent 98%);
          mask-image: linear-gradient(180deg, #000 45%, transparent 98%);
}
.hero .icon {
  width: 104px; height: 104px; margin: 0 auto 22px; border-radius: 24px;
  box-shadow: 0 0 0 2px rgba(243, 228, 200, .14), 0 18px 40px rgba(0, 0, 0, .55);
}
.hero h1 {
  margin: 14px 0 6px; font: 400 clamp(52px, 10vw, 112px)/.95 var(--west); color: var(--ink);
  text-shadow: 0 4px 0 #3B2418, 0 18px 40px rgba(0, 0, 0, .55);
}
.hero .sub { margin: 0 auto; max-width: 30ch; font-size: clamp(21px, 2.4vw, 26px); color: var(--ink); }
.hero .sub span { color: var(--ink-soft); }

.store { margin: 30px 0 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.soon {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 20px 12px 16px; border-radius: 12px;
  background: #000; color: #fff; box-shadow: inset 0 0 0 1.5px #A6A6A6;
  text-decoration: none; text-align: left;
}
.soon svg { width: 26px; height: 26px; flex: none; }
.soon small { display: block; font: 500 11px/1.1 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; letter-spacing: .02em; }
.soon strong { display: block; font: 600 21px/1.05 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif; letter-spacing: -.01em; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.facts li { font: 500 12px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-soft); }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 5px; height: 5px; background: var(--gold); }

.screen {
  position: relative; margin: clamp(40px, 6vw, 64px) auto 0; width: min(1040px, 100%);
  border-radius: clamp(12px, 2vw, 22px); overflow: hidden;
  box-shadow: 0 0 0 3px var(--edge), 0 40px 80px -20px rgba(0, 0, 0, .8);
}
.screen img { width: 100%; height: auto; }

/* ---------- Sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0 0; }
.head { text-align: center; margin: 0 auto clamp(36px, 5vw, 56px); max-width: 640px; }
.head h2 { margin: 12px 0 10px; font: 400 clamp(34px, 5vw, 52px)/1.05 var(--west); color: var(--ink); }
.head p { margin: 0; }

.beat {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: center;
  gap: clamp(24px, 5vw, 64px); margin-bottom: clamp(44px, 6vw, 80px);
}
.beat:nth-of-type(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.beat:nth-of-type(even) .pic { order: 2; }
.beat .pic {
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 0 0 2px var(--edge), 0 24px 50px -16px rgba(0, 0, 0, .75);
}
.beat .no { font: 400 clamp(44px, 5vw, 64px)/1 var(--west); color: var(--gold); opacity: .55; }
.beat h3 { margin: 8px 0 10px; font: 600 clamp(28px, 3.2vw, 36px)/1.1 var(--body); color: var(--ink); letter-spacing: -.005em; }
.beat p { margin: 0 0 12px; }
@media (max-width: 760px) {
  .beat, .beat:nth-of-type(even) { grid-template-columns: 1fr; }
  .beat:nth-of-type(even) .pic { order: 0; }
}

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 28px); }
.card {
  background: var(--panel); border-radius: 18px; overflow: hidden;
  box-shadow: inset 0 0 0 2px var(--edge);
}
.card img { border-bottom: 2px solid var(--edge); }
.card .txt { padding: 22px 26px 26px; }
.card h3 { margin: 0 0 6px; font: 600 28px/1.1 var(--body); color: var(--ink); }
.card p { margin: 0; }
@media (max-width: 760px) { .pair { grid-template-columns: 1fr; } }

.tally {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: clamp(48px, 7vw, 88px);
  border-block: 2px solid var(--edge);
}
.tally div { padding: 26px 12px; text-align: center; }
.tally div + div { border-left: 2px solid var(--edge); }
.tally b { display: block; font: 400 clamp(40px, 5vw, 58px)/1 var(--west); color: var(--ink); }
.tally span { display: block; margin-top: 10px; }
@media (max-width: 640px) {
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tally div:nth-child(3) { border-left: 0; }
  .tally div:nth-child(n + 3) { border-top: 2px solid var(--edge); }
}

/* ---------- Support ---------- */
.support { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.letter {
  position: sticky; top: 24px;
  background: var(--panel); border-radius: 18px; padding: 28px;
  box-shadow: inset 0 0 0 2px var(--gold);
}
.letter h3 { margin: 10px 0 8px; font: 400 30px/1.1 var(--west); color: var(--ink); }
.letter p { margin: 0 0 16px; }
.letter .mail {
  display: inline-block; padding: 12px 18px; border-radius: 10px;
  background: var(--gold); color: var(--on-gold); text-decoration: none;
  font: 600 21px/1 var(--body);
}
.letter .mail:hover { background: var(--gold-hi); }
.letter .hint { margin: 16px 0 0; font-size: 17px; color: var(--ink-faint); }
@media (max-width: 860px) { .support { grid-template-columns: 1fr; } .letter { position: static; } }

.faq details { border-bottom: 2px solid var(--panel); }
.faq details:first-child { border-top: 2px solid var(--panel); }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font: 600 23px/1.25 var(--body); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font: 500 26px/1 var(--mono); color: var(--gold); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: -4px 0 20px; max-width: 60ch; }

/* ---------- Footer ---------- */
.foot { margin-top: clamp(72px, 10vw, 128px); padding: 28px 0 44px; border-top: 2px solid var(--panel); font-size: 17px; color: var(--ink-faint); }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 28px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Prose (privacy) ---------- */
.prose { max-width: 700px; padding: clamp(28px, 6vw, 64px) 0 0; }
.prose h1 { margin: 12px 0 8px; font: 400 clamp(44px, 7vw, 72px)/1 var(--west); color: var(--ink); }
.prose h2 { margin: 40px 0 8px; font: 600 27px/1.15 var(--body); color: var(--ink); }
.prose p { margin: 0 0 14px; }
.prose .lede { font-size: 24px; color: var(--ink); }
