/* Tumble Royale - tumbleroyale.deyapps.com
   One stylesheet for the whole site. Palette and type are lifted straight from
   the game so the page and the store listing read as the same product:
   deep navy stage, glossy toy pieces, gold display face (Lilita One),
   rounded body face (Varela Round). */

/* ---------- fonts (self-hosted: no third-party request on a site whose
   main obligation is a privacy policy) ---------- */
@font-face {
  font-family: 'Lilita One';
  src: url('fonts/LilitaOne-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Varela Round';
  src: url('fonts/VarelaRound-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --navy-900: #040b1a;
  --navy-800: #08142b;
  --navy-700: #0d1e3d;
  --ink:      #eaf1ff;
  --ink-dim:  #b3c4de;
  --ink-mute: #8296b5;

  --gold:   #ffc93c;
  --amber:  #ff9f1c;
  --orange: #f4762b;
  --marble: #4aa8ff;
  --mint:   #43d6a4;
  --grape:  #a06bf0;

  --line: rgba(255,255,255,.10);
  --card: rgba(255,255,255,.045);
  --card-hi: rgba(255,255,255,.075);

  --radius: 22px;
  --radius-sm: 14px;
  --shell: 1140px;
  --pad: clamp(20px, 5vw, 40px);

  --shadow-lift: 0 18px 40px rgba(0,0,0,.45);
  --shadow-deep: 0 30px 70px rgba(0,0,0,.55);
}

/* ---------- reset-ish ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: 'Varela Round', ui-rounded, 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.68;
  color: var(--ink);
  background: var(--navy-900);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-color: rgba(255,201,60,.45); text-underline-offset: 3px; }
a:hover { color: #ffd86e; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, .display {
  font-family: 'Lilita One', 'Varela Round', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: .5px;
  line-height: 1.08;
  margin: 0;
  text-transform: uppercase;
}

.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--pad); }
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--gold); color: #1a1204; padding: 10px 16px; border-radius: 0 0 10px 0;
  font-family: 'Lilita One', sans-serif; text-decoration: none;
}
.skip:focus { left: 0; }

/* ---------- the stage: navy gradient plus the out-of-focus pieces the
   game floats behind its board ---------- */
.stage {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 50% -10%, #16305c 0%, transparent 62%),
    radial-gradient(900px 620px at 85% 8%, rgba(160,107,240,.20) 0%, transparent 60%),
    linear-gradient(180deg, #08142b 0%, #050e20 45%, #040b1a 100%);
}
.stage::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(150px 150px at 12% 22%, rgba(244,118,43,.30), transparent 70%),
    radial-gradient(170px 170px at 88% 34%, rgba(160,107,240,.26), transparent 70%),
    radial-gradient(140px 140px at 72% 12%, rgba(67,214,164,.22), transparent 70%),
    radial-gradient(190px 190px at 22% 74%, rgba(74,168,255,.18), transparent 70%),
    radial-gradient(130px 130px at 62% 88%, rgba(255,201,60,.14), transparent 70%);
  filter: blur(18px);
  opacity: .85;
}

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(4,11,26,.94), rgba(4,11,26,.66));
  border-bottom: 1px solid var(--line);
}
.site-head .shell { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
/* the app icon is a dark navy tile on a dark navy page, so it needs its own
   edge: a light hairline ring, a warm halo picked from the icon's own glow,
   and a lifted shadow to sit it above the header */
.brand img {
  width: 38px; height: 38px; border-radius: 11px;
  border: 1.5px solid rgba(255,255,255,.30);
  box-shadow:
    0 0 0 1px rgba(4,11,26,.9),
    0 0 14px rgba(255,159,28,.22),
    0 6px 16px rgba(0,0,0,.55);
}
.brand:hover img { border-color: rgba(255,201,60,.75); box-shadow: 0 0 0 1px rgba(4,11,26,.9), 0 0 18px rgba(255,159,28,.38), 0 6px 16px rgba(0,0,0,.55); }
.brand span {
  font-family: 'Lilita One', sans-serif; font-size: 21px; letter-spacing: .6px;
  text-transform: uppercase; line-height: 1;
}
.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.nav a {
  color: var(--ink-dim); text-decoration: none; font-size: 15px;
  padding: 6px 2px; border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--gold); }
