/* ════════════════════════════════════════════════════════════════════
   RADIANT OPTIMIZER — PREMIUM FX LAYER
   High-end motion, depth & micro-interactions layered on top of the
   existing "Precision Luxury" design.

   • Palette-locked: only uses the existing --black / --white / --blue tokens.
   • Loads AFTER the inline <style>, so later rules win where intended.
   • Fully respects prefers-reduced-motion.
   • Touch devices get lighter / no motion automatically (JS gated).
   ════════════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────
   FONT UPGRADE — Cabinet Grotesk display (overrides --font-display)
   Keeps Satoshi (body) + JetBrains Mono (mono).
   ─────────────────────────────────────────────── */
:root {
  --font-display: 'Cabinet Grotesk', system-ui, sans-serif;
}


/* ───────────────────────────────────────────────
   0 · GLOBAL POLISH
   ─────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* Premium thin scrollbar (signature blue) */
* { scrollbar-width: thin; scrollbar-color: var(--blue) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--blue-3), var(--blue));
  border-radius: 100px;
  border: 2px solid rgba(0,0,0,0.25);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--blue-3), var(--blue-3)); }

/* Crisper focus ring for accessibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--blue-3);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ───────────────────────────────────────────────
   1 · HERO — living aurora + cursor-reactive light
   ─────────────────────────────────────────────── */
.hero-bg::before,
.hero-bg::after { content: ''; position: absolute; pointer-events: none; }

/* Drifting aurora mesh (subtle, blurred, blue-only) */
.hero-bg::before {
  inset: -20%;
  background:
    radial-gradient(38% 48% at 22% 30%, rgba(0,82,255,0.22),  transparent 60%),
    radial-gradient(34% 44% at 80% 26%, rgba(59,130,246,0.16), transparent 60%),
    radial-gradient(44% 54% at 62% 82%, rgba(0,71,224,0.16),   transparent 62%);
  filter: blur(46px);
  opacity: 0.85;
  transform: translateZ(0);
  will-change: transform;
  animation: fx-aurora 20s ease-in-out infinite alternate;
}
@keyframes fx-aurora {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1.05) rotate(0deg); }
  50%  { transform: translate3d(3%,  2%,  0) scale(1.13) rotate(2.2deg); }
  100% { transform: translate3d(-1%, 1%,  0) scale(1.08) rotate(-2.2deg); }
}

/* Cursor-reactive spotlight (position driven by JS via --hero-mx/--hero-my) */
.hero-bg::after {
  inset: 0;
  background: radial-gradient(520px circle at var(--hero-mx, 50%) var(--hero-my, 26%),
              rgba(0,82,255,0.15), transparent 60%);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out-expo);
}
.hero.fx-lit .hero-bg::after { opacity: 1; }

/* ───────────────────────────────────────────────
   2 · HERO — 3D tilt + glossy sheen on the dashboard
   ─────────────────────────────────────────────── */
.hero-visual { perspective: 1500px; }
.hero-dash {
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}
.hero-dash.fx-tilt {
  transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)) translateZ(0);
}
.hero-dash.fx-active {
  box-shadow:
    0 50px 120px rgba(0,0,0,0.55),
    0 0 0 1px rgba(0,82,255,0.22),
    0 0 70px rgba(0,82,255,0.20),
    inset 0 1px 0 rgba(255,255,255,0.10);
}
.hero-dash .fx-sheen {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(420px circle at var(--sx, 50%) var(--sy, 50%),
              rgba(255,255,255,0.20), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out-expo);
  mix-blend-mode: screen;
}
.hero-dash.fx-active .fx-sheen { opacity: 1; }

/* ───────────────────────────────────────────────
   3 · MAGNETIC BUTTONS
   ─────────────────────────────────────────────── */
.fx-magnetic { transition: transform 0.4s var(--ease-out-expo), box-shadow 0.3s; will-change: transform; }

/* ───────────────────────────────────────────────
   4 · HEADLINE GRADIENT SHIMMER
   Promotes solid accents to a slow-moving blue gradient sheen.
   ─────────────────────────────────────────────── */
