/* ==========================================================================
   Wild Clash — site styles (landing, guide, legal)
   Zero third-party requests: system fonts, inline SVG, no frameworks, no JS.
   ========================================================================== */

:root {
  --bg: #080b18;
  --bg-deep: #05070f;
  --card: #141a33;
  --card-hi: #1b2347;
  --line: rgb(154 163 199 / 0.18);
  --line-strong: rgb(154 163 199 / 0.34);
  --text: #eaeefc;
  --text-soft: #c9d0ee;
  --muted: #98a2be;
  --gold: #ffb020;
  --red: #e5484d;
  --yellow: #f1b32b;
  --green: #30a46c;
  --blue: #3b82f6;
  --violet: #a78bfa;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --ink: #1b1405;
  --grad: linear-gradient(120deg, var(--gold) 0%, var(--pink) 50%, var(--cyan) 100%);
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1120px;
  --gutter: 16px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  color-scheme: dark;
}

@media (min-width: 720px) { :root { --gutter: 24px; } }

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

html { background-color: var(--bg); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* Soft colour wash behind everything, the four card colours. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 45% at 85% 0%, rgb(229 72 77 / 0.16), transparent 70%),
    radial-gradient(ellipse 55% 45% at 10% 12%, rgb(59 130 246 / 0.16), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 108%, rgb(167 139 250 / 0.14), transparent 70%);
}

main { display: block; flex: 1 0 auto; }
img, svg { max-width: 100%; }
ul, ol { padding-left: 1.2em; }
li { margin: .35em 0; }

a { color: var(--cyan); text-underline-offset: .18em; }
a:hover { color: var(--gold); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2.1rem, 7.5vw, 3.6rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.12rem; font-weight: 800; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--ink); padding: 10px 16px; border-radius: 0 0 10px 0; font-weight: 800; z-index: 99;
}
.skip-link:focus { left: 0; }

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

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgb(8 11 24 / .82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.12rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--text-soft); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-nav a:hover { background: rgb(255 255 255 / .07); color: var(--text); }
.site-nav a[aria-current] { color: var(--gold); }
.nav-play { background: var(--grad); color: var(--ink) !important; font-weight: 800 !important; }
/* On a phone the logo is the way home, so that nav item goes rather than the wordmark. */
@media (max-width: 560px) {
  .site-nav a { padding: 8px 9px; font-size: .88rem; }
  .site-nav li:first-child { display: none; }
  .brand { font-size: 1rem; gap: 8px; }
}

/* ---------- sections ---------- */
.section { padding: clamp(48px, 8vw, 86px) 0; }
.section-alt { background: linear-gradient(rgb(255 255 255 / .03), rgb(255 255 255 / 0)); border-block: 1px solid var(--line); }
.section-head { max-width: 760px; margin: 0 auto clamp(28px, 5vw, 46px); text-align: center; }
.section-title { margin-bottom: .3em; }
.section-head p { color: var(--text-soft); font-size: 1.06rem; margin: 0; }
.sub-title { margin-top: 2.2em; }

/* ---------- hero ---------- */
.hero { padding: clamp(36px, 7vw, 76px) 0 clamp(40px, 7vw, 80px); }
.hero-grid { display: grid; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr .95fr; } }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 99px; margin: 0 0 18px;
  background: rgb(255 176 32 / .12); border: 1px solid rgb(255 176 32 / .35);
  font-size: .85rem; font-weight: 700; color: var(--gold);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.hero-title { margin-bottom: .2em; }
