/* Forge & Lantern V2. Tokens and contrast pairs are documented in docs/v2/visual-direction.md. */
:root {
  --night: #14110f;
  --night-2: #1f1b17;
  --night-3: #2a2520;
  --paper: #f6efe3;
  --paper-muted: #c9bfae;
  --fire: #e2602a;
  --fire-deep: #b4441a;
  --ink: #1f1b17;
  --line: rgba(246, 239, 227, 0.12);
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1120px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font: 17px/1.6 var(--sans);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--paper); text-decoration-color: var(--fire); text-underline-offset: 3px; }
a:hover { color: var(--fire); }
:focus-visible { outline: 3px solid var(--fire); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

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

/* Header */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 5; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; color: var(--paper);
  font: 400 15px/1 var(--serif); letter-spacing: 0.16em; text-transform: uppercase; }
.brand .amp, .amp { color: var(--fire); }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-header nav a { color: var(--paper-muted); text-decoration: none; font-size: 15px; padding: 6px 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--paper); }

/* Hero */
.hero { position: relative; display: flex; flex-direction: column; justify-content: flex-end; background: var(--night); overflow: hidden; }
.hero__img { position: relative; z-index: 0; width: 100%; height: clamp(300px, 58vh, 560px); object-fit: cover; object-position: 80% 40%; }
.hero::before { content: ""; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: clamp(300px, 58vh, 560px); pointer-events: none;
  background: linear-gradient(180deg, rgba(20,17,15,0.75) 0%, rgba(20,17,15,0) 22%, rgba(20,17,15,0) 70%, var(--night) 100%); }
.hero__inner { position: relative; z-index: 2; padding-top: 8px; padding-bottom: 56px; }
.eyebrow { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-muted); margin-bottom: 14px; }
.hero h1 { font-size: clamp(38px, 9vw, 64px); letter-spacing: -0.005em; margin-bottom: 18px; }
.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--paper-muted); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid rgba(246,239,227,0.35);
  color: var(--paper); text-decoration: none; font-weight: 600; font-size: 16px; }
.btn:hover { border-color: var(--paper); color: var(--paper); }
.btn--primary { background: var(--fire); border-color: var(--fire); color: var(--night); }
.btn--primary:hover { background: #ef7440; border-color: #ef7440; color: var(--night); }

@media (min-width: 900px) {
  .hero { min-height: min(86vh, 820px); justify-content: center; }
  /* Shift the photo right so the lantern clears the headline; the left edge fades into --night. */
  .hero__img { position: absolute; top: 0; bottom: 0; left: clamp(0px, (100vw - 900px) * 0.45, 260px); width: 100%; height: 100%; object-position: 30% center; }
  .hero::before { height: auto; bottom: 0; min-height: 0;
    background:
      linear-gradient(90deg, var(--night) 0%, var(--night) 14%, rgba(20,17,15,0.82) 30%, rgba(20,17,15,0.25) 50%, rgba(20,17,15,0) 62%),
      linear-gradient(180deg, rgba(20,17,15,0.6) 0%, rgba(20,17,15,0) 18%, rgba(20,17,15,0) 80%, var(--night) 100%); }
  .hero__inner { width: 100%; padding-top: 120px; padding-bottom: 96px; }
  .hero__inner > * { max-width: 540px; }
}
@media (min-width: 900px) {
  .hero h1 { font-size: clamp(44px, 4.4vw, 64px); }
}

/* Sections */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section__title { font-size: 13px; font-family: var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--paper-muted); margin-bottom: 32px; }

.services { display: grid; gap: 20px; }
@media (min-width: 900px) { .services { grid-template-columns: repeat(3, 1fr); } }
.service { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; overflow: hidden; }
.service::before { content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--fire), transparent); opacity: 0.7; }
.service h3 { font-size: 26px; margin-bottom: 10px; }
.service p { color: var(--paper-muted); }
.service ul { margin: 0; padding: 0; list-style: none; }
.service li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }

/* Games */
.game { display: grid; gap: 28px; align-items: center; border-radius: 20px; padding: 28px; margin-bottom: 24px; overflow: hidden; }
@media (min-width: 900px) { .game { grid-template-columns: 5fr 6fr; padding: 44px; } }
.game__icon { width: 72px; height: 72px; border-radius: 18px; margin-bottom: 18px; }
.pixel { image-rendering: pixelated; }
.game h3 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 6px; }
.game__tagline { font-size: 19px; margin-bottom: 14px; }
.game__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; }
.muted { color: var(--paper-muted); }
.chip { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; padding: 4px 12px; border-radius: 999px; margin-bottom: 12px; }

.game--rushers { background: radial-gradient(120% 90% at 20% 0%, #2a3f9a 0%, #13205a 45%, #0b1233 100%); }
.game--rushers .chip { background: #ffc93d; color: #0b1233; }
.game--rushers .rushers-title { font-family: "Arial Rounded MT Bold", var(--sans); font-weight: 800; color: #ffc93d; letter-spacing: 0.04em; text-transform: uppercase; }
.game--rushers p { color: #dfe4f2; }
.game--rushers .game__tagline { color: #f3f5fb; }
.game--rushers a { color: #f3f5fb; text-decoration-color: #5fe0ec; }
.game--rushers a:hover { color: #5fe0ec; }
.game__shots { display: flex; gap: 14px; justify-content: center; }
.game__shots img { width: 31%; max-width: 200px; border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,0.45); }
@media (max-width: 520px) { .game__shots img.extra:last-child { display: none; } .game__shots img { width: 46%; } }

.game--driftfire { background: radial-gradient(100% 120% at 85% 10%, #142036 0%, #0a0f1c 55%, #070b14 100%); border: 1px solid rgba(120,170,255,0.12); }
.game--driftfire .chip--muted { background: rgba(255,255,255,0.08); color: #cfe0ff; border: 1px solid rgba(207,224,255,0.25); }
.game--driftfire .driftfire-title { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: clamp(26px, 4vw, 36px); color: #e9f1ff; }
.game--driftfire p { color: #c3cee3; }
.game--driftfire .game__tagline { color: #e9f1ff; }
.fleet { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px 10px;
  background-image: linear-gradient(rgba(120,170,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(120,170,255,0.06) 1px, transparent 1px);
  background-size: 24px 24px; border-radius: 14px; padding: 22px 10px; }
.fleet li { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fleet img { width: 88px; height: 88px; image-rendering: pixelated; }
.fleet span { font: 600 12px/1 ui-monospace, Consolas, monospace; letter-spacing: 0.12em; text-transform: uppercase; color: #8fa4c8; }
/* Weapon-tier "temperature ladder" accent: Frost, Azure, Violet, Ember */
.game--driftfire .game__text { position: relative; }
.game--driftfire .game__text::after { content: ""; display: block; width: 120px; height: 3px; margin-top: 22px; border-radius: 2px;
  background: linear-gradient(90deg, #9be7ff, #3d8bff, #9b5cff, #ff7a2f); }

/* Contact band */
.contact-band { text-align: center; background: radial-gradient(60% 120% at 50% 100%, rgba(226,96,42,0.16), transparent 70%); }
.contact-band h2 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 10px; }
.contact-band p { color: var(--paper-muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--paper-muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--paper-muted); }
.site-footer a:hover { color: var(--paper); }

/* Simple pages (404 and others) */
.page { padding: 140px 0 80px; min-height: 60vh; }
.page h1 { font-size: clamp(34px, 6vw, 52px); margin-bottom: 16px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Inner pages ---------- */
.page-head { padding: 140px 0 48px; background: radial-gradient(50% 120% at 15% 0%, rgba(226,96,42,0.12), transparent 70%); }
.page-head h1 { font-size: clamp(36px, 6vw, 58px); max-width: 16em; margin-bottom: 16px; }
.page-head .lede { max-width: 38em; }
.section--flush { padding-top: 8px; }
.section--flush + .section { border-top: 1px solid var(--line); }
.narrow { max-width: 640px; }
.small { font-size: 14px; }
.more { margin-top: 24px; color: var(--paper-muted); }
.prose { max-width: 680px; }
.prose h2 { font-size: 28px; margin: 36px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--paper-muted); }
.prose a { color: var(--paper); }
.prose-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .prose-grid { grid-template-columns: 7fr 5fr; gap: 64px; align-items: start; } }
.note { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.note p { color: var(--paper-muted); margin: 0; }

.services--two { display: grid; gap: 20px; }
@media (min-width: 900px) { .services--two { grid-template-columns: 1fr 1fr; } }
.service li strong { display: block; font-weight: 600; }
.service li span { display: block; color: var(--paper-muted); font-size: 15px; }
.service h2 { font-size: 28px; margin-bottom: 10px; }
.service li:has(span) { padding: 12px 0; }

.facts { width: 100%; border-collapse: collapse; margin: 0 0 28px; font-size: 15px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 10px 0; border-top: 1px solid var(--line); }
.facts th { color: var(--paper-muted); font-weight: 500; width: 40%; padding-right: 16px; }

.link-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 720px) { .link-cards { grid-template-columns: repeat(2, 1fr); } }
.link-cards a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 22px 24px; border-radius: var(--radius);
  background: var(--night-2); border: 1px solid var(--line); text-decoration: none; }
.link-cards a:hover { border-color: rgba(226,96,42,0.6); color: var(--paper); }
.link-cards strong { font-family: var(--serif); font-weight: 400; font-size: 22px; }
.link-cards span { color: var(--paper-muted); font-size: 15px; }
.link-cards .link-cards__addr { color: var(--fire); margin-top: 6px; }

.logo-tiles { display: flex; gap: 12px; margin-bottom: 16px; }
.logo-tile { width: auto; height: 112px; padding: 20px 44px; border-radius: var(--radius); background: var(--night-2); border: 1px solid var(--line); box-sizing: content-box; }
.logo-tile--light { background: var(--paper); }
.downloads { list-style: none; padding: 0; margin: 0 0 16px; }
.downloads li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }

.section__title a { color: inherit; text-decoration: none; }

/* Game pages */
.game h2 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 6px; }
.game h2 a, .game h3 a { color: inherit; text-decoration: none; }
.game h2 a:hover, .game h3 a:hover { text-decoration: underline; }
.game-hero { border-radius: 0; margin: 0; padding: 130px 0 56px; }
.game-hero__inner { display: grid; gap: 36px; align-items: center; }
@media (min-width: 900px) { .game-hero__inner { grid-template-columns: 6fr 5fr; } }
.game-hero h1 { font-size: clamp(44px, 8vw, 80px); margin-bottom: 8px; }
.game-hero .lede { color: inherit; opacity: 0.88; }
.game__icon--lg { width: 104px; height: 104px; border-radius: 24px; }
.theme-rushers .game-hero h1 { font-family: "Arial Rounded MT Bold", var(--sans); font-weight: 800; color: #ffc93d; text-transform: uppercase; letter-spacing: 0.04em; }
.theme-driftfire .game-hero h1 { font-size: clamp(32px, 6vw, 56px); }
.poster { position: relative; display: block; justify-self: center; width: min(300px, 80%); border-radius: 28px; overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 0 3px rgba(255,255,255,0.14); text-decoration: none; }
.poster__play { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); white-space: nowrap; background: rgba(11,18,51,0.85);
  color: #ffc93d; font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 999px; border: 1px solid rgba(255,201,61,0.5); }
.poster:hover .poster__play { background: #ffc93d; color: #0b1233; }

.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .features { grid-template-columns: repeat(3, 1fr); } }
.features li { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.features h3 { font-size: 22px; margin-bottom: 6px; }
.features p { color: var(--paper-muted); margin: 0; font-size: 15px; }
.theme-rushers .features li { background: #101a45; border-color: rgba(255,255,255,0.1); }
.theme-rushers .features h3 { color: #ffe08a; }

.gallery { list-style: none; margin: 0; padding: 4px 2px 18px; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; }
.gallery li { flex: 0 0 auto; width: 220px; scroll-snap-align: start; }
.gallery img { border-radius: 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.45); }

.fleet--roles { grid-template-columns: repeat(2, 1fr); gap: 24px 12px; }
@media (min-width: 720px) { .fleet--roles { grid-template-columns: repeat(3, 1fr); } }
.fleet small { color: #c3cee3; font-size: 14px; text-align: center; max-width: 16em; }
.theme-driftfire .section { background: linear-gradient(180deg, rgba(10,15,28,0.6), transparent 60%); }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 8fr 3fr; gap: 56px; align-items: start; } }
.contact-form fieldset { border: 0; margin: 0 0 36px; padding: 0; min-width: 0; }
.contact-form legend { font: 400 24px/1.2 var(--serif); margin-bottom: 18px; padding: 0; display: flex; align-items: center; gap: 12px; }
.step { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--fire); color: var(--fire); font: 600 14px/1 var(--sans); }

.topics { display: grid; gap: 12px; }
@media (min-width: 640px) { .topics { grid-template-columns: repeat(2, 1fr); } }
.topics legend { grid-column: 1 / -1; }
.topic { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px 18px 52px; border-radius: var(--radius);
  background: var(--night-2); border: 1px solid var(--line); cursor: pointer; }
.topic:hover { border-color: rgba(226,96,42,0.5); }
.topic input { position: absolute; left: 20px; top: 21px; width: 18px; height: 18px; margin: 0; accent-color: var(--fire); }
.topic strong { font: 400 21px/1.2 var(--serif); }
.topic span { color: var(--paper-muted); font-size: 15px; }
.topic:has(input:checked) { border-color: var(--fire); background: linear-gradient(180deg, rgba(226,96,42,0.12), rgba(226,96,42,0.04)), var(--night-2); }
.topic:has(input:focus-visible) { outline: 3px solid var(--fire); outline-offset: 3px; }

.field-row { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { margin: 0 0 18px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 600; }
.optional { font-weight: 400; color: var(--paper-muted); }
.field input, .field textarea { width: 100%; font: 16px/1.5 var(--sans); color: var(--paper); background: var(--night-2);
  border: 1px solid rgba(246,239,227,0.22); border-radius: 10px; padding: 12px 14px; }
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--fire); outline-offset: 1px; border-color: var(--fire); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #e8836a; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 8px 0 0; }
.form-foot .btn { border: 0; cursor: pointer; }

.hint { display: none; margin: -4px 0 18px; padding: 12px 16px; border-left: 2px solid var(--fire); background: rgba(226,96,42,0.06); color: var(--paper-muted); font-size: 15px; border-radius: 0 8px 8px 0; }
.contact-form:has(#topic-consulting:checked) .hint--consulting,
.contact-form:has(#topic-press:checked) .hint--press,
.contact-form:has(#topic-rushers:checked) .hint--rushers { display: block; }
.contact-form:has(#topic-rushers:checked) .field--company { display: none; }
.contact-aside p { color: var(--paper-muted); }
.contact-aside strong { color: var(--paper); font-weight: 600; }
.captcha { margin: 4px 0 18px; min-height: 65px; }

/* ---------- Analytics consent ---------- */
.consent { position: fixed; z-index: 20; left: 16px; right: 16px; bottom: 16px; max-width: 560px; margin: 0 auto;
  background: var(--night-2); color: var(--paper); border: 1px solid rgba(246,239,227,0.2); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: 0 18px 50px rgba(0,0,0,0.5); font-size: 15px; }
.consent p { margin: 0 0 12px; color: var(--paper-muted); }
.consent a { color: var(--paper); }
.consent__actions { display: flex; gap: 10px; margin: 0 !important; }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 15px; background: transparent; cursor: pointer; font-family: var(--sans); }
.consent .btn--small { flex: 1; }
.linklike { background: none; border: 0; padding: 0; margin-left: 0.5em; font: inherit; color: var(--paper-muted); text-decoration: underline;
  text-decoration-color: var(--fire); text-underline-offset: 3px; cursor: pointer; }
.linklike::before { content: "· "; text-decoration: none; display: inline-block; margin-right: 0.35em; }
.linklike:hover { color: var(--paper); }
.prose code { font-size: 0.92em; color: var(--paper); }
