/* ============================================================
   ReviewerOne — Design tokens & custom CSS
   Tailwind handles utility classes; this file holds
   tokens, gradients, glass, noise, animations.
   ============================================================ */

:root {
  /* Type */
  --font-display: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Light palette */
  --bg: #FAFAFB;
  --bg-2: #F4F4F7;
  --surface: #FFFFFF;
  --surface-2: #FBFBFD;
  --ink: #0A0A14;
  --ink-2: #2E2E3A;
  --muted: #6A6A78;
  --muted-2: #9A9AA8;
  --border: rgba(10, 10, 20, 0.08);
  --border-strong: rgba(10, 10, 20, 0.14);

  /* Brand */
  --indigo-50: #EEF0FF;
  --indigo-100: #E1E4FF;
  --indigo-300: #A3AAFF;
  --indigo-500: #5A60F0;
  --indigo-600: #4A4DE2;
  --indigo-700: #3B3DC4;
  --indigo-900: #1B1D5A;
  --violet-500: #8B5CF6;
  --violet-600: #7C3AED;
  --cyan-400: #38BDF8;
  --cyan-500: #06B6D4;

  /* Effects */
  --shadow-sm: 0 1px 2px rgba(10, 10, 20, 0.04), 0 1px 1px rgba(10, 10, 20, 0.03);
  --shadow-md: 0 6px 24px -8px rgba(10, 10, 20, 0.10), 0 2px 6px rgba(10, 10, 20, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(20, 22, 80, 0.22), 0 8px 20px -10px rgba(10, 10, 20, 0.08);
  --shadow-glow: 0 0 0 1px rgba(90, 96, 240, 0.18), 0 18px 60px -18px rgba(90, 96, 240, 0.45);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl: 32px;
}

html.dark {
  --bg: #07070C;
  --bg-2: #0B0B14;
  --surface: #0F0F1A;
  --surface-2: #14142A;
  --ink: #F4F4F8;
  --ink-2: #C5C5D0;
  --muted: #8A8A98;
  --muted-2: #5C5C6E;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --indigo-50: rgba(90, 96, 240, 0.12);
  --indigo-100: rgba(90, 96, 240, 0.18);

  --shadow-md: 0 6px 24px -8px rgba(0, 0, 0, 0.50), 0 2px 6px rgba(0, 0, 0, 0.30);
  --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.60), 0 8px 20px -10px rgba(0, 0, 0, 0.40);
  --shadow-glow: 0 0 0 1px rgba(122, 128, 255, 0.30), 0 18px 60px -18px rgba(122, 128, 255, 0.55);
}

/* ---------------------------------- Base ---- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.font-display { font-family: var(--font-display); letter-spacing: -0.02em; }
.font-mono { font-family: var(--font-mono); }

::selection { background: rgba(90, 96, 240, 0.22); color: var(--ink); }

/* ---------------------------------- Backdrop layers ---- */

