/* Shared tokens, fonts and controls. Colors come from the game's
   SYNTHWAVE DUSK theme (src/world/worlds.gd) and HUD palette. */

@font-face {
  font-family: "Lilita One";
  src: url("/assets/fonts/lilita-one.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --sky-top: #1a1438;
  --sky-mid: #9e4080;
  --sky-bottom: #ff946b;
  --sun-top: #ffdb7a;
  --sun-bottom: #ff5c73;
  --hill-far: #6b3d86;
  --hill-mid: #4b2c6e;
  --hill-near: #2e1d4f;
  --night: #100c24;
  --ink: #15112b;
  --ink-soft: #241d45;
  --cream: #f6e7cf;
  --cream-dim: #c9b9d9;
  --cyan: #4fd8ff;
  --mint: #5ef0c0;
  --gold: #ffd23f;
  --coral: #ff4f5e;

  --font-display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", ui-rounded, system-ui, -apple-system, sans-serif;

  --text-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.95rem);
  --text-base: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  --text-lead: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-h2: clamp(2.25rem, 1.4rem + 4vw, 4.5rem);
  --text-hero: clamp(4rem, 1rem + 9.6vw, 9.25rem);

  --gutter: clamp(1rem, 0.6rem + 2vw, 2.5rem);
  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius-chunk: 22px;
  --border: 4px solid var(--ink);
  --lift: 0 6px 0 var(--ink);

  --duration-fast: 140ms;
  --duration-normal: 320ms;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--night);
  color: var(--cream);
  font: 500 var(--text-base) / 1.6 var(--font-body);
  overflow-x: hidden;
}

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

a { color: inherit; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; border-radius: 6px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--gold); color: var(--ink);
  font-weight: 800; border: var(--border); border-radius: 12px;
}
.skip-link:focus { top: 1rem; }

/* Chunky game buttons: ink outline, hard drop shadow, press-down on tap. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: .85rem 1.6rem;
  font: 400 1.15rem/1 var(--font-display); letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  background: var(--cream);
  border: var(--border); border-radius: 999px; box-shadow: var(--lift);
  transition: transform var(--duration-fast) var(--ease-out-expo),
              box-shadow var(--duration-fast) var(--ease-out-expo),
              filter var(--duration-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn:hover { transform: translateY(-3px); box-shadow: 0 9px 0 var(--ink); filter: brightness(1.06); }
.btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--ink); }
.btn--primary { background: var(--mint); }
.btn--gold { background: var(--gold); }
.btn--small { min-height: 44px; padding: .55rem 1.1rem; font-size: 1rem; }

.store-actions { display: flex; flex-wrap: wrap; gap: 1rem 1.1rem; }
.store-note { margin: 1rem 0 0; font-size: var(--text-sm); color: var(--cream-dim); }
.store-note[hidden] { display: none; }

/* VHS scanlines, used over hero art and media. */
.scanlines {
  pointer-events: none; position: absolute; inset: 0;
  background: repeating-linear-gradient(to bottom, rgb(0 0 0 / .14) 0 1px, transparent 1px 4px);
  mix-blend-mode: multiply;
}

/* Striped synthwave sun. */
.sun {
  aspect-ratio: 1; border-radius: 50%;
  background: linear-gradient(var(--sun-top), var(--sun-bottom) 85%);
  -webkit-mask: linear-gradient(#000 52%, transparent 0) top / 100% 100% no-repeat,
                repeating-linear-gradient(#000 0 9%, transparent 0 12%) bottom / 100% 48% no-repeat;
          mask: linear-gradient(#000 52%, transparent 0) top / 100% 100% no-repeat,
                repeating-linear-gradient(#000 0 9%, transparent 0 12%) bottom / 100% 48% no-repeat;
  filter: drop-shadow(0 0 60px rgb(255 120 110 / .55));
}

.site-footer {
  position: relative; padding: 3rem var(--gutter) 2.5rem;
  background: var(--ink); border-top: var(--border);
  font-size: var(--text-sm); color: var(--cream-dim);
}
.site-footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem; align-items: center; justify-content: space-between;
}
.site-footer nav ul { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--mint); text-decoration: underline; text-underline-offset: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
