@font-face {
  font-family: 'Chakra Petch';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/chakra-petch-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Chakra Petch';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/chakra-petch-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/barlow-semi-condensed-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Barlow Semi Condensed';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2');
}

:root {
  --night: #0a0f13;
  --night-2: #10171d;
  --ice: #eef3f8;
  --frost: #9aa8b5;
  --solith: #57d8e6;
  --solith-deep: #1a7f8c;
  --amber: #e8a33d;
  --amber-hot: #ffbe5c;
  --aurora: #63e39a;
  --edge: rgba(238, 243, 248, 0.12);
  --f-display: 'Chakra Petch', 'Segoe UI', sans-serif;
  --f-body: 'Barlow Semi Condensed', 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 5vw, 72px);
  --measure: 34rem;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ice);
  font: 400 clamp(18px, 1.25vw + 12px, 22px) / 1.55 var(--f-body);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 700;
  margin: 0;
  text-wrap: balance;
}

h2 {
  font-size: clamp(36px, 5.4vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(22px, 1.6vw + 12px, 30px);
  line-height: 1.15;
}

p {
  margin: 0;
  max-width: var(--measure);
  text-wrap: pretty;
}

.muted {
  color: var(--frost);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--ice);
  color: var(--night);
  padding: 8px 14px;
}

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

/* wordmark: the O is the Solith crystal */
.wm {
  font-family: var(--f-display);
  font-weight: 700;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.wm .gem {
  display: inline-block;
  width: 0.8em;
  height: 0.8em;
  vertical-align: -0.04em;
  margin-right: 0.12em;
}

/* buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1206;
  font: 600 19px/1 var(--f-display);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}
.btn:hover {
  background: var(--amber-hot);
}
.btn:active {
  transform: scale(0.98);
}
.btn-small {
  min-height: 36px;
  padding: 0 16px;
  font-size: 15px;
}
.btn-large {
  min-height: 60px;
  padding: 0 40px;
  font-size: 22px;
}

/* top bar: appears once the hero is scrolled past */
.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  padding: 0 var(--gutter);
  background: rgba(10, 15, 19, 0.72);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--edge);
  transform: translateY(-100%);
  transition: transform 0.35s ease;
}
.topbar.on {
  transform: none;
}
.topbar-mark {
  margin-right: auto;
  text-decoration: none;
  font-size: 17px;
}
.topbar nav {
  display: flex;
  gap: 22px;
  font-size: 16px;
}
.topbar nav a {
  color: var(--frost);
  text-decoration: none;
}
.topbar nav a:hover {
  color: var(--ice);
}

/* hero */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
  display: grid;
  align-items: end;
}
.hero-layers,
.hero-layers img,
.hero-snow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-layers img {
  object-fit: cover;
  object-position: 62% 50%;
  will-change: transform;
}
.hero-bg {
  transform: scale(1.08);
}
.hero-layers::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 15, 19, 0.15) 0%, rgba(10, 15, 19, 0) 35%, rgba(10, 15, 19, 0.55) 72%, var(--night) 100%),
    radial-gradient(ellipse at 30% 70%, rgba(10, 15, 19, 0.55), transparent 60%);
}
.hero-snow {
  background-image:
    radial-gradient(1.5px 1.5px at 12% 20%, rgba(255, 255, 255, 0.8), transparent),
    radial-gradient(1px 1px at 38% 62%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(2px 2px at 71% 33%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 86% 78%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1.5px 1.5px at 55% 12%, rgba(255, 255, 255, 0.7), transparent);
  background-size: 340px 340px;
  animation: snow 14s linear infinite;
  opacity: 0.7;
}
@keyframes snow {
  to {
    background-position: -120px 680px;
  }
}
.hero-copy {
  position: relative;
  padding: 0 var(--gutter) clamp(40px, 9vh, 96px);
  max-width: 1100px;
}
.wm-hero {
  display: inline-block;
  font-size: clamp(42px, 8.4vw, 132px);
  line-height: 1;
  filter: drop-shadow(0 0 30px rgba(88, 166, 255, 0.35)) drop-shadow(0 4px 0 rgba(0, 0, 0, 0.7));
}
.hero-lead {
  margin-top: clamp(16px, 2.4vh, 28px);
  max-width: 30rem;
  font-size: clamp(20px, 1.4vw + 12px, 27px);
  line-height: 1.4;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
  margin-top: 28px;
}
.link-down {
  font-family: var(--f-display);
  font-weight: 600;
  text-decoration: none;
  color: var(--ice);
  border-bottom: 1px solid rgba(238, 243, 248, 0.4);
  padding-bottom: 2px;
}
.hero-note {
  margin-top: 18px;
  font-size: 16px;
  color: var(--frost);
}

/* story: the crystal grows while the text arrives (progress --p from landing.js) */
.story {
  --p: 0;
  position: relative;
  height: 200vh;
}
.story-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--gutter);
  padding: 0 var(--gutter);
  overflow: hidden;
}
.story-gem {
  justify-self: center;
  width: min(42vw, 520px);
  height: auto;
  transform: scale(calc(0.5 + var(--p) * 0.5)) rotate(calc(var(--p) * 30deg));
  filter: drop-shadow(0 0 calc(20px + var(--p) * 90px) rgba(87, 216, 230, calc(0.15 + var(--p) * 0.4)));
}
.story-copy {
  display: grid;
  gap: 26px;
}
.story-copy > * {
  opacity: clamp(0, calc((var(--p) - var(--at, 0)) * 6), 1);
  transform: translateY(calc((1 - clamp(0, calc((var(--p) - var(--at, 0)) * 6), 1)) * 24px));
}
.story-copy h2 {
  --at: 0;
}
.story-copy p:nth-of-type(1) {
  --at: 0.2;
}

