:root {
  --paper: #f3ede2;
  --paper-2: #e8dfcf;
  --paper-3: #fbf8f2;
  --ink: #19142b;
  --ink-2: #3a3350;
  --muted: #554d66;
  --signal: #e2552d;
  --signal-ink: #a8361a;
  --signal-soft: #f6c7b4;
  --teal: #1a7f7c;
  --teal-soft: #cfe6e3;
  --purple: #4b2a88;
  --line: 2px solid var(--ink);
  --shadow: 4px 4px 0 var(--ink);
  --shadow-lg: 6px 6px 0 var(--ink);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(25, 20, 43, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 20, 43, .045) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
.pixel { image-rendering: pixelated; image-rendering: crisp-edges; }
@supports (image-rendering: pixelated) { .pixel { image-rendering: pixelated; } }

a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--signal-ink); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }

h1, h2, h3, h4 { line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 10px 14px; font-weight: 700;
}
.skip:focus { top: 12px; color: var(--paper); }

.kicker {
  font: 700 12px/1.3 var(--mono);
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--signal-ink);
  margin: 0 0 12px;
}

/* Buttons */
.btn {
  --b: var(--paper-3);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 20px;
  background: var(--b); color: var(--ink);
  border: var(--line); box-shadow: var(--shadow);
  font: 700 15px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .12s steps(2), box-shadow .12s steps(2);
}
.btn:hover { color: var(--ink); transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn--primary { --b: var(--signal); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } }

/* Top bar */
.topbar {
  position: relative; z-index: 50;
  background: rgba(243, 237, 226, .94);
  border-bottom: var(--line);
}
@media (min-width: 760px) {
  html { scroll-padding-top: 92px; }
  .topbar { position: sticky; top: 0; }
  @supports (backdrop-filter: blur(6px)) {
    .topbar { background: rgba(243, 237, 226, .82); backdrop-filter: blur(6px); }
  }
}
.topbar__inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  min-height: 60px; padding-top: 8px; padding-bottom: 8px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -0.01em; }
.brand__mark { display: block; box-shadow: 2px 2px 0 var(--signal); }
.lang { margin-left: auto; }
.lang ul { display: flex; list-style: none; margin: 0; padding: 0; border: var(--line); background: var(--paper-3); }
.lang li + li { border-left: var(--line); }
.lang a {
  display: block; min-width: 38px; padding: 7px 8px; text-align: center; text-decoration: none;
  font: 700 12px/1 var(--mono); letter-spacing: .08em;
}
.lang a:hover { background: var(--paper-2); color: var(--ink); }
.lang a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.nav { width: 100%; order: 3; }
.nav ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; white-space: nowrap; }
.nav a {
  display: inline-block; padding: 8px 9px; text-decoration: none;
  font: 700 14px/1.2 var(--sans); border: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="true"] { border-color: var(--ink); background: var(--paper-3); color: var(--ink); }
.nav__cta { background: var(--ink); color: var(--paper) !important; }
.nav__cta:hover, .nav .nav__cta[aria-current="true"] { background: var(--signal); border-color: var(--ink); color: var(--ink) !important; }
@media (max-width: 359px) {
  .topbar__inner { column-gap: 10px; }
  .lang a { min-width: 32px; padding: 7px 4px; }
}
@media (min-width: 960px) {
  html { scroll-padding-top: 64px; }
  .nav { width: auto; order: 2; margin-left: auto; }
  .nav ul { flex-wrap: nowrap; }
  .nav a { padding: 8px 12px; }
  .lang { order: 3; margin-left: 6px; }
}

/* Hero */
.hero { padding: clamp(36px, 7vw, 88px) 0 clamp(48px, 7vw, 96px); }
.hero__grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.15fr .85fr; } }

.status {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em;
  background: var(--teal-soft); border: var(--line); padding: 9px 12px; margin-bottom: 22px;
}
.status__dot { width: 10px; height: 10px; background: var(--teal); box-shadow: 0 0 0 2px var(--ink); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { background: var(--paper-3); } }