@media (max-width: 560px) { .nav a.hide-xs { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Lilita One', sans-serif; font-size: 18px; letter-spacing: .6px;
  text-transform: uppercase; text-decoration: none;
  padding: 15px 26px; border-radius: 999px; border: 0;
  color: #2a1600;
  background: linear-gradient(180deg, #ffd45e 0%, var(--gold) 45%, var(--amber) 100%);
  box-shadow: 0 6px 0 #c46a12, 0 16px 30px rgba(255,159,28,.28);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}
.btn:hover { color: #2a1600; filter: brightness(1.04); transform: translateY(-2px); box-shadow: 0 8px 0 #c46a12, 0 20px 36px rgba(255,159,28,.34); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c46a12, 0 8px 18px rgba(255,159,28,.24); }
.btn.ghost {
  color: var(--ink); background: var(--card-hi);
  border: 1px solid var(--line); box-shadow: none;
}
.btn.ghost:hover { background: rgba(255,255,255,.13); box-shadow: none; transform: translateY(-2px); }
.btn.locked { cursor: default; }
.btn.locked:hover, .btn.locked:active { transform: none; filter: none; box-shadow: 0 6px 0 #c46a12, 0 16px 30px rgba(255,159,28,.28); }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover, .btn:active { transform: none; transition: none; } }
/* the long "coming soon" label wraps on a narrow phone otherwise */
@media (max-width: 430px) { .btn { font-size: 16px; padding: 14px 20px; } }

/* ---------- hero ---------- */
.hero { padding: clamp(40px, 8vw, 84px) 0 clamp(26px, 5vw, 50px); }
.hero .shell {
  display: grid; gap: clamp(28px, 5vw, 56px);
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .85fr);
  align-items: center;
}
@media (max-width: 860px) { .hero .shell { grid-template-columns: 1fr; text-align: center; } }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--ink-dim);
  background: var(--card); border: 1px solid var(--line);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 20px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 12px var(--mint); }

.hero h1 { font-size: clamp(48px, 10.5vw, 92px); }
.hero h1 .l1, .hero h1 .l2 {
  display: block;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 5px 0 rgba(0,0,0,.35));
}
.hero h1 .l1 { background-image: linear-gradient(180deg, #fff5d0 0%, var(--gold) 55%, var(--amber) 100%); }
.hero h1 .l2 { background-image: linear-gradient(180deg, #ffb765 0%, var(--orange) 60%, #d8501a 100%); }
.hero p.lede { font-size: clamp(18px, 2.4vw, 21px); color: var(--ink-dim); max-width: 46ch; margin: 20px 0 0; }
@media (max-width: 860px) { .hero p.lede { margin-inline: auto; } }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
@media (max-width: 860px) { .cta-row { justify-content: center; } }
.cta-note { margin: 15px 0 0; font-size: 14.5px; color: var(--ink-mute); }

.hero-art { position: relative; justify-self: center; }
.hero-art img {
  width: min(300px, 74vw); border-radius: 26px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow-deep);
  transform: rotate(-3deg);
}
.hero-art::before {
  content: ''; position: absolute; inset: -14% -18%;
  background: radial-gradient(closest-side, rgba(255,159,28,.30), transparent 72%);
  filter: blur(26px); z-index: -1;
}
@media (prefers-reduced-motion: reduce) { .hero-art img { transform: none; } }

/* ---------- stat strip ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stats div { background: rgba(8,20,43,.78); padding: 22px 16px; text-align: center; }
.stats strong {
  display: block; font-family: 'Lilita One', sans-serif; font-size: clamp(26px, 5vw, 36px);
  color: var(--gold); line-height: 1.05; font-weight: 400; letter-spacing: .5px;
}
.stats span { display: block; font-size: 12.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--ink-mute); margin-top: 6px; }

/* ---------- sections ---------- */
section { padding: clamp(48px, 8vw, 88px) 0; }
.section-head { max-width: 62ch; margin-bottom: clamp(28px, 5vw, 44px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(30px, 5.4vw, 46px); }
.section-head h2 em { font-style: normal; color: var(--gold); }
.nowrap { white-space: nowrap; }
.section-head p { color: var(--ink-dim); margin: 14px 0 0; }

.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(228px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px 28px;
}
.card .glyph {
  width: 48px; height: 48px; border-radius: 15px; margin-bottom: 16px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  border: 1px solid var(--line);
}
.card .glyph svg { width: 25px; height: 25px; display: block; }
.card h3 { font-size: 21px; margin-bottom: 9px; }
.card p { margin: 0; color: var(--ink-dim); font-size: 15.5px; }

/* piece colours, borrowed from the tray */
.card:nth-child(4n+1) .glyph { color: var(--orange); box-shadow: inset 0 0 0 1px rgba(244,118,43,.5), 0 8px 18px rgba(244,118,43,.18); }
.card:nth-child(4n+2) .glyph { color: var(--mint);   box-shadow: inset 0 0 0 1px rgba(67,214,164,.5), 0 8px 18px rgba(67,214,164,.18); }
.card:nth-child(4n+3) .glyph { color: var(--marble); box-shadow: inset 0 0 0 1px rgba(74,168,255,.5), 0 8px 18px rgba(74,168,255,.18); }
.card:nth-child(4n+4) .glyph { color: var(--grape);  box-shadow: inset 0 0 0 1px rgba(160,107,240,.5), 0 8px 18px rgba(160,107,240,.18); }

/* ---------- screenshot rail ---------- */
.rail-wrap { margin-inline: calc(var(--pad) * -1); }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(258px, 66vw);
  gap: 20px; overflow-x: auto; padding: 6px var(--pad) 26px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.22) transparent;
}
.rail::-webkit-scrollbar { height: 8px; }
.rail::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border-radius: 999px; }
.rail figure { margin: 0; scroll-snap-align: center; }
.rail img {
  width: 100%; border-radius: 20px;
  border: 1px solid rgba(255,255,255,.13); box-shadow: var(--shadow-lift);
}
.rail figcaption {
  margin-top: 12px; text-align: center; font-size: 12.5px;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-mute);
}

/* ---------- booster pills ---------- */
.pill-list { display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 0; list-style: none; }
.pill-list li {
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 11px 20px; font-size: 15.5px; color: var(--ink-dim);
}
.pill-list li b { color: var(--ink); font-weight: 400; font-family: 'Lilita One', sans-serif; letter-spacing: .5px; }

/* ---------- split feature ---------- */
.split { display: grid; gap: clamp(26px, 5vw, 54px); grid-template-columns: minmax(0,1fr) minmax(0,1fr); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } .split .text { text-align: center; } }
.split img {
  width: min(276px, 70vw); justify-self: center; border-radius: 22px;
  border: 1px solid rgba(255,255,255,.13); box-shadow: var(--shadow-lift);
}
.split .section-head { margin-bottom: 22px; }

