/* ============================================================
   RPS CASH — Electric Night
   Deep black canvas · electric-blue glow rising from the floor
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg:        #04050A;
  --bg-2:      #070912;
  --ink:       #F5F7FF;
  --ink-2:     rgba(233, 238, 252, .66);
  --ink-3:     rgba(214, 222, 245, .42);

  --brand:        #0357EE;   /* exact brand blue */
  --brand-deep:   #0242B5;
  --brand-bright: #6AA0FF;
  --brand-tint:   rgba(76, 141, 255, .22);

  --line:   rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .055);

  --radius: 20px;
  --shadow-blue: 0 10px 30px rgba(3, 87, 238, .45), 0 2px 8px rgba(3, 87, 238, .35);

  --display: 'Clash Display', 'Bricolage Grotesque', system-ui, sans-serif;
  --sans:    'General Sans', ui-sans-serif, system-ui, sans-serif;
  --mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease:  cubic-bezier(.16, 1, .3, 1);
  --ease2: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Glass utility ---------- */
.glass {
  position: relative;
  background: rgba(10, 12, 20, 0.55);
  backdrop-filter: blur(22px) saturate(170%);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.04),
    0 24px 60px rgba(0,0,0,0.35),
    0 0 0 1px rgba(0,0,0,0.20);
  overflow: hidden;
}
.glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    700px circle at var(--gx, 50%) var(--gy, 0%),
    rgba(255,255,255,0.13),
    transparent 45%
  );
  opacity: 0.8;
  z-index: 1;
}
.glass::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  opacity: 0.7;
  pointer-events: none;
  z-index: 2;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  min-height: 100svh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body.is-loading { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
::selection { background: var(--brand); color: #fff; }

/* ============================================================
   BACKGROUND — rising electric glow
   ============================================================ */
.bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(120% 80% at 50% -10%, #0a0d18 0%, var(--bg) 55%);
  pointer-events: none;
  isolation: isolate;            /* keep screen-blend within the bg */
}

/* the glow field reacts subtly to the pointer */
.glow-field {
  position: absolute; inset: 0;
  transform: translate3d(calc(var(--px,0) * 1px), calc(var(--py,0) * 1px), 0);
  transition: transform 1s var(--ease);
  will-change: transform;
}
.glow {
  position: absolute; left: 50%; transform: translateX(-50%);
  mix-blend-mode: screen; will-change: transform, opacity;
}
/* wide indigo base pushing up from below the fold */
.glow--deep {
  bottom: -30%; width: 142%; height: 134%;
  background: radial-gradient(ellipse 62% 60% at 50% 100%,
              rgba(46, 96, 250, .95), rgba(3, 70, 215, .50) 40%, transparent 72%);
  filter: blur(26px);
  animation: breatheDeep 12s ease-in-out infinite alternate;
}
/* brighter electric core */
.glow--core {
  bottom: -16%; width: 88%; height: 98%;
  background: radial-gradient(ellipse 58% 56% at 50% 100%,
              rgba(142, 186, 255, .96), rgba(8, 98, 246, .58) 36%, transparent 64%);
  filter: blur(14px);
  animation: breatheCore 9s ease-in-out infinite alternate;
}
/* soft swaying highlight for life */
.glow--sway {
  bottom: -4%; width: 56%; height: 60%;
  background: radial-gradient(circle at 50% 100%, rgba(178, 210, 255, .66), transparent 62%);
  filter: blur(36px);
  animation: sway 16s ease-in-out infinite alternate;
}
@keyframes breatheDeep {
  0%   { transform: translateX(-50%) scale(1);    opacity: .82; }
  100% { transform: translateX(-50%) scale(1.12); opacity: 1; }
}
@keyframes breatheCore {
  0%   { transform: translateX(-50%) translateY(2%)  scale(1);   opacity: .78; }
  100% { transform: translateX(-50%) translateY(-3%) scale(1.1); opacity: 1; }
}
@keyframes sway {
  0%   { transform: translateX(-64%) scale(.92); opacity: .7; }
  100% { transform: translateX(-36%) scale(1.12); opacity: 1; }
}

/* faint technical grid, strongest up top, dissolving into the glow */
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 66px 66px;
  -webkit-mask-image: radial-gradient(ellipse 85% 65% at 50% 22%, #000 10%, transparent 72%);
          mask-image: radial-gradient(ellipse 85% 65% at 50% 22%, #000 10%, transparent 72%);
}

/* film grain */
.grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .07; mix-blend-mode: overlay;
}

/* vignette to deepen the frame */
.vignette {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 100% 70% at 50% 18%, transparent 50%, rgba(0,0,0,.55) 100%),
    linear-gradient(180deg, rgba(0,0,0,.45), transparent 22%);
}

/* blue floor gradient */
.bg-floor {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 62%;
  background: radial-gradient(ellipse 140% 100% at 50% 100%, rgba(3,87,238,.55) 0%, rgba(2,66,181,.30) 45%, transparent 72%);
  pointer-events: none;
  opacity: .85;
}

/* cursor-follow highlight */
.cursor-glow {
  position: fixed; left: var(--cx, 50%); top: var(--cy, 50%);
  width: 480px; height: 480px; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(76,141,255,.16), rgba(76,141,255,0) 62%);
  mix-blend-mode: screen; pointer-events: none; z-index: 2; opacity: 0;
  transition: opacity .5s ease;
}

