/* Fonts, reset and focus handling are lifted from mothcoat-website's stylesheet.
   Same engineering, different palette: that site is warm and quiet, this one is not. */
@font-face {
  font-family: 'Oswald';
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/oswald-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Karla';
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  src: url('/fonts/karla-var.woff2') format('woff2');
}

:root {
  --void: #0a0910;
  --panel: #14121e;
  --panel-2: #1b1828;
  --line: #2c2740;
  --text: #f4f1ea;
  --muted: #9a93ad;
  --faint: #6b6480;
  --hot: #ff7a2f;
  --volt: #b8f24a;
  --cyan: #45d6e8;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-body: 'Karla', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Cascadia Mono', Consolas, 'SFMono-Regular', monospace;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1240px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--volt);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Fine horizontal lines over everything. Sits above the page but takes no clicks. */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0 1px,
    transparent 1px 3px
  );
}

/* ---------- top bar ---------- */

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 9, 16, 0.9);
}

.mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
}
.mark span { color: var(--hot); }

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  align-items: center;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}
.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--text); }
.topbar nav .nav-cta {
  color: var(--volt);
  border: 1px solid rgba(184, 242, 74, 0.35);
  padding: 0.35rem 0.8rem;
}
.topbar nav .nav-cta:hover { background: rgba(184, 242, 74, 0.1); color: var(--volt); }

/* ---------- hero ---------- */

.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 8rem) var(--pad) clamp(2rem, 5vw, 4rem);
}

.eyebrow {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--hot);
  margin-bottom: 1.1rem;
}

.wordmark {
  font-size: clamp(3rem, 13vw, 10.5rem);
  letter-spacing: -0.015em;
  text-transform: uppercase;
  /* Split-channel offset. Cheap chromatic aberration, no filters, scales with the type. */
  text-shadow: 0.018em 0 0 var(--hot), -0.018em 0 0 var(--cyan);
}

.lede {
  max-width: 56ch;
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 1.6vw, 1.32rem);
  color: #d6d0e2;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 5vw, 4rem);
  list-style: none;
  margin-top: 2.6rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--line);
}
.stats li { display: flex; flex-direction: column; }
.stats b {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  font-weight: 700;
  color: var(--volt);
  line-height: 1;
}
.stats span {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin-top: 0.45rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2.4rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--panel);
}
.btn:hover { border-color: var(--faint); background: var(--panel-2); }
.btn-primary {
  background: var(--hot);
  border-color: var(--hot);
  color: #17100a;
  font-weight: 700;
}
.btn-primary:hover { background: #ff9354; border-color: #ff9354; color: #17100a; }
.btn-small { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

/* ---------- marquee ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  padding: 0.7rem 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  padding-left: 2.5rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}
.marquee-track span::after {
  content: '/';
  margin-left: 2.5rem;
  color: var(--hot);
}

/* ---------- sections ---------- */

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 7rem) var(--pad);
}
.section.narrow { max-width: 820px; }

.section-title {
  font-size: clamp(1.7rem, 4.5vw, 3rem);
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}
.section-title span {
  color: var(--hot);
  font-size: 0.42em;
  vertical-align: 0.9em;
  letter-spacing: 0.1em;
  margin-right: 0.7rem;
}
.section-note {
  max-width: 62ch;
  color: var(--muted);
  margin-bottom: 3rem;
}

/* ---------- featured games ---------- */

.feature {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.8rem, 4vw, 4rem);
  align-items: start;
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  border-top: 1px solid var(--line);
}
.feature:first-of-type { border-top: 0; padding-top: 0; }
.feature.reverse .feature-media { order: 2; }

.feature-media .shot {
  width: 100%;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: #000;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin-top: 0.55rem;
}
.gallery img {
  width: 100%;
  border: 1px solid var(--line);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.feature-body h3 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.feature-body .eyebrow { color: var(--accent); }
.tagline {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text);
  margin-bottom: 1.4rem;
}
.feature-body p { margin-bottom: 1rem; color: #cec8dc; max-width: 60ch; }

.spec {
  margin: 1.8rem 0 1.4rem;
  border-top: 1px solid var(--line);
}
.spec > div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}
.spec dt {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 0.15rem;
}
.spec dd { font-size: 0.95rem; color: #cec8dc; }

.links { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- prototype cards ---------- */

.proto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 1.4rem;
}

.proto {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
}
.proto > img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  background:
    repeating-linear-gradient(135deg,
      rgba(160, 108, 213, 0.09) 0 12px,
      transparent 12px 24px),
    var(--panel-2);
}
.placeholder span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 4vw, 2.1rem);
  letter-spacing: 0.06em;
  color: var(--accent);
}
.placeholder b {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--faint);
}

.proto-body { padding: 1.5rem 1.4rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.proto-body h3 {
  font-size: 1.6rem;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.7rem;
}
.proto-body p { font-size: 0.95rem; color: #c4bed4; margin-bottom: 0.85rem; }
.proto-body .pitch { color: var(--text); }
.proto-body .q {
  border-left: 2px solid var(--accent);
  padding-left: 0.9rem;
  color: #ded8ea;
}
.proto-body .q b {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent);
  display: block;
}
.proto-body .note { color: var(--faint); font-size: 0.85rem; font-style: italic; }

.proto-links { margin: 0.9rem 0 0; }
.proto-links a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.proto-links a:hover { color: var(--text); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin-top: auto;
  padding-top: 1rem;
}
.chips li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.22rem 0.55rem;
}

/* ---------- about + contact ---------- */

.narrow .big {
  font-size: clamp(1.05rem, 1.8vw, 1.22rem);
  color: #d6d0e2;
  margin-bottom: 1.3rem;
  max-width: 66ch;
}

.contact {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) var(--pad);
  border-top: 1px solid var(--line);
}
.contact h2 {
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}
.contact .cta-row { margin-top: 1rem; }
.contact .small { gap: 1.5rem; font-size: 0.9rem; }
.contact .small a { color: var(--muted); }
.contact .small a:hover { color: var(--volt); }

footer {
  padding: 2rem var(--pad) 3rem;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}

/* ---------- responsive ---------- */

/* The two columns are never the same height, so the shorter one leaves a hole.
   Pinning the media keeps a screenshot on screen for the whole read instead. */
@media (min-width: 941px) {
  .feature-media { position: sticky; top: 2rem; }
}

@media (max-width: 940px) {
  .feature { grid-template-columns: 1fr; }
  .feature.reverse .feature-media { order: 0; }
  .spec > div { grid-template-columns: 1fr; gap: 0.15rem; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .topbar { padding-block: 0.9rem; }
  .topbar nav { width: 100%; justify-content: space-between; gap: 0.6rem; }
  .gallery { grid-template-columns: 1fr; }
  .stats { gap: 1.5rem 2rem; }
}

/* ---------- motion ---------- */

@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: slide 38s linear infinite; }
  @keyframes slide {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }

  .btn, .topbar nav a { transition: background 140ms ease, color 140ms ease, border-color 140ms ease; }

  .proto { transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
  .proto:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 34px -18px var(--accent);
  }

  .gallery img { transition: opacity 160ms ease; }
  .gallery img:hover { opacity: 0.78; }
}

/* An autoplaying loop is exactly what reduced motion asks you not to do.
   Swap it for the poster frame, which carries the same information. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  video.shot { display: none; }
  img.shot-fallback { display: block; }
}
img.shot-fallback { display: none; }
