/* Altered Realms / Garrison Zero — one stylesheet, no external requests. Fonts: SIL OFL (see /fonts/). */
@font-face { font-family: "Rajdhani"; src: url("/fonts/rajdhani-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("/fonts/rajdhani-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Exo 2"; src: url("/fonts/exo2-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Share Tech Mono"; src: url("/fonts/sharetechmono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --ink: #070d13;
  --ink-2: #0c151d;
  --ink-3: #132029;
  --line: rgba(64, 190, 222, 0.26);
  --line-strong: #40bede;
  --text: #e6ecef;
  --muted: #a3b4be;
  --readout: #c8e8f0;
  --parchment: #f3e9d2;
  --gold: #ffcd5a;
  --amber: #f2c27a;
  --hazard: #e8b923;
  --sodium: #ff9a3c;
  --holo: #4fd8f0;
  --red: #ff5a46;
  --font-display: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --font-body: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Share Tech Mono", ui-monospace, Consolas, monospace;
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --cut: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--holo); text-underline-offset: 3px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.05; letter-spacing: 0.02em; margin: 0 0 0.5em; text-transform: uppercase; }
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.35rem; letter-spacing: 0.04em; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--gold); color: var(--ink); padding: 8px 14px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.wrap { width: min(100%, var(--wrap)); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 13, 19, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand-logo { display: block; height: 44px; width: auto; }
@media (max-width: 420px) { .brand-logo { height: 36px; } }
.site-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); }
.site-nav a {
  color: var(--muted); text-decoration: none;
  font: 600 0.98rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 8px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--gold); }
.site-nav .nav-cta { color: var(--ink); background: var(--gold); padding: 9px 14px; border: 0; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); }
.site-nav .nav-cta:hover { background: var(--parchment); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); width: 44px; height: 40px; cursor: pointer; position: relative; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { position: absolute; left: 11px; width: 20px; height: 2px; background: var(--text); content: ""; transition: transform .2s; }
.nav-toggle-bar { top: 19px; }
.nav-toggle-bar::before { left: 0; top: -6px; }
.nav-toggle-bar::after { left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { margin-top: 12px; text-align: center; }
}

/* ---------------------------------------------------------------- building blocks */
.kicker {
  display: inline-block; margin: 0 0 14px;
  font: 400 0.9rem/1.3 var(--font-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--holo);
}
.kicker::before { content: "// "; color: var(--line-strong); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--readout); max-width: 62ch; }
.muted { color: var(--muted); }
.hazard {
  height: 8px; border: 0; margin: 0;
  background: repeating-linear-gradient(-45deg, var(--hazard) 0 14px, #14110a 14px 28px);
  opacity: 0.9;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  font: 700 1.02rem/1 var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: background-color .15s, color .15s;
}
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--parchment); color: var(--ink); }
.btn-primary.is-static { cursor: default; }
.btn-primary.is-static:hover { background: var(--gold); }
.btn-ghost { color: var(--readout); background: rgba(64, 190, 222, 0.08); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: rgba(64, 190, 222, 0.18); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.panel {
  position: relative;
  background: linear-gradient(180deg, var(--ink-2), rgba(12, 21, 29, 0.85));
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  padding: 26px;
}
.panel::before {
  content: ""; position: absolute; left: -1px; top: -1px; width: 26px; height: 2px; background: var(--holo);
}

.section { padding: clamp(64px, 9vw, 112px) 0; position: relative; }
.section-alt { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 44px; }
.grid-bg {
  background-image:
    linear-gradient(rgba(64, 190, 222, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 190, 222, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ---------------------------------------------------------------- studio home */
.studio-hero { padding: clamp(80px, 13vw, 168px) 0 clamp(64px, 9vw, 112px); position: relative; overflow: hidden; }
.studio-hero::after {
  content: ""; position: absolute; inset: auto -20% -60% 30%; height: 120%;
  background: radial-gradient(closest-side, rgba(242, 194, 122, 0.16), transparent 70%);
  pointer-events: none;
}
.studio-hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 48px; align-items: center; }
.studio-hero h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); max-width: 13ch; }
.studio-hero h1 em { font-style: normal; color: var(--amber); }
.studio-mark { width: clamp(130px, 17vw, 222px); height: auto; filter: drop-shadow(0 0 48px rgba(233, 217, 176, 0.14)); }
@media (max-width: 780px) { .studio-hero-inner { grid-template-columns: 1fr; } .studio-mark { order: -1; width: 104px; } }

.game-card {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  background: var(--ink-2); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 22px 100%, 0 calc(100% - 22px));
  text-decoration: none; color: inherit;
}
.game-card-media { position: relative; overflow: hidden; min-height: 320px; }
.game-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.game-card:hover .game-card-media img { transform: scale(1.03); }
.game-card-body { padding: clamp(24px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; }
.game-card-logo { width: min(100%, 360px); margin-bottom: 18px; }
.game-card .status { font: 400 0.9rem/1.4 var(--font-mono); color: var(--gold); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 14px; }
@media (max-width: 860px) { .game-card { grid-template-columns: 1fr; } .game-card-media { min-height: 220px; aspect-ratio: 16 / 9; } }

.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.values h3 { color: var(--parchment); }
.values p { color: var(--muted); margin: 0; }

/* ---------------------------------------------------------------- game page */
.game-hero {
  position: relative; min-height: min(92vh, 900px); display: flex; align-items: flex-end;
  padding: 140px 0 clamp(48px, 8vw, 96px); overflow: hidden; isolation: isolate;
}
.game-hero-media { position: absolute; inset: 0; z-index: -2; }
.game-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.game-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 13, 19, 0.92) 0%, rgba(7, 13, 19, 0.65) 38%, rgba(7, 13, 19, 0.05) 70%),
    linear-gradient(0deg, var(--ink) 0%, rgba(7, 13, 19, 0) 34%);
}
@media (max-width: 780px) {
  .game-hero { min-height: 0; padding-top: 120px; }
  .game-hero::before { background: linear-gradient(0deg, var(--ink) 8%, rgba(7, 13, 19, 0.78) 55%, rgba(7, 13, 19, 0.45) 100%); }
}
.game-hero-logo { width: min(100%, 620px); margin: 6px 0 18px; filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.6)); }
.game-hero .tagline { font: 600 clamp(1.4rem, 2.6vw, 2rem)/1.2 var(--font-display); color: var(--amber); letter-spacing: 0.04em; margin-bottom: 14px; }
.game-hero .lede { color: var(--text); text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8); max-width: 54ch; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 26px; font: 400 0.92rem/1.4 var(--font-mono); color: var(--readout); letter-spacing: 0.08em; text-transform: uppercase; }
.hero-facts span::before { content: "▸ "; color: var(--gold); }