/* ============================================================
   PRELOADER
   ============================================================ */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--bg);
  transition: transform 1s var(--ease), opacity .5s ease .35s;
}
body.loaded #loader { transform: translateY(-101%); }
.loader__inner {
  display: flex; flex-direction: column; align-items: center; gap: 26px;
  animation: loaderIn .7s var(--ease) both;
}
@keyframes loaderIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.loader__badge {
  width: 64px; height: 64px; border-radius: 18px;
  box-shadow: var(--shadow-blue);
  animation: badgeFloat 3.4s ease-in-out infinite;
}
.loader__badge img { width: 64px; height: 64px; border-radius: 18px; }
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50%      { transform: translateY(-7px) rotate(-1.5deg); }
}
.loader__track {
  position: relative; width: 220px; height: 2px;
  background: rgba(255,255,255,.12); border-radius: 2px; overflow: hidden;
}
.loader__fill {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--brand-bright));
  border-radius: 2px; box-shadow: 0 0 14px rgba(76,141,255,.7);
}
.loader__fill::after {
  content: ""; position: absolute; inset: 0; right: -40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
  animation: sheen 1.3s linear infinite;
}
@keyframes sheen { from { transform: translateX(-120%); } to { transform: translateX(320%); } }
.loader__meta { display: flex; align-items: center; gap: 12px; font-family: var(--mono); }
.loader__pct { font-size: 13px; font-weight: 600; color: var(--brand-bright); font-variant-numeric: tabular-nums; }
.loader__label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  margin: 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: auto;
  max-width: 960px;
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
}
.nav.glass { overflow: visible; }
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__badge {
  width: 34px; height: 34px; border-radius: 10px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(3,87,238,.5);
  transition: transform .4s var(--ease);
}
.brand:hover .brand__badge { transform: rotate(-6deg) scale(1.06); }
.brand__badge img { width: 34px; height: 34px; }
.brand__word {
  font-family: var(--display); font-weight: 700; font-size: 19px;
  letter-spacing: -.01em; color: var(--ink);
}
.nav__right { display: flex; align-items: center; gap: 12px; }
.icon-link {
  display: grid; place-items: center; width: 38px; height: 38px;
  border-radius: 11px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--ink); transition: all .3s var(--ease);
}
.icon-link svg { width: 17px; height: 17px; fill: currentColor; }
.icon-link:hover {
  color: #fff;
  background: rgba(76,141,255,.18);
  border-color: rgba(76,141,255,.35);
  transform: translateY(-2px);
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative; z-index: 10;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 120px clamp(22px, 5vw, 56px) 110px;
}
.hero__inner { width: 100%; max-width: 880px; text-align: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2);
  padding: 8px 16px; border-radius: 999px;
  margin-bottom: clamp(22px, 4vw, 34px);
}
.eyebrow.glass { overflow: visible; }
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-bright);
  box-shadow: 0 0 8px rgba(76,141,255,.9); animation: ping 2.4s ease-out infinite;
}
@keyframes ping {
  0%   { box-shadow: 0 0 8px rgba(76,141,255,.9), 0 0 0 0 rgba(76,141,255,.5); }
  70%  { box-shadow: 0 0 8px rgba(76,141,255,.6), 0 0 0 9px rgba(76,141,255,0); }
  100% { box-shadow: 0 0 8px rgba(76,141,255,.9), 0 0 0 0 rgba(76,141,255,0); }
}