/* ---------- faq ---------- */
.faq { display: grid; gap: 12px; max-width: 74ch; }
details.qa {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 2px 20px;
}
details.qa summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-family: 'Lilita One', sans-serif; font-size: 18px; letter-spacing: .4px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: '+'; color: var(--gold); font-size: 26px; line-height: 1; }
details.qa[open] summary::after { content: '\2212'; }
details.qa p { margin: 0 0 18px; color: var(--ink-dim); font-size: 15.5px; }

/* ---------- closing band ---------- */
.band {
  text-align: center; border: 1px solid var(--line); border-radius: 28px;
  padding: clamp(34px, 6vw, 60px) var(--pad);
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(255,159,28,.18), transparent 70%),
    linear-gradient(180deg, rgba(20,41,79,.7), rgba(8,20,43,.7));
}
.band h2 { font-size: clamp(28px, 5.6vw, 46px); }
.band h2 em { font-style: normal; color: var(--gold); }
.band p { color: var(--ink-dim); max-width: 52ch; margin: 14px auto 0; }
.band .cta-row { justify-content: center; }

/* ---------- text pages ---------- */
.page-head { padding: clamp(38px, 7vw, 68px) 0 0; }
.page-head h1 { font-size: clamp(34px, 6.4vw, 54px); }
.page-head .meta { color: var(--ink-mute); font-size: 15px; margin-top: 14px; }
.prose { max-width: 74ch; padding: clamp(24px, 4vw, 34px) 0 0; }
.prose h2 {
  font-size: clamp(21px, 3.4vw, 27px); margin: 40px 0 12px;
  padding-top: 24px; border-top: 1px solid var(--line);
}
.prose h3 { font-size: 17px; margin: 26px 0 4px; color: var(--gold); }
.prose p, .prose li { color: var(--ink-dim); }
.prose ul { padding-left: 20px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--gold); }
.prose strong { color: var(--ink); font-weight: 400; }
.prose .callout {
  background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: var(--radius-sm);
  padding: 18px 22px; margin: 24px 0;
}
.prose .callout > :first-child { margin-top: 0; }
.prose .callout > :last-child { margin-bottom: 0; }
.toc {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 22px; margin-top: 8px;
}
.toc p {
  font-family: 'Lilita One', sans-serif; font-size: 13px; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink-mute); margin: 0;
}
.toc ul { list-style: none; padding: 0; margin: 10px 0 0; columns: 2; column-gap: 26px; }
@media (max-width: 620px) { .toc ul { columns: 1; } }
.toc li { margin: 5px 0; font-size: 15px; break-inside: avoid; }

