/* =========================================================================
   Appy Gaming — site stylesheet
   Art direction: night-navy base, crystal blue / orange / mint accents,
   faceted "gem-cut" shapes echoing the low-poly Prism Imp mascot.
   ========================================================================= */

@font-face {
  font-family: "Lilita One";
  src: url("../fonts/lilita-one-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --navy-950: #03061a;
  --navy-900: #060b2c;
  --navy-800: #0a1240;
  --navy-700: #111c5c;
  --navy-600: #182779;
  --blue: #2a6cf0;
  --blue-deep: #0f3bb0;
  --blue-light: #7cc4ff;
  --orange: #ffad1f;
  --orange-deep: #f2560f;
  --yellow: #ffd34d;
  --mint: #3fe0b5;
  --ink: #f4f6ff;
  --ink-soft: #c7cfee;
  --muted: #aab4e0;
  --line: rgba(124, 196, 255, 0.16);
  --line-strong: rgba(124, 196, 255, 0.34);

  --font-display: "Lilita One", "Arial Black", Impact, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --grad-orange: linear-gradient(180deg, #ffd34d 0%, #ffad1f 46%, #f2560f 100%);
  --grad-blue: linear-gradient(180deg, #a8dcff 0%, #2a6cf0 55%, #0f3bb0 100%);
  --grad-mint: linear-gradient(180deg, #a5fbe3 0%, #3fe0b5 55%, #159c7a 100%);
  --grad-border: linear-gradient(135deg, rgba(124, 196, 255, 0.7), rgba(42, 108, 240, 0.12) 45%, rgba(63, 224, 181, 0.45));

  --gem-cut: 14px;
  --gem-shape: polygon(
    var(--gem-cut) 0, 100% 0,
    100% calc(100% - var(--gem-cut)), calc(100% - var(--gem-cut)) 100%,
    0 100%, 0 var(--gem-cut)
  );
  --gem-shape-4: polygon(
    var(--gem-cut) 0, calc(100% - var(--gem-cut)) 0, 100% var(--gem-cut),
    100% calc(100% - var(--gem-cut)), calc(100% - var(--gem-cut)) 100%,
    var(--gem-cut) 100%, 0 calc(100% - var(--gem-cut)), 0 var(--gem-cut)
  );

  --container: 1200px;
  --gutter: 1rem;
  --header-h: 72px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 0.35s;
}

@media (min-width: 768px) {
  :root { --gutter: 1.5rem; --header-h: 80px; }
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  color-scheme: dark;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--navy-900);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue-light); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: #fff; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
h4 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; }
::selection { background: var(--orange); color: var(--navy-950); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.7rem 1rem; background: var(--orange); color: var(--navy-950);
  font-weight: 700; text-decoration: none; clip-path: var(--gem-shape); --gem-cut: 8px;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.container--narrow { --container: 820px; }
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); position: relative; }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--facets {
  background: var(--navy-800) url("../img/brand/facets-navy.svg") center / cover no-repeat;
}
.section--facets::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 70% at 70% 20%, rgba(42, 108, 240, 0.22), transparent 70%);
}
.section > .container { position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .lead { margin-inline: auto; }

/* ---------- type helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-display); font-size: 0.85rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--blue-light); margin-bottom: 1rem;
}
.eyebrow::before {
  content: ""; width: 0.65em; height: 0.65em; background: var(--grad-mint);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.eyebrow--orange { color: var(--orange); }
.eyebrow--orange::before { background: var(--grad-orange); }
.grad-text {
  background: var(--grad-orange); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.35));
}
.grad-text--blue { background-image: var(--grad-blue); }
.grad-text--mint { background-image: var(--grad-mint); }
.display { font-size: clamp(2.8rem, 8vw, 6.2rem); line-height: 0.95; }

/* ---------- gem surfaces ---------- */
.gem {
  position: relative; isolation: isolate;
  clip-path: var(--gem-shape);
  --gem-bg: var(--navy-800);
  --gem-border: var(--grad-border);
}
.gem::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--gem-border); }
.gem::after { content: ""; position: absolute; inset: 1px; z-index: -1; background: var(--gem-bg); clip-path: var(--gem-shape); }
.gem--4 { clip-path: var(--gem-shape-4); }
.gem--4::after { clip-path: var(--gem-shape-4); }
.gem--glass { --gem-bg: rgba(10, 18, 64, 0.72); }
.gem--deep { --gem-bg: linear-gradient(160deg, var(--navy-800), var(--navy-950)); }