.title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.7rem, 8.2vw, 6rem);
  line-height: .96; letter-spacing: -.025em; color: var(--ink);
}
.title__line { display: block; }
.title__line--accent {
  background: linear-gradient(100deg, #8FB7FF 8%, #2E7BFF 48%, #9DC0FF 92%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 6px 34px rgba(46,123,255,.5));
  animation: shimmer 7s linear infinite;
}
@keyframes shimmer { to { background-position: 200% center; } }

.sub {
  max-width: 580px; margin: clamp(22px, 4vw, 30px) auto 0;
  font-size: clamp(1rem, 1.45vw, 1.18rem); line-height: 1.62;
  color: var(--ink-2); font-weight: 400;
}
.tok {
  font-family: var(--mono); font-weight: 600; font-size: .92em;
  color: var(--brand-bright); letter-spacing: -.01em;
}

/* ---------- CTAs ---------- */
.cta-row {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  margin-top: clamp(30px, 5vw, 42px);
}
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px; border-radius: 999px;
  font-family: var(--sans); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn--sm { padding: 9px 18px; font-size: 14px; }

.btn--primary { color: #fff; background: linear-gradient(180deg, #2E7BFF, var(--brand)); box-shadow: var(--shadow-blue); }
.btn--primary::before {
  content: ""; position: absolute; top: 0; left: -80%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent);
  transform: skewX(-18deg); transition: left .7s var(--ease);
}
.btn--primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px rgba(3,87,238,.55), 0 0 28px rgba(76,141,255,.45), 0 0 60px rgba(3,87,238,.28);
}
.btn--primary:hover::before { left: 130%; }
.btn__arrow { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.btn--primary:hover .btn__arrow { transform: translateX(4px); }

.btn--ghost {
  color: var(--ink); background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,0.14); backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.btn--ghost:hover {
  background: rgba(76,141,255,.13); border-color: rgba(76,141,255,.32);
  color: #fff; transform: translateY(-3px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 30px rgba(76,141,255,.22);
}
.btn__x { width: 16px; height: 16px; fill: currentColor; }

.nav__play { backdrop-filter: blur(8px); }

/* ---------- feature chips ---------- */
.chips {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px;
  margin-top: clamp(30px, 5vw, 44px);
}
.chips li {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.chips__dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--brand-bright); box-shadow: 0 0 8px rgba(76,141,255,.8);
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  overflow: hidden; padding: 16px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker__row { display: flex; width: max-content; animation: marquee linear infinite; will-change: transform; }
.ticker__group { display: flex; flex-shrink: 0; }
.ticker__row span {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: rgba(233,238,252,.5);
  white-space: nowrap; padding-right: 8px;
}
.ticker__row i { color: var(--brand-bright); font-style: normal; opacity: .9; padding: 0 4px; }
@keyframes marquee { to { transform: translateX(calc(var(--tw, 25%) * -1)); } }

/* ============================================================
   MODAL
   ============================================================ */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0; background: rgba(2,4,10,.72);
  backdrop-filter: blur(22px) saturate(1.25); opacity: 0; transition: opacity .4s var(--ease);
}
.modal__card {
  position: relative; width: 100%; max-width: 440px; text-align: center;
  background: linear-gradient(180deg, rgba(22,26,38,.97), rgba(9,11,18,.98));
  border: 1px solid var(--line); border-radius: 26px;
  padding: 38px 34px 30px;
  box-shadow: 0 40px 100px rgba(0,0,0,.65), 0 0 60px rgba(3,87,238,.20), inset 0 1px 0 rgba(255,255,255,.06);
  opacity: 0; transform: translateY(14px) scale(.96);
  transition: opacity .45s var(--ease), transform .55s var(--ease2);
}
.modal__card::before {
  content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brand-bright), transparent); opacity: .7;
}
body.modal-open .modal__backdrop { opacity: 1; }
body.modal-open .modal__card { opacity: 1; transform: none; }

.modal__close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; color: var(--ink-3); transition: all .3s var(--ease);
}
.modal__close:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.modal__close svg { width: 18px; height: 18px; }

.modal__status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 22px;
}
.modal__statusdot {
  width: 7px; height: 7px; border-radius: 50%; background: #F5A524;
  box-shadow: 0 0 8px rgba(245,165,36,.8); animation: ping-amber 2s ease-out infinite;
}
@keyframes ping-amber {
  0%   { box-shadow: 0 0 8px rgba(245,165,36,.8), 0 0 0 0 rgba(245,165,36,.5); }
  70%  { box-shadow: 0 0 8px rgba(245,165,36,.5), 0 0 0 8px rgba(245,165,36,0); }
  100% { box-shadow: 0 0 8px rgba(245,165,36,.8), 0 0 0 0 rgba(245,165,36,0); }
}
.modal__badge {
  width: 56px; height: 56px; margin: 0 auto 20px; border-radius: 16px;
  box-shadow: var(--shadow-blue);
}
.modal__badge img { width: 56px; height: 56px; border-radius: 16px; }
.modal__title {
  font-family: var(--display); font-weight: 600; font-size: 1.7rem;
  letter-spacing: -.02em; color: var(--ink); margin-bottom: 12px;
}
.modal__body { font-size: 15px; line-height: 1.6; color: var(--ink-2); margin-bottom: 26px; }
.modal__actions { display: flex; flex-direction: column; gap: 10px; }
.modal__actions .btn { width: 100%; justify-content: center; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 560px) {
  .nav { top: 14px; left: 12px; right: 12px; padding: 8px 10px 8px 14px; }
  .brand__word { font-size: 17px; }
  .nav__play { display: none; }
  .title { font-size: clamp(2.5rem, 13vw, 3.6rem); }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .glow--deep, .glow--core { width: 150%; }
  .ticker { padding: 12px 0; }

}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .glow { animation: none; }
  .ticker__row { animation: none; }
  #loader { transition: opacity .3s ease; }
  body.loaded #loader { transform: none; opacity: 0; pointer-events: none; }
  .cursor-glow { display: none; }
}

/* ============================================================
   ENTRANCE (gated on body.loaded)
   ============================================================ */
[data-reveal] {
  opacity: 0; transform: translateY(22px); filter: blur(8px);
  transition: opacity .9s var(--ease), transform 1s var(--ease), filter .9s var(--ease);
  transition-delay: var(--d, 0s);
}
body.loaded [data-reveal] { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; filter: none; transition: none; }
}
