/* ============================================================
   ARENIQ — Marketing Site Design System
   UI Style: Glassmorphism + Geometric | Dark AI-Native
   Based on UI/UX Pro Max Skill guidelines
   ============================================================ */

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Colors — Primitives */
  --cyan-500:  #00E5FF;
  --cyan-400:  #33EEFF;
  --cyan-300:  #66F2FF;
  --violet-500: #7C3AED;
  --violet-400: #8B5CF6;
  --green-400:  #34D399;
  --orange-400: #FB923C;
  --red-400:    #F87171;

  /* Colors — Semantic */
  --color-bg-base:     #07090e;
  --color-bg-surface:  #0d1117;
  --color-bg-elevated: #151b23;
  --color-bg-card:     rgba(21, 27, 35, 0.7);
  --color-border:      rgba(255,255,255,0.07);
  --color-border-accent: rgba(0,229,255,0.25);
  --color-text-primary: #FFFFFF;
  --color-text-secondary: #94a3b8;
  --color-text-muted:  #475569;
  --color-accent:      var(--cyan-500);
  --color-accent-dim:  rgba(0,229,255,0.08);
  --color-accent-glow: rgba(0,229,255,0.15);

  /* Typography */
  --font-sans: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-display: 'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --section-pad: clamp(5rem, 10vw, 8rem);

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-glow:  0 0 40px rgba(0,229,255,0.12);
  --shadow-card:  0 4px 24px rgba(0,0,0,0.4);
  --shadow-float: 0 8px 40px rgba(0,0,0,0.6);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Typography Scale ─────────────────────────────────────── */
.text-display {
  font-size: clamp(2.75rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.text-h1 { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.025em; }
.text-h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.text-h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 600; line-height: 1.3; }
.text-h4 { font-size: 1.125rem; font-weight: 600; }
.text-body-lg { font-size: 1.125rem; line-height: 1.7; }
.text-body    { font-size: 1rem; line-height: 1.7; }
.text-sm      { font-size: 0.875rem; }
.text-xs      { font-size: 0.75rem; }
.text-mono    { font-family: var(--font-mono); }

/* ── Gradient Text ────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--cyan-400) 0%, var(--violet-400) 60%, var(--cyan-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-cyan {
  background: linear-gradient(90deg, var(--cyan-400), var(--cyan-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Layout ───────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}
.section { padding: var(--section-pad) 0; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--color-border);
  transition: background 0.3s;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 5vw, 2.5rem);
}
.nav-logo img { height: 68px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav-links a {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--color-text-primary); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.5rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-bg-base);
}
.btn-primary:hover {
  background: var(--cyan-400);
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0,229,255,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--color-border-accent);
}
.btn-outline:hover {
  background: var(--color-accent-dim);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.04);
  color: var(--color-text-primary);
}
.btn-lg {
  height: 52px;
  padding: 0 2rem;
  font-size: 1rem;
  border-radius: var(--radius-full);
}
.btn-sm {
  height: 36px;
  padding: 0 1rem;
  font-size: 0.8125rem;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: rgba(0,229,255,0.2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow);
}
.card-highlight {
  border-color: var(--color-border-accent);
  background: linear-gradient(135deg, rgba(0,229,255,0.04) 0%, rgba(124,58,237,0.04) 100%);
}

/* ── Badge ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-cyan {
  background: var(--color-accent-dim);
  color: var(--color-accent);
  border: 1px solid var(--color-border-accent);
}
.badge-violet {
  background: rgba(124,58,237,0.08);
  color: var(--violet-400);
  border: 1px solid rgba(124,58,237,0.2);
}
.badge-green {
  background: rgba(52,211,153,0.08);
  color: var(--green-400);
  border: 1px solid rgba(52,211,153,0.2);
}

/* ── Live dot ─────────────────────────────────────────────── */
.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: pulse-glow 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,229,255,0.4); opacity: 1; }
  50%       { box-shadow: 0 0 0 8px rgba(0,229,255,0); opacity: 0.8; }
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 5rem;
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 30%, transparent 100%);
}
.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(0,229,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-glow-2 {
  position: absolute;
  bottom: -10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(124,58,237,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}
.hero-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.hero-title { margin-bottom: 1.5rem; }
.hero-subtitle {
  color: var(--color-text-secondary);
  max-width: 640px;
  margin: 0 auto 2.5rem;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}
.hero-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* ── Section Headers ──────────────────────────────────────── */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 4rem;
}
.section-eyebrow {
  margin-bottom: 0.875rem;
}
.section-title {
  margin-bottom: 1rem;
}
.section-desc {
  color: var(--color-text-secondary);
}

/* ── How It Works ─────────────────────────────────────────── */
.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0;
  position: relative;
}
.pipeline-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 4rem;
}
.pipeline-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--color-accent);
  padding-top: 0.5rem;
}
.pipeline-step {
  position: relative;
  text-align: center;
  padding: 1.5rem 1rem;
}
.pipeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 2.75rem;
  right: -1px;
  width: 2px;
  height: 32px;
  background: linear-gradient(to bottom, var(--color-accent), transparent);
  transform: rotate(90deg);
  transform-origin: top;
}
.pipeline-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-md);
  background: var(--color-accent-dim);
  border: 1px solid var(--color-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}