/* arsenal: big game shot, then a convoy of units drifting past */
.arsenal {
  padding: clamp(80px, 14vh, 160px) 0;
}
.arsenal-intro {
  display: grid;
  gap: 22px;
  padding: 0 var(--gutter);
  margin-bottom: clamp(40px, 7vh, 80px);
}
.arsenal-shot {
  margin: 0 auto;
  width: min(1100px, calc(100% - 2 * var(--gutter)));
}
.arsenal-shot img {
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--edge);
}
.convoy {
  margin-top: clamp(48px, 8vh, 96px);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.convoy-track {
  display: flex;
  align-items: flex-end;
  gap: clamp(36px, 5vw, 72px);
  width: max-content;
  margin: 0;
  padding: 0 0 8px;
  list-style: none;
  animation: convoy 60s linear infinite;
}
.convoy:hover .convoy-track {
  animation-play-state: paused;
}
/* the units face right, so the convoy drives right */
@keyframes convoy {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}
.convoy li {
  display: grid;
  justify-items: center;
  gap: 4px;
}
.convoy img {
  height: auto;
  max-height: 120px;
  width: auto;
  margin-bottom: 14px;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.6));
}
.unit-name {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 19px;
}
.unit-kind {
  font-size: 15px;
  color: var(--frost);
}

/* factions */
.factions {
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  background: linear-gradient(180deg, var(--night), var(--night-2) 30%, var(--night));
}
.factions > h2 {
  margin-bottom: clamp(36px, 6vh, 72px);
}
.faction-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: clamp(16px, 2vw, 28px);
}
.faction {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  min-height: 640px;
  display: grid;
  align-items: end;
  box-shadow: 0 0 0 1px var(--edge);
}
.faction img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s ease;
}
.faction:hover img {
  transform: scale(1.04);
}
.faction::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 19, 0) 25%, rgba(10, 15, 19, 0.92) 78%);
}
.faction-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  padding: clamp(24px, 3vw, 44px);
}
.faction-copy h3 {
  font-size: clamp(30px, 2.6vw + 12px, 48px);
}
.faction-steel h3 {
  color: #9fc4ff;
}
.faction-aurora h3 {
  color: var(--aurora);
}
.faction-south h3 {
  color: #ffb45c;
}
.faction-claim {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(19px, 0.8vw + 13px, 24px);
  line-height: 1.3;
}
.faction-copy p:not(.faction-claim) {
  color: var(--frost);
}

/* maps */
.maps {
  position: relative;
  padding: 0 0 clamp(80px, 14vh, 160px);
}
.maps-shot {
  margin: 0;
  height: min(78vh, 860px);
  overflow: hidden;
}
.maps-shot img {
  width: 100%;
  height: 112%;
  object-fit: cover;
  will-change: transform;
}
.maps-copy {
  position: relative;
  margin: -18vh var(--gutter) 0;
  max-width: 46rem;
  display: grid;
  gap: 20px;
  padding: clamp(28px, 4vw, 52px);
  border-radius: 26px;
  background: rgba(10, 15, 19, 0.78);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1px var(--edge);
}

