/* =============================================================
   ZEYD ONLINE - Portal design tokens
   -------------------------------------------------------------
   Shared palette / type / motion tokens for the marketing portal
   (home.html). Deliberately NOT sharing css/style.css: that
   stylesheet locks html/body to a fixed, non-scrolling app shell
   (overflow: hidden, landscape-only) built for the game client.
   The portal is a normal scrolling document, so it gets its own
   token sheet using the same palette/type language as the game.
   ============================================================= */

:root {
  /* Palette - identical values to css/style.css so the portal
     reads as the same brand, not a re-skin. */
  --c-void: #07040d;
  --c-navy-deep: #0d1030;
  --c-navy: #141a44;
  --c-purple-deep: #1e0f2e;
  --c-blood: #6b1220;
  --c-blood-light: #9c1c2c;
  --c-gold: #e8c064;
  --c-gold-bright: #ffe9a8;
  --c-gold-dim: #8a6a2c;
  --c-fire: #ff8a2b;
  --c-text: #efe6d2;
  --c-text-dim: #b9ad93;

  /* Portal-only surface steps (page background depth, not in the
     game's token set because the game never needed a scroll depth
     ladder). */
  --p-surface-0: #050308;
  --p-surface-1: #0a0713;
  --p-surface-2: #100a1c;
  --p-surface-3: #170f26;
  --p-line: rgba(232, 192, 100, 0.16);
  --p-line-strong: rgba(232, 192, 100, 0.4);
  --p-shadow: rgba(0, 0, 0, 0.62);

  /* Typography - same stacks as the game shell. */
  --font-display: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --font-ui: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Motion */
  --t-fast: 160ms;
  --t-base: 280ms;
  --t-slow: 560ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Layout */
  --p-max: 1360px;
  --p-gutter: clamp(1.1rem, 4vw, 3rem);
  --p-radius-sm: 4px;
  --p-radius-md: 10px;
  --nav-h: 68px;

  color-scheme: dark;
}

/* -------------------------------------------------------------
   RESET (scoped to the portal document only)
   ------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--p-surface-0);
  scroll-padding-top: var(--nav-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  color: var(--c-text);
  background: var(--p-surface-0);
  font-family: var(--font-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  user-select: none;
  -webkit-user-drag: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

h1, h2, h3, p, figure {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(232, 192, 100, 0.32);
  color: var(--c-gold-bright);
}

:focus-visible {
  outline: 2px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 2px;
}

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

[hidden] {
  display: none !important;
}

/* Below-the-fold imagery: a placeholder tone while a lazy image is
   still fetching, so nothing flashes/shifts (CLS) on a slow
   connection. js/portal/main.js adds/removes this class per image
   around its load event. NOT a plain `img[loading="lazy"]` rule:
   most of this site's art is transparent-background cutouts, and
   an unconditional background-color would show through the
   transparent pixels forever, not just while loading - exactly the
   "baked rectangular backdrop" this whole art pass exists to kill. */
img.is-loading-ph {
  background: var(--p-surface-2);
}

/* -------------------------------------------------------------
   Reduced motion: collapse every custom animation/transition to
   an instant state-change. Individual components add their own
   heavier overrides (pin release, particle removal) in scenes.css
   and the JS reads this same query to skip work entirely.
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

