/* Crown & Conquest: the website. A royal night sky, gold that shimmers,
   frosted glass, and the game's own pixel art, alive. */

@font-face {
  font-family: 'Fredoka';
  src: url('fonts/fredoka-bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

:root {
  --night-0: #07031a;
  --night-1: #0e0730;
  --night-2: #1d0f52;
  --night-3: #34188a;
  --violet: #7c4dff;
  --violet-2: #b388ff;
  --gold: #ffd54f;
  --gold-hi: #fff4c2;
  --gold-2: #ffb300;
  --gold-3: #e65100;
  --ink: #fff;
  --ink-2: rgba(255, 255, 255, 0.8);
  --ink-3: rgba(255, 255, 255, 0.58);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-2: rgba(255, 255, 255, 0.11);
  --rim: rgba(255, 255, 255, 0.14);
  --rim-2: rgba(255, 255, 255, 0.24);
  --blue: #40c4ff;
  --red: #ff5263;
  --green: #00e676;
  --radius: 24px;
  --wrap: 1160px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

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

body {
  margin: 0;
  font-family: 'Fredoka', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-weight: 700;
  color: var(--ink);
  background: var(--night-0);
  line-height: 1.55;
  overflow-x: hidden;
}

/* The sky behind every page: deep violet glows over the night. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 85% -5%, rgba(124, 77, 255, 0.45), transparent 60%),
    radial-gradient(800px 520px at -10% 25%, rgba(64, 196, 255, 0.2), transparent 60%),
    radial-gradient(700px 500px at 50% 110%, rgba(255, 179, 0, 0.14), transparent 60%),
    linear-gradient(180deg, var(--night-2) 0%, var(--night-1) 45%, var(--night-0) 100%);
}

/* Twinkling stars and rising gold dust (drawn by script). */
#sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.wrap {
  width: min(var(--wrap), 100% - 32px);
  margin-inline: auto;
}

.pixel,
.spr,
.stage img {
  image-rendering: pixelated;
}

/* ---------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  background: rgba(10, 5, 34, 0.55);
  border-bottom: 1px solid var(--rim);
}

.nav::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 79, 0.7), transparent);
  opacity: 0.6;
}

.nav .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 19px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  box-shadow: 0 0 0 2px rgba(255, 213, 79, 0.55), 0 6px 18px rgba(255, 179, 0, 0.4);
}

/* The game's name as the app draws it: "Crown" in gold, "& Conquest" in
   sky blue, a dark outline, a drop shadow and a gloss on the upper half. */
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.28em;
}

.lw {
  position: relative;
  display: inline-block;
  /* The letters themselves only hold the space; the outline goes under,
     the colours over (each its own layer, in that order). */
  color: transparent;
}

.lw::before,
.lw::after {
  content: attr(data-t);
  position: absolute;
  left: 0;
  top: 0;
  white-space: nowrap;
}

.lw::before {
  /* The dark outline and its drop shadow. */
  color: #1a1d45;
  -webkit-text-stroke: 0.2em #1a1d45;
  text-shadow: 0 0.07em 0 rgba(0, 0, 0, 0.5);
}

.lw::after {
  /* The colours, top to bottom, with a gloss on the upper half. */
  color: transparent;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.12) 42%, transparent 43%),
    linear-gradient(180deg, var(--c1), var(--c2), var(--c3));
  -webkit-background-clip: text;
  background-clip: text;
}

.lw.gold {
  --c1: #fff59d;
  --c2: #ffd54f;
  --c3: #ff9800;
}

.lw.sky {
  --c1: #ffffff;
  --c2: #b3e5fc;
  --c3: #7c9cff;
}

.brand .logo {
  font-size: 21px;
}