/* devices */
.devices {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(36px, 6vw, 96px);
  padding: clamp(60px, 10vh, 120px) var(--gutter);
}
.devices-copy {
  display: grid;
  gap: 22px;
}
.devices-copy p {
  color: var(--frost);
}
.phone {
  justify-self: center;
  width: min(100%, 720px);
  padding: 14px;
  border-radius: 46px;
  background: linear-gradient(145deg, #2a3138, #0e1317);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 90px rgba(0, 0, 0, 0.6);
  transform: rotate(-4deg);
}
.phone img {
  border-radius: 34px;
}

/* friends */
.friends {
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  border-top: 1px solid var(--edge);
}
.friends > h2 {
  margin-bottom: clamp(36px, 6vh, 72px);
}
.friends-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 0.9fr;
  gap: clamp(28px, 4vw, 64px);
}
.friends-grid > div {
  display: grid;
  gap: 12px;
  align-content: start;
}
.friends-grid p {
  color: var(--frost);
}

/* game modes (same grid as the friends block) */
.modes {
  padding: clamp(80px, 14vh, 160px) var(--gutter);
  border-top: 1px solid var(--edge);
}
.modes > h2 {
  margin-bottom: clamp(36px, 6vh, 72px);
}

/* final call */
.final {
  display: grid;
  justify-items: center;
  gap: 28px;
  padding: clamp(100px, 18vh, 200px) var(--gutter);
  text-align: center;
  background: radial-gradient(ellipse at 50% 30%, rgba(87, 216, 230, 0.12), transparent 60%);
}
.final-gem {
  width: 96px;
  height: 96px;
  filter: drop-shadow(0 0 40px rgba(87, 216, 230, 0.5));
}
.final h2 {
  max-width: 14ch;
}

/* legal pages (impressum.html): contact data as graphics, not as plain text */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 120px var(--gutter) 80px;
}
.legal h1 {
  font-size: clamp(36px, 4.4vw, 60px);
  margin-bottom: 28px;
}
.legal h2 {
  font-size: 22px;
  margin: 40px 0 12px;
  color: var(--solith);
}
.legal p {
  max-width: none;
  color: var(--frost);
}
.legal p + p {
  margin-top: 12px;
}
.legal-img {
  max-width: 100%;
  height: auto;
}

/* footer */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 32px;
  padding: 32px var(--gutter) 48px;
  border-top: 1px solid var(--edge);
  font-size: 15px;
}
.wm-small {
  font-size: 16px;
}
.footer nav {
  display: flex;
  gap: 20px;
}
.footer nav a,
.footer a {
  color: var(--frost);
}
.footer .muted {
  margin-left: auto;
}
/* own row under the footer line: links to other sites */
.footer .footer-tips {
  flex-basis: 100%;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
}
.footer-tips-label {
  font-family: var(--f-display);
  font-weight: 600;
  color: var(--ice);
}

/* reveal on scroll (landing.js adds .in) */
.js .reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}

/* narrow screens */
@media (max-width: 980px) {
  .topbar nav {
    display: none;
  }
  .story {
    height: 170vh;
  }
  .story-stage {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 28px;
  }
  .story-gem {
    width: min(48vw, 260px);
  }
  .faction-row,
  .devices,
  .friends-grid {
    grid-template-columns: 1fr;
  }
  .faction {
    min-height: 520px;
  }
  .maps-shot {
    height: 52vh;
  }
  .maps-copy {
    margin-top: -10vh;
  }
  .phone {
    transform: none;
    padding: 8px;
    border-radius: 30px;
  }
  .phone img {
    border-radius: 23px;
  }
  .footer .muted {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero-snow,
  .convoy-track {
    animation: none;
  }
  .convoy-track {
    flex-wrap: wrap;
    width: auto;
    justify-content: center;
    padding: 0 var(--gutter);
  }
  .convoy-track [aria-hidden] {
    display: none;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .story {
    height: auto;
  }
  .story-stage {
    position: relative;
    height: auto;
    padding-block: 120px;
  }
  .story {
    --p: 1 !important;
  }
}
