/* Axiom of Stars: the night sky of the game, starlight type, and one color per
   constellation, used only where that constellation is on screen. */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --night: #050813;
  --deep: #0a1122;
  --starlight: #eef3ff;
  --haze: #9aa6c2;
  --line: #1c2742;
  --world: #32d3e0;
  --display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --text: "Inter", "Segoe UI", system-ui, sans-serif;
  --gutter: clamp(16px, 5vw, 64px);
  --measure: 34em;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--starlight);
  font: 400 1.0625rem/1.65 var(--text);
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }

:focus-visible {
  outline: 2px solid var(--starlight);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--starlight);
  color: var(--night);
  border-radius: 6px;
  text-decoration: none;
}
.skip-link:focus { top: 16px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

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

/* The display voice: the game's lockup, uppercase and tracked. */
.lockup, h1, h2 {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
}
h2, .tagline, .secret p, .closing p { text-wrap: balance; }
h2 {
  font-size: clamp(1.75rem, 3.8vw, 3.25rem);
  line-height: 1.04;
  margin-bottom: 0.6em;
}
h3 {
  font: 500 1rem/1.4 var(--text);
  margin: 0 0 0.3em;
}

/* Header */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 3;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 22px;
  padding-bottom: 22px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 500 0.95rem/1 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { text-decoration: none; color: var(--haze); font-size: 0.95rem; }
.site-nav a:hover { color: var(--starlight); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 24px;
  border-radius: 6px;
  font: 500 1rem/1 var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}
.button.primary { background: var(--starlight); color: var(--night); }
.button.primary:hover { background: #ffffff; box-shadow: 0 0 32px rgba(238, 243, 255, 0.35); }
.button.quiet { border-color: rgba(238, 243, 255, 0.35); color: var(--starlight); }
.button.quiet:hover { border-color: var(--starlight); }
.site-nav .button { min-height: 40px; padding: 0 18px; color: var(--night); }

/* Hero: the whole lit sky behind the lockup. */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}
.hero-media video, .hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Quiet the sky so the lockup reads first, as on the store capsules. */
  filter: saturate(0.55) brightness(0.62);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 58% 48% at 50% 50%, rgba(5, 8, 19, 0.78), rgba(5, 8, 19, 0.35) 55%, rgba(5, 8, 19, 0) 80%),
    linear-gradient(to bottom, rgba(5, 8, 19, 0.35), rgba(5, 8, 19, 0) 25%, rgba(5, 8, 19, 0) 70%, var(--night));
}
.hero-content { padding: 120px var(--gutter) 96px; }
.lockup {
  font-size: clamp(3.4rem, 12.5vw, 11.5rem);
  line-height: 0.92;
  letter-spacing: 0.08em;
  margin-right: -0.08em; /* the tracking after the last letter */
  text-shadow: 0 0 60px rgba(5, 8, 19, 0.6);
}
.lockup span { display: block; }
.tagline {
  margin: 1.6rem auto 0;
  max-width: 30em;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--starlight);
}
.hero .actions { justify-content: center; }
.availability { margin-top: 1.1rem; color: var(--haze); font-size: 0.95rem; }

/* The one orchestrated moment: the lockup settles into its tracking. */
@media (prefers-reduced-motion: no-preference) {
  .lockup span {
    animation: settle 1.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .lockup span + span { animation-delay: 0.25s; }
  .tagline, .hero .actions, .availability {
    animation: appear 1.2s ease-out 1.1s both;
  }
}
@keyframes settle {
  from { opacity: 0; letter-spacing: 0.3em; filter: blur(6px); }
  to { opacity: 1; letter-spacing: 0.08em; filter: blur(0); }
}
@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Trailer */
.trailer { padding: 24px 0 120px; }
.trailer-frame {
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 30px 120px rgba(50, 120, 255, 0.12);
}
.trailer-frame { position: relative; }
.trailer-frame video { width: 100%; aspect-ratio: 16 / 9; }
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(238, 243, 255, 0.92);
  color: var(--night);
  cursor: pointer;
  box-shadow: 0 0 0 10px rgba(238, 243, 255, 0.12), 0 0 48px rgba(238, 243, 255, 0.35);
}
.play:hover { background: #ffffff; box-shadow: 0 0 0 14px rgba(238, 243, 255, 0.16), 0 0 64px rgba(238, 243, 255, 0.5); }
.play[hidden] { display: none; }

/* Chapters: one clip and its words, lit by that constellation's color. */
.chapter { padding: 64px 0; }
.chapter-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.chapter.flip .chapter-media { order: 2; }
.chapter-media {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--world) 45%, transparent);
  box-shadow: 0 0 90px color-mix(in srgb, var(--world) 22%, transparent);
  background: #000;
}
.chapter-media video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.chapter-copy p { color: var(--haze); max-width: var(--measure); }
.chapter-copy p strong { color: var(--starlight); font-weight: 500; }