.nav nav {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.nav nav a {
  color: var(--ink-2);
  padding: 8px 13px;
  border-radius: 12px;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.nav nav a:hover,
.nav nav a[aria-current='page'] {
  color: var(--ink);
  background: var(--glass-2);
  text-decoration: none;
}

/* ---------------------------------------------------------------- type */

/* Gold that a light sweeps across every few seconds. */
.gold-text {
  background: linear-gradient(
    100deg,
    var(--gold-2) 0%,
    var(--gold) 30%,
    var(--gold-hi) 45%,
    #ffffff 50%,
    var(--gold-hi) 55%,
    var(--gold) 70%,
    var(--gold-3) 100%
  );
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 5s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  20% {
    background-position: 100% 0;
  }
  60%,
  100% {
    background-position: 0% 0;
  }
}

.title {
  font-size: clamp(52px, 8.6vw, 104px);
  line-height: 1.02;
  margin: 18px 0 0;
  letter-spacing: 0.5px;
  filter: drop-shadow(0 14px 30px rgba(255, 179, 0, 0.3));
}

.title.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.title .amp {
  font-size: 0.72em;
  margin-top: -0.12em;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px 7px 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 213, 79, 0.18), rgba(124, 77, 255, 0.18));
  border: 1px solid rgba(255, 213, 79, 0.45);
  color: var(--gold-hi);
  font-size: 14px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 24px rgba(255, 213, 79, 0.18);
}

.kicker img {
  width: 22px;
  height: 22px;
}

.lead {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--ink-2);
  max-width: 36ch;
  margin: 20px 0 0;
}

h2 {
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.08;
  margin: 0 0 12px;
  filter: drop-shadow(0 3px 0 #3d1a00) drop-shadow(0 10px 24px rgba(255, 179, 0, 0.3));
}

.section-head {
  text-align: center;
  margin-bottom: 44px;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--violet-2);
  margin-bottom: 10px;
}

.section-head p {
  color: var(--ink-2);
  margin: 0 auto;
  max-width: 56ch;
  font-size: 17px;
}

/* ---------------------------------------------------------------- buttons */

.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px 12px 15px;
  border-radius: 18px;
  color: #fff;
  font-size: 17px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.3), 0 16px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

/* A glint that runs across every button now and then. */
.btn::after {
  content: '';
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  animation: glint 4.5s ease-in-out infinite;
}

.btn:nth-child(2)::after {
  animation-delay: 0.6s;
}