.table-scroll { overflow-x: auto; margin: 20px 0; }
table.data {
  width: 100%; border-collapse: collapse; font-size: 15px; min-width: 460px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-family: 'Lilita One', sans-serif; font-weight: 400; letter-spacing: .6px; color: var(--ink); background: rgba(255,255,255,.05); }
table.data td { color: var(--ink-dim); }
table.data tbody th { font-family: inherit; letter-spacing: 0; background: transparent; }

/* a three-column prose table is unreadable on a phone: stack it into labelled rows */
@media (max-width: 660px) {
  .table-scroll { overflow-x: visible; }
  table.data { min-width: 0; display: block; }
  table.data thead { display: none; }
  table.data tbody { display: block; }
  table.data tr { display: block; padding: 6px 0 12px; border-bottom: 1px solid var(--line); }
  table.data tr:last-child { border-bottom: 0; }
  table.data th, table.data td { display: block; border: 0; padding: 4px 14px; }
  table.data tbody th {
    font-family: 'Lilita One', sans-serif; color: var(--ink);
    letter-spacing: .5px; font-size: 17px; padding-top: 12px;
  }
  table.data td::before {
    content: attr(data-label); display: block;
    font-size: 11.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-mute);
  }
}
table.data tr:last-child td { border-bottom: 0; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--line); margin-top: clamp(40px, 7vw, 80px);
  padding: 40px 0 54px; background: rgba(4,11,26,.6);
}
.site-foot .shell { display: flex; flex-wrap: wrap; gap: 18px 36px; align-items: center; }
.site-foot .brand span { font-size: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.foot-links a { color: var(--ink-dim); text-decoration: none; font-size: 15px; }
.foot-links a:hover { color: var(--ink); }
.copy { width: 100%; color: var(--ink-mute); font-size: 13.5px; margin: 0; }
@media (max-width: 620px) { .foot-links { margin-left: 0; } }

/* ---------- 404 ---------- */
.oops { text-align: center; padding: clamp(60px, 12vw, 120px) 0; }
.oops h1 { font-size: clamp(56px, 14vw, 118px); color: var(--gold); }
.oops p { color: var(--ink-dim); margin: 12px auto 30px; max-width: 44ch; }

/* ---------- print (a privacy policy gets printed and filed) ---------- */
@media print {
  .stage, .site-head, .site-foot, .toc, .btn { display: none !important; }
  body { background: #fff; color: #111; font-size: 12pt; }
  .prose p, .prose li, .page-head .meta { color: #333; }
  .prose h3 { color: #000; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