/* The thirteen constellations, each with its own star color. */
.constellations {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
  gap: 10px 18px;
}
.constellations li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.98rem;
  color: var(--starlight);
}
.constellations li::before {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c), 0 0 2px #fff inset;
}

/* The secret: the half dark sky. */
.secret {
  position: relative;
  margin: 72px 0;
  padding: clamp(120px, 18vw, 220px) 0;
  text-align: center;
  isolation: isolate;
  overflow: hidden;
}
.secret img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  filter: saturate(0.55) brightness(0.6);
}
.secret::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(5, 8, 19, 0.7), rgba(5, 8, 19, 0) 75%),
    linear-gradient(to bottom, var(--night), rgba(5, 8, 19, 0.35) 30%, rgba(5, 8, 19, 0.35) 70%, var(--night));
}
.secret p { max-width: 30em; margin: 0 auto; color: var(--starlight); font-size: 1.15rem; }

/* What is in the box. */
.facts { padding: 96px 0 40px; }
.facts h2 { font-size: clamp(2rem, 5.2vw, 4.5rem); max-width: 12em; }
.feature-list {
  list-style: none;
  margin: 2.4rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 56px;
  border-top: 1px solid var(--line);
}
.feature-list li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  color: var(--haze);
}
.feature-list li strong { color: var(--starlight); font-weight: 500; }

/* Closing */
.closing { padding: 120px 0 140px; text-align: center; }
.closing p { color: var(--haze); max-width: 30em; margin: 0 auto; }
.closing .actions { justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--haze); font-size: 0.95rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.footer-nav a { color: var(--haze); text-decoration: none; }
.footer-nav a:hover { color: var(--starlight); text-decoration: underline; }

/* Privacy policy */
.policy-hero { padding: 150px 0 40px; }
.policy-hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1; }
.policy-hero .lede { margin-top: 1.4rem; max-width: 36em; color: var(--starlight); font-size: 1.15rem; }
.policy {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 56px;
  padding-bottom: 120px;
}
.policy-contents { position: sticky; top: 32px; align-self: start; font-size: 0.95rem; }
.policy-contents p { color: var(--haze); margin-bottom: 0.6rem; }
.policy-contents a { display: block; padding: 4px 0; color: var(--haze); text-decoration: none; }
.policy-contents a:hover { color: var(--starlight); }
.policy-copy { max-width: 42em; }
.policy-copy section { padding: 8px 0 22px; border-top: 1px solid var(--line); }
.policy-copy section:first-child { border-top: 0; }
.policy-copy h2 { font-size: 1.35rem; letter-spacing: 0.05em; margin: 22px 0 12px; }
.policy-copy p, .policy-copy li { color: var(--haze); }
.policy-copy strong { color: var(--starlight); font-weight: 500; }
.policy-copy code {
  font: 0.92em/1.4 Consolas, "Cascadia Mono", monospace;
  color: var(--starlight);
  overflow-wrap: anywhere;
}
.policy-copy ul { padding-left: 1.2em; }
.policy-copy li { margin-bottom: 0.4em; }
.policy-copy a { color: var(--starlight); }

@media (max-width: 860px) {
  .chapter-inner { grid-template-columns: 1fr; }
  .chapter.flip .chapter-media { order: 0; }
  .chapter { padding: 40px 0; }
  .feature-list { grid-template-columns: 1fr; }
  .policy { grid-template-columns: 1fr; gap: 24px; }
  .policy-contents { position: static; }
}
@media (max-width: 560px) {
  .site-nav a:not(.button):not(.back) { display: none; }
  .brand span { display: none; }
  .hero-content { padding-top: 96px; }
  .actions .button { flex: 1 1 100%; justify-content: center; }
  .play { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}