/* ---------- buttons ---------- */
.btn {
  --gem-cut: 11px;
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 50px; padding: 0.7em 1.6em;
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 0.05em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 0; white-space: nowrap;
  clip-path: var(--gem-shape);
  color: var(--navy-950);
  background: var(--grad-orange);
  transition: transform 0.2s var(--ease-out), filter 0.2s;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform 0.6s var(--ease-out);
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); filter: brightness(1.08); color: var(--navy-950); }
.btn:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0); }
.btn--ghost {
  color: var(--ink);
  background: linear-gradient(rgba(10, 18, 64, 0.85), rgba(10, 18, 64, 0.85)) padding-box, var(--grad-border) border-box;
  border: 1px solid transparent;
  box-shadow: inset 0 0 0 1px rgba(124, 196, 255, 0.25);
}
.btn--ghost:hover, .btn--ghost:focus-visible { color: #fff; filter: brightness(1.2); }
.btn--blue { background: var(--grad-blue); color: #fff; }
.btn--blue:hover, .btn--blue:focus-visible { color: #fff; }
.btn--sm { min-height: 42px; padding: 0.5em 1.2em; font-size: 0.92rem; --gem-cut: 9px; }
.btn--lg { min-height: 58px; padding: 0.8em 2.1em; font-size: 1.2rem; }
.btn-glow { display: inline-block; filter: drop-shadow(0 10px 24px rgba(255, 140, 30, 0.28)); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem 1rem; align-items: center; }
.btn svg { width: 1.1em; height: 1.1em; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(6, 11, 44, 0.78);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s, box-shadow 0.3s;
}
.site-header.is-scrolled { background: rgba(6, 11, 44, 0.92); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35); }
.site-header__inner { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
@media (min-width: 768px) { .brand img { height: 52px; } }
.nav { margin-left: auto; }
.nav__list { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(1rem, 2vw, 2rem); align-items: center; }
.nav__link {
  position: relative; display: inline-block; padding: 0.4rem 0.1rem;
  color: var(--ink-soft); font-weight: 600; font-size: 0.95rem; text-decoration: none; letter-spacing: 0.01em;
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--grad-mint); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: #fff; }
.nav__link:hover::after, .nav__link[aria-current="page"]::after { transform: scaleX(1); }
.header-cta { flex-shrink: 0; }
.menu-toggle {
  display: none; margin-left: auto; width: 48px; height: 48px; padding: 0;
  background: transparent; border: 1px solid var(--line-strong); cursor: pointer; clip-path: var(--gem-shape); --gem-cut: 9px;
  place-items: center;
}
.menu-toggle span { display: block; width: 22px; height: 2px; background: #fff; margin: 3px auto; transition: transform 0.25s, opacity 0.2s; }
.site-header.is-open .menu-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.site-header.is-open .menu-toggle span:nth-child(2) { opacity: 0; }
.site-header.is-open .menu-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 899.98px) {
  .header-cta { display: none; }
  .menu-toggle { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; margin: 0;
    background: var(--navy-900) url("../img/brand/facets-navy.svg") center / cover;
    padding: 2rem var(--gutter) 3rem; overflow-y: auto;
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.35s var(--ease-out), visibility 0s linear 0.35s;
  }
  .site-header.is-open .nav { transform: none; visibility: visible; transition: transform 0.35s var(--ease-out); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list li { border-bottom: 1px solid var(--line); }
  .nav__link { display: block; padding: 1rem 0.25rem; font-family: var(--font-display); font-size: 1.6rem; font-weight: 400; letter-spacing: 0.02em; }
  .nav__link::after { display: none; }
  .nav__cta { padding-top: 1.5rem; border-bottom: 0 !important; }
  .nav__cta .btn { width: 100%; }
}
@media (min-width: 900px) { .nav__cta { display: none; } }

/* ---------- hero ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100svh - var(--header-h)); display: grid; align-items: center;
  padding-block: clamp(3rem, 6vw, 5rem);
}
.hero__bg { position: absolute; inset: 0; z-index: -3; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 40%; }
.hero__veil {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(6, 11, 44, 0.35), rgba(6, 11, 44, 0.1) 40%, var(--navy-900) 100%),
    linear-gradient(90deg, var(--navy-900) 0%, rgba(6, 11, 44, 0.9) 30%, rgba(6, 11, 44, 0.35) 65%, rgba(6, 11, 44, 0.55) 100%);
}
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.08fr 0.92fr; gap: 2rem; } }
.hero__copy { max-width: 620px; }
.hero__copy .lead { margin-bottom: 1.8rem; }
.hero__title { margin-bottom: 1rem; }
.hero__title span { display: block; }
.hero__art { position: relative; display: grid; place-items: center; min-height: 320px; }
.hero__glow {
  position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(42, 108, 240, 0.55), rgba(63, 224, 181, 0.12) 50%, transparent 70%);
  filter: blur(30px);
}
.hero__mascot {
  width: min(100%, 520px); height: auto; aspect-ratio: 769 / 900;
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.45));
  transition: transform 0.4s var(--ease-out);
  will-change: transform;
}
.mascot-float { animation: float 6s ease-in-out infinite; }
.hero__mascot-wrap { position: relative; transition: transform 0.3s var(--ease-out); }
.hero__mascot-wrap.is-happy .hero__mascot { animation: wiggle 0.9s var(--ease-out); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes wiggle {
  0% { transform: rotate(0) scale(1); } 25% { transform: rotate(-4deg) scale(1.03); }
  50% { transform: rotate(3deg) scale(1.04); } 75% { transform: rotate(-2deg) scale(1.02); } 100% { transform: rotate(0) scale(1); }
}
.shard {
  position: absolute; z-index: -1; pointer-events: none; opacity: 0.8;
  background: var(--grad-blue); clip-path: polygon(50% 0, 100% 40%, 70% 100%, 15% 85%, 0 35%);
  animation: drift 9s ease-in-out infinite;
}
.shard--mint { background: var(--grad-mint); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.shard--orange { background: var(--grad-orange); clip-path: polygon(30% 0, 100% 20%, 80% 100%, 0 70%); }
@keyframes drift { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(8px, -18px) rotate(12deg); } }
.hero__stats { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }

/* ---------- chips & stats ---------- */
.chip {
  --gem-cut: 8px; display: inline-flex; flex-direction: column; gap: 0.1rem;
  padding: 0.55rem 0.95rem; --gem-bg: rgba(10, 18, 64, 0.75);
}
.chip__value { font-family: var(--font-display); font-size: 1.25rem; line-height: 1; color: #fff; }
.chip__label { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.chip--orange .chip__value { color: var(--orange); }
.chip--mint .chip__value { color: var(--mint); }
.chip--blue .chip__value { color: var(--blue-light); }

/* ---------- grids / cards ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.card { padding: clamp(1.25rem, 2.5vw, 1.75rem); height: 100%; }
.card h3 { margin-top: 0.75rem; }
.card p:last-child { margin-bottom: 0; }
.card__icon {
  width: 56px; height: 56px; display: grid; place-items: center;
  background: var(--grad-blue); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  color: #fff;
}
.card__icon svg { width: 28px; height: 28px; }
.card__icon--orange { background: var(--grad-orange); color: var(--navy-950); }
.card__icon--mint { background: var(--grad-mint); color: var(--navy-950); }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.feature-list li { position: relative; padding-left: 1.6rem; }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 0.75em; height: 0.75em;
  background: var(--grad-mint); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ---------- game cards ---------- */
.game-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.game-card-wrap { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.4)); transition: filter 0.3s; }
.game-card-wrap:hover { filter: drop-shadow(0 26px 40px rgba(42, 108, 240, 0.35)); }
.game-card {
  display: block; position: relative; aspect-ratio: 4 / 5; overflow: hidden; text-decoration: none; color: #fff;
  --gem-cut: 18px; --gem-bg: var(--navy-800);
  transform-style: preserve-3d; transition: transform 0.25s var(--ease-out);
}
.game-card__bg { position: absolute; inset: 0; z-index: 0; }
.game-card__bg img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.game-card:hover .game-card__bg img { transform: scale(1.06); }
.game-card__shade {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(6, 11, 44, 0.15), transparent 35%, rgba(6, 11, 44, 0.2) 70%, rgba(6, 11, 44, 0.95) 100%);
}
.game-card__char {
  /* stacked in bands so nothing overlaps: tag on top, logo below it, the character above the title strip */
  position: absolute; left: 50%; bottom: 20%; height: 39%; width: auto; z-index: 2;
  transform: translateX(-50%); transition: transform 0.4s var(--ease-out);
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.5));
}
.game-card:hover .game-card__char { transform: translateX(-50%) scale(1.05) translateY(-6px); }
.game-card__logo { position: absolute; top: 11%; left: 50%; width: 56%; transform: translateX(-50%); z-index: 3; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.game-card__meta { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 1.1rem 1.25rem 1.3rem; }
.game-card__title { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; margin: 0; }
.game-card__sub { font-size: 0.8rem; color: var(--ink-soft); margin: 0.3rem 0 0; }
.game-card__tag {
  position: absolute; top: 1rem; right: 1rem; z-index: 3;
  --gem-cut: 6px; clip-path: var(--gem-shape); padding: 0.35em 0.7em;
  font-family: var(--font-display); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase;
  background: var(--grad-mint); color: var(--navy-950); white-space: nowrap;
}
.game-card__tag--orange { background: var(--grad-orange); }
.game-card--soon { --gem-bg: var(--navy-800); }
.game-card--soon .game-card__bg { background: var(--navy-800) url("../img/brand/facets-navy.svg") center / cover; opacity: 0.9; }
.game-card--soon .game-card__char { height: 62%; filter: brightness(0) saturate(0); opacity: 0.35; }
.game-card--soon .game-card__meta { display: block; text-align: center; padding-bottom: 1.6rem; }
.game-card--soon .game-card__title { color: var(--blue-light); }
.game-card--soon .game-card__tag { right: auto; left: 1rem; background: rgba(124, 196, 255, 0.18); color: var(--blue-light); }

/* ---------- tilt ---------- */
[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)); }