@keyframes glint {
  0%,
  55% {
    left: -60%;
  }
  80%,
  100% {
    left: 130%;
  }
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 9px 0 rgba(0, 0, 0, 0.3), 0 22px 38px rgba(0, 0, 0, 0.4);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.btn svg {
  width: 28px;
  height: 28px;
  flex: none;
}

.btn small {
  display: block;
  font-size: 11px;
  opacity: 0.88;
  letter-spacing: 0.6px;
  line-height: 1.1;
}

.btn span {
  line-height: 1.15;
}

.btn.green {
  background: linear-gradient(180deg, #8dfb64, #00c853 55%, #00913c);
}

.btn.blue {
  background: linear-gradient(180deg, #8ae0ff, #2196f3 55%, #1259b8);
}

.btn.gold {
  background: linear-gradient(180deg, #ffe58f, var(--gold-2) 55%, var(--gold-3));
}

.btn.ghost {
  background: var(--glass-2);
  border-color: var(--rim-2);
  box-shadow: none;
  padding: 12px 22px;
}

/* The store buttons, as on Word Fight's site: the same size, dark and glossy. */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 200px;
  padding: 12px 16px;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(180deg, #2a2a3a, #11111a);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35), 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), border-color 0.18s;
}

.store-btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(255, 213, 79, 0.7);
  box-shadow: 0 8px 0 rgba(0, 0, 0, 0.35), 0 14px 28px rgba(0, 0, 0, 0.3);
}

.store-btn:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}

.store-btn svg {
  width: 28px;
  height: 28px;
  fill: #fff;
  flex: none;
}

.store-btn small {
  display: block;
  font-size: 11px;
  opacity: 0.8;
  line-height: 1.1;
}

.store-btn span {
  display: block;
  font-size: 18px;
  line-height: 1.2;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 8px;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--rim);
  color: var(--ink-2);
  font-size: 14px;
}

.chip img {
  width: 22px;
  height: 22px;
}

/* ---------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 64px 0 40px;
}

.hero .hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 40px;
}

.showcase {
  position: relative;
  justify-self: center;
  width: 330px;
  aspect-ratio: 330 / 716;
}

/* Golden rays turning slowly behind the phone. */
.rays {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 900px;
  height: 900px;
  translate: -50% -50%;
  z-index: -1;
  background: repeating-conic-gradient(from 0deg, rgba(255, 213, 79, 0.16) 0deg 7deg, transparent 7deg 20deg);
  mask-image: radial-gradient(closest-side, #000 18%, transparent 70%);
  -webkit-mask-image: radial-gradient(closest-side, #000 18%, transparent 70%);
  animation: spin 60s linear infinite;
}

.halo {
  position: absolute;
  inset: 8% -20% 4%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 213, 79, 0.45), rgba(124, 77, 255, 0.25) 55%, transparent 75%);
  filter: blur(14px);
  animation: breathe 5s ease-in-out infinite;
}

@keyframes spin {
  to {
    rotate: 360deg;
  }
}

@keyframes breathe {
  50% {
    opacity: 0.65;
    scale: 1.06;
  }
}

.phone {
  position: relative;
  width: 100%;
  border-radius: 46px;
  padding: 11px;
  background: linear-gradient(160deg, #4b3a8c, #150a36 60%, #241256);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.07), 0 0 0 6px rgba(255, 213, 79, 0.08);
}

.phone::before {
  /* The glass catching the light. */
  content: '';
  position: absolute;
  inset: 11px;
  border-radius: 36px;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.22), transparent 32%);
  pointer-events: none;
  z-index: 1;
}

.phone img {
  /* The whole screenshot, as tall as it is: nothing cut off by the frame. */
  width: 100%;
  height: auto;
  border-radius: 36px;
}

.showcase .phone {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: rotate(3deg) translateY(0);
  }
  50% {
    transform: rotate(3deg) translateY(-14px);
  }
}

/* Loot floating round the phone. */
.loot {
  position: absolute;
  width: var(--sz, 62px);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 16px rgba(255, 213, 79, 0.45));
  animation: bob var(--t, 4.5s) ease-in-out infinite;
  animation-delay: var(--d, 0s);
  z-index: 2;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0) rotate(var(--r, -8deg));
  }
  50% {
    transform: translateY(-16px) rotate(calc(var(--r, -8deg) * -1));
  }
}

/* ---------------------------------------------------------------- the battlefield */

.battle {
  position: relative;
  margin-top: 30px;
}

.battle .frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  border: 2px solid rgba(255, 213, 79, 0.55);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 213, 79, 0.08), 0 0 60px rgba(124, 77, 255, 0.3);
  background: #3f7a37;
}

.battle .frame::after {
  /* A soft vignette, as in the game. */
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.45);
}

.stage {
  position: relative;
  width: 1200px;
  height: 420px;
  transform-origin: 0 0;
  background: url('terrain/grass.png') 0 0 / 64px 64px;
}

.stage > *,
.stage .spr,
.stage img {
  position: absolute;
}

.river {
  left: 536px;
  top: 0;
  width: 128px;
  height: 420px;
  overflow: hidden;
  background: url('terrain/water.png') 0 0 / 64px 64px;
  animation: flow 6s linear infinite;
}

@keyframes flow {
  to {
    background-position: 0 64px;
  }
}

