/* AstralxWave site. Dark, starry, neon accents taken from the Star Rings palette. */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/fredoka-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("../fonts/fredoka-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark;
  --bg: #0a0617;
  --bg-2: #130a2a;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.11);
  --text: #f4f0ff;
  --muted: #b9afd6;
  --faint: #8b80ab;
  --pink: #ff3fb4;
  --yellow: #ffc93c;
  --cyan: #22c3ff;
  --green: #1fe3a2;
  --violet: #a35cff;
  --grad: linear-gradient(100deg, var(--pink), var(--violet) 45%, var(--cyan));
  --radius: 22px;
  --radius-s: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --display: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(163, 92, 255, 0.28), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(255, 63, 180, 0.16), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(34, 195, 255, 0.14), transparent 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  overflow-x: hidden;
}
/* Two layers of tiny stars, fixed behind everything */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-repeat: repeat;
}
body::before {
  background-image:
    radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,.8), transparent 60%),
    radial-gradient(1px 1px at 140px 90px, rgba(255,255,255,.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 260px 170px, rgba(255,255,255,.7), transparent 60%),
    radial-gradient(1px 1px at 80px 230px, rgba(255,255,255,.45), transparent 60%),
    radial-gradient(1px 1px at 330px 40px, rgba(255,255,255,.6), transparent 60%);
  background-size: 380px 280px;
  opacity: .7;
}
body::after {
  background-image:
    radial-gradient(1.5px 1.5px at 60px 120px, rgba(255,201,60,.65), transparent 60%),
    radial-gradient(1.5px 1.5px at 420px 60px, rgba(34,195,255,.6), transparent 60%),
    radial-gradient(1px 1px at 300px 380px, rgba(255,63,180,.6), transparent 60%);
  background-size: 560px 460px;
  opacity: .8;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #7fdcff; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.12; margin: 0 0 .5em; letter-spacing: .005em; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 650; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: #1a1030; padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 12px; }

.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: .82rem; color: var(--yellow); margin-bottom: .9em; display: inline-block; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 40ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 6, 23, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 650; font-size: 1.32rem; letter-spacing: .01em; }
.brand:hover { color: var(--text); }
.brand img { width: 34px; height: 34px; }
.brand .x { color: var(--pink); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-family: var(--display); font-weight: 500; padding: 8px 12px; border-radius: 999px; font-size: 1rem; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav .lang { border: 1px solid var(--line); margin-left: 6px; font-size: .9rem; letter-spacing: .06em; }
@media (max-width: 720px) {
  .site-header .wrap { padding-block: 10px; gap: 8px; }
  .nav { margin-left: 0; width: 100%; justify-content: space-between; gap: 0; }
  .nav a { padding: 6px 9px; font-size: .95rem; }
  .nav .lang { margin-left: 0; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  padding: 13px 24px; border-radius: 999px; text-decoration: none;
  color: #170c2e; background: var(--yellow);
  box-shadow: 0 8px 26px rgba(255, 201, 60, 0.28);
  transition: transform .15s ease, box-shadow .15s ease;
  border: 0; cursor: pointer;
}
.btn:hover { color: #170c2e; transform: translateY(-2px); box-shadow: 0 12px 30px rgba(255, 201, 60, 0.38); }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.soon { background: var(--surface-2); color: var(--text); border: 1.5px dashed rgba(255,255,255,.28); box-shadow: none; cursor: default; }
.btn.soon:hover { transform: none; }
.btn svg { width: 20px; height: 20px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* Sections */
main { flex: 1; }
.section { padding-block: clamp(56px, 9vw, 110px); }
.section.tight { padding-block: clamp(40px, 6vw, 70px); }
.section-head { max-width: 62ch; margin-bottom: 36px; }
.section-head p { color: var(--muted); }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); border: 0; margin: 0; }

/* Grid children may shrink below their content (long images) */
.hero .wrap > *, .feature > *, .split > *, .games > *, .points > *, .modes > *, .values > *, .cards > * { min-width: 0; }

/* Hero */
.hero { padding-block: clamp(48px, 8vw, 100px) clamp(40px, 6vw, 80px); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { margin-bottom: .35em; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } }

/* Phone with floating rings */
.stage { position: relative; display: grid; place-items: center; min-height: 420px; }
.phone {
  position: relative; z-index: 2;
  width: min(300px, 72vw); aspect-ratio: 9 / 16;
  border-radius: 34px; padding: 10px;
  background: linear-gradient(160deg, #2b1d52, #120a26);
  box-shadow: 0 0 0 1.5px rgba(255,255,255,.14), var(--shadow), 0 0 80px rgba(163, 92, 255, .35);
  transform: rotate(4deg);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.ring {
  position: absolute; border-radius: 50%; z-index: 1;
  border: 10px solid currentColor;
  box-shadow: 0 0 22px currentColor, inset 0 0 18px currentColor;
  opacity: .9;
  animation: float 7s ease-in-out infinite;
}
.ring.r1 { color: var(--pink); width: 130px; height: 130px; top: 4%; left: 2%; }
.ring.r2 { color: var(--cyan); width: 90px; height: 90px; bottom: 8%; right: 4%; border-width: 8px; animation-delay: -2s; }
.ring.r3 { color: var(--yellow); width: 58px; height: 58px; top: 14%; right: 10%; border-width: 6px; animation-delay: -4s; }
.ring.r4 { color: var(--green); width: 74px; height: 74px; bottom: 4%; left: 12%; border-width: 7px; animation-delay: -5.5s; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(8deg); } }
@media (prefers-reduced-motion: reduce) { .ring { animation: none; } html { scroll-behavior: auto; } }
@media (max-width: 520px) {
  .stage { min-height: 360px; }
  .ring.r1 { width: 96px; height: 96px; border-width: 8px; }
}

/* Featured game band */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center;
  background: linear-gradient(135deg, rgba(163,92,255,.16), rgba(255,63,180,.08) 50%, rgba(34,195,255,.10));
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px);
  padding: clamp(22px, 4vw, 44px);
  box-shadow: var(--shadow);
}
.feature .art { border-radius: var(--radius); overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.feature .logo { width: min(420px, 100%); margin-bottom: 14px; }
@media (max-width: 860px) { .feature { grid-template-columns: 1fr; } }

/* Badges / tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tag { font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.tag.new { color: #170c2e; background: var(--yellow); border-color: transparent; }
.tag.live { color: var(--green); border-color: rgba(31,227,162,.35); background: rgba(31,227,162,.08); }

/* Game cards */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.game {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 20px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.game:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.22); background: var(--surface-2); }
.game .top { display: flex; align-items: center; gap: 14px; }
.game .icon { width: 72px; height: 72px; border-radius: 18px; flex: none; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.game h3 { margin: 0 0 4px; font-size: 1.25rem; }
.game p { color: var(--muted); margin: 0; font-size: .98rem; flex: 1; }
.game .go { font-family: var(--display); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; }
.game .go::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.game .go span { transition: transform .15s ease; }
.game:hover .go span { transform: translateX(3px); }
.game .soon { color: var(--yellow); font-family: var(--display); font-weight: 600; margin-top: 4px; }
.game.star { border-color: rgba(255, 63, 180, .45); background: linear-gradient(160deg, rgba(255,63,180,.12), rgba(163,92,255,.10) 60%, rgba(255,255,255,.03)); }

/* Feature list (Star Rings) */
.points { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.point { padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.point h3 { display: flex; align-items: center; gap: 10px; font-size: 1.15rem; }
.point h3::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 3.5px solid var(--c, var(--pink)); box-shadow: 0 0 10px var(--c, var(--pink)); flex: none; }
.point p { color: var(--muted); margin: 0; font-size: .98rem; }

.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mode { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.mode .k { font-family: var(--display); font-weight: 700; font-size: 1.4rem; letter-spacing: .04em; margin-bottom: 6px; }
.mode p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } }

/* Screenshot rail */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px var(--gutter) 18px;
  margin-inline: calc(-1 * var(--gutter));
  scrollbar-color: rgba(255,255,255,.25) transparent;
}
.rail img { border-radius: 18px; scroll-snap-align: start; box-shadow: 0 10px 30px rgba(0,0,0,.45); aspect-ratio: 9 / 16; width: 100%; object-fit: cover; }

.video { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; }
.video video { width: 100%; aspect-ratio: 16 / 9; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Values / stats strip */
.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.value { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.value .n { font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; margin-bottom: 8px; }
.value p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .values { grid-template-columns: 1fr; } }

/* Contact cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.card p { color: var(--muted); }
.mail { font-family: var(--display); font-weight: 600; font-size: clamp(1.15rem, 2.4vw, 1.5rem); word-break: break-all; }

/* Long-form documents (privacy, legal) */
.doc { max-width: 76ch; }
.doc h1 { font-size: clamp(2rem, 4.4vw, 3rem); }
.doc h2 { font-size: 1.55rem; margin-top: 2.2em; padding-top: .4em; }
.doc h3 { font-size: 1.15rem; margin-top: 1.6em; }
.doc p, .doc li { color: #ddd5f3; }
.doc li { margin-bottom: .4em; }
.doc ul { padding-left: 1.2em; }
.doc .meta { color: var(--faint); font-size: .95rem; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 18px 22px; margin: 24px 0 8px; }
.toc ol { margin: 0; padding-left: 1.2em; columns: 2; column-gap: 32px; }
.toc li { margin: 0 0 .35em; break-inside: avoid; }
.toc a { color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--cyan); }
@media (max-width: 640px) { .toc ol { columns: 1; } }
.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; border: 1px solid var(--line); border-radius: var(--radius-s); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
th { font-family: var(--display); font-weight: 600; background: var(--surface-2); color: var(--text); }
tr:last-child td { border-bottom: 0; }
td { color: #ddd5f3; }
.note { border-left: 3px solid var(--yellow); background: rgba(255, 201, 60, .07); padding: 12px 16px; border-radius: 0 12px 12px 0; }
address { font-style: normal; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: rgba(10, 6, 23, .6); margin-top: 40px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; padding-block: 44px 28px; }
.site-footer h4 { font-size: 1rem; color: var(--text); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer p { color: var(--muted); font-size: .95rem; }
.site-footer .base { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 18px; color: var(--faint); font-size: .88rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr 1fr; } .site-footer .about { grid-column: 1 / -1; } }

/* 404 */
.lost { text-align: center; padding-block: 120px; }
.lost .n { font-family: var(--display); font-size: clamp(5rem, 18vw, 10rem); font-weight: 700; line-height: 1; }