/* ---------- featured game ---------- */
.feature-split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .feature-split { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.feature-split--rev > :first-child { order: 2; }
@media (min-width: 900px) { .feature-split--rev > :first-child { order: 0; } }
.showpiece { position: relative; --gem-cut: 22px; aspect-ratio: 4 / 3; overflow: hidden; }
.showpiece__bg { position: absolute; inset: 0; z-index: 0; }
.showpiece__bg img { width: 100%; height: 100%; object-fit: cover; }
/* the rabbit stands on the right, the game logo on the left: they never overlap */
.showpiece__char { position: absolute; z-index: 1; bottom: 0; right: 4%; height: 92%; width: auto; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5)); }
.showpiece__logo { position: absolute; z-index: 2; top: 50%; left: 4%; width: 50%; transform: translateY(-58%); filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.55)); }
.showpiece__video { position: absolute; z-index: 1; bottom: 0; right: 2%; height: 100%; width: auto; }
.game-logo { width: min(100%, 420px); height: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }

/* ---------- video / showreel ---------- */
.reel { --gem-cut: 22px; position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-950); }
.reel video, .reel img { width: 100%; height: 100%; object-fit: cover; }
.reel__controls { position: absolute; right: 1rem; bottom: 1rem; display: flex; gap: 0.5rem; z-index: 2; }
.icon-btn {
  --gem-cut: 8px; clip-path: var(--gem-shape); width: 46px; height: 46px; border: 0; cursor: pointer;
  background: rgba(6, 11, 44, 0.75); color: #fff; display: grid; place-items: center;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.icon-btn:hover { background: var(--blue); }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn[aria-pressed="true"] { background: var(--mint); color: var(--navy-950); }

/* ---------- band (CTA) ---------- */
.band {
  position: relative; isolation: isolate; overflow: hidden;
  --gem-cut: 26px; clip-path: var(--gem-shape-4);
  background: var(--navy-800) url("../img/brand/facets-ember.svg") center / cover;
  color: var(--navy-950);
  padding: clamp(2rem, 5vw, 4rem);
  display: grid; gap: 1.5rem; align-items: center;
}
@media (min-width: 900px) { .band { grid-template-columns: auto 1fr auto; gap: 2.5rem; } }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(255, 211, 77, 0.3), transparent 50%, rgba(242, 86, 15, 0.25)); }
.band h2 { margin: 0 0 0.3em; color: var(--navy-950); }
.band p { margin: 0; color: #2a1200; font-weight: 500; max-width: 50ch; }
.band__mascot { width: 150px; height: auto; filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.35)); }
.band .btn--dark { background: var(--navy-900); color: #fff; }
.band .btn--dark:hover, .band .btn--dark:focus-visible { color: #fff; }

/* ---------- tables / facts ---------- */
.facts { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); margin: 0; }
.facts div { --gem-cut: 10px; padding: 1rem 1.15rem; }
.facts dt { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.25rem; }
.facts dd { margin: 0; font-family: var(--font-display); font-size: 1.45rem; line-height: 1.1; color: #fff; }
.facts dd small { display: block; font-family: var(--font-body); font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.2rem; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
table.data th, table.data td { text-align: left; padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-family: var(--font-display); font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.8rem; color: var(--blue-light); }
table.data td:first-child { font-weight: 600; color: #fff; }
table.data .num { font-family: var(--font-display); color: var(--orange); font-size: 1.1rem; white-space: nowrap; }

/* ---------- symbol gallery ---------- */
.symbols { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.symbol { --gem-cut: 12px; padding: 1rem; text-align: center; }
.symbol img { width: 96px; height: 96px; object-fit: contain; margin: 0 auto 0.6rem; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45)); transition: transform 0.3s var(--ease-out); }
.symbol:hover img { transform: translateY(-4px) scale(1.06); }
.symbol__name { font-family: var(--font-display); font-size: 0.95rem; line-height: 1.15; }
.symbol__sub { font-size: 0.75rem; color: var(--muted); margin-top: 0.15rem; }
.mech { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.mech__item { --gem-cut: 12px; display: grid; grid-template-columns: 76px 1fr; gap: 1rem; align-items: start; padding: 1.1rem; }
.mech__item img { width: 76px; height: 76px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.mech__item h4 { margin: 0 0 0.25rem; }
.mech__item p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- bonus ladder ---------- */
.ladder { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.tier { --gem-cut: 16px; padding: 1.4rem 1.4rem 0; display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; }
.tier__bells { display: flex; gap: 0.2rem; margin-bottom: 0.6rem; }
.tier__bells img { width: 24px; height: 24px; object-fit: contain; }
.tier__bells span { font-family: var(--font-display); color: var(--orange); margin-left: 0.4rem; }
.tier h3 { margin-bottom: 0.35rem; }
.tier p { font-size: 0.92rem; color: var(--ink-soft); }
.tier__min { font-family: var(--font-display); color: var(--mint); font-size: 1rem; letter-spacing: 0.04em; }
.tier__char { justify-self: center; height: 220px; width: auto; margin-top: 0.75rem; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.5)); transition: transform 0.4s var(--ease-out); }
.tier:hover .tier__char { transform: translateY(-6px) scale(1.03); }
.tier--mythical { --gem-bg: linear-gradient(170deg, #1a1458, #06071f); --gem-border: linear-gradient(135deg, rgba(168, 220, 255, 0.9), rgba(63, 224, 181, 0.4) 50%, rgba(255, 173, 31, 0.6)); }

/* ---------- game hero ---------- */
.game-hero { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(3rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); }
.game-hero__bg { position: absolute; inset: 0; z-index: -2; }
.game-hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.game-hero__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 11, 44, 0.55), rgba(6, 11, 44, 0.35) 50%, var(--navy-900) 100%), linear-gradient(90deg, rgba(6, 11, 44, 0.75), transparent 60%); }
.game-hero__grid { display: grid; gap: 2rem; align-items: end; }
@media (min-width: 900px) { .game-hero__grid { grid-template-columns: 1.1fr 0.9fr; } }
.game-hero__char { position: relative; display: grid; place-items: end center; min-height: 380px; }
.game-hero__char img, .game-hero__char video { height: min(560px, 70vh); width: auto; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6)); }
/* still picture until the animated clip is actually playing, then only the clip (never both). The clip stays in the
   page while invisible (a display:none video may never start), in the same spot as the still, and they cross over. */
[data-alpha-video] > img, [data-alpha-video] > video { grid-area: 1 / 1; transition: opacity 0.35s ease; }
[data-alpha-video] video { opacity: 0; }
[data-alpha-video].has-video video { opacity: 1; }
[data-alpha-video].has-video img { opacity: 0; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form__row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 0.4rem; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field label .req { color: var(--orange); }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 1rem; font: inherit; color: #fff;
  background: linear-gradient(rgba(10, 18, 64, 0.9), rgba(10, 18, 64, 0.9)) padding-box, var(--grad-border) border-box;
  border: 1px solid transparent; clip-path: var(--gem-shape); --gem-cut: 9px;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.6rem; background-image: linear-gradient(rgba(10, 18, 64, 0.9), rgba(10, 18, 64, 0.9)), var(--grad-border); }
.field select option { color: #000; background: #fff; }
.field--select { position: relative; }
.field--select::after { content: ""; position: absolute; right: 1.1rem; bottom: 1.25rem; width: 0.6rem; height: 0.6rem; border-right: 2px solid var(--blue-light); border-bottom: 2px solid var(--blue-light); transform: rotate(45deg); pointer-events: none; }
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--mint); outline-offset: 0; }
.field.is-invalid input, .field.is-invalid select, .field.is-invalid textarea { box-shadow: inset 0 0 0 2px var(--orange-deep); }
.field__error { color: #ffb08a; font-size: 0.85rem; min-height: 1.2em; }
.field__hint { color: var(--muted); font-size: 0.85rem; }
.form__status { --gem-cut: 10px; padding: 1rem 1.2rem; }
.form__status[hidden] { display: none; }
.check { display: flex; gap: 0.7rem; align-items: start; font-size: 0.92rem; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: 0.2rem; accent-color: var(--mint); flex-shrink: 0; }

/* ---------- prose (legal etc.) ---------- */
.prose { max-width: 76ch; }
.prose h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.25rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4em; }
.prose p, .prose li { color: var(--ink-soft); }
.prose strong { color: #fff; }
.prose table.data td { color: var(--ink-soft); }
.todo {
  background: rgba(255, 173, 31, 0.16); color: var(--yellow); font-weight: 600;
  padding: 0.05em 0.35em; border-bottom: 1px dashed var(--orange); border-radius: 2px;
}
.notice { --gem-cut: 12px; padding: 1.2rem 1.4rem; margin-bottom: 2rem; --gem-bg: rgba(255, 173, 31, 0.08); --gem-border: linear-gradient(135deg, rgba(255, 173, 31, 0.8), rgba(242, 86, 15, 0.3)); }
.notice p { margin: 0; color: var(--ink); }
.page-head { padding-block: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
.updated { font-size: 0.85rem; color: var(--muted); }

/* ---------- press / palette ---------- */
.swatches { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.swatch { --gem-cut: 12px; padding: 0; overflow: hidden; }
.swatch__color { height: 86px; }
.swatch__meta { padding: 0.7rem 0.9rem 0.9rem; }
.swatch__name { font-family: var(--font-display); font-size: 0.95rem; }
.swatch__hex { font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.download { display: flex; gap: 1rem; align-items: center; padding: 1rem 1.2rem; --gem-cut: 12px; text-decoration: none; color: inherit; }
.download:hover { color: #fff; --gem-bg: var(--navy-700); }
.download__thumb { width: 84px; height: 64px; object-fit: contain; flex-shrink: 0; background: rgba(255, 255, 255, 0.04); padding: 6px; }
.download__thumb--light { background: #fff; }
.download__name { font-weight: 700; }
.download__meta { font-size: 0.8rem; color: var(--muted); }
.pose-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { .pose-grid { grid-template-columns: repeat(4, 1fr); } }
.pose { --gem-cut: 14px; overflow: hidden; }
.pose img { width: 100%; height: auto; aspect-ratio: 560 / 750; object-fit: cover; }

/* ---------- misc blocks ---------- */
.steps { counter-reset: step; display: grid; gap: 1.25rem; }
.step { --gem-cut: 12px; padding: 1.4rem 1.4rem 1.4rem 4.6rem; position: relative; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1.2rem; top: 1.2rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center;
  font-family: var(--font-display); color: var(--navy-950); background: var(--grad-orange);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.step h3 { margin-bottom: 0.3rem; }
.step p { margin: 0; color: var(--ink-soft); }
.org-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.org-list li { --gem-cut: 10px; padding: 1rem 1.2rem; }
.org-list a { font-weight: 700; display: block; margin-bottom: 0.2rem; }
.org-list span { font-size: 0.85rem; color: var(--muted); }
.badge-18 {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid #fff; font-family: var(--font-display); font-size: 0.95rem; color: #fff; letter-spacing: 0.02em;
}
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); border: 0; margin: 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-950); border-top: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: 0.92rem; }
.site-footer__grid { display: grid; gap: 2.5rem 2rem; }
@media (min-width: 720px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.site-footer__brand img { height: 56px; width: auto; margin-bottom: 1rem; }
.site-footer__brand p { color: var(--muted); max-width: 36ch; }
.site-footer h4 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue-light); margin-bottom: 0.9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.site-footer a { color: var(--ink-soft); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.social { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; --gem-cut: 8px; clip-path: var(--gem-shape); background: rgba(124, 196, 255, 0.1); color: var(--ink-soft); }
.social a:hover { background: var(--blue); color: #fff; }
.social svg { width: 20px; height: 20px; }
.site-footer__legal { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); display: grid; gap: 1rem; color: var(--muted); font-size: 0.82rem; }
.site-footer__rg { display: flex; gap: 0.9rem; align-items: center; }
.site-footer__rg p { margin: 0; }
.site-footer__row { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }

/* ---------- scroll reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); transition-delay: var(--d, 0s); }
  html.js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .mascot-float, .shard { animation: none; }
  [data-tilt] { transform: none !important; }
}

/* ---------- 404 ---------- */
.lost { min-height: calc(100svh - var(--header-h)); display: grid; place-items: center; text-align: center; padding-block: 3rem; }
.lost img { width: min(60vw, 300px); height: auto; margin: 0 auto 1.5rem; }
.lost h1 { font-size: clamp(3rem, 12vw, 7rem); line-height: 1; }

/* ---------- print ---------- */
@media print {
  .site-header, .site-footer, .btn, video { display: none !important; }
  body { background: #fff; color: #000; }
  .prose p, .prose li { color: #000; }
}

/* =========================================================================
   Fly-through hero (home): sticky canvas stage scrubbed by scroll.
   States: .fly (no JS -> static f001 hero), .fly--js (scrubbed), .fly--static (reduced motion -> f096)
   ========================================================================= */
.site-header--float { position: fixed; left: 0; right: 0; top: 0; background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header--float.is-scrolled { background: rgba(6, 11, 44, 0.9); border-bottom-color: var(--line); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.site-header--float.is-open { background: var(--navy-900); }

.fly { position: relative; background: var(--navy-900); }
.fly__stage {
  position: relative; height: 100vh; height: 100svh; overflow: hidden; isolation: isolate;
  /* poster while the frames load, and the whole hero without JS (first frame) or with reduced motion (last frame) */
  background: var(--navy-900) url("../flythrough/webp/f001.webp") center / cover no-repeat;
  display: grid; align-content: center; padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
}
.fly--static .fly__stage { background-image: url("../flythrough/webp/f120.webp"); }
/* phones held upright: the 9:16 version of the scene, and no big logo over the imp (the header already shows it) */
@media (max-aspect-ratio: 10/11) {
  .fly__stage { background-image: url("../flythrough/webp-pt/f001.webp"); }
  .fly--static .fly__stage { background-image: url("../flythrough/webp-pt/f120.webp"); }
  .fly__logo { display: none; }
  /* the text sits low on a tall, detailed picture: a deeper shade behind it */
  .fly__stage .fly__vignette { background: linear-gradient(180deg, rgba(6, 11, 44, 0.35) 0%, rgba(6, 11, 44, 0) 18%, rgba(6, 11, 44, 0) 48%, rgba(6, 11, 44, 0.78) 78%, rgba(6, 11, 44, 0.92) 100%); }
}
.fly__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: none; }
.fly__vignette {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 11, 44, 0.45), transparent 28%, transparent 62%, rgba(6, 11, 44, 0.65) 100%);
}
.fly__fade { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; z-index: 1; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent, var(--navy-900)); }
.fly__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 3; background: rgba(255, 255, 255, 0.08); transition: opacity 0.6s; display: none; }
.fly__progress span { display: block; height: 100%; width: 0; background: var(--grad-mint); background: linear-gradient(90deg, var(--blue-light), var(--mint)); transition: width 0.2s; }
.fly__progress.is-done { opacity: 0; }

.fly__beat { position: relative; z-index: 2; max-width: 620px; }
.fly__beat > * { position: relative; }
.fly__beat::before {
  content: ""; position: absolute; inset: -12% -14%; z-index: 0; pointer-events: none; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(6, 11, 44, 0.62), rgba(6, 11, 44, 0.3) 55%, transparent 100%);
}
.fly__beat h1, .fly__beat h2, .fly__beat p { text-shadow: 0 2px 18px rgba(3, 6, 26, 0.7); }
.fly__logo { width: min(100%, 420px); height: auto; margin-bottom: 1.8rem; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5)); }
.fly__title { font-size: clamp(2.2rem, 6vw, 4.4rem); line-height: 0.98; margin-bottom: 0.5rem; }
.fly__title span { display: block; }
.fly__beat .lead { color: var(--ink); }
.fly__beat--2 h2 { font-size: clamp(1.9rem, 4.6vw, 3.4rem); }
.fly__beat--3 { text-align: center; margin-inline: auto; max-width: 680px; }
.fly__beat--3 h2 { font-size: clamp(2.4rem, 7vw, 5rem); }
.fly__beat--3 .btn-row { justify-content: center; margin-top: 1.4rem; }
.fly__scroll { display: inline-flex; align-items: center; gap: 0.6rem; margin-top: 1.4rem; font-family: var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.8rem; color: var(--blue-light); }
.fly__scroll svg { width: 18px; height: 18px; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* static layouts (no JS, or reduced motion): beats stack in normal flow */
.fly:not(.fly--js) .fly__stage { min-height: 100svh; height: auto; row-gap: 2rem; }
.fly:not(.fly--js) .fly__beat--2 { display: none; }
.fly--static .fly__beat--2 { display: block; }
.fly:not(.fly--js) .fly__scroll { display: none; }
.fly:not(.fly--js) .fly__beat--3 { margin-inline: 0; text-align: left; }
.fly:not(.fly--js) .fly__beat--3 .btn-row { justify-content: flex-start; }
.fly:not(.fly--js) .fly__fade { display: none; }
@media (min-width: 900px) {
  .fly:not(.fly--js) .fly__stage { grid-template-columns: 1fr 1fr; column-gap: 3rem; align-items: center; }
  .fly:not(.fly--js) .fly__beat--1 { grid-column: 2; grid-row: 1; }
  .fly:not(.fly--js) .fly__beat--2 { grid-column: 2; grid-row: 2; }
  .fly:not(.fly--js) .fly__beat--3 { grid-column: 2; grid-row: 3; }
  .fly:not(.fly--js) .fly__stage { padding-inline: max(var(--gutter), calc((100% - var(--container)) / 2)); }
}

/* scrubbed layout */
.fly--js { height: 350vh; }
@media (min-width: 900px) { .fly--js { height: 430vh; } }
.fly--js .fly__stage { position: sticky; top: 0; display: block; padding: 0; }
.fly--js .fly__canvas { display: block; }
.fly--js .fly__progress { display: block; }
.fly--js .fly__beat { position: absolute; opacity: 0; visibility: hidden; will-change: opacity, transform; transform: translate3d(0, var(--by, 0px), 0); }
.fly--js .fly__beat--1, .fly--js .fly__beat--2 { left: var(--gutter); right: var(--gutter); bottom: max(9%, 4rem); }
.fly--js .fly__beat--3 { left: var(--gutter); right: var(--gutter); top: 50%; transform: translate3d(0, calc(-50% + var(--by, 0px)), 0); }
@media (min-width: 900px) {
  .fly--js .fly__beat--1, .fly--js .fly__beat--2 { left: 52%; right: 5%; bottom: auto; top: 50%; transform: translate3d(0, calc(-50% + var(--by, 0px)), 0); max-width: 560px; }
  .fly--js .fly__beat--3 { left: 50%; right: auto; width: min(680px, 90%); margin-left: calc(min(680px, 90%) / -2); }
}

/* pre-launch: the contact email under the footer logo */
.site-footer__mail { margin-top: .6rem; }
.site-footer__mail a { color: var(--mint, #3fe0b5); font-weight: 600; text-decoration: none; }
.site-footer__mail a:hover, .site-footer__mail a:focus-visible { text-decoration: underline; }