.hero h1 { font-size: clamp(44px, 9vw, 92px); font-weight: 900; letter-spacing: -0.045em; line-height: .95; }
.hero__role {
  display: inline-block; margin: 14px 0 26px;
  font: 700 clamp(14px, 2vw, 16px)/1 var(--mono); text-transform: uppercase; letter-spacing: .12em;
  background: var(--ink); color: var(--paper); padding: 8px 10px;
}
.hero__lead { font-size: clamp(22px, 3.2vw, 32px); line-height: 1.25; font-weight: 750; letter-spacing: -0.015em; max-width: 22em; }
.hero__lead { text-wrap: balance; }
.hero__sub { color: var(--muted); max-width: 36em; font-size: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 30px; }
.hero__facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.hero__facts li {
  font: 600 13px/1 var(--mono); padding: 8px 10px;
  border: 2px solid var(--ink-2); background: var(--paper-3);
}

.hero__stage {
  position: relative;
  order: -1;
  aspect-ratio: 6 / 5;
  width: min(100%, 360px); justify-self: center;
  background: #2b1d4f url(/images/pixel/hero-bg.png) center bottom / cover no-repeat;
  image-rendering: pixelated;
  border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink);
}
.hero__sprite { position: absolute; left: 50%; bottom: 3.2%; height: min(202px, 74%); transform: translateX(-62%); }
@media (min-width: 900px) { .hero__sprite { height: min(404px, 80%); } }
.hero__sprite img { height: 100%; width: auto; }
.sprite-bob { animation: bob 1.4s steps(1) infinite; }
@keyframes bob { 50% { transform: translateY(-1.1%); } }
.bubble {
  position: absolute; right: 5%; top: 6%; width: 52%; z-index: 2;
  background: var(--paper-3); border: 3px solid var(--ink);
  padding: 10px 12px; font: 700 13px/1.35 var(--mono);
  box-shadow: 4px 4px 0 var(--ink);
}
.bubble::after {
  content: ""; position: absolute; left: 18%; bottom: -15px; width: 12px; height: 12px;
  background: var(--paper-3); border: 3px solid var(--ink); border-top: 0; border-left: 0;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
@media (min-width: 900px) {
  .hero__stage { order: 0; aspect-ratio: 6 / 7; width: min(100%, 440px); }
}
@media (max-width: 899px) {
  .hero { padding-top: 28px; }
  .bubble { width: 48%; font-size: 12px; padding: 8px 10px; top: 7%; right: 4%; }
}
@media (prefers-reduced-motion: reduce) {
  .sprite-bob, .status__dot { animation: none; }
}

/* Section heads */
.section-head { max-width: 44em; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { font-size: clamp(34px, 5.6vw, 60px); font-weight: 900; letter-spacing: -0.04em; margin-bottom: 16px; }
.section-head__intro { color: var(--muted); font-size: 18px; margin: 0; }

/* Story */
.story {
  padding: clamp(56px, 8vw, 110px) 0;
  background: var(--paper-2);
  border-top: var(--line); border-bottom: var(--line);
}
.story__grid { display: grid; gap: 40px; }
.stage { display: none; }

.chapters { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(48px, 7vw, 80px); }
.chapter { position: relative; max-width: 720px; }
.chapter__scene {
  margin: 0 0 20px; border: 3px solid var(--ink); box-shadow: var(--shadow-lg); background: var(--ink);
}
.chapter__scene img { width: 100%; }
.chapter__level {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px;
}
.chapter__level span { background: var(--signal); border: var(--line); padding: 6px 8px; }
.chapter h3 { font-size: clamp(28px, 4vw, 40px); font-weight: 900; letter-spacing: -0.03em; margin-bottom: 16px; }
.chapter > p { font-size: 18px; }

.role { border-left: 4px solid var(--ink); padding: 2px 0 2px 16px; margin: 0 0 20px; }
.role p { margin: 0; }
.role p + p { margin-top: 6px; }
.role__title { font-weight: 800; font-size: 19px; line-height: 1.3; }
.role__title span { font-weight: 600; color: var(--ink-2); }
.role__meta { font: 600 13px/1.4 var(--mono); color: var(--muted); }

.readout {
  display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 22px;
  border: var(--line); background: var(--ink); color: var(--paper); width: fit-content; max-width: 100%;
}
.readout div { padding: 10px 16px; border-right: 2px solid #3d3557; }
.readout div:last-child { border-right: 0; }
.readout dt { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: #c6bdd8; margin-bottom: 6px; }
.readout dd { margin: 0; font: 800 20px/1 var(--mono); color: #ffd27a; }

.quests { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.quests li {
  background: var(--paper-3); border: var(--line); padding: 16px 18px 16px 44px; position: relative;
}
.quests li::before {
  content: ""; position: absolute; left: 16px; top: 21px; width: 12px; height: 12px;
  background: var(--teal); box-shadow: 0 0 0 2px var(--ink);
}
.quests h4 { font-size: 17px; margin-bottom: 6px; letter-spacing: -0.01em; }
.quests p { margin: 0; color: var(--ink-2); font-size: 16px; }

@media (min-width: 960px) {
  .js .story__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; align-items: start; }
  .js .stage { display: block; position: sticky; top: 92px; max-width: 518px; }
  .js .chapter__scene { display: none; }
  .js .chapter { min-height: 64vh; padding-top: 4vh; }
  .js .chapter:last-child { min-height: 0; padding-bottom: 8vh; }
}

.stage__frame { background: var(--ink); border: 3px solid var(--ink); box-shadow: 10px 10px 0 var(--signal); }
.stage__hud {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; color: var(--paper);
  font: 700 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em;
}
.stage__level { color: #ffd27a; }
.stage__screen { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.stage__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; clip-path: inset(0 100% 0 0);
  transition: clip-path .5s steps(8), opacity 0s linear .5s;
}
.stage__img.is-active { opacity: 1; clip-path: inset(0 0 0 0); z-index: 1; transition: clip-path .5s steps(8), opacity 0s; }
@media (prefers-reduced-motion: reduce) {
  .stage__img, .stage__img.is-active { transition: none; }
}
.stage__bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.stage__bar-label { font: 700 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: #c6bdd8; }
.stage__track { flex: 1; height: 12px; background: #2f2847; box-shadow: inset 0 0 0 2px #4a4166; position: relative; }
.stage__fill {
  position: absolute; inset: 2px auto 2px 2px; width: 0;
  background: repeating-linear-gradient(90deg, #ffd27a 0 8px, #f0a24a 8px 10px);
}

/* Builds */
.builds { padding: clamp(56px, 8vw, 110px) 0; }
.builds__intro { display: grid; gap: 28px; align-items: center; margin-bottom: clamp(24px, 4vw, 48px); }
.builds__intro .section-head { margin-bottom: 0; }
.builds__scene { margin: 0; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--purple); background: var(--ink); }
.builds__scene img { width: 100%; }
@media (min-width: 900px) {
  .builds__intro { grid-template-columns: 1fr 1fr; gap: 56px; }
}

.group-title {
  display: flex; align-items: center; gap: 12px;
  font-size: 22px; font-weight: 850; margin: 44px 0 20px;
}
.group-title span { font: 700 13px/1 var(--mono); background: var(--ink); color: var(--paper); padding: 6px 8px; }

.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cards--four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards--four .card h4 { font-size: 19px; }
  .cards .card--feature { grid-column: 1 / -1; flex-direction: row; }
  .cards .card--feature .card__shot { flex: 0 0 58%; border-bottom: 0; border-right: var(--line); }
  .cards .card--feature .card__body { padding: 28px 30px; justify-content: center; }
  .cards .card--feature h4 { font-size: 30px; }
  .cards .card--feature p { font-size: 18px; }
  .card--feature .tags { margin-top: 8px; }
}
@media (min-width: 640px) and (max-width: 1039px) {
  .card--feature { grid-column: 1 / -1; }
}

.card {
  display: flex; flex-direction: column;
  background: var(--paper-3); border: var(--line); box-shadow: var(--shadow);
  transition: transform .12s steps(2), box-shadow .12s steps(2);
}
.card:hover, .card:focus-within { transform: translate(-3px, -3px); box-shadow: 7px 7px 0 var(--ink); }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover, .card:focus-within { transform: none; } }
.card__shot { display: block; border-bottom: var(--line); background: var(--paper-2); }
.card__chrome {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 10px; border-bottom: var(--line); background: var(--ink); color: #d9d2e6;
  font: 600 11px/1 var(--mono); letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card__chrome::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-right: 26px;
  background: var(--signal); box-shadow: 10px 0 0 #ffd27a, 20px 0 0 #4fc3a1;
}
.card__shot img { aspect-ratio: 8 / 5; object-fit: cover; width: 100%; }
.card__body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card h4 { font-size: 21px; font-weight: 850; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card h4 a { text-decoration: none; }
.card h4 a::after {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px; vertical-align: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23a8361a' d='M2 0h5v5H6V2H5v1H4v1H3v1H2v1H1v1H0V6h1V5h1V4h1V3h1V2H2z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.card h4 a:hover { text-decoration: underline; }
.card p { font-size: 16px; color: var(--ink-2); margin-bottom: 10px; }
.card__note { font-size: 15px !important; color: var(--muted) !important; }
.tags { list-style: none; margin: auto 0 0; padding: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 600 12px/1 var(--mono); padding: 6px 8px; background: var(--paper-2); border: 1px solid var(--ink-2); }

.badge-18 {
  font: 800 12px/1 var(--mono); padding: 5px 7px; background: var(--ink); color: #ffd27a; letter-spacing: .06em;
}
.card--adult .card__shot { background: #1c0d17; }

/* Kit */
.kit { padding: clamp(56px, 8vw, 110px) 0; background: var(--ink); color: var(--paper); border-top: var(--line); }
.kit .kicker { color: #ffb48f; }
.kit .section-head__intro { color: #cfc7dd; }
.kit__grid { display: grid; gap: 18px; grid-template-columns: 1fr; grid-auto-flow: dense; }
@media (min-width: 720px) { .kit__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pouch--wide { grid-column: 1 / -1; } }
@media (min-width: 1040px) { .kit__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pouch--wide { grid-column: span 2; } }
.pouch { border: 2px solid #4a4166; background: #221c38; padding: 18px; }
.pouch h3 { font: 700 13px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: #c6bdd8; margin-bottom: 14px; }
.slots { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.slot {
  font: 700 14px/1 var(--sans); padding: 10px 12px;
  background: #2f2847; color: var(--paper); border: 2px solid #5a5078;
}
.slot--equipped { background: var(--signal); color: var(--ink); border-color: var(--paper); box-shadow: 3px 3px 0 #000; }
.slot--inline { display: inline-block; padding: 4px 8px; font-size: 13px; vertical-align: 1px; }

/* Contact */
.contact { padding: clamp(56px, 8vw, 110px) 0; }
.contact__grid { display: grid; gap: clamp(32px, 5vw, 64px); align-items: start; }
@media (min-width: 900px) { .contact__grid { grid-template-columns: .95fr 1.05fr; } .contact__side { position: sticky; top: 100px; } }
.contact__scene { margin: 0; }
.contact__scene img { width: 100%; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--signal); background: var(--ink); }
.contact__scene figcaption { font: 600 14px/1.4 var(--mono); margin-top: 18px; color: var(--muted); }

.form { display: grid; gap: 18px; }
.field label { display: block; font-weight: 800; margin-bottom: 8px; }
.field input, .field textarea {
  width: 100%; font: 400 17px/1.4 var(--sans); color: var(--ink);
  background: var(--paper-3); border: var(--line); padding: 13px 14px; border-radius: 0;
  box-shadow: inset 3px 3px 0 rgba(25, 20, 43, .08);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: 3px solid var(--signal); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__row { display: flex; flex-wrap: wrap; gap: 14px; }
.form__msg { margin: 0; padding: 12px 14px; border: var(--line); font-weight: 600; }
.form__msg.is-ok { background: var(--teal-soft); }
.form__msg.is-error { background: var(--signal-soft); }

/* Footer */
.footer { background: var(--ink); color: #d9d2e6; border-top: 4px solid var(--signal); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding-top: 26px; padding-bottom: 26px; font: 600 13px/1.4 var(--mono); }
.footer p { margin: 0; }
.footer a { color: var(--paper); }
.footer a:hover { color: #ffd27a; }
.footer__note { flex: 1; }
.footer__top { text-decoration: none; border: 2px solid #5a5078; padding: 8px 10px; }