.hero-title-1 { display: block; }
.tagline { font-size: clamp(1.05rem, 3.4vw, 1.42rem); font-weight: 800; margin: 0 0 .7em; }
.t-red { color: var(--red); } .t-yellow { color: var(--yellow); } .t-green { color: var(--green); } .t-blue { color: var(--blue); }
.lead { font-size: 1.08rem; color: var(--text-soft); max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 20px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 26px; border-radius: 99px;
  font-weight: 800; font-size: 1.02rem; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .14s ease, filter .14s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(160deg, #ffc857, var(--gold)); color: var(--ink); box-shadow: 0 10px 30px rgb(255 176 32 / .3); }
.btn-primary:hover { color: var(--ink); }
.btn-secondary { background: rgb(255 255 255 / .07); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover { color: var(--text); background: rgb(255 255 255 / .12); }
.btn-icon { width: 20px; height: 20px; flex: none; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.hero-facts li {
  margin: 0; padding: 6px 13px; border-radius: 99px;
  background: rgb(255 255 255 / .05); border: 1px solid var(--line);
  font-size: .85rem; font-weight: 600; color: var(--text-soft);
}

/* ---------- the hero fan of cards ---------- */
.hero-art { display: grid; place-items: center; }
.fan { position: relative; width: min(100%, 430px); aspect-ratio: 1.15; }
.fan .pc {
  position: absolute; top: 50%; left: 50%;
  width: 30%; aspect-ratio: 2/3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 40px rgb(0 0 0 / .55);
  transform: translate(-50%, -50%) translateX(var(--x, 0)) rotate(var(--r)) translateY(var(--y, 0));
  animation: hover 5s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes hover { 50% { transform: translate(-50%, -50%) translateX(var(--x, 0)) rotate(var(--r)) translateY(calc(var(--y, 0px) - 14px)); } }
.fan .pc::before {
  content: ""; position: absolute; inset: 6%;
  border-radius: 7px;
  background: linear-gradient(155deg, var(--c1), var(--c2));
  box-shadow: inset 0 0 0 5px #fff;
}
.fan .pc .o { position: absolute; inset: 20% 11%; background: #fff; border-radius: 50%; transform: rotate(-32deg); }
.fan .pc .v {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 900 clamp(1.7rem, 6.5vw, 2.6rem)/1 var(--font); color: var(--c1);
}
.fan .r { --c1: #e5484d; --c2: #b4252a; }
.fan .y { --c1: #f1b32b; --c2: #c78a0d; }
.fan .g { --c1: #30a46c; --c2: #1d7a4c; }
.fan .b { --c1: #3b82f6; --c2: #1d4fd8; }
.fan .w { --c1: #171a33; --c2: #090b18; }
.fan .w .o { display: none; }
.fan .w .v svg { width: 62%; }
.fan .glow {
  position: absolute; inset: 12%;
  background: radial-gradient(circle, rgb(255 176 32 / .35), transparent 65%);
  filter: blur(26px);
}

/* ---------- cards / grids ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.tile {
  padding: 22px;
  border-radius: var(--radius);
  background: linear-gradient(var(--card-hi), var(--card));
  border: 1px solid var(--line);
}
.tile h3 { margin-bottom: .35em; }
.tile p { margin: 0; color: var(--text-soft); font-size: .96rem; }
.tile-ic { font-size: 1.7rem; line-height: 1; display: block; margin-bottom: 10px; }

.power-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.power {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px; border-radius: var(--radius);
  background: linear-gradient(140deg, rgb(124 58 237 / .22), rgb(76 29 149 / .12));
  border: 1px solid rgb(167 139 250 / .3);
}
.power .ic { font-size: 1.7rem; line-height: 1; }
.power h3 { margin-bottom: .2em; }
.power p { margin: 0; font-size: .92rem; color: var(--text-soft); }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: s; list-style: none; padding: 0; }
.steps li {
  position: relative; padding: 22px 22px 22px 62px;
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
}
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 20px; top: 20px;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--grad); color: var(--ink); font-weight: 900; font-size: .92rem;
}

.mode-table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.mode-table th, .mode-table td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mode-table th { color: var(--gold); font-weight: 800; white-space: nowrap; }
.mode-table tr:last-child td, .mode-table tr:last-child th { border-bottom: 0; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }

details.faq {
  border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  padding: 2px 20px; margin-bottom: 12px;
}
details.faq summary { cursor: pointer; padding: 17px 0; font-weight: 800; list-style: none; display: flex; gap: 12px; align-items: center; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; margin-left: auto; color: var(--gold); font-size: 1.4rem; line-height: 1; }
details.faq[open] summary::after { content: "–"; }
details.faq > div { padding-bottom: 18px; color: var(--text-soft); }
details.faq > div > :last-child { margin-bottom: 0; }

.cta-box {
  text-align: center; padding: clamp(30px, 5vw, 52px);
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgb(255 176 32 / .14), rgb(167 139 250 / .14));
  border: 1px solid var(--line-strong);
}
.cta-box .cta-row { justify-content: center; }

/* ---------- prose pages (legal, guide) ---------- */
.prose { max-width: 760px; margin-inline: auto; padding: clamp(32px, 6vw, 64px) 0; }
.prose h1 { font-size: clamp(1.9rem, 5.5vw, 2.6rem); }
.prose h2 { font-size: clamp(1.3rem, 3.6vw, 1.7rem); margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: var(--text-soft); }
.prose .updated { color: var(--muted); font-size: .92rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .94rem; }
.prose th, .prose td { text-align: left; padding: 11px 12px; border: 1px solid var(--line); }
.prose th { background: rgb(255 255 255 / .04); color: var(--text); }
.callout {
  padding: 16px 20px; border-radius: var(--radius-sm);
  background: rgb(34 211 238 / .1); border-left: 3px solid var(--cyan);
  margin: 1.4em 0;
}
.callout > :last-child { margin-bottom: 0; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 34px 0; margin-top: auto; background: var(--bg-deep); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--gold); }
.footer-note { color: var(--muted); font-size: .84rem; margin: 14px 0 0; max-width: 70ch; }
