/* ─────────────────────────────────────────────────────────────
   Bubble Masters — marketing site
   Dark cosmic theme. Matches the in-game splash (#0d1b2a) and the
   logo's purple/gold/amber palette. Mobile-first, no build step —
   plain CSS served straight from the root.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Palette */
  --bg-0: #070d18;
  --bg-1: #0d1b2a;
  --bg-2: #14263d;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #f1f5f9;
  --text-muted: rgba(241, 245, 249, 0.68);
  --text-dim: rgba(241, 245, 249, 0.42);

  --gold: #ffd24a;
  --gold-deep: #f59e0b;
  --amber: #fb923c;
  --purple: #a78bfa;
  --purple-deep: #7c3aed;
  --indigo: #6366f1;
  --ruby: #fb7185;

  /* Typography */
  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, sans-serif;

  /* Sizing */
  --container: 1160px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
}

* {
  box-sizing: border-box;
  margin: 0;
}

html {
  background: var(--bg-0);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background: var(--bg-1);
  /* A subtle nebula glow behind the entire page — pure CSS, no
     images. Two radial gradients layered so the cosmic vibe from
     the app icon carries through. */
  background-image:
    radial-gradient(
      ellipse 80% 60% at 20% 10%,
      rgba(124, 58, 237, 0.28),
      transparent 60%
    ),
    radial-gradient(
      ellipse 70% 50% at 85% 30%,
      rgba(245, 158, 11, 0.12),
      transparent 60%
    ),
    radial-gradient(
      ellipse 90% 70% at 50% 110%,
      rgba(99, 102, 241, 0.18),
      transparent 60%
    );
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  color: var(--amber);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}
h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
}
h3 {
  font-size: 1.25rem;
}

p {
  color: var(--text-muted);
}

/* ── Layout ─────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 88px 0;
}

@media (max-width: 640px) {
  section {
    padding: 56px 0;
  }
}

/* ── Navbar ─────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  background: rgba(7, 13, 24, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.nav__brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  padding: 0;
}
.nav__links a {
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 500;
}
.nav__links a:hover {
  color: var(--text);
}
@media (max-width: 640px) {
  .nav__links {
    display: none;
  }
}

/* ── Hero ───────────────────────────────────────────────────── */

.hero {
  padding-top: 80px;
  padding-bottom: 120px;
  text-align: center;
  position: relative;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(255, 210, 74, 0.08);
  margin-bottom: 28px;
}
.hero__badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold);
}
.hero h1 {
  max-width: 880px;
  margin: 0 auto 24px;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #e0c3fc 45%,
    #ffd24a 100%
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.hero__sub {
  max-width: 640px;
  margin: 0 auto 40px;
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  color: var(--text-muted);
}
.hero__icon {
  width: 160px;
  height: 160px;
  margin: 0 auto 32px;
  border-radius: 36px;
  box-shadow:
    0 0 0 1px var(--border-strong),
    0 24px 60px -20px rgba(124, 58, 237, 0.55),
    0 12px 40px -20px rgba(245, 158, 11, 0.35);
  transition: transform 0.4s ease;
}
.hero__icon:hover {
  transform: scale(1.03) rotate(-1deg);
}

/* ── Download buttons ───────────────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 14px;
  background: #000;
  border: 1px solid var(--border-strong);
  color: #fff;
  font-weight: 500;
  min-width: 210px;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}
.store-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.28);
  background: #0a0a0a;
  color: #fff;
}
.store-btn__icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.store-btn__label {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.store-btn__label small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.store-btn__label span {
  font-size: 1.05rem;
  font-weight: 600;
  font-family: var(--font-display);
}
.store-btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Stats row ──────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 64px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}
.stat {
  text-align: center;
}
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  background: linear-gradient(135deg, #fff, var(--gold));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.stat__label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 4px;
}
@media (max-width: 640px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Section headings ───────────────────────────────────────── */

.section-head {
  max-width: 640px;
  margin: 0 auto 56px;
  text-align: center;
}
.section-head .eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 12px;
  display: block;
}
.section-head h2 {
  margin-bottom: 12px;
}
.section-head p {
  font-size: 1.05rem;
}