.hero-headline .accent {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: #FFFFFF !important;
  color: #FFFFFF !important;
  /* No animation override — word-rise (from .word class) must run to bring opacity 0→1 */
}
h2.display .accent,
.section-dark h2.display .accent {
  background: linear-gradient(100deg, var(--blue-3) 0%, var(--blue) 40%, var(--blue-2) 60%, var(--blue-3) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: fx-shimmer 8s linear infinite;
}
@keyframes fx-shimmer { to { background-position: 220% 0; } }

/* ───────────────────────────────────────────────
   5 · ENHANCED SCROLL REVEALS (blur-in + lift)
   Builds on the existing .reveal → .reveal.in system.
   ─────────────────────────────────────────────── */
.reveal {
  transform: translateY(36px);
  filter: blur(10px);
  transition:
    opacity   0.9s var(--ease-out-expo),
    transform 0.9s var(--ease-out-expo),
    filter    0.9s var(--ease-out-expo);
  will-change: opacity, transform, filter;
}
.reveal.in { filter: blur(0); }

/* Optional directional / scale variants (added via markup or JS) */
.reveal.fx-left  { transform: translateX(-44px); }
.reveal.fx-right { transform: translateX(44px); }
.reveal.fx-scale { transform: scale(0.94); }
.reveal.in.fx-left,
.reveal.in.fx-right { transform: translateX(0); }
.reveal.in.fx-scale { transform: scale(1); }

/* ───────────────────────────────────────────────
   6 · CURSOR-FOLLOW SPOTLIGHT ON CARDS
   .fx-spotlight + injected .fx-glow (added by JS)
   ─────────────────────────────────────────────── */
.fx-spotlight { position: relative; overflow: hidden; }
.fx-spotlight .fx-glow {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%),
              rgba(0,82,255,0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-expo);
}
.fx-spotlight:hover .fx-glow { opacity: 1; }
.fx-spotlight > *:not(.fx-glow) { position: relative; z-index: 1; }

/* ───────────────────────────────────────────────
   7 · NAV LINK UNDERLINE SWEEP
   ─────────────────────────────────────────────── */
.nav-links a { position: relative; }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 5px;
  height: 1.5px;
  background: linear-gradient(90deg, var(--blue-3), var(--blue));
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.32s var(--ease-out-expo);
}
.nav-links a:hover::after { transform: scaleX(1); }

/* ───────────────────────────────────────────────
   8 · COUNT-UP NUMBERS — tabular alignment while animating
   ─────────────────────────────────────────────── */
.hero-mini-stat-num,
.problem-stat-num { font-variant-numeric: tabular-nums; }

/* ───────────────────────────────────────────────
   10 · CONTENT IMAGE FRAMES — thick black border + blue glow
   Applies ONLY to real content screenshots/photos, never logos/avatars.
   ─────────────────────────────────────────────── */
.hero-dash,
.answer-card,
.feat-viewer-frame,
.ai-screenshot-frame {
  border: 4px solid #0A0A0B !important;
  background: #0A0A0B !important;
  box-shadow:
    0 0 0 1.5px rgba(0,82,255,0.55),
    0 0 28px rgba(0,82,255,0.40),
    0 0 70px rgba(0,82,255,0.22),
    0 30px 80px rgba(0,0,0,0.55) !important;
  transition:
    box-shadow 0.45s var(--ease-out-expo),
    transform 0.4s var(--ease-out-expo) !important;
}
.hero-dash:hover,
.answer-card:hover,
.feat-viewer-frame:hover,
.ai-screenshot-frame:hover {
  box-shadow:
    0 0 0 1.5px rgba(0,82,255,0.85),
    0 0 40px rgba(0,82,255,0.60),
    0 0 100px rgba(0,82,255,0.35),
    0 36px 90px rgba(0,0,0,0.60) !important;
}
/* Keep the images flush inside the new dark frame.
   NOTE: .feat-viewer-frame img is intentionally EXCLUDED — that gallery
   toggles display none/block per active tab and must not be forced visible. */
.hero-dash img,
.answer-card img,
.ai-screenshot-frame img { display: block; }
.feat-viewer-frame img.active { display: block; }


/* ───────────────────────────────────────────────
   11 · BIGGER HERO SHOWPIECE — rebalance the grid so the
   product screenshot reads large & legible on desktop.
   (Scoped to desktop; mobile stacked layout untouched.)
   ─────────────────────────────────────────────── */
@media (min-width: 1101px) {
  .hero-wrap {
    grid-template-columns: 1.25fr 1fr;
    gap: 44px;
    max-width: 1400px;
  }
}
@media (min-width: 1600px) {
  .hero-wrap {
    grid-template-columns: 1.25fr 1fr;
    gap: 64px;
    max-width: 1480px;
  }
}

/* ───────────────────────────────────────────────
   12 · TESTIMONIAL WALL — auto-scrolling columns of social proof
   (Paragon-style proof wall, Radiant identity: matte cards, blue glow)
   ─────────────────────────────────────────────── */
.tweet-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  height: 660px;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 11%, #000 89%, transparent 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 11%, #000 89%, transparent 100%);
}
.tweet-col {
  display: flex;
  flex-direction: column;
  will-change: transform;
  animation: tweet-scroll var(--dur, 46s) linear infinite;
}
.tweet-col:nth-child(2) { --dur: 58s; animation-direction: reverse; }
.tweet-col:nth-child(3) { --dur: 52s; }
.tweet-wall:hover .tweet-col { animation-play-state: paused; }
@keyframes tweet-scroll {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}

