/* synarchygame.com. Palette and type follow the game (Docs/Theme/_global.md §3). */

@font-face {
  font-family: "Synarchy Text";
  src: url("fonts/synarchy-text.woff2?v=f6fdb523") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Synarchy Display";
  src: url("fonts/synarchy-display.woff2?v=fff97128") format("woff2");
  font-weight: 300;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --base: #04040b;
  --surface: #0b0b18;
  --raised: #101020;
  --hover: #161628;
  --border: #1a1a32;
  --border-mid: #252540;
  --border-strong: #343458;
  --text: #d6d6ea;
  --text-2: #80809c;
  --text-muted: #484860;
  --gold: #c8a040;
  --gold-light: #e8c060;
  --gold-dim: #7a6028;
  --synarchy: #739eff;
  --confed: #ffb859;
  --ungoverned: #999ead;
  --font-text: "Synarchy Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Synarchy Display", "Synarchy Text", "Segoe UI", system-ui, sans-serif;
  --wrap: 1120px;
  --gutter: 16px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
@media (min-width: 720px) { :root { --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--base);
  color: var(--text);
  font: 400 17px/1.65 var(--font-text);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--gold-light); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #f4d27c; }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
h1, h2, h3 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }

.wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--gold); color: var(--base); padding: 8px 14px; }
.skip:focus { left: 8px; }

