/* Spirit Surge: Crystal Siege · spiritsurge.revuflex.com (static; no trackers, no cookies, no third-party requests)
   Layout: the page is a walk across the game's world map: a drifting panorama of all ten worlds behind the
   hero, then how a battle works, the ten worlds, screenshots in true phone frames, and plain answers.
   Single dark look on purpose: it is the game's own night-sky UI. */
@font-face {
  font-family: "Lilita One";
  src: url("fonts/LilitaOne-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #0b0e22;        /* page ground, same as the game's splash */
  --night-2: #10152f;      /* alternate band */
  --panel: #161d42;        /* raised surfaces */
  --edge: #2a3672;         /* panel borders */
  --ink: #f2f5ff;          /* text */
  --muted: #a9b4da;        /* secondary text */
  --gem: #4fd8ff;          /* accent: the game's gem cyan */
  --coin: #ffd23f;         /* highlight: the game's coin gold */
  --stroke: #140f30;       /* title outline, like the in-game labels */
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1140px;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gem); text-underline-offset: 3px; }
a:hover { color: #9be8ff; }
:focus-visible { outline: 3px solid var(--coin); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { text-wrap: balance; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--coin); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--night); z-index: 10; }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: rgba(11, 14, 34, 0.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 21px; letter-spacing: 0.3px; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.brand:hover { color: var(--ink); }
.nav { display: flex; gap: 4px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] { color: var(--ink); background: rgba(79, 216, 255, 0.12); }
@media (max-width: 680px) { .nav .opt { display: none; } .nav a { padding: 8px 9px; font-size: 14px; } .brand { font-size: 19px; } }

/* ---------- game-style title ---------- */
.title {
  font-family: var(--display); font-weight: 400; margin: 0; line-height: 0.98; letter-spacing: 0.5px;
  color: #fff;
  /* the in-game labels: thick dark outline + a drop under it */
  text-shadow:
    0 0 0 var(--stroke), 3px 0 0 var(--stroke), -3px 0 0 var(--stroke), 0 3px 0 var(--stroke), 0 -3px 0 var(--stroke),
    2px 2px 0 var(--stroke), -2px 2px 0 var(--stroke), 2px -2px 0 var(--stroke), -2px -2px 0 var(--stroke),
    0 8px 0 rgba(0, 0, 0, 0.35);
}
.title .sub { display: block; color: var(--coin); font-size: 0.5em; margin-top: 10px; letter-spacing: 1px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; isolation: isolate; padding-block: 64px 72px; }
.hero::before {
  /* all ten worlds side by side, drifting slowly */
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("img/worlds-strip.webp") 0 50% / auto 100% repeat-x;
  animation: drift 160s linear infinite;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 14, 34, 0.94) 0%, rgba(11, 14, 34, 0.80) 45%, rgba(11, 14, 34, 0.45) 100%),
    linear-gradient(180deg, rgba(11, 14, 34, 0.2) 0%, rgba(11, 14, 34, 0) 60%, var(--night) 100%);
}
@keyframes drift { from { background-position-x: 0; } to { background-position-x: -4800px; } }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 48px; align-items: center; }
.hero .wrap > * { min-width: 0; }
.hero-icon { width: 104px; height: 104px; border-radius: 24px; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12), 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 60px rgba(79, 216, 255, 0.35); margin-bottom: 22px; }
.hero .title { font-size: clamp(52px, 8.4vw, 92px); }
.hero .by { margin: 18px 0 0; color: var(--muted); font-weight: 700; font-size: 15px; letter-spacing: 1.6px; text-transform: uppercase; }
.lead { font-size: clamp(18px, 2.1vw, 20px); color: #dfe5fb; margin: 18px 0 28px; max-width: 32em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 22px; border-radius: 16px; font-weight: 800; font-size: 16px; text-decoration: none; }
.pill.soon { background: linear-gradient(180deg, #ffe066, #ffbf1f); color: #2a1a00; box-shadow: 0 5px 0 #b97f00, 0 10px 24px rgba(255, 190, 31, 0.3); }
.pill.soon:hover { color: #2a1a00; }
.pill.ghost { color: var(--ink); border: 1.5px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.04); }
.pill.ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.09); }
.platforms { margin-top: 16px; color: var(--muted); font-size: 14px; }

.hero-phones { position: relative; justify-self: center; width: min(330px, 78vw); }
.hero-phones .phone.back { position: absolute; width: 78%; right: -34%; top: 9%; transform: rotate(7deg); opacity: 0.9; z-index: -1; }
@media (max-width: 900px) {
  .hero { padding-block: 40px 56px; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 44px; }
  .hero-icon { margin-inline: auto; }
  .lead { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .hero-phones { width: min(290px, 70vw); }
  .hero-phones .phone.back { right: -26%; }
  .hero::after { background: linear-gradient(180deg, rgba(11, 14, 34, 0.86) 0%, rgba(11, 14, 34, 0.78) 50%, var(--night) 100%); }
}

/* ---------- phone frame (true 430:932 screen ratio, never stretched) ---------- */
.phone { margin: 0; padding: 7px; border-radius: 40px; background: linear-gradient(160deg, #3a4790, #161c44 55%, #0d1230); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 24px 60px rgba(0, 0, 0, 0.55); }
.phone img { width: 100%; aspect-ratio: 430 / 932; object-fit: cover; border-radius: 33px; background: #0d1230; }

/* ---------- sections ---------- */
section { padding-block: 76px; }
.band { background: var(--night-2); border-block: 1px solid rgba(255, 255, 255, 0.05); }
.eyebrow { margin: 0 0 8px; color: var(--gem); font-weight: 800; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; }
.section-title { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4.6vw, 46px); line-height: 1.05; margin: 0 0 14px; }
.section-intro { color: var(--muted); max-width: 40em; margin: 0 0 36px; }

/* how a battle works: a real three-step sequence */
.how-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; counter-reset: step; }
.step { counter-increment: step; background: var(--panel); border: 1px solid var(--edge); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.step img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.step .txt { padding: 20px 22px 24px; display: grid; gap: 6px; }
.step h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 24px; display: flex; align-items: center; gap: 12px; }
.step h3::before { content: counter(step); flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--coin); color: #2a1a00; font-size: 19px; box-shadow: 0 3px 0 #b97f00; }
.step p { margin: 0; color: var(--muted); }
@media (max-width: 860px) { .how-steps { grid-template-columns: minmax(0, 1fr); max-width: 520px; } }

/* powers */
.powers { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; padding: 0; list-style: none; }
.powers li { display: inline-flex; align-items: center; gap: 9px; padding: 9px 16px 9px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.10); font-weight: 700; font-size: 15px; }
.powers svg { width: 26px; height: 26px; flex: none; }
.powers small { color: var(--muted); font-weight: 600; }

/* ten worlds */
.worlds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.world { position: relative; border-radius: 20px; overflow: hidden; background: var(--panel); border: 1px solid var(--edge); }
.world img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 45%; transition: transform 0.5s ease; }
.world:hover img { transform: scale(1.05); }
.world .cap { position: absolute; inset: auto 0 0; padding: 40px 14px 14px; background: linear-gradient(180deg, rgba(8, 10, 26, 0) 0%, rgba(8, 10, 26, 0.92) 55%); display: grid; gap: 2px; }
.world .num { color: var(--coin); font-weight: 800; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.world h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.1; }
.world .boss { color: var(--muted); font-size: 13px; }
@media (max-width: 1000px) {
  .worlds { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-right: calc(-1 * var(--gutter-r)); padding-right: var(--gutter-r); }
  .world { flex: 0 0 min(220px, 58vw); scroll-snap-align: start; }
}

/* screenshots */
.shots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.shots figure { margin: 0; display: grid; gap: 12px; }
.shots figcaption { text-align: center; color: var(--muted); font-weight: 700; font-size: 14px; }
@media (max-width: 1000px) {
  .shots { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; margin-right: calc(-1 * var(--gutter-r)); padding-right: var(--gutter-r); }
  .shots li { flex: 0 0 min(230px, 60vw); scroll-snap-align: start; }
}
.scroll-hint { display: none; color: var(--muted); font-size: 13px; margin: -22px 0 18px; }
@media (max-width: 1000px) { .scroll-hint { display: block; } }

/* friends (coming soon) */
.friends { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; background: linear-gradient(135deg, #1a2356, #121736); border: 1px solid var(--edge); border-radius: 28px; padding: clamp(24px, 4vw, 48px); }
.friends > * { min-width: 0; }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(79, 216, 255, 0.14); color: var(--gem); font-weight: 800; font-size: 12px; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 12px; }
.friends ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.friends li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; color: #dfe5fb; }
.friends li svg { width: 26px; height: 26px; }
.board { background: rgba(8, 10, 26, 0.6); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 20px; padding: 18px; display: grid; gap: 8px; }
.board-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; padding: 0 6px 6px; }
.row { display: grid; grid-template-columns: 28px 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); font-variant-numeric: tabular-nums; }
.row.you { background: rgba(255, 210, 63, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 210, 63, 0.35); }
.row .rk { font-family: var(--display); color: var(--muted); text-align: center; }
.row .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); color: #10152f; }
.row .nm { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.row .st { font-family: var(--display); color: var(--coin); }
.board-note { margin: 4px 6px 0; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) { .friends { grid-template-columns: minmax(0, 1fr); } }

/* questions */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--panel); border: 1px solid var(--edge); border-radius: 16px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 16px 52px 16px 20px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(79, 216, 255, 0.14); color: var(--gem); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin: 0; padding: 0 20px 18px; }