/* A sprite sheet played frame by frame: --n frames of --fw x --fh. */
.spr {
  width: calc(var(--fw) * 1px);
  height: calc(var(--fh) * 1px);
  background-image: var(--img);
  background-repeat: no-repeat;
  background-size: calc(var(--fw) * var(--n) * 1px) calc(var(--fh) * 1px);
  animation: frames var(--dur, 0.8s) steps(var(--n)) infinite;
  animation-delay: var(--delay, 0s);
  /* Scaled round its feet ([--oy] down the frame), so it stands where placed. */
  transform-origin: 50% var(--oy, 100%);
  scale: var(--s, 1);
}

.spr.flip {
  scale: calc(var(--s, 1) * -1) var(--s, 1);
}

@keyframes frames {
  from {
    background-position: 0 0;
  }
  to {
    background-position: calc(var(--fw) * var(--n) * -1px) 0;
  }
}

.foam {
  --fw: 192;
  --fh: 192;
  --n: 16;
  --img: url('terrain/foam.png');
  --dur: 2.2s;
  --oy: 50%;
}

.bridge {
  left: 484px;
  top: 158px;
  width: 232px;
  height: 104px;
  background: url('terrain/bridge_h.png') 0 0 / 100% 100%;
  filter: drop-shadow(0 8px 0 rgba(0, 0, 0, 0.18));
}

.duck {
  left: 580px;
  width: 32px;
  height: 32px;
  background: url('terrain/duck.png') 0 0 / 96px 32px;
  animation: duck-frames 0.6s steps(3) infinite, duck-swim 26s linear infinite;
  scale: 1.4;
}

@keyframes duck-frames {
  to {
    background-position: -96px 0;
  }
}

@keyframes duck-swim {
  0% {
    top: -40px;
    translate: 0 0;
  }
  35% {
    translate: 10px 0;
  }
  36%,
  64% {
    top: 120px;
    translate: 10px 0;
    opacity: 0;
  }
  65% {
    top: 290px;
    opacity: 1;
  }
  100% {
    top: 460px;
    translate: -6px 0;
  }
}

/* Soldiers marching for the bridge: across, then gone, then again. */
.march {
  animation: march var(--walk, 7s) linear infinite;
  animation-delay: var(--wd, 0s);
}

@keyframes march {
  0% {
    translate: 0 0;
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  84% {
    opacity: 1;
  }
  100% {
    translate: var(--go) 0;
    opacity: 0;
  }
}

.boom {
  --fw: 192;
  --fh: 192;
  --n: 8;
  --img: url('fx/explosion.png');
  animation: frames 0.7s steps(8) infinite, now-and-then 3.2s steps(1) infinite;
  animation-delay: var(--delay, 0s);
}

/* Shown a fifth of the time: a blast now and then, not a steady fire. */
@keyframes now-and-then {
  0% {
    opacity: 1;
  }
  22% {
    opacity: 0;
  }
}

.fire {
  --fw: 64;
  --fh: 64;
  --n: 8;
  --img: url('fx/fire.png');
  --dur: 0.7s;
}

.banner-flag {
  left: 50%;
  bottom: 14px;
  translate: -50% 0;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.vs {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  letter-spacing: 1px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}

.vs.b {
  background: linear-gradient(180deg, #8ae0ff, #1e88e5);
}

.vs.r {
  background: linear-gradient(180deg, #ff9aa5, #e53935);
}

/* ---------------------------------------------------------------- stats */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.stat {
  position: relative;
  padding: 18px 18px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--rim);
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat img {
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.4));
}

.stat b {
  display: block;
  font-size: 32px;
  line-height: 1;
}

.stat small {
  color: var(--ink-3);
  font-size: 14px;
}

/* ---------------------------------------------------------------- sections */

section {
  padding: 96px 0;
}

/* Cards with a gold edge that runs round them. */
.glow-card {
  position: relative;
  border-radius: var(--radius);
  padding: 1.5px;
  background: linear-gradient(var(--rim), var(--rim));
  isolation: isolate;
  transition: transform 0.35s var(--ease);
}

.glow-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 60%, var(--gold) 75%, var(--violet-2) 85%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: edge 6s linear infinite;
  opacity: 0.9;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes edge {
  to {
    --angle: 360deg;
  }
}

.glow-card:hover {
  transform: translateY(-6px);
}

.glow-card > .inner {
  position: relative;
  height: 100%;
  border-radius: calc(var(--radius) - 1.5px);
  padding: 26px 24px 24px;
  background: linear-gradient(180deg, rgba(36, 18, 90, 0.92), rgba(14, 7, 46, 0.95));
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.features .glow-card:nth-child(2)::before {
  animation-delay: -1.5s;
}

.features .glow-card:nth-child(3)::before {
  animation-delay: -3s;
}

.features .glow-card:nth-child(4)::before {
  animation-delay: -4.5s;
}

.badge-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  margin-bottom: 18px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.15);
  transition: transform 0.35s var(--ease);
}

.glow-card:hover .badge-icon {
  transform: rotate(-8deg) scale(1.08);
}

.badge-icon img {
  width: 42px;
  height: 42px;
}

.glow-card h3 {
  margin: 0 0 8px;
  font-size: 21px;
}

.glow-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
}

