/* MemeWheel custom background theme.
   Loaded after styles.css. Do not put these rules in styles.css —
   other workers own that file. */

/* ---------- Hero art + overlay ---------- */
.hero {
  isolation: isolate;
  background-color: #050506;
  background-image: url("/img/bg/hero-sm.webp");
  background-repeat: no-repeat;
  background-position: 86% 42%;
  background-size: cover;
}

@media (min-width: 800px) {
  .hero {
    background-image: url("/img/bg/hero.webp");
  }
}

/* Dark overlay so headline, ticker, and body copy stay readable. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  transform: none;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 55% 70% at 82% 38%, rgba(60, 232, 255, 0.10), transparent 62%),
    radial-gradient(ellipse 40% 50% at 70% 70%, rgba(200, 255, 61, 0.07), transparent 70%),
    linear-gradient(
      90deg,
      rgba(7, 7, 8, 0.92) 0%,
      rgba(7, 7, 8, 0.84) 28%,
      rgba(7, 7, 8, 0.55) 52%,
      rgba(7, 7, 8, 0.32) 72%,
      rgba(7, 7, 8, 0.40) 100%
    ),
    linear-gradient(
      180deg,
      rgba(7, 7, 8, 0.28) 0%,
      rgba(7, 7, 8, 0.10) 42%,
      rgba(7, 7, 8, 0.62) 100%
    );
}

.hero .wrap {
  position: relative;
  z-index: 2;
}

.hero h1 {
  text-shadow: 0 2px 28px rgba(7, 7, 8, 0.9);
}

.hero-sub,
.hero-ticker,
.hero .eyebrow {
  text-shadow: 0 1px 14px rgba(7, 7, 8, 0.85);
}

/* Slowly rotating neon wheel motif, sitting behind the copy on the right. */
.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  right: -6%;
  top: 4%;
  width: min(640px, 68vw);
  height: min(640px, 68vw);
  background: url("/img/bg/wheel-motif.svg") center / contain no-repeat;
  opacity: 0.34;
  transform-origin: 50% 50%;
  animation: mw-spin 96s linear infinite, mw-wheel-glow 8s ease-in-out infinite alternate;
  will-change: transform, filter, opacity;
}

/* ---------- Mid-page section backdrops ---------- */
#paired,
#splits,
#how-it-works,
#dashboard,
#buybacks {
  position: relative;
  isolation: isolate;
  background-color: #070708;
}

#paired::before,
#splits::before,
#how-it-works::before,
#dashboard::before,
#buybacks::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

#paired > *,
#splits > *,
#how-it-works > *,
#dashboard > *,
#buybacks > * {
  position: relative;
  z-index: 1;
}

/* Faint wheel blueprint / circuit traces */
#paired::before {
  background-image:
    linear-gradient(180deg, rgba(7, 7, 8, 0.82) 0%, rgba(7, 7, 8, 0.78) 50%, rgba(7, 7, 8, 0.88) 100%),
    url("/img/bg/blueprint-sm.webp");
}

/* Close-up spoke crop, heavily veiled for table contrast */
#splits::before {
  background-image:
    linear-gradient(180deg, rgba(7, 7, 8, 0.90) 0%, rgba(7, 7, 8, 0.86) 50%, rgba(7, 7, 8, 0.92) 100%),
    url("/img/bg/spokes-sm.webp");
  background-position: center, 50% 40%;
}

/* Lime–cyan nebula behind How it works. */
#how-it-works::before {
  background-image:
    linear-gradient(180deg, rgba(7, 7, 8, 0.78) 0%, rgba(7, 7, 8, 0.74) 45%, rgba(7, 7, 8, 0.88) 100%),
    url("/img/bg/nebula-sm.webp");
}

/* Floating wheels and coins, very soft */
#dashboard::before {
  background-image:
    linear-gradient(180deg, rgba(7, 7, 8, 0.88) 0%, rgba(7, 7, 8, 0.86) 50%, rgba(7, 7, 8, 0.92) 100%),
    url("/img/bg/float-sm.webp");
}

#buybacks::before {
  background-image:
    linear-gradient(180deg, rgba(7, 7, 8, 0.90) 0%, rgba(7, 7, 8, 0.88) 100%),
    url("/img/bg/blueprint-sm.webp");
  background-position: center, 50% 80%;
}

@media (min-width: 800px) {
  #paired::before {
    background-image:
      linear-gradient(180deg, rgba(7, 7, 8, 0.82) 0%, rgba(7, 7, 8, 0.78) 50%, rgba(7, 7, 8, 0.88) 100%),
      url("/img/bg/blueprint.webp");
  }
  #splits::before {
    background-image:
      linear-gradient(180deg, rgba(7, 7, 8, 0.90) 0%, rgba(7, 7, 8, 0.86) 50%, rgba(7, 7, 8, 0.92) 100%),
      url("/img/bg/spokes.webp");
  }
  #how-it-works::before {
    background-image:
      linear-gradient(180deg, rgba(7, 7, 8, 0.78) 0%, rgba(7, 7, 8, 0.74) 45%, rgba(7, 7, 8, 0.88) 100%),
      url("/img/bg/nebula.webp");
  }
  #dashboard::before {
    background-image:
      linear-gradient(180deg, rgba(7, 7, 8, 0.88) 0%, rgba(7, 7, 8, 0.86) 50%, rgba(7, 7, 8, 0.92) 100%),
      url("/img/bg/float.webp");
  }
  #buybacks::before {
    background-image:
      linear-gradient(180deg, rgba(7, 7, 8, 0.90) 0%, rgba(7, 7, 8, 0.88) 100%),
      url("/img/bg/blueprint.webp");
  }
}

