/* Periapsis Works — site styles
   Palette: test-chamber panels (cool light greys), ink, one signal orange.
   Type: Archivo (wide for display, normal for text) + IBM Plex Mono for data. */

@font-face {
  font-family: "Archivo";
  src: url("/assets/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #f3f4f4;
  --panel: #e6e8e9;
  --ink: #15181b;
  --graphite: #5b6268;
  --rule: #cfd3d6;
  --signal: #e8591a;
  --signal-ink: #c2470f;
  --night: #0c1120;
  --night-2: #141b2e;
  --night-rule: #27304a;
  --night-text: #c9cfdc;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* ---- type roles ---------------------------------------------------------------------- */

.display {
  font-stretch: 125%;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.98;
  margin: 0;
}
.h1 { font-size: clamp(2.3rem, 5.6vw, 4.6rem); }
.h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.h3 { font-size: 1.05rem; line-height: 1.2; }

.label {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--graphite);
}
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.5; max-width: 38em; }
.muted { color: var(--graphite); }

/* ---- header -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243, 244, 244, 0.92);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.nav a {
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--ink); }
.nav a[aria-current="page"] { border-bottom-color: var(--signal); }
@media (max-width: 560px) {
  .brand img { height: 28px; }
  .nav { gap: 14px; }
  .nav a { font-size: 12px; letter-spacing: 0.04em; }
  .nav .nav-optional { display: none; }
}

/* ---- buttons ------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 0 20px;
  font-family: var(--mono); font-size: 13.5px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase;
  text-decoration: none; border: 1.5px solid var(--ink); border-radius: var(--radius);
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn--primary { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn--primary:hover { background: var(--signal-ink); border-color: var(--signal-ink); color: #fff; }
.btn--light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn--light:hover { background: #fff; color: var(--night); border-color: #fff; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

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

.section { padding: clamp(64px, 10vw, 120px) 0; }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 40px; }
.section-head .label { flex: none; }

/* ---- home hero: the orbit figure ----------------------------------------------------- */

.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { margin: 18px 0 26px; font-size: clamp(2.2rem, 4.3vw, 3.7rem); }
.hero .lede { margin-bottom: 32px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero figure { max-width: 440px; }
}

.orbit-fig { margin: 0; }
.orbit-fig svg { width: 100%; height: auto; overflow: visible; }
.orbit-fig .orbit { fill: none; stroke: var(--ink); stroke-width: 1.4; }
.orbit-fig .axis { stroke: var(--graphite); stroke-width: 0.6; stroke-dasharray: 2 3; }
.orbit-fig .planet { fill: var(--ink); }
.orbit-fig .sat { fill: var(--signal); }
.orbit-fig .tick { stroke: var(--ink); stroke-width: 0.8; }
.orbit-fig text { font-family: var(--mono); font-size: 5.2px; letter-spacing: 0.08em; fill: var(--graphite); }
.orbit-fig text.strong { fill: var(--ink); font-weight: 500; }
.orbit-fig figcaption {
  margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: var(--graphite);
}
.orbit-fig figcaption b { color: var(--ink); font-weight: 500; }

/* ---- game feature card (home + games index) ------------------------------------------ */