/* ---------- legal / help documents ---------- */
.doc-hero { padding-block: 48px 8px; }
.doc-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 6vw, 56px); line-height: 1.05; margin: 0 0 10px; }
.doc-hero .meta { color: var(--muted); margin: 0; font-size: 15px; }
.doc-body { padding-block: 32px 80px; }
.doc-body .wrap { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-body.single .wrap { grid-template-columns: minmax(0, 1fr); max-width: 820px; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 88px); font-size: 14px; }
.toc p { margin: 0 0 10px; color: var(--muted); font-weight: 800; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 2px solid var(--edge); }
.toc a { display: block; padding: 5px 12px; color: var(--muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); border-left-color: var(--gem); }
.prose { max-width: 70ch; min-width: 0; }
.prose h2 { font-family: var(--display); font-weight: 400; font-size: 27px; line-height: 1.15; margin: 44px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 18px; margin: 24px 0 6px; }
.prose p, .prose li { color: #d9e0f8; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose code { font-size: 0.92em; background: rgba(255, 255, 255, 0.07); padding: 2px 6px; border-radius: 6px; }
.prose .box { background: var(--panel); border: 1px solid var(--edge); border-radius: 18px; padding: 18px 22px; margin: 0 0 28px; }
.prose .box p { margin: 0; }
.prose .box p + p { margin-top: 10px; }
.prose .note { border-left: 3px solid var(--gem); padding: 4px 0 4px 16px; color: var(--muted); }
.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--edge); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; min-width: 620px; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
tr:last-child td { border-bottom: 0; }
th { color: var(--coin); font-weight: 800; background: rgba(255, 255, 255, 0.03); font-size: 14px; }
td:first-child { font-weight: 700; color: var(--ink); }
@media (max-width: 900px) {
  .doc-body .wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .toc { position: static; background: var(--panel); border: 1px solid var(--edge); border-radius: 16px; padding: 16px 18px; }
  .toc ol { border-left: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc a { padding: 4px 0; border-left: 0; margin: 0; }
}
@media (max-width: 480px) { .toc ol { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-block: 40px 48px; color: var(--muted); font-size: 14px; background: #090b1c; }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: start; }
.foot-brand { display: flex; gap: 14px; align-items: center; }
.foot-brand img { width: 44px; height: 44px; border-radius: 12px; }
.foot-brand strong { display: block; color: var(--ink); font-family: var(--display); font-weight: 400; font-size: 19px; }
.site-foot nav { display: grid; grid-template-columns: repeat(2, auto); gap: 6px 28px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.legal-line { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.06); font-size: 13px; }
@media (max-width: 640px) { .site-foot .wrap { grid-template-columns: minmax(0, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero::before { animation: none; }
  .world img { transition: none; }
}