/* Subtle grid background */
.grid-bg {
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: -1px -1px;
}
.grid-bg-fine {
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* Dot grid */
.dot-bg {
  background-image: radial-gradient(circle, var(--border-strong) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Noise overlay */
.noise::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.6;
  pointer-events: none;
  mix-blend-mode: multiply;
}
html.dark .noise::before { mix-blend-mode: screen; opacity: 0.4; }

/* Hero gradient bloom */
.hero-bloom {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.hero-bloom::before, .hero-bloom::after {
  content: ""; position: absolute; border-radius: 9999px; filter: blur(80px);
}
.hero-bloom::before {
  width: 720px; height: 720px; left: -140px; top: -240px;
  background: radial-gradient(circle, rgba(90,96,240,0.45), rgba(90,96,240,0) 60%);
}
.hero-bloom::after {
  width: 640px; height: 640px; right: -120px; top: -120px;
  background: radial-gradient(circle, rgba(139,92,246,0.35), rgba(6,182,212,0.18) 50%, rgba(6,182,212,0) 70%);
}
html.dark .hero-bloom::before { background: radial-gradient(circle, rgba(90,96,240,0.55), rgba(90,96,240,0) 60%); }
html.dark .hero-bloom::after { background: radial-gradient(circle, rgba(139,92,246,0.45), rgba(6,182,212,0.20) 55%, rgba(6,182,212,0) 70%); }

/* Animated conic gradient ring */
@keyframes spin-slow {
  to { transform: rotate(360deg); }
}
.conic-ring {
  background: conic-gradient(from 0deg, rgba(90,96,240,0), rgba(90,96,240,0.5), rgba(139,92,246,0.5), rgba(6,182,212,0.5), rgba(90,96,240,0));
  animation: spin-slow 18s linear infinite;
}

/* ---------------------------------- Glass ---- */
.glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-lg);
}
html.dark .glass {
  background: rgba(20, 20, 38, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.7);
}
html.dark .glass-strong {
  background: rgba(15, 15, 26, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------------------------------- First-visit popup ---- */
.ssp-popup {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms cubic-bezier(.2,.7,.2,1);
}
.ssp-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}
.ssp-popup__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(90,96,240,0.30), transparent 46%),
    rgba(7, 7, 12, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.ssp-popup__dialog {
  position: relative;
  width: min(940px, 100%);
  max-height: min(86vh, 780px);
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.56);
  border-radius: 30px;
  box-shadow: 0 34px 90px -24px rgba(10, 10, 20, 0.46);
  transform: translateY(18px) scale(0.97);
  transition: transform 320ms cubic-bezier(.2,.7,.2,1);
}
.ssp-popup.is-open .ssp-popup__dialog {
  transform: translateY(0) scale(1);
}
.ssp-popup__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: 999px;
  background: rgba(10, 10, 20, 0.55);
  color: white;
  cursor: pointer;
  transition: transform 180ms, background 180ms;
}
.ssp-popup__close:hover {
  transform: rotate(8deg) scale(1.04);
  background: rgba(10, 10, 20, 0.78);
}
.ssp-popup__image-wrap {
  min-height: 420px;
  background: linear-gradient(135deg, var(--indigo-50), rgba(139,92,246,0.16));
}
.ssp-popup__image {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: cover;
}
.ssp-popup__content {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 48px 42px;
}
.ssp-popup__content::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(90,96,240,0.14), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(6,182,212,0.10), transparent 34%);
  pointer-events: none;
}
.ssp-popup__content > * {
  position: relative;
}
.ssp-popup__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--indigo-50);
  color: var(--indigo-600);
  border: 1px solid rgba(90,96,240,0.16);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.ssp-popup__eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--indigo-500);
  box-shadow: 0 0 0 4px rgba(90,96,240,0.16);
}
.ssp-popup__content h2 {
  font-size: clamp(30px, 2vw, 48px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.ssp-popup__content p {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.65;
}
.ssp-popup-open {
  overflow: hidden;
}
html.dark .ssp-popup__dialog {
  background: rgba(15, 15, 26, 0.94);
  border-color: rgba(255,255,255,0.10);
}
html.dark .ssp-popup__content p {
  color: var(--ink-2);
}

@media (max-width: 820px) {
  .ssp-popup__dialog {
    max-height: 88vh;
    grid-template-columns: 1fr;
    overflow-y: auto;
    border-radius: 24px;
  }
  .ssp-popup__image-wrap,
  .ssp-popup__image {
    min-height: 260px;
  }
  .ssp-popup__content {
    padding: 30px 24px 28px;
  }
}

/* ---------------------------------- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.15rem; border-radius: 12px;
  font-weight: 500; font-size: 0.95rem; letter-spacing: -0.01em;
  transition: all 220ms cubic-bezier(.2,.7,.2,1);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(180deg, #5A60F0 0%, #4A4DE2 100%);
  color: white;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 18px -6px rgba(74,77,226,0.45);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 14px 28px -8px rgba(74,77,226,0.55), 0 0 0 4px rgba(74,77,226,0.10);
}
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  background: var(--surface-2);
  border-color: rgba(90,96,240,0.35);
  color: var(--indigo-600);
}
html.dark .btn-secondary:hover { color: #C7CAFF; }

.btn-ghost {
  color: var(--ink-2);
}
.btn-ghost:hover { color: var(--ink); }

/* ---------------------------------- Labels ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--indigo-600);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--indigo-50);
  border: 1px solid rgba(90,96,240,0.16);
}
html.dark .eyebrow { color: #B7BBFF; }

.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--indigo-500);
  box-shadow: 0 0 0 3px rgba(90,96,240,0.18);
}

/* ---------------------------------- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 280ms cubic-bezier(.2,.7,.2,1), box-shadow 280ms, border-color 280ms;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}

.card-glow {
  position: relative;
  isolation: isolate;
}
.card-glow::before {
  content: ""; position: absolute; inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(90,96,240,0.0), rgba(139,92,246,0.0));
  z-index: -1; opacity: 0; transition: opacity 360ms;
}
.card-glow:hover::before {
  background: linear-gradient(135deg, rgba(90,96,240,0.35), rgba(139,92,246,0.25) 50%, rgba(6,182,212,0.20));
  opacity: 1; filter: blur(18px);
}

/* ---------------------------------- Inputs ---- */
.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.95rem;
  color: var(--ink);
  transition: all 220ms;
}
.input::placeholder { color: var(--muted-2); }
.input:focus {
  outline: none;
  border-color: rgba(90,96,240,0.6);
  box-shadow: 0 0 0 4px rgba(90,96,240,0.14);
}
html.dark .input { background: rgba(255,255,255,0.04); }

/* ---------------------------------- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 800ms cubic-bezier(.2,.7,.2,1), transform 800ms cubic-bezier(.2,.7,.2,1);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 80ms; }
.reveal-delay-2 { transition-delay: 160ms; }
.reveal-delay-3 { transition-delay: 240ms; }
.reveal-delay-4 { transition-delay: 320ms; }

/* ---------------------------------- Floating animation ---- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.float { animation: float 6s ease-in-out infinite; }
.float-slow { animation: float 9s ease-in-out infinite; }
.float-delay { animation-delay: -3s; }

/* ---------------------------------- Pulse dot ---- */
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(90,96,240,0.5); }
  100% { box-shadow: 0 0 0 14px rgba(90,96,240,0); }
}
.pulse-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--indigo-500);
  animation: pulse-ring 2.2s ease-out infinite;
}