.game-card {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  background: var(--night); color: #fff; border-radius: var(--radius); overflow: hidden;
  text-decoration: none;
}
.game-card__art { position: relative; min-height: 280px; background: var(--night); }
.game-card__art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.game-card__body { padding: clamp(24px, 3.5vw, 44px); display: flex; flex-direction: column; gap: 18px; border-left: 1px solid var(--night-rule); }
.game-card__body .label { color: #8e97ab; }
.game-card__logo { width: 100%; max-width: 360px; image-rendering: pixelated; }
.game-card__body p { color: var(--night-text); margin: 0; }
.game-card__meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; font-family: var(--mono); font-size: 13px; }
.game-card__meta dt { color: #8e97ab; text-transform: uppercase; letter-spacing: 0.08em; }
.game-card__meta dd { margin: 0; color: #fff; }
.game-card__body .btn-row { margin-top: auto; }
@media (max-width: 860px) {
  .game-card { grid-template-columns: 1fr; }
  .game-card__art { min-height: 0; aspect-ratio: 1232 / 706; }
  .game-card__body { border-left: 0; border-top: 1px solid var(--night-rule); }
}

.next-slot {
  margin-top: 20px; padding: 20px 24px; border: 1.5px dashed var(--rule); border-radius: var(--radius);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}

/* ---- studio + contact ---------------------------------------------------------------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(32px, 6vw, 96px); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 40px 0 0; border-top: 1px solid var(--ink); }
.facts div { padding: 16px 16px 0 0; }
.facts dt { font-family: var(--mono); font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--graphite); }
.facts dd { margin: 4px 0 0; font-stretch: 125%; font-weight: 600; font-size: 1.05rem; text-transform: uppercase; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } }

.contact-line { font-stretch: 112%; font-weight: 700; font-size: clamp(1.15rem, 2.5vw, 1.85rem); text-decoration: none; border-bottom: 3px solid var(--signal); overflow-wrap: anywhere; }
.contact-line:hover { color: var(--signal-ink); }

/* ---- footer -------------------------------------------------------------------------- */

.site-footer { background: var(--ink); color: #aab1b8; padding: 56px 0 40px; font-size: 14.5px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.site-footer img { height: 40px; width: auto; margin-bottom: 16px; }
.site-footer h2 { font-family: var(--mono); font-weight: 500; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: #fff; margin: 4px 0 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid #2a2f35; padding-top: 20px; margin-top: 16px; font-family: var(--mono); font-size: 12px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .wrap > :first-child { grid-column: 1 / -1; } }

/* ---- game page ----------------------------------------------------------------------- */

.game-hero { position: relative; background: var(--night); color: #fff; overflow: hidden; }
.game-hero__art { position: absolute; inset: 0; }
.game-hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; image-rendering: pixelated; }
.game-hero__art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,17,32,.35) 0%, rgba(12,17,32,.05) 35%, rgba(12,17,32,.55) 72%, var(--night) 100%);
}
.game-hero .wrap { position: relative; min-height: min(78vh, 760px); display: flex; flex-direction: column; justify-content: flex-end; padding-top: 48px; padding-bottom: 56px; }
.game-hero__logo { width: min(540px, 88%); image-rendering: pixelated; margin-bottom: 22px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.45)); }
.game-hero__tag { font-size: clamp(1.1rem, 2vw, 1.4rem); max-width: 34em; margin: 0 0 28px; color: #e5e9f1; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.game-hero .crumbs { position: absolute; top: 24px; left: var(--gutter); right: var(--gutter); max-width: var(--wrap); }
.crumbs { font-family: var(--mono); font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; }
.crumbs a { text-decoration: none; opacity: .8; }
.crumbs a:hover { opacity: 1; text-decoration: underline; }
.crumbs span { opacity: .5; margin: 0 8px; }

.specbar { background: var(--night); color: #fff; border-top: 1px solid var(--night-rule); }
.specbar dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0; }
.specbar div { padding: 18px 16px 20px 0; border-right: 1px solid var(--night-rule); padding-left: 16px; }
.specbar div:first-child { padding-left: 0; }
.specbar div:last-child { border-right: 0; }
.specbar dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: #8e97ab; }
.specbar dd { margin: 4px 0 0; font-stretch: 112%; font-weight: 600; font-size: 15px; }
@media (max-width: 860px) {
  .specbar dl { grid-template-columns: 1fr 1fr; }
  .specbar div, .specbar div:first-child { padding: 14px 12px 14px 0; border-right: 0; border-bottom: 1px solid var(--night-rule); }
}

.dark { background: var(--night); color: var(--night-text); }
.dark .label { color: #8e97ab; }
.dark h2, .dark h3 { color: #fff; }
.dark .section + .section, .section.dark + .section.dark { border-top-color: var(--night-rule); }

.trailer { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--night-rule); }
.trailer video { width: 100%; height: 100%; image-rendering: pixelated; }

.story { display: grid; gap: clamp(56px, 8vw, 96px); }
.story-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px clamp(28px, 5vw, 64px); }
.story-row__media { grid-column: 1 / -1; border-radius: var(--radius); overflow: hidden; background: var(--night); border: 1px solid var(--night-rule); }
.story-row__media video { width: 100%; aspect-ratio: 1232 / 308; object-fit: cover; image-rendering: pixelated; }
.story-row h3 { font-size: clamp(1.25rem, 2.2vw, 1.7rem); margin: 8px 0 0; }
.story-row__text > div > p:last-child, .story-row p:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .story-row { grid-template-columns: 1fr; } }

.shots { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.shots a { display: block; grid-column: span 4; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--night-rule); background: #000; }
.shots a:nth-child(1), .shots a:nth-child(2), .shots a:nth-child(6), .shots a:nth-child(7) { grid-column: span 6; }
.shots img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; transition: opacity .2s ease; }
.shots a:hover img { opacity: .85; }
@media (max-width: 700px) { .shots a, .shots a:nth-child(n) { grid-column: span 12; } }