.pipeline-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  color: var(--color-text-muted);
}

/* ── Audience Section Tabs ────────────────────────────────── */
.audience-tabs {
  display: flex;
  gap: 0.5rem;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 4px;
  width: fit-content;
  margin: 0 auto 3rem;
  flex-wrap: wrap;
  justify-content: center;
}
.audience-tab {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  background: transparent;
  border: none;
  transition: all 0.2s;
}
.audience-tab.active {
  background: var(--color-accent);
  color: var(--color-bg-base);
}
.audience-tab:hover:not(.active) {
  color: var(--color-text-primary);
  background: rgba(255,255,255,0.04);
}
.audience-panel { display: none; }
.audience-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.audience-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.audience-features { list-style: none; display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.audience-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.feature-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-dim);
  border: 1px solid var(--color-border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.feature-text-title { font-weight: 600; font-size: 0.9375rem; }
.feature-text-desc { font-size: 0.875rem; color: var(--color-text-secondary); margin-top: 2px; }

/* ── Signal Grid ──────────────────────────────────────────── */
.signal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── Signal Card (visual) ─────────────────────────────────── */
.signal-viz {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  font-family: var(--font-mono);
}
.signal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
.signal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.8125rem;
}
.signal-row:last-child { border-bottom: none; }
.signal-key { color: var(--color-text-secondary); }
.signal-val { color: var(--color-accent); font-weight: 600; }
.signal-val.positive { color: var(--green-400); }
.signal-val.warning  { color: var(--orange-400); }
.modifier-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  margin-top: 1rem;
  overflow: hidden;
}
.modifier-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--cyan-500), var(--violet-400));
  transition: width 1s ease;
}

/* ── Stats Grid ───────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.stat-card {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}
.stat-num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-label {
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

/* ── CTA Section ──────────────────────────────────────────── */
.cta-section {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: var(--section-pad) 0;
}
.cta-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(0,229,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.cta-border {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 5rem 3rem;
  position: relative;
  overflow: hidden;
}
.cta-border::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,229,255,0.04) 0%, rgba(124,58,237,0.04) 100%);
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem 0 2rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: start;
}
.footer-brand p {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-top: 0.75rem;
  max-width: 340px;
}
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 3rem;
}
.footer-links-col h5 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
}
.footer-links-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.625rem; }
.footer-links-col a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}
.footer-links-col a:hover { color: var(--color-text-primary); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border) 30%, var(--color-border) 70%, transparent);
}

/* ── Glassmorphism panel ──────────────────────────────────── */
.glass {
  background: rgba(13, 17, 23, 0.6);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.07);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--color-bg-base); }
::-webkit-scrollbar-thumb { background: var(--color-bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-text-muted); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .audience-content { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links-grid { grid-template-columns: repeat(2, auto); }
}
@media (max-width: 640px) {
  .hero-stats { gap: 2rem; }
  .cta-border { padding: 3rem 1.5rem; }
  .footer-links-grid { grid-template-columns: 1fr; gap: 2rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .pipeline-row {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .pipeline-arrow { display: none; }
  .signal-grid { grid-template-columns: 1fr; }
}

/* ── Utility helpers ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.color-muted { color: var(--color-text-secondary); }
.color-accent { color: var(--color-accent); }

/* ── Animate on scroll ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Demo Video Modal ─────────────────────────────────────── */
.demo-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.demo-modal.open { display: flex; }
.demo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
}
.demo-modal-content {
  position: relative;
  z-index: 1;
  width: min(92vw, 1060px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
}
.demo-modal-content video {
  display: block;
  width: 100%;
  height: auto;
}
.demo-modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.demo-modal-close:hover { background: rgba(255, 255, 255, 0.12); }