.tweet-card {
  margin-bottom: 16px;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.05);
  transition:
    border-color 0.3s var(--ease-out-expo),
    box-shadow 0.35s var(--ease-out-expo),
    transform 0.35s var(--ease-out-expo);
}
.tweet-card:hover {
  border-color: rgba(0,82,255,0.55);
  box-shadow: 0 0 0 1px rgba(0,82,255,0.45), 0 0 30px rgba(0,82,255,0.22), 0 18px 44px rgba(0,0,0,0.10);
  transform: translateY(-2px);
}
.tweet-card-img { padding: 0; overflow: hidden; }
.tweet-card-img img { width: 100%; display: block; border-radius: 15px; }

.tw-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.tw-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--blue-2));
  color: #fff; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  flex-shrink: 0; box-shadow: 0 0 14px var(--blue-glow);
}
.tw-id { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; min-width: 0; }
.tw-name { font-weight: 700; font-size: 14px; color: var(--text-on-light); }
.tw-handle { font-family: var(--font-mono); font-size: 11px; color: var(--text-on-light-3); }
.tw-stars { color: var(--gold); font-size: 12px; letter-spacing: 1px; flex-shrink: 0; }
.tw-text { font-size: 14px; line-height: 1.55; color: var(--text-on-light); margin-bottom: 12px; }
.tw-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.03em;
  color: var(--success);
}

@media (max-width: 860px) {
  .tweet-wall { grid-template-columns: repeat(2, 1fr); height: 580px; }
  .tweet-col:nth-child(3) { display: none; }
}
@media (max-width: 560px) {
  .tweet-wall { grid-template-columns: 1fr; height: 520px; }
  .tweet-col:nth-child(2) { display: none; }
}

/* ───────────────────────────────────────────────
   13 · MORE COUNT-UP STATS — tabular alignment while animating
   ─────────────────────────────────────────────── */
.cred-stat-value,
.ai-ticker-num,
.compare-meter-val { font-variant-numeric: tabular-nums; }

/* ───────────────────────────────────────────────
   14 · ICON MICRO-INTERACTIONS — springy scale + tilt on card hover
   ─────────────────────────────────────────────── */
.answer-feat-icon,
.hiw-step-icon,
.cred-stat-icon,
.feat-tab-icon,
.ai-feat-dark-icon,
.tool-card-icon {
  transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
  will-change: transform;
}
.answer-feat:hover .answer-feat-icon,
.hiw-step:hover .hiw-step-icon,
.cred-stat-box:hover .cred-stat-icon,
.feat-tab:hover .feat-tab-icon,
.ai-feat-dark:hover .ai-feat-dark-icon,
.tool-card:hover .tool-card-icon {
  transform: scale(1.12) rotate(-5deg);
}

/* Dark-surface cards get a slightly brighter cursor spotlight */
.ai-feat-dark .fx-glow,
.compare-card .fx-glow {
  background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 50%),
              rgba(59,130,246,0.22), transparent 60%);
}

/* ───────────────────────────────────────────────
   15 · PRICING CARD — slow "breathing" blue glow (always-on, subtle)
   ─────────────────────────────────────────────── */
.pricing-card {
  animation: fx-price-breathe 6s ease-in-out infinite;
}
@keyframes fx-price-breathe {
  0%, 100% {
    box-shadow:
      0 40px 100px rgba(0,0,0,0.60),
      0 0 0 1px rgba(0,82,255,0.12),
      0 0 60px rgba(0,82,255,0.10),
      inset 0 1px 0 rgba(255,255,255,0.06);
  }
  50% {
    box-shadow:
      0 40px 110px rgba(0,0,0,0.62),
      0 0 0 1px rgba(0,82,255,0.30),
      0 0 110px rgba(0,82,255,0.28),
      inset 0 1px 0 rgba(255,255,255,0.08);
  }
}

/* ───────────────────────────────────────────────
   16 · EYEBROW LABEL — accent line sweeps in when its block reveals
   ─────────────────────────────────────────────── */
.reveal.in .eyebrow::before {
  transform-origin: left center;
  animation: fx-eyebrow-grow 0.85s var(--ease-out-expo) both;
}
@keyframes fx-eyebrow-grow {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 1; }
}

/* ───────────────────────────────────────────────
   17 · TESTIMONIAL CARDS — periodic light sweep for a "live" feel
   ─────────────────────────────────────────────── */
.tweet-card { position: relative; overflow: hidden; }
.tweet-card::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(0,82,255,0.07), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
  transition: left 0.6s var(--ease-out-expo);
}
.tweet-card:hover::after { left: 130%; }

/* ───────────────────────────────────────────────
   9 · REDUCED MOTION — disable all heavy motion
   ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

  .tweet-col { animation: none !important; }
  .pricing-card { animation: none !important; }
  .reveal.in .eyebrow::before { animation: none !important; }


  html { scroll-behavior: auto; }
  .hero-bg::before,
  .hero-bg::after,
  .hero-headline .accent,
  h2.display .accent,
  .section-dark h2.display .accent { animation: none !important; }
  .reveal {
    filter: none !important;
    transform: none !important;
    transition: opacity 0.4s ease !important;
  }
  .reveal.in { transform: none !important; }
  .hero-dash.fx-tilt { transform: none !important; }
}
