/* Modern UX effects — Listgood palette (indigo accent, slate text).
 * Adapted from the modern-ux skill; safety-orange palette swapped for
 * the existing indigo brand color. Pairs with js/interactions.js for
 * scroll-aware nav, bento spotlight, and scroll-reveal. */

:root {
  --glow-indigo: #4F46E5;
  --glow-violet: #7C5CFF;
  --glow-cyan:   #38BDF8;
  --ink-stage:   #07080B;
  --paper-warm:  #F8FAFC;
}

/* ─────────────────────────────────────────────────────────────────────
 * 1. AURORA STAGE — dark hero with drifting radial glows + retro grid.
 *    Drop on a <section class="mod-stage">. Add a child .mod-stage-bg
 *    for the glow layer and .mod-grain for the noise overlay.
 * ───────────────────────────────────────────────────────────────────── */

.mod-stage {
  position: relative;
  isolation: isolate;
  background: var(--ink-stage);
  color: #F8FAFC;
  overflow: hidden;
}

.mod-stage-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(60% 50% at 20% 30%, rgba(79, 70, 229, 0.55), transparent 70%),
    radial-gradient(50% 40% at 80% 20%, rgba(124, 92, 255, 0.45), transparent 70%),
    radial-gradient(60% 60% at 65% 80%, rgba(56, 189, 248, 0.30), transparent 70%);
  filter: blur(40px) saturate(120%);
  animation: mod-drift 18s ease-in-out infinite alternate;
}

@keyframes mod-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-20px, 18px, 0) scale(1.05); }
  100% { transform: translate3d(15px, -12px, 0) scale(0.98); }
}

/* Subtle masked grid overlay for techy texture. */
.mod-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}

.mod-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/></svg>");
}

/* ─────────────────────────────────────────────────────────────────────
 * 2. EYEBROW — mono uppercase label with pulsing accent dot.
 *    "<p class='mod-eyebrow'>— Built for Amazon sellers</p>"
 * ───────────────────────────────────────────────────────────────────── */

.mod-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--glow-violet);
  margin: 0 0 18px;
}

.mod-eyebrow::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--glow-cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
  animation: mod-pulse 2s ease-in-out infinite;
}

@keyframes mod-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.4); }
}

/* ─────────────────────────────────────────────────────────────────────
 * 3. GRADIENT WORD — apply to one <span> inside an h1.
 * ───────────────────────────────────────────────────────────────────── */

.mod-gradient-word {
  background: linear-gradient(135deg, #4F46E5 0%, #7C5CFF 50%, #38BDF8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ─────────────────────────────────────────────────────────────────────
 * 4. GLOW BUTTON — indigo gradient CTA with colored glow + lift hover.
 *    Use alongside the existing .btn for consistent sizing.
 * ───────────────────────────────────────────────────────────────────── */

.mod-glow-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, #4F46E5 0%, #6366F1 50%, #7C5CFF 100%);
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08) inset,
    0 12px 32px -8px rgba(79, 70, 229, 0.6),
    0 6px 16px -4px rgba(124, 92, 255, 0.4);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mod-glow-btn:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 18px 42px -8px rgba(79, 70, 229, 0.7),
    0 10px 22px -6px rgba(124, 92, 255, 0.55);
}

.mod-ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.mod-ghost-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.32);
}

/* ─────────────────────────────────────────────────────────────────────
 * 5. GLASS FRAME — frosted container that lifts visuals off dark stages.
 *    Wrap the dashboard mockup in one of these.
 * ───────────────────────────────────────────────────────────────────── */

.mod-glass {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 12px 32px -8px rgba(79, 70, 229, 0.25);
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────────────────────
 * 6. SCROLL-AWARE NAV — transparent over the hero, solid once scrolled.
 *    The JS toggles .mod-nav-scrolled.
 * ───────────────────────────────────────────────────────────────────── */

.mod-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(7, 8, 11, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.mod-nav .nav-links a,
.mod-nav .logo-text {
  color: rgba(248, 250, 252, 0.85);
}

.mod-nav .btn-outline {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
  color: #F8FAFC;
}

.mod-nav.mod-nav-scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.mod-nav.mod-nav-scrolled .nav-links a,
.mod-nav.mod-nav-scrolled .logo-text {
  color: var(--text);
}

.mod-nav.mod-nav-scrolled .btn-outline {
  background: white;
  border-color: var(--border);
  color: var(--text);
}

/* ─────────────────────────────────────────────────────────────────────
 * 7. SCROLL REVEAL — IntersectionObserver toggles .is-visible.
 * ───────────────────────────────────────────────────────────────────── */

.mod-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.mod-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered children — set inline --i="0" / "1" / "2" on each child. */
.mod-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

.mod-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ─────────────────────────────────────────────────────────────────────
 * 8. BENTO — feature grid with mixed-size cells + cursor spotlight.
 *    JS sets --mx/--my on each card.
 * ───────────────────────────────────────────────────────────────────── */

.mod-bento {
  position: relative;
}

.mod-bento > * {
  position: relative;
  isolation: isolate;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.mod-bento > *::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(180px 180px at var(--mx, 50%) var(--my, 50%), rgba(79, 70, 229, 0.12), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: -1;
}

.mod-bento > *:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 16px 40px -12px rgba(79, 70, 229, 0.25);
}

.mod-bento > *:hover::after {
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────────────────
 * 9. HERO LOGO — bigger, centered, with a soft halo on dark.
 * ───────────────────────────────────────────────────────────────────── */

/* The brand logo.png is black wordmark on white. On a dark stage we
 * invert it so the wordmark reads as white and the white background
 * becomes near-black (blending into the stage). drop-shadow then adds
 * colored glow halos around the now-white text. */
.mod-hero-logo {
  display: block;
  margin: 0 auto 20px;
  height: clamp(110px, 14vw, 170px);
  width: auto;
  filter:
    invert(1)
    drop-shadow(0 0 24px rgba(124, 92, 255, 0.55))
    drop-shadow(0 12px 36px rgba(79, 70, 229, 0.45));
  animation: mod-logo-float 6s ease-in-out infinite;
}

/* Nav logo: invert while the nav is dark (default over hero), revert
 * to original when the nav snaps to solid white past the hero. */
.mod-nav .logo img { filter: invert(1) brightness(1.1); transition: filter 0.3s ease; }
.mod-nav.mod-nav-scrolled .logo img { filter: none; }

@keyframes mod-logo-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

/* ─────────────────────────────────────────────────────────────────────
 * 10. REDUCED MOTION — kill all the moving parts for users who opted out.
 * ───────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .mod-stage-bg,
  .mod-eyebrow::before,
  .mod-hero-logo,
  .mod-reveal,
  .mod-stagger > * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