.i-red {
  background: linear-gradient(180deg, #ff8a80, #e53935);
}

.i-blue {
  background: linear-gradient(180deg, #80d8ff, #1e88e5);
}

.i-gold {
  background: linear-gradient(180deg, #ffe082, #ffa000);
}

.i-purple {
  background: linear-gradient(180deg, #d1c4e9, #7e57c2);
}

.i-green {
  background: linear-gradient(180deg, #b9f6ca, #00c853);
}

/* ---------------------------------------------------------------- the army */

.army {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.troop {
  position: relative;
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 6px;
  padding: 12px 16px 12px 6px;
  border-radius: 22px;
  background: radial-gradient(120% 140% at 0% 50%, rgba(64, 196, 255, 0.28), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(128, 216, 255, 0.32);
  /* A lance or a spear may stand out over the card's edge. */
  overflow: visible;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}

.troop:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 213, 79, 0.7);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(255, 213, 79, 0.18);
}

.troop .pad {
  position: relative;
  height: 132px;
}

.troop .pad::after {
  /* Its shadow on the ground. */
  content: '';
  position: absolute;
  left: 50%;
  /* Right under its feet ([--feet] down the pad). */
  top: calc(var(--feet, 118px) - 8px);
  width: 64px;
  height: 14px;
  translate: -50% 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  filter: blur(2px);
}

.troop .spr {
  position: absolute;
  left: 50%;
  bottom: 10px;
  margin-left: calc(var(--fw) * -0.5px);
  z-index: 1;
}

.troop b {
  display: block;
  font-size: 19px;
}

.troop small {
  display: block;
  color: var(--ink-3);
  font-size: 13.5px;
  margin-top: 2px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tag {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--rim);
  color: var(--ink-2);
}

.tag.cost {
  background: linear-gradient(180deg, #b388ff, #651fff);
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

.tag.beats {
  background: rgba(0, 230, 118, 0.16);
  border-color: rgba(105, 240, 174, 0.5);
  color: #b9f6ca;
}

/* ---------------------------------------------------------------- campaign */

.campaign {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: center;
}

.campaign .phone {
  width: min(320px, 100%);
  margin-inline: auto;
  rotate: -3deg;
}

.campaign ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 14px;
}

.campaign li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--rim);
  color: var(--ink-2);
}

.campaign li img {
  width: 34px;
  height: 34px;
  flex: none;
}

.campaign li strong {
  color: var(--ink);
  display: block;
  font-size: 17px;
}

.bosses {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  margin-top: 26px;
  height: 180px;
  padding: 0 10px;
  border-radius: 22px;
  background: radial-gradient(80% 120% at 50% 100%, rgba(255, 82, 99, 0.28), transparent 70%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(255, 138, 128, 0.3);
  overflow: hidden;
}

.bosses .slot {
  position: relative;
  width: 1px;
  height: 100%;
}

.bosses .spr {
  position: absolute;
  bottom: 6px;
  left: 0;
  margin-left: calc(var(--fw) * -0.5px);
}

/* ---------------------------------------------------------------- screens */

.reel {
  position: relative;
  height: 640px;
  perspective: 1600px;
  --step: 260px;
}

/* Every phone stands at the middle; where it shows is only a transform, so
   sliding from one to the next is smooth and nothing else moves. */
.reel figure {
  position: absolute;
  left: 50%;
  top: 0;
  width: 250px;
  margin: 0 0 0 -125px;
  text-align: center;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease), opacity 0.8s var(--ease), filter 0.8s var(--ease);
  will-change: transform;
}

.reel figure .phone {
  border-radius: 36px;
  padding: 9px;
}

.reel figure .phone img {
  border-radius: 28px;
}

.reel figure .phone::before {
  inset: 9px;
  border-radius: 28px;
}

.reel figcaption {
  margin-top: 22px;
  color: var(--ink-2);
  font-size: 15px;
  transition: opacity 0.5s;
}

.reel figure[data-pos='0'] {
  transform: translateX(0) scale(1);
  z-index: 3;
}

.reel figure[data-pos='-1'] {
  transform: translateX(calc(var(--step) * -1)) rotateY(24deg) scale(0.82);
  filter: brightness(0.55);
  z-index: 2;
}

.reel figure[data-pos='1'] {
  transform: translateX(var(--step)) rotateY(-24deg) scale(0.82);
  filter: brightness(0.55);
  z-index: 2;
}

.reel figure[data-pos='-2'],
.reel figure[data-pos='2'] {
  transform: translateX(0) scale(0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.reel figure:not([data-pos='0']) figcaption {
  opacity: 0;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.dots button {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: width 0.3s, background 0.3s;
  padding: 0;
}

.dots button[aria-current='true'] {
  width: 32px;
  background: var(--gold);
}

/* ---------------------------------------------------------------- promises & cta */

.promise {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.promise .card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--rim);
}

.promise .badge-icon {
  flex: none;
  margin: 0;
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.promise .badge-icon img {
  width: 34px;
  height: 34px;
}

.promise h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

.promise p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

.cta {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 70px 24px 64px;
  border-radius: 34px;
  background: radial-gradient(700px 300px at 50% 0, rgba(255, 213, 79, 0.3), transparent 70%),
    linear-gradient(135deg, #8e5cff, #4a1db0 55%, #22105a);
  border: 2px solid var(--gold);
  box-shadow: 0 24px 70px rgba(124, 77, 255, 0.4), 0 0 0 8px rgba(255, 213, 79, 0.08);
  isolation: isolate;
}

.cta .rays {
  top: 30%;
  width: 1100px;
  height: 1100px;
  opacity: 0.9;
}

.cta img.crown {
  width: 104px;
  margin: 0 auto 12px;
  filter: drop-shadow(0 10px 20px rgba(255, 179, 0, 0.6));
  animation: bob 4s ease-in-out infinite;
  --r: -6deg;
}

.cta p {
  color: var(--ink-2);
  max-width: 48ch;
  margin: 0 auto;
}

.cta .btns {
  justify-content: center;
}

/* ---------------------------------------------------------------- documents */

.doc {
  padding: 52px 0 90px;
}

.doc .paper {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 52px);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(42, 22, 100, 0.72), rgba(16, 8, 50, 0.82));
  border: 1px solid var(--rim-2);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 6px rgba(255, 213, 79, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.doc h1 {
  font-size: clamp(34px, 5vw, 50px);
  margin: 0 0 4px;
  line-height: 1.1;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 45%, var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #4a1f00);
}

.doc .date {
  color: var(--ink-3);
  font-size: 14px;
  margin: 0 0 26px;
}

.doc h2 {
  font-size: 22px;
  margin: 36px 0 8px;
  color: var(--ink);
  filter: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.doc h2::before {
  content: '';
  width: 10px;
  height: 10px;
  rotate: 45deg;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  box-shadow: 0 0 10px rgba(255, 213, 79, 0.6);
  flex: none;
}

.doc p,
.doc li {
  color: var(--ink-2);
  font-size: 16.5px;
}

.doc ul,
.doc ol {
  padding-left: 22px;
}

.doc li {
  margin: 7px 0;
}

.doc li::marker {
  color: var(--gold);
}

.doc strong {
  color: var(--ink);
}

.doc .summary {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(0, 230, 118, 0.16), rgba(0, 200, 83, 0.06));
  border: 1px solid rgba(105, 240, 174, 0.45);
}

.doc .summary img {
  width: 36px;
  flex: none;
}

.doc .summary p {
  margin: 0;
  color: var(--ink);
}

.faq details {
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--rim);
  margin: 10px 0;
  padding: 0 20px;
  transition: background 0.25s, border-color 0.25s;
}

.faq details[open] {
  background: var(--glass-2);
  border-color: rgba(255, 213, 79, 0.45);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 17px 30px 17px 0;
  position: relative;
  font-size: 17px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 12px;
  font-size: 26px;
  color: var(--gold);
  transition: transform 0.25s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p,
.faq details ol,
.faq details ul {
  margin-top: 0;
}

.contact {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255, 213, 79, 0.2), rgba(255, 179, 0, 0.05));
  border: 1px solid rgba(255, 213, 79, 0.55);
  margin: 8px 0 26px;
}

.contact img {
  width: 54px;
  flex: none;
}

.contact p {
  margin: 2px 0 0;
}

.contact .btn {
  margin-left: auto;
  white-space: nowrap;
}

kbd {
  font-family: inherit;
  padding: 1px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid var(--rim-2);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font-size: 0.92em;
}

/* ---------------------------------------------------------------- footer */

footer {
  position: relative;
  border-top: 1px solid var(--rim);
  padding: 36px 0 48px;
  color: var(--ink-3);
  font-size: 14px;
}

footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 213, 79, 0.6), transparent);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
}

footer .mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

footer .mark img {
  width: 30px;
  border-radius: 8px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-left: auto;
}

footer a {
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- reveal */

.js .reveal {
  opacity: 0;
  transform: translateY(26px) scale(0.98);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------------- small screens */

@media (max-width: 980px) {
  .hero .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .lead {
    margin-inline: auto;
  }
  .title.logo {
    align-items: center;
  }
  .btns,
  .stores,
  .chips {
    justify-content: center;
  }
  .showcase {
    width: 270px;
    margin-top: 10px;
  }
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  .army {
    grid-template-columns: repeat(2, 1fr);
  }
  .campaign {
    grid-template-columns: 1fr;
  }
  .campaign .copy {
    order: -1;
  }
  .promise {
    grid-template-columns: 1fr;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .reel {
    height: 540px;
    --step: 200px;
  }
  .reel figure {
    width: 210px;
    margin-left: -105px;
  }
}

@media (max-width: 620px) {
  .nav nav a {
    padding: 8px;
    font-size: 14px;
  }
  .brand span {
    display: none;
  }
  .features,
  .army {
    grid-template-columns: 1fr;
  }
  section {
    padding: 70px 0;
  }
  .stat {
    padding: 14px;
    gap: 10px;
  }
  .stat b {
    font-size: 26px;
  }
  .stat img {
    width: 36px;
    height: 36px;
  }
  .reel {
    height: 480px;
    --step: 118px;
  }
  .reel figure {
    width: 190px;
    margin-left: -95px;
  }
  .contact {
    flex-wrap: wrap;
  }
  .contact .btn {
    margin-left: 0;
  }
  footer nav {
    margin-left: 0;
  }
  .battle .frame {
    border-radius: 18px;
  }
}
