/* Chess Warlords landing — "royal court": midnight royal blue, gilded edges, parchment grain. */
:root {
  --lacquer-950: #04081a;
  --lacquer-900: #071030;
  --lacquer-800: #0c1a48;
  --lacquer-600: #1f3f8f;
  --lacquer-500: #2f5da8;
  --gold-300: #ffe2a3;
  --gold-400: #f4c66b;
  --gold-500: #d9a441;
  --gold-700: #8a6220;
  --paper: #fbf1dc;
  --ink: #241510;
  --muted: #e6cfae;
  --jade: #3fae7b;

  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;

  --text-hero: clamp(2.6rem, 1.2rem + 5.4vw, 5.6rem);
  --text-h2: clamp(2rem, 1.2rem + 2.6vw, 3.4rem);
  --text-lead: clamp(1.05rem, 0.95rem + 0.4vw, 1.3rem);
  --space-section: clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius-l: 28px;
  --radius-m: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--paper);
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(47, 93, 168, 0.55), transparent 60%),
    radial-gradient(900px 600px at -10% 30%, rgba(31, 63, 143, 0.5), transparent 60%),
    linear-gradient(180deg, var(--lacquer-800), var(--lacquer-950) 70%);
  line-height: 1.6;
  overflow-x: hidden;
}
/* ink-paper grain */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, header, footer { position: relative; z-index: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: var(--text-h2); text-align: center; color: var(--gold-300); }
.lead { text-align: center; color: var(--muted); font-size: var(--text-lead); margin: 0.8rem auto 0; max-width: 40ch; }
section { padding: var(--space-section) clamp(1.2rem, 4vw, 4rem) 0; max-width: 1240px; margin: 0 auto; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  background: rgba(4, 8, 26, 0.66);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid rgba(244, 198, 107, 0.16);
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--gold-300); }
.brand img { border-radius: 11px; box-shadow: 0 0 0 1px rgba(244, 198, 107, 0.5), 0 6px 18px rgba(0, 0, 0, 0.4); }
.links { display: flex; gap: 1.6rem; margin-left: auto; }
.links a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; position: relative; padding: 0.3rem 0; }
.links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--gold-400); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease); }
.links a:hover { color: var(--gold-300); }
.links a:hover::after { transform: scaleX(1); }
.lang { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.7rem; border-radius: 999px; border: 1px solid rgba(244, 198, 107, 0.35); background: rgba(255, 255, 255, 0.04); }
.lang svg { width: 18px; height: 18px; fill: var(--gold-400); }
.lang select { appearance: none; background: transparent; border: 0; color: var(--paper); font: 600 0.92rem var(--font-body); cursor: pointer; padding-right: 0.2rem; }
.lang select option { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 2rem;
  min-height: min(88vh, 860px); padding-top: clamp(2rem, 5vw, 4rem); position: relative;
}
.glyph { position: absolute; right: -4%; top: 4%; width: min(62vw, 760px); opacity: 0.07; pointer-events: none; filter: blur(0.3px); }
.tag {
  display: inline-block; margin: 0 0 1.1rem; padding: 0.35rem 0.9rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold-300); background: rgba(244, 198, 107, 0.1); border: 1px solid rgba(244, 198, 107, 0.35);
}
.hero h1 {
  font-size: var(--text-hero);
  background: linear-gradient(180deg, #fff6df 10%, var(--gold-400) 60%, var(--gold-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.45));
}
.hero .sub { font-size: var(--text-lead); color: var(--muted); max-width: 36rem; margin: 1.4rem 0 2rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }
.ctas.center { justify-content: center; }
.store {
  display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.7rem 1.3rem 0.7rem 1.1rem; border-radius: 16px;
  text-decoration: none; color: #1b0d06; background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 10px 30px rgba(217, 164, 65, 0.25);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.store.android { background: linear-gradient(180deg, #fff, #f1e4c8); }
.store svg { width: 26px; height: 26px; fill: currentColor; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 0.72rem; font-weight: 600; opacity: 0.75; }
.store b { font-size: 1.15rem; }
.store:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 16px 36px rgba(217, 164, 65, 0.4); }
.store:active { transform: translateY(0); }
.ghost { display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.1rem; color: var(--paper); text-decoration: none; font-weight: 700; border-radius: 16px; transition: background 0.25s; }
.ghost:hover { background: rgba(255, 255, 255, 0.08); }
.play { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--gold-400); position: relative; }
.play::after { content: ""; position: absolute; left: 12px; top: 9px; border-left: 11px solid var(--gold-400); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }

.hero-art { position: relative; height: clamp(360px, 52vw, 640px); }
.halo {
  position: absolute; inset: 8% 4% 0; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 200, 110, 0.55), rgba(47, 93, 168, 0.3) 55%, transparent 72%);
  filter: blur(6px);
}
.halo::after { content: ""; position: absolute; inset: 10%; border-radius: 50%; border: 2px solid rgba(244, 198, 107, 0.45); box-shadow: 0 0 60px rgba(244, 198, 107, 0.35); }
.hero-red, .hero-black { position: absolute; bottom: 0; height: 92%; width: auto; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.55)); }
.hero-red { left: 2%; z-index: 2; }
.hero-black { right: 0; height: 80%; z-index: 1; filter: drop-shadow(0 26px 30px rgba(0, 0, 0, 0.55)) brightness(0.92); }
.float { animation: float 6s ease-in-out infinite; }
.float.delay { animation-delay: -3s; }
@keyframes float { 50% { transform: translateY(-14px); } }

/* ---------- stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; padding: 0; margin-top: clamp(2rem, 5vw, 4rem);
  border-radius: var(--radius-l); overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(244, 198, 107, 0.22);
}
.stats div { padding: 1.6rem 1rem; text-align: center; border-left: 1px solid rgba(244, 198, 107, 0.14); }
.stats div:first-child { border-left: 0; }
.stats b { display: block; font-family: var(--font-display); font-size: clamp(1.9rem, 1.2rem + 2vw, 2.8rem); color: var(--gold-400); line-height: 1; }
.stats span { color: var(--muted); font-size: 0.92rem; }

/* ---------- trailer ---------- */
.video-frame {
  margin: 2.4rem auto 0; max-width: 980px; border-radius: var(--radius-l); overflow: hidden; position: relative;
  padding: 6px; background: linear-gradient(135deg, var(--gold-300), var(--gold-700) 40%, var(--gold-400) 70%, var(--gold-700));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.video-frame video { width: 100%; display: block; border-radius: calc(var(--radius-l) - 6px); background: #000; aspect-ratio: 16 / 9; }

/* ---------- features (bento) ---------- */
.grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.1rem; margin-top: 2.6rem; }
.card {
  grid-column: span 2; position: relative; overflow: hidden; padding: 1.8rem 1.6rem 1.7rem; border-radius: var(--radius-m);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(244, 198, 107, 0.18);
  transition: transform 0.35s var(--ease), border-color 0.35s, background 0.35s;
}
.card:nth-child(1), .card:nth-child(2) { grid-column: span 3; min-height: 250px; padding-right: 42%; }
.card:nth-child(6) { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; column-gap: 1.6rem; align-items: center; }
.card:nth-child(6) .coin { grid-row: span 2; margin: 0; }
.card:hover { transform: translateY(-4px); border-color: rgba(244, 198, 107, 0.5); background: linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.03)); }
.card h3 { font-size: 1.45rem; color: var(--gold-300); margin-bottom: 0.6rem; }
.card p { margin: 0; color: var(--muted); }
.card img { position: absolute; right: -2%; bottom: -12%; height: 118%; width: auto; opacity: 0.95; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5)); transition: transform 0.5s var(--ease); }
.card:nth-child(n + 3) img { position: static; height: 120px; margin: -0.6rem 0 0.8rem -0.4rem; }
.card:hover img { transform: translateY(-6px) rotate(-2deg); }
.coin {
  width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 1.2rem;
  font: 700 2.4rem "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols2", serif; color: #2f5da8;
  background: radial-gradient(circle at 35% 30%, #fff8e6, #ecd3a0 70%); box-shadow: 0 0 0 4px #2f5da8 inset, 0 10px 24px rgba(0, 0, 0, 0.4);
}
.coin.black { color: #1d2a3a; box-shadow: 0 0 0 4px #1d2a3a inset, 0 10px 24px rgba(0, 0, 0, 0.4); }

/* ---------- gallery ---------- */
.gallery { max-width: none; padding-left: 0; padding-right: 0; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(220px, 24vw, 290px); gap: 1.6rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 2.6rem max(1.2rem, calc((100vw - 1240px) / 2)) 1.6rem;
  scrollbar-width: thin; scrollbar-color: var(--gold-700) transparent;
}
.rail figure { margin: 0; scroll-snap-align: center; }
.phone {
  border-radius: 34px; padding: 7px; background: linear-gradient(160deg, #2a3a6a, #060b20);
  box-shadow: 0 0 0 1px rgba(244, 198, 107, 0.45), 0 24px 50px rgba(0, 0, 0, 0.55);
  transition: transform 0.4s var(--ease);
}
.phone img { border-radius: 28px; width: 100%; height: auto; }
.rail figure:hover .phone { transform: translateY(-8px) scale(1.015); }
figcaption { text-align: center; margin-top: 0.9rem; font-weight: 700; color: var(--gold-300); }

/* ---------- steps ---------- */
.steps ol { list-style: none; padding: 0; margin: 2.6rem 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; counter-reset: s; }
.steps li { position: relative; padding: 1.6rem 1.4rem 1.4rem 5rem; border-radius: var(--radius-m); background: rgba(0, 0, 0, 0.22); border: 1px dashed rgba(244, 198, 107, 0.3); }
.steps li span {
  position: absolute; left: 1.2rem; top: 50%; transform: translateY(-50%); width: 2.8rem; height: 2.8rem; border-radius: 50%;
  display: grid; place-items: center; font: 700 1.3rem var(--font-display); color: var(--lacquer-900); background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
}
.steps p { margin: 0; font-weight: 600; }

/* ---------- faq ---------- */
.faq { max-width: 860px; }
.faq h2 { margin-bottom: 2rem; }
details { border-bottom: 1px solid rgba(244, 198, 107, 0.2); padding: 0.4rem 0; }
summary { cursor: pointer; list-style: none; padding: 1rem 2.4rem 1rem 0; font-weight: 700; font-size: 1.08rem; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%); font-size: 1.6rem; color: var(--gold-400); transition: transform 0.3s var(--ease); }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { margin: 0 0 1.1rem; color: var(--muted); }

/* ---------- final + footer ---------- */
.final { text-align: center; padding-bottom: var(--space-section); }
.final img { margin: 0 auto 1.4rem; border-radius: 24px; box-shadow: 0 0 0 2px var(--gold-500), 0 20px 50px rgba(0, 0, 0, 0.5); }
.final .ctas { margin-top: 2rem; }
footer { border-top: 1px solid rgba(244, 198, 107, 0.15); padding: 2.2rem 1.2rem 2.6rem; text-align: center; color: var(--muted); font-size: 0.9rem; background: rgba(0, 0, 0, 0.25); }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.6rem; margin-bottom: 0.8rem; }
footer a { text-decoration: none; font-weight: 600; }
footer a:hover { color: var(--gold-300); }
footer p { margin: 0; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; text-align: center; min-height: 0; }
  .hero .sub { margin-left: auto; margin-right: auto; }
  .ctas { justify-content: center; }
  .hero-art { order: -1; height: clamp(300px, 70vw, 460px); max-width: 560px; width: 100%; margin: 0 auto; }
  .glyph { right: 50%; transform: translateX(50%); width: 110vw; top: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card, .card:nth-child(1), .card:nth-child(2) { grid-column: span 1; padding-right: 1.6rem; min-height: 0; }
  .card:nth-child(6) { grid-column: 1 / -1; }
  .card:nth-child(1) img, .card:nth-child(2) img { position: static; height: 120px; margin: -0.6rem 0 0.8rem -0.4rem; }
  .steps ol { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(3) { border-left: 0; }
  .stats div:nth-child(n + 3) { border-top: 1px solid rgba(244, 198, 107, 0.14); }
}
@media (max-width: 640px) {
  .links { display: none; }
  .lang { margin-left: auto; }
  .brand span { display: none; }
  .grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .phone, .store, .card img { transition: none; }
}