/* Soft wash under the stats row so the hero doesn't cut off hard. */
#stats {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(ellipse 80% 80% at 80% -20%, rgba(60, 232, 255, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 70% at 10% 120%, rgba(200, 255, 61, 0.05), transparent 60%),
    #070708;
}

#treasury,
#risk {
  position: relative;
  background-color: #070708;
}

/* Desktop parallax: the mid-page art stays fixed while content scrolls. */
@media (min-width: 900px) {
  .hero {
    background-attachment: fixed;
  }
  #paired::before,
  #how-it-works::before,
  #dashboard::before {
    background-attachment: scroll, fixed;
  }
}

/* ---------- Glassy cards over the art ---------- */
.hero .split-card,
.hero .pair-callout,
.stat-card,
.partner-card,
.panel,
.table-wrap,
.split-bar,
.how-step,
.how-mm,
.faq-list details,
.risk-banner {
  background: rgba(14, 15, 19, 0.72);
  backdrop-filter: saturate(1.15) blur(16px);
  -webkit-backdrop-filter: saturate(1.15) blur(16px);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero .pair-steps li {
  background: rgba(10, 11, 14, 0.55);
  border-color: rgba(255, 255, 255, 0.07);
}

.how-step:hover {
  background: rgba(22, 23, 30, 0.82);
  border-color: rgba(200, 255, 61, 0.22);
}

.risk-banner {
  background: rgba(26, 20, 8, 0.78);
  border-color: rgba(255, 176, 32, 0.28);
}

/* Section titles stay readable over nebula / blueprint glows. */
#paired .section-head h2,
#splits .section-head h2,
#how-it-works .section-head h2,
#dashboard .section-head h2,
#buybacks .section-head h2,
#treasury .section-head h2 {
  text-shadow: 0 2px 22px rgba(7, 7, 8, 0.92);
}

#paired .section-head p,
#splits .section-head p,
#how-it-works .section-head p,
#dashboard .section-head p,
#buybacks .section-head p,
#treasury .section-head p {
  color: #c8c9d0;
  text-shadow: 0 1px 12px rgba(7, 7, 8, 0.92), 0 0 16px rgba(7, 7, 8, 0.7);
}

/* ---------- Motion ---------- */
@keyframes mw-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes mw-wheel-glow {
  from {
    opacity: 0.26;
    filter: drop-shadow(0 0 10px rgba(200, 255, 61, 0.16)) drop-shadow(0 0 22px rgba(60, 232, 255, 0.12));
  }
  to {
    opacity: 0.46;
    filter: drop-shadow(0 0 24px rgba(200, 255, 61, 0.32)) drop-shadow(0 0 44px rgba(60, 232, 255, 0.28));
  }
}

/* ---------- Mobile: smaller art, stronger veil, less work ---------- */
@media (max-width: 799px) {
  .hero {
    background-position: 78% 30%;
    background-attachment: scroll;
  }

  .hero::before {
    background:
      radial-gradient(ellipse 70% 50% at 80% 18%, rgba(60, 232, 255, 0.08), transparent 60%),
      linear-gradient(
        180deg,
        rgba(7, 7, 8, 0.78) 0%,
        rgba(7, 7, 8, 0.70) 36%,
        rgba(7, 7, 8, 0.82) 100%
      ),
      linear-gradient(
        90deg,
        rgba(7, 7, 8, 0.88) 0%,
        rgba(7, 7, 8, 0.70) 55%,
        rgba(7, 7, 8, 0.62) 100%
      );
  }

  .hero::after {
    width: min(340px, 86vw);
    height: min(340px, 86vw);
    right: -18%;
    top: auto;
    bottom: 38%;
    opacity: 0.22;
    animation: mw-spin 140s linear infinite;
    will-change: transform;
  }

  .hero .split-card,
  .hero .pair-callout,
  .stat-card,
  .partner-card,
  .panel,
  .table-wrap,
  .split-bar,
  .how-step,
  .how-mm,
  .faq-list details,
  .risk-banner {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(14, 15, 19, 0.88);
  }

  .risk-banner {
    background: rgba(26, 20, 8, 0.9);
  }

  #paired::before,
  #splits::before,
  #how-it-works::before,
  #dashboard::before,
  #buybacks::before {
    background-attachment: scroll;
  }
}

/* Phones: keep the wheel small and out of the headline. */
@media (max-width: 600px) {
  .hero::after {
    bottom: auto;
    top: 12px;
    right: -28%;
    width: 240px;
    height: 240px;
    opacity: 0.18;
  }
}

/* Reduced motion: freeze the wheel, drop parallax and glow. */
@media (prefers-reduced-motion: reduce) {
  .hero,
  #paired::before,
  #how-it-works::before,
  #dashboard::before,
  #splits::before,
  #buybacks::before {
    background-attachment: scroll !important;
    animation: none !important;
  }

  .hero::before,
  .hero::after {
    animation: none !important;
    filter: none;
    transform: none;
    will-change: auto;
  }

  .hero::after {
    opacity: 0.28;
  }
}
