/* =========================================================================
   Dexter landing — gaming polish layer (mobile-first, additive)
   Only enhances; never replaces. Loads after main inline styles so it wins
   without !important spam where possible.
   ========================================================================= */

/* ── Hero HUD chip (mobile only) ─────────────────────────────────────────── */
@media (max-width: 760px) {
  .hero-container { position: relative; }
  .hero-container::before {
    content: '';
    position: absolute;
    top: 92px;
    left: 50%;
    transform: translateX(-50%);
    width: 76vw;
    max-width: 320px;
    height: 200px;
    background: radial-gradient(ellipse at center, rgba(205,250,82,0.22), transparent 70%);
    filter: blur(40px);
    z-index: 0;
    pointer-events: none;
    animation: dxHeroGlowPulse 5.4s ease-in-out infinite;
  }
  @keyframes dxHeroGlowPulse {
    0%, 100% { opacity: 0.65; transform: translate(-50%, 0) scale(1); }
    50% { opacity: 1; transform: translate(-50%, 4px) scale(1.06); }
  }

  /* HUD chip — small status badge at top of mobile hero */
  .hero-container::after {
    content: 'ON-CHAIN · LIVE · 90/10';
    position: absolute;
    top: calc(var(--nav-height-mobile, 78px) + 18px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    padding: 6px 12px 5px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.18em;
    color: #cdfa52;
    background: rgba(10, 14, 8, 0.7);
    backdrop-filter: blur(8px) saturate(140%);
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    border: 1px solid rgba(205, 250, 82, 0.38);
    border-radius: 999px;
    box-shadow: 0 0 24px rgba(205, 250, 82, 0.18), inset 0 0 12px rgba(205, 250, 82, 0.06);
    pointer-events: none;
    animation: dxChipFadeIn 700ms cubic-bezier(0.22, 1, 0.36, 1) 300ms backwards;
  }
  @keyframes dxChipFadeIn {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to { opacity: 1; transform: translate(-50%, 0); }
  }
}

/* ── Hero primary CTA — particle sweep + glow ───────────────────────────── */
@media (max-width: 760px) {
  .hero-btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(205,250,82,0.32), 0 12px 28px rgba(205,250,82,0.22) !important;
    isolation: isolate;
  }
  .hero-btn-primary::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.42) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: dxBtnSweep 3.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    z-index: 0;
    pointer-events: none;
  }
  @keyframes dxBtnSweep {
    0%, 60% { transform: translateX(-100%); }
    100% { transform: translateX(220%); }
  }
  /* Re-elevate content above the sweep */
  .hero-btn-primary > * {
    position: relative;
    z-index: 1;
  }
  .hero-btn-secondary {
    border: 1px solid rgba(205,250,82,0.28) !important;
    background: rgba(13, 17, 11, 0.6) !important;
    backdrop-filter: blur(8px);
    transition: all 200ms ease;
  }
  .hero-btn-secondary:active {
    transform: scale(0.97);
    background: rgba(205,250,82,0.06) !important;
  }
  .hero-btn-primary:active {
    transform: scale(0.97);
  }
}

/* ── Stats band — HUD corner brackets + scanline ────────────────────────── */
@media (max-width: 760px) {
  .stat-cell {
    position: relative;
    isolation: isolate;
  }
  /* Corner brackets — lime, top-left & bottom-right */
  .stat-cell::before,
  .stat-cell::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1px solid rgba(205, 250, 82, 0.48);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 480ms cubic-bezier(0.22, 1, 0.36, 1);
  }
  .stat-cell::before {
    top: 6px;
    left: 6px;
    border-right: none;
    border-bottom: none;
  }
  .stat-cell::after {
    bottom: 6px;
    right: 6px;
    border-left: none;
    border-top: none;
  }
  .stat-cell.is-revealed::before,
  .stat-cell.is-revealed::after {
    opacity: 1;
  }
  .stat-cell.is-revealed::before { animation: dxBracketIn 600ms cubic-bezier(0.22, 1, 0.36, 1); }
  .stat-cell.is-revealed::after { animation: dxBracketIn 600ms cubic-bezier(0.22, 1, 0.36, 1) 100ms backwards; }
  @keyframes dxBracketIn {
    from { transform: scale(0.4); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
  }

  /* Stat number flicker-glow on reveal */
  .stat-n {
    transition: text-shadow 600ms ease;
  }
  .stat-cell.is-revealed .stat-n {
    text-shadow: 0 0 18px rgba(205, 250, 82, 0.42);
  }
}

/* ── Section reveals — subtle 3D pop ─────────────────────────────────────── */
@media (max-width: 760px) {
  .reveal {
    opacity: 0;
    transform: translateY(20px) scale(0.985);
    transition: opacity 700ms cubic-bezier(0.22, 1, 0.36, 1),
                transform 700ms cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity, transform;
  }
  .reveal.is-revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  .reveal-d1 { transition-delay: 80ms; }
  .reveal-d2 { transition-delay: 160ms; }
  .reveal-d3 { transition-delay: 240ms; }
  /* Respect motion preferences */
  @media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-btn-primary::before { animation: none; }
    .hero-container::before { animation: none; }
  }
}

/* ── Pack cards on mobile — HUD frame + active state ────────────────────── */
@media (max-width: 760px) {
  .pkg-art {
    position: relative;
    overflow: hidden;
  }
  /* Scan-line shimmer on pkg cards */
  .pkg-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, transparent 45%, rgba(205,250,82,0.06) 50%, transparent 55%);
    background-size: 100% 240%;
    pointer-events: none;
    animation: dxScanLine 4.8s linear infinite;
    z-index: 1;
  }
  @keyframes dxScanLine {
    from { background-position: 0 -100%; }
    to { background-position: 0 100%; }
  }
}

/* ── Tap ripple — applies to any [data-ripple] (added via JS to CTAs) ───── */
.dx-ripple {
  position: absolute;
  border-radius: 50%;
  transform: scale(0);
  animation: dxRipple 620ms cubic-bezier(0.22, 1, 0.36, 1);
  background: radial-gradient(circle, rgba(205,250,82,0.55) 0%, rgba(205,250,82,0) 70%);
  pointer-events: none;
  z-index: 100;
}
@keyframes dxRipple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ── Mobile footer signature badge ──────────────────────────────────────── */
@media (max-width: 760px) {
  .footer-brand-p::after {
    content: 'v1.0 · build ' attr(data-build);
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 9px;
    letter-spacing: 0.14em;
    color: rgba(205, 250, 82, 0.72);
    border: 1px solid rgba(205, 250, 82, 0.22);
    border-radius: 999px;
    background: rgba(205, 250, 82, 0.04);
    vertical-align: middle;
  }
}

/* ── Section-seam glow tweak on mobile (more punch) ─────────────────────── */
@media (max-width: 760px) {
  .section-accent {
    background: linear-gradient(180deg, transparent, rgba(205, 250, 82, 0.18) 50%, transparent) !important;
    height: 1px;
    box-shadow: 0 0 32px rgba(205, 250, 82, 0.32);
  }
}