/* ---- type ---- */
.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--text-2);
}
h2 {
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: clamp(26px, 4.2vw, 40px);
  line-height: 1.2;
  margin-bottom: 36px;
}
h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 18px;
  background: var(--gold);
  border-radius: 1px;
}
h3 {
  font-family: var(--font-display);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: 17px;
  color: var(--gold-light);
  margin-bottom: 10px;
}
.prose { color: #c4c4da; }
.prose p:last-child { margin-bottom: 0; }
.prose-narrow { max-width: 760px; }
.section-intro { max-width: 760px; color: #c4c4da; margin-bottom: 28px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 3px;
  font: 500 15px/1 var(--font-text);
  letter-spacing: .08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-gold { background: var(--gold); color: #120e04; }
.btn-gold:hover { background: var(--gold-light); color: #120e04; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: rgba(11, 11, 24, .55); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.btn.is-pending { cursor: default; opacity: .72; }
.btn-gold.is-pending { background: transparent; border-color: var(--gold-dim); color: var(--gold-light); }
.btn.is-pending:hover { border-color: var(--border-strong); color: var(--text); }
.btn-gold.is-pending:hover { border-color: var(--gold-dim); color: var(--gold-light); }
.soon {
  font-size: 10px;
  letter-spacing: .16em;
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: .8;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions-center { justify-content: center; }

/* ---- top bar ---- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(4, 4, 11, .82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand img { width: 150px; }
.nav { display: none; gap: 26px; margin-left: 12px; }
.nav a { color: var(--text-2); text-decoration: none; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; transition: color .2s var(--ease); }
.nav a:hover { color: var(--text); }
.topbar-actions { display: flex; gap: 8px; margin-left: auto; }
@media (min-width: 900px) { .nav { display: flex; } }
@media (max-width: 420px) {
  .brand img { width: 118px; }
  .topbar-actions .btn-ghost { display: none; }
}

/* ---- hero ---- */
.hero {
  position: relative;
  min-height: min(92vh, 900px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 30%;
  z-index: -2;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(4, 4, 11, .92) 0%, rgba(4, 4, 11, .7) 38%, rgba(4, 4, 11, 0) 70%),
    linear-gradient(0deg, var(--base) 0%, rgba(4, 4, 11, 0) 40%);
}
.hero-inner { width: 100%; padding-top: 96px; padding-bottom: 72px; }
.hero-logo { margin: 6px 0 28px; }
.hero-logo img { width: min(520px, 100%); }
.hero-lead {
  font-size: clamp(19px, 5.1vw, 30px);
  line-height: 1.35;
  font-weight: 300;
  margin-bottom: 18px;
  max-width: 640px;
}
.hero-sub { max-width: 560px; color: #b6b6cc; margin-bottom: 32px; }
.hero-note { margin: 22px 0 0; color: var(--text-2); font-size: 14px; letter-spacing: .2em; text-transform: uppercase; }
/* Phones: the picture sits above the copy instead of behind it. */
@media (max-width: 719px) {
  .hero { display: block; min-height: 0; }
  .hero-bg { position: relative; height: auto; aspect-ratio: 4 / 3; object-position: 62% 30%; }
  .hero::before { bottom: auto; aspect-ratio: 4 / 3; background: linear-gradient(0deg, var(--base) 0%, rgba(4, 4, 11, 0) 45%); }
  .hero-inner { margin-top: -56px; padding-top: 0; padding-bottom: 32px; }
  .hero .actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* ---- sections ---- */
.section { padding: 96px 0 24px; }
@media (max-width: 719px) { .section { padding-top: 64px; } }

.video-frame {
  position: relative;
  border: 1px solid var(--border-mid);
  background: #000;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.video-frame video { width: 100%; aspect-ratio: 16 / 9; }
.trailer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; margin-top: 20px; }
.trailer-meta p { flex: 1 1 420px; color: var(--text-2); margin: 0; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }

.about { display: grid; gap: 36px; align-items: start; }
@media (min-width: 900px) { .about { grid-template-columns: 1.5fr 1fr; gap: 56px; } }
.form-card {
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  background: linear-gradient(180deg, var(--raised), var(--surface));
  padding: 26px 26px 22px;
}
.form-kicker { font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--text-2); margin-bottom: 16px; }
.form-body { font-size: 21px; line-height: 1.4; color: var(--text); margin-bottom: 18px; }
.form-note { font-size: 15px; color: var(--text-2); margin: 0; }

.features {
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
}
.features li { background: var(--base); padding: 26px 24px 22px; }
.features p { margin: 0; color: #b6b6cc; font-size: 16px; }

/* ---- gallery ---- */
.stage { position: relative; margin: 0; background: #000; border: 1px solid var(--border-mid); }
.stage-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.stage-open img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: opacity .35s var(--ease); }
.stage-open img.is-loading { opacity: .25; }
.stage figcaption {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--surface);
  border-top: 1px solid var(--border-mid);
}
#stage-caption { margin: 0; color: #c4c4da; font-size: 15px; }
#stage-count { color: var(--text-muted); font-size: 13px; letter-spacing: .14em; white-space: nowrap; font-variant-numeric: tabular-nums; }

.arrow {
  position: absolute;
  top: calc(50% - 30px);
  width: 48px;
  height: 60px;
  border: 1px solid var(--border-strong);
  background: rgba(4, 4, 11, .62);
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.stage .arrow { top: calc(50% - 56px); }
.arrow:hover { background: rgba(16, 16, 32, .9); border-color: var(--gold); }
.arrow-prev { left: 12px; }
.arrow-next { right: 12px; }
.arrow span, .lightbox-close span { position: absolute; inset: 0; }
.arrow span::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: solid var(--text);
  border-width: 2px 2px 0 0;
  transform: translate(-30%, -50%) rotate(-135deg);
}
.arrow-next span::before { transform: translate(-70%, -50%) rotate(45deg); }
@media (max-width: 600px) { .stage .arrow { display: none; } }

.thumbs {
  list-style: none;
  margin: 12px 0 0;
  padding: 0 0 8px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, calc((100% - 5 * 10px) / 6));
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--border-strong) transparent;
}
.thumb {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--border-mid);
  background: #000;
  cursor: pointer;
  scroll-snap-align: start;
  opacity: .55;
  transition: opacity .25s var(--ease), border-color .25s var(--ease);
}
.thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.thumb:hover { opacity: .85; }
.thumb[aria-current="true"] { opacity: 1; border-color: var(--gold); }

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(2, 2, 6, .96);
  color: var(--text);
  opacity: 0;
  transition: opacity .3s var(--ease), display .3s allow-discrete, overlay .3s allow-discrete;
}
.lightbox[open] { opacity: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
@starting-style { .lightbox[open] { opacity: 0; } }
.lightbox::backdrop { background: transparent; }
#lightbox-img { max-width: calc(100vw - 32px); max-height: calc(100vh - 110px); width: auto; height: auto; object-fit: contain; }
#lightbox-caption { max-width: 900px; margin: 16px var(--gutter) 0; text-align: center; color: #c4c4da; font-size: 15px; }
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  background: rgba(4, 4, 11, .62);
  cursor: pointer;
}
.lightbox-close span::before, .lightbox-close span::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 2px;
  background: var(--text);
  transform: translate(-50%, -50%) rotate(45deg);
}
.lightbox-close span::after { transform: translate(-50%, -50%) rotate(-45deg); }
.lightbox-close:hover { border-color: var(--gold); }

/* ---- setting ---- */
.factions {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}
.faction { padding: 22px 22px 18px; border: 1px solid var(--border-mid); border-top: 3px solid var(--c); background: var(--surface); }
.faction h3 { color: var(--c); }
.faction p { margin: 0; color: #b6b6cc; font-size: 16px; }
.faction-synarchy { --c: var(--synarchy); }
.faction-confed { --c: var(--confed); }
.faction-ungoverned { --c: var(--ungoverned); }

/* ---- roadmap ---- */
.roadmap {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 40px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  counter-reset: item;
}
.roadmap li { position: relative; padding: 18px 0 18px 54px; border-top: 1px solid var(--border-mid); counter-increment: item; }
.roadmap li::before {
  content: counter(item, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 19px;
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .12em;
  color: var(--gold-dim);
}
.roadmap h3 { color: var(--text); margin-bottom: 4px; }
.roadmap p { margin: 0; color: var(--text-2); font-size: 16px; }

/* ---- community + footer ---- */
.community { padding-bottom: 96px; }
.community-inner {
  text-align: center;
  border: 1px solid var(--border-mid);
  background: radial-gradient(ellipse at 50% 0%, rgba(115, 158, 255, .1), transparent 65%), var(--surface);
  padding-top: 56px;
  padding-bottom: 56px;
}
.community h2::after { margin-left: auto; margin-right: auto; }
.community .section-intro { margin-left: auto; margin-right: auto; }

.footer { border-top: 1px solid var(--border); padding: 40px 0 48px; color: var(--text-muted); font-size: 14px; }
.footer-inner p { margin: 0 0 8px; max-width: 820px; }
.footer a { color: var(--text-2); }
.footer-logo { width: 120px; opacity: .5; margin-bottom: 18px; }
.credits { font-size: 13px; }