/* ---------------------------------- Marquee (logos) ---- */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee-track {
  display: flex; gap: 3.5rem; width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee-mask {
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

/* ---------------------------------- Network viz line ---- */
.net-line { stroke: rgba(90,96,240,0.35); stroke-width: 1; fill: none; }
.net-node { fill: var(--indigo-500); }
.net-node-soft { fill: rgba(90,96,240,0.18); }
html.dark .net-line { stroke: rgba(160,164,255,0.30); }

/* ---------------------------------- Bento card art ---- */
.tilt {
  transform: perspective(900px) rotateX(8deg) rotateY(-8deg);
  transition: transform 500ms cubic-bezier(.2,.7,.2,1);
}
.tilt-host:hover .tilt {
  transform: perspective(900px) rotateX(4deg) rotateY(-4deg) translateY(-4px);
}

/* ---------------------------------- Headline gradient ---- */
.text-gradient {
  background: linear-gradient(180deg, var(--ink) 30%, rgba(90,96,240,0.85) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html.dark .text-gradient {
  background: linear-gradient(180deg, #F5F5FA 30%, rgba(160,164,255,0.9) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

.text-accent { color: var(--indigo-600); }
html.dark .text-accent { color: #B7BBFF; }

/* ---------------------------------- Divider ---- */
.hr-soft {
  height: 1px; width: 100%;
  background: linear-gradient(to right, transparent, var(--border-strong), transparent);
}

/* ---------------------------------- Avatars ---- */
.avatar {
  width: 36px; height: 36px; border-radius: 999px;
  background: linear-gradient(135deg, #C7CAFF, #E9D5FF);
  border: 2px solid var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--indigo-700);
}

/* Loading shimmer for empty-state mock */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.shimmer {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--surface-2) 50%, var(--bg-2) 100%);
  background-size: 800px 100%;
  animation: shimmer 2.2s linear infinite;
}

/* ---------------------------------- Nav dropdowns ---- */
.nav-item { position: relative; }

.nav-trigger {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.5rem 0.85rem; border-radius: 10px;
  font-size: 14px; color: var(--ink-2);
  transition: color 200ms, background 200ms;
  cursor: pointer; background: transparent; border: 0;
  font-family: inherit;
}
.nav-trigger:hover, .nav-trigger[aria-expanded="true"] {
  color: var(--ink);
  background: rgba(10,10,20,0.04);
}
html.dark .nav-trigger:hover, html.dark .nav-trigger[aria-expanded="true"] {
  background: rgba(255,255,255,0.05);
}
.nav-trigger .chev {
  width: 11px; height: 11px;
  transition: transform 240ms cubic-bezier(.2,.7,.2,1);
  opacity: 0.6;
}
.nav-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }

.nav-panel {
  position: absolute; top: calc(100% + 10px); left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms, transform 240ms cubic-bezier(.2,.7,.2,1);
  z-index: 60;
}
.nav-panel.wide { min-width: 460px; }
.nav-panel[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
html.dark .nav-panel { background: rgba(15,15,26,0.92); backdrop-filter: blur(16px); }

.nav-panel-link {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 10px 12px; border-radius: 12px;
  text-decoration: none;
  transition: background 180ms;
}
.nav-panel-link:hover { background: var(--bg-2); }
html.dark .nav-panel-link:hover { background: rgba(255,255,255,0.04); }

.nav-panel-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--indigo-50);
  color: var(--indigo-600);
  display: grid; place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(90,96,240,0.14);
}
html.dark .nav-panel-icon { color: #B7BBFF; }

.nav-panel-title {
  font-size: 14px; font-weight: 600; color: var(--ink);
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 6px;
}
.nav-panel-desc {
  font-size: 12.5px; color: var(--muted);
  margin-top: 2px; line-height: 1.4;
}
.nav-panel-soon {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 999px;
  background: var(--bg-2); color: var(--muted);
  border: 1px solid var(--border);
}

.nav-panel-footer {
  margin-top: 4px; padding: 12px 12px 8px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.nav-panel-footer-link {
  font-size: 12.5px; color: var(--indigo-600);
  display: inline-flex; align-items: center; gap: 4px;
  font-weight: 500;
}
.nav-panel-footer-link:hover { gap: 6px; }

/* Mobile accordion */
.mobile-acc-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px; border-radius: 10px;
  font-size: 15px; color: var(--ink); background: transparent; border: 0;
  font-family: inherit; cursor: pointer;
}
.mobile-acc-trigger .chev { width: 13px; height: 13px; transition: transform 240ms; opacity: 0.6; }
.mobile-acc-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.mobile-acc-panel { display: none; padding: 2px 8px 8px 16px; }
.mobile-acc-panel[data-open="true"] { display: block; }
.mobile-acc-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  font-size: 14px; color: var(--ink-2); text-decoration: none;
}
.mobile-acc-link:hover { background: var(--bg-2); color: var(--ink); }

/* ---------------------------------- Sticky nav scrolled state ---- */
.nav-scrolled {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 var(--border);
}
html.dark .nav-scrolled {
  background: rgba(7, 7, 12, 0.72);
  border-bottom: 1px solid var(--border);
}

/* ---------------------------------- Section spacing ---- */
.section { padding: 7rem 0; position: relative; }
@media (max-width: 768px) {
  .section { padding: 4.5rem 0; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