/* ── Features ───────────────────────────────────────────────── */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}
.feature {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}
.feature:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
}
.feature__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--purple-deep), var(--indigo));
  margin-bottom: 20px;
  font-size: 1.5rem;
  box-shadow: 0 6px 20px -8px rgba(124, 58, 237, 0.6);
}
.feature:nth-child(2) .feature__icon {
  background: linear-gradient(135deg, var(--gold-deep), var(--amber));
  box-shadow: 0 6px 20px -8px rgba(245, 158, 11, 0.6);
}
.feature:nth-child(3) .feature__icon {
  background: linear-gradient(135deg, var(--ruby), #e11d48);
  box-shadow: 0 6px 20px -8px rgba(251, 113, 133, 0.5);
}
.feature:nth-child(4) .feature__icon {
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  box-shadow: 0 6px 20px -8px rgba(14, 165, 233, 0.5);
}
.feature h3 {
  margin-bottom: 8px;
}
.feature p {
  font-size: 0.95rem;
}

/* ── Themes showcase ────────────────────────────────────────── */

.themes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.theme-chip {
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  text-align: center;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}
.theme-chip:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.theme-chip__emoji {
  font-size: 2rem;
  margin-bottom: 8px;
}
.theme-chip__name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}
.theme-chip__sub {
  font-size: 0.82rem;
  color: var(--text-dim);
}

/* ── Power-ups ──────────────────────────────────────────────── */

.powerups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.powerup {
  display: flex;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  align-items: flex-start;
}
.powerup__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
}
.powerup__icon--swap {
  background: linear-gradient(135deg, var(--purple), var(--purple-deep));
}
.powerup__icon--shake {
  background: linear-gradient(135deg, #f87171, #dc2626);
}
.powerup__icon--magnet {
  background: linear-gradient(135deg, #34d399, #059669);
}
.powerup h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.powerup p {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── CTA band ───────────────────────────────────────────────── */

.cta-band {
  padding: 64px 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(
    135deg,
    rgba(124, 58, 237, 0.25),
    rgba(245, 158, 11, 0.15)
  );
  border: 1px solid var(--border-strong);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 210, 74, 0.25), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.3), transparent 40%);
  pointer-events: none;
}
.cta-band > * {
  position: relative;
}
.cta-band h2 {
  margin-bottom: 12px;
}
.cta-band p {
  margin-bottom: 32px;
  font-size: 1.05rem;
  max-width: 520px;
  margin-inline: auto;
}

/* ── Footer ─────────────────────────────────────────────────── */

.footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .footer__grid {
    grid-template-columns: 1fr;
  }
}
.footer__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.footer__brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.footer__brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.footer__about {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 340px;
}
.footer__col h4 {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer__col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__col a {
  color: var(--text-muted);
  font-size: 0.92rem;
}
.footer__col a:hover {
  color: var(--text);
}
.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── Legal / content pages ──────────────────────────────────── */

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 80px 0 40px;
}
.prose h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-bottom: 8px;
  background: linear-gradient(135deg, #fff, var(--purple));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.prose .meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: 40px;
}
.prose h2 {
  font-size: 1.5rem;
  margin: 40px 0 14px;
  color: var(--text);
}
.prose h3 {
  font-size: 1.1rem;
  margin: 28px 0 8px;
  color: var(--text);
}
.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 1rem;
}
.prose p {
  margin-bottom: 14px;
}
.prose ul,
.prose ol {
  padding-left: 22px;
  margin-bottom: 14px;
}
.prose li {
  margin-bottom: 6px;
}
.prose strong {
  color: var(--text);
}
.prose a {
  border-bottom: 1px solid rgba(255, 210, 74, 0.4);
}

/* ── Utilities ──────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
