@font-face {
  font-family: Qaz;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/Qaz-Regular.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --ink: #0b1211;
  --text: #f7f4e9;
  --muted: #bbbfb6;
  --gold: #e6c788;
  --line: rgb(233 220 185 / 19%);
  font-family: Qaz, Arial, sans-serif;
  color: var(--text);
  background: var(--ink);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
::selection { color: var(--ink); background: var(--gold); }

a:focus-visible, button:focus-visible {
  outline: 3px solid #fff2c8;
  outline-offset: 6px;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10;
  padding: 0.8rem 1.2rem;
  color: var(--ink);
  background: var(--gold);
  transform: translateY(-200%);
}

.skip-link:focus { transform: translateY(0); }

/* The gameplay keeps its own retro rendering. A small ordered screen-door
   texture adds the requested dither without a canvas or per-frame processing. */
.scenery {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #17231c;
}

.scenery__poster, .scenery__video, .scenery__shade, .scenery__dither {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scenery__poster, .scenery__video {
  object-fit: cover;
  object-position: 50% 45%;
  filter: saturate(0.7);
}

.scenery__video {
  opacity: 0;
  transition: opacity 1.2s ease;
}

.scenery.is-ready .scenery__video { opacity: 1; }

.scenery__shade {
  background:
    linear-gradient(180deg, rgb(5 12 12 / 62%), transparent 26%, transparent 65%, rgb(5 12 12 / 91%)),
    radial-gradient(ellipse at 50% 43%, rgb(6 12 11 / 72%) 0%, rgb(6 12 11 / 55%) 42%, rgb(6 12 11 / 28%) 100%);
}

.scenery__dither {
  background-image: repeating-conic-gradient(rgb(0 0 0 / 24%) 0% 25%, transparent 0% 50%);
  background-size: 4px 4px;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 clamp(1.25rem, 4.2vw, 5rem);
}

.hero {
  display: grid;
  flex: 1;
  place-items: center;
  padding: 3rem 0 3.5rem;
  text-align: center;
}

.hero__content { width: min(100%, 46rem); }

.hero__logo {
  width: min(100%, 29rem);
  margin: 0 auto 1.75rem;
  line-height: 0;
}

.hero__logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 3px 14px rgb(0 0 0 / 35%));
}

.hero__headline {
  margin: 0;
  font-size: clamp(1.65rem, 2.7vw, 2.5rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.025em;
  text-wrap: balance;
  text-shadow: 0 2px 16px rgb(0 0 0 / 25%);
}

.hero__description {
  max-width: 33rem;
  margin: 1rem auto 0;
  color: #d3d7cc;
  font-size: 1.125rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.destinations {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin: 2rem 0 0;
}

.founder-action {
  display: flex;
  justify-content: center;
  width: 100%;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  min-height: 3.75rem;
  padding: 1rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.button img { flex: 0 0 1.5rem; width: 1.5rem; height: 1.5rem; }
.button span { min-width: 0; text-align: left; }

.button__arrow {
  flex: 0 0 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
  margin-left: 0.6rem;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--steam {
  color: #191b15;
  background: var(--gold);
  border-color: #f3dba9;
  box-shadow: 0 2px 16px rgb(0 0 0 / 16%), inset 0 1px 0 rgb(255 255 255 / 20%);
}

.button--discord {
  color: var(--text);
  background: rgb(13 23 23 / 80%);
  border-color: rgb(230 224 201 / 38%);
}

.button--founder {
  min-height: 2.75rem;
  padding: 0.625rem 1.125rem;
  color: var(--gold);
  background: rgb(13 23 23 / 55%);
  border-color: rgb(230 199 136 / 32%);
  font-size: 0.875rem;
}

@media (hover: hover) {
  .button:hover { transform: translateY(-2px); }
  .button--steam:hover { background: #f1d9a9; box-shadow: 0 6px 26px rgb(230 199 136 / 13%); }
  .button--discord:hover { background: #26332f; border-color: var(--gold); }
  .button--founder:hover { background: #26332f; border-color: var(--gold); }
  .motion-control:hover { color: var(--text); border-color: rgb(230 224 201 / 38%); }
}

.button:active { transform: translateY(0); }

.hero__note {
  margin: 1.125rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  min-height: 5rem;
  padding: 1rem 0 max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.footer p { margin: 0; }
.footer__about { display: grid; gap: 0.25rem; }
.footer__highscores { color: var(--gold); text-underline-offset: 0.2em; justify-self: start; }
.footer__credit { letter-spacing: 0.025em; }
.footer__copyright { text-align: center; }

.motion-control {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 3px;
  color: var(--muted);
  background: transparent;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}

.motion-control svg { flex: 0 0 1rem; width: 1rem; height: 1rem; }
.motion-control__pause, .motion-control.is-playing .motion-control__play { display: none; }
.motion-control.is-playing .motion-control__pause { display: block; }

@media (max-height: 850px) and (min-width: 641px) {
  .hero { padding: 1.75rem 0 2rem; }
  .hero__logo { width: min(100%, 23rem); margin-bottom: 1.25rem; }
  .destinations { margin-top: 1.5rem; }
  .footer { min-height: 4.5rem; }
}

@media (max-width: 640px) {
  .page { padding-inline: clamp(1rem, 4vw, 1.25rem); }
  .hero { padding: 2.5rem 0; }
  .hero__logo { width: min(85%, 22rem); margin-bottom: 1.5rem; }
  .hero__description { max-width: 25rem; font-size: 1rem; }
  .destinations { flex-direction: column; max-width: 23rem; margin: 1.75rem auto 0; gap: 0.75rem; }
  .button { width: 100%; min-height: 3.5rem; padding: 0.875rem 1.25rem; }
  .button span { flex: 1; }
  .button--founder { width: auto; min-height: 2.75rem; padding: 0.625rem 1.125rem; }
  .hero__note { margin-inline: auto; max-width: 19rem; }
  .footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; padding-block: 0.875rem max(0.875rem, env(safe-area-inset-bottom)); }
  .footer__credit { width: 100%; font-size: 0.8125rem; }
  .footer__about { width: 100%; }
  .footer__copyright { text-align: left; font-size: 0.75rem; }
}

@media (max-width: 420px) {
  .button { gap: 0.6rem; padding-inline: 1rem; }
  .button__arrow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .button:hover { transform: none; }
}

@media (forced-colors: active) {
  .scenery { display: none; }
  .button, .motion-control { border: 1px solid ButtonText; }
}