.pitch { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.pitch figure { margin: 0; }
.framed { border: 1px solid var(--line); clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px)); }
@media (max-width: 860px) { .pitch { grid-template-columns: 1fr; } }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.feature h3 { color: var(--parchment); margin-bottom: 10px; }
.feature p { color: var(--muted); margin: 0; }
.feature .num { font: 400 0.85rem/1 var(--font-mono); color: var(--gold); letter-spacing: 0.12em; display: block; margin-bottom: 14px; }

.trailer { margin-bottom: 18px; background: var(--ink-3); }
.trailer video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.gallery a { display: block; position: relative; overflow: hidden; border: 1px solid var(--line); background: var(--ink-3); }
.gallery a:first-child { grid-column: span 2; grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; transition: transform .5s ease, opacity .2s; }
.gallery a:hover img { transform: scale(1.04); }
@media (max-width: 860px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery a:first-child { grid-column: span 2; grid-row: auto; } }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } .gallery a:first-child { grid-column: auto; } }

.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 14px; }
.unit.unit-wide { grid-column: 1 / -1; }
.unit { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px; }
.unit img { width: 64px; height: 64px; image-rendering: auto; background: rgba(64, 190, 222, 0.06); border: 1px solid var(--line); padding: 4px; }
.unit h3 { font-size: 1.12rem; margin: 2px 0 6px; color: var(--parchment); }
.unit p { margin: 0; font-size: 0.95rem; color: var(--muted); line-height: 1.5; }
.unit .tag { font: 400 0.75rem/1 var(--font-mono); color: var(--holo); letter-spacing: 0.1em; text-transform: uppercase; }
.roster-kethra .unit .tag { color: var(--sodium); }
.roster-kethra .unit img { background: rgba(255, 154, 60, 0.06); border-color: rgba(255, 154, 60, 0.3); }

.crew { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.crew-card { padding: 0; }
.crew-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-bottom: 1px solid var(--line); }
.crew-card .crew-body { padding: 20px 22px 24px; }
.crew-card .role { font: 400 0.8rem/1.3 var(--font-mono); color: var(--holo); letter-spacing: 0.1em; text-transform: uppercase; }
.crew-card h3 { margin: 6px 0 12px; color: var(--parchment); }
.crew-card blockquote { margin: 0; color: var(--amber); font-style: italic; font-size: 0.98rem; }
@media (max-width: 860px) { .crew { grid-template-columns: 1fr; max-width: 520px; } }

.specs { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
.specs th, .specs td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs th { font: 600 0.95rem/1.3 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); width: 32%; }
.note { font-size: 0.92rem; color: var(--muted); margin-top: 16px; }

.cta-band { text-align: center; }
.cta-band .btn-row { justify-content: center; }

/* ---------------------------------------------------------------- press + prose */
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 28px; margin: 0; }
.facts dt { font: 600 0.95rem/1.5 var(--font-display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 12px; } }
.press-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .press-grid { grid-template-columns: 1fr; } }
.logo-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.logo-tile { display: flex; align-items: center; justify-content: center; min-height: 140px; padding: 24px; border: 1px solid var(--line); }
.logo-tile.on-light { background: #e9e4d8; }
.logo-tile.on-dark { background: var(--ink-3); }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.6rem; margin-top: 2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.page-head { padding: clamp(72px, 10vw, 128px) 0 clamp(32px, 5vw, 56px); }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 48px; color: var(--muted); font-size: 0.95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--gold); }
.footer-division { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-division p { margin: 0; font-size: 0.88rem; letter-spacing: 0.02em; }
.footer-division a { color: var(--text); text-underline-offset: 3px; }
.footer-division a:hover { color: var(--gold); }

/* ---------------------------------------------------------------- lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; }
.lightbox::backdrop { background: rgba(3, 6, 9, 0.92); }
.lightbox img { max-width: 96vw; max-height: 88vh; width: auto; border: 1px solid var(--line); }
.lightbox-close {
  position: fixed; top: 16px; right: 16px; width: 48px; height: 48px;
  background: var(--ink-2); color: var(--text); border: 1px solid var(--line-strong); font-size: 1.6rem; cursor: pointer;
}
.lightbox-caption { color: var(--muted); font: 400 0.85rem/1.4 var(--font-mono); text-align: center; margin-top: 10px; letter-spacing: 0.06em; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