.feature-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
.feature-list li { padding: 14px 0 14px 26px; border-top: 1px solid var(--rule); position: relative; }
.feature-list li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 8px; height: 8px; background: var(--signal); border-radius: 50%; }
@media (max-width: 760px) { .feature-list { grid-template-columns: 1fr; } }

.presskit-cta {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  padding: clamp(24px, 4vw, 40px); background: var(--panel); border-radius: var(--radius);
}
@media (max-width: 700px) { .presskit-cta { grid-template-columns: 1fr; } }

/* ---- lightbox ------------------------------------------------------------------------ */

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(6, 9, 16, .94); display: none; align-items: center; justify-content: center; padding: 56px 16px; }
.lightbox.is-open { display: flex; }
.lightbox img { max-width: min(1920px, 100%); max-height: 100%; image-rendering: pixelated; }
.lightbox button {
  position: absolute; background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: var(--radius);
  font-family: var(--mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 14px; cursor: pointer;
}
.lightbox button:hover { background: #fff; color: var(--night); }
.lightbox .lb-close { top: 12px; right: 12px; }
.lightbox .lb-prev { left: 12px; bottom: 12px; }
.lightbox .lb-next { right: 12px; bottom: 12px; }
.lightbox .lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #aab1b8; font-family: var(--mono); font-size: 12px; }

/* ---- press kit ----------------------------------------------------------------------- */

.pk-head { padding: clamp(40px, 6vw, 72px) 0 clamp(32px, 4vw, 48px); border-bottom: 1px solid var(--rule); }
.pk-head .crumbs { color: var(--graphite); margin-bottom: 20px; }
.pk-head h1 { margin: 0 0 18px; }
.pk-head .btn-row { margin-top: 28px; }

.pk { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 104px); }
.pk-facts { align-self: start; position: sticky; top: 88px; }
.pk-facts dl { margin: 0; border-top: 1px solid var(--ink); }
.pk-facts dl > div { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.pk-facts dt { font-family: var(--mono); font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--graphite); margin-bottom: 2px; }
.pk-facts dd { margin: 0; font-size: 15px; line-height: 1.45; }
.pk-facts dd a { text-decoration-color: var(--signal); text-underline-offset: 3px; }
@media (max-width: 900px) { .pk { grid-template-columns: 1fr; } .pk-facts { position: static; } }

.pk-body > section { padding-bottom: 48px; margin-bottom: 48px; border-bottom: 1px solid var(--rule); }
.pk-body > section:last-child { border-bottom: 0; margin-bottom: 0; }
.pk-body h2 { font-size: 1.35rem; margin-bottom: 18px; }
.pk-body p, .pk-body li { max-width: 44em; }
.pk-body ul.plain { padding-left: 1.1em; margin: 0; }
.pk-body ul.plain li { margin-bottom: 6px; }

.dl-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.dl-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.dl-list .name { font-weight: 500; }
.dl-list .meta { font-family: var(--mono); font-size: 12.5px; color: var(--graphite); }
.dl-list a.get { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; white-space: nowrap; border-bottom: 1.5px solid var(--signal); }
.dl-list a.get:hover { color: var(--signal-ink); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.tile { margin: 0; }
.tile a.thumb { display: block; background: var(--night); border-radius: var(--radius); overflow: hidden; }
.tile a.thumb.is-light { background: repeating-conic-gradient(#e2e5e7 0% 25%, #f7f8f8 0% 50%) 50% / 16px 16px; }
.tile a.thumb.is-dark-check { background: repeating-conic-gradient(#1a2033 0% 25%, #111726 0% 50%) 50% / 16px 16px; }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; image-rendering: pixelated; }
.tile img.smooth { image-rendering: auto; }
.tile figcaption { display: flex; justify-content: space-between; gap: 8px; padding-top: 8px; font-family: var(--mono); font-size: 12px; color: var(--graphite); }
.tile figcaption a { color: var(--ink); font-weight: 500; text-decoration: none; border-bottom: 1.5px solid var(--signal); white-space: nowrap; }

.pk-video { aspect-ratio: 16/9; background: #000; border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.pk-video video { width: 100%; height: 100%; image-rendering: pixelated; }

.quote-note { font-family: var(--mono); font-size: 13px; color: var(--graphite); }

/* ---- 404 ----------------------------------------------------------------------------- */

.notfound { min-height: 62vh; display: flex; align-items: center; }
.notfound .num { font-family: var(--mono); color: var(--signal); }

/* ---- utilities ----------------------------------------------------------------------- */

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 1em; }
.muted-inline { opacity: .8; text-transform: none; letter-spacing: 0; }
