/* ═══════════════════════════════════════════════════════════════
   SellerKite — Cinematic Design System
   Dark mode only. Awwwards quality. Apple-level polish.
   ═══════════════════════════════════════════════════════════════ */

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: auto; /* Lenis handles smooth scroll */
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

img, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }

/* ── CSS Custom Properties ───────────────────────────────────── */
:root {
  /* Backgrounds */
  --bg:             #040404;
  --bg-elevated:    #080808;
  --surface:        #0B0B0B;
  --surface-hover:  #141414;
  --surface-active: #1A1A1A;

  /* Borders */
  --border:         #1A1A1A;
  --border-subtle:  #111111;
  --border-hover:   #2A2A2A;

  /* Accent */
  --accent:         #5CE1E6;
  --accent-hover:   #7DE8EC;
  --accent-dim:     rgba(92, 225, 230, 0.15);
  --accent-glow:    rgba(92, 225, 230, 0.4);
  --accent-subtle:  rgba(92, 225, 230, 0.08);

  /* Semantic */
  --success:        #22C55E;
  --success-dim:    rgba(34, 197, 94, 0.15);
  --warning:        #F59E0B;
  --warning-dim:    rgba(245, 158, 11, 0.15);
  --error:          #EF4444;
  --error-dim:      rgba(239, 68, 68, 0.15);

  /* Text */
  --text:           #F5F5F5;
  --text-secondary: #A3A3A3;
  --text-muted:     #666666;
  --text-dim:       #444444;

  /* Glass */
  --glass:          rgba(255, 255, 255, 0.03);
  --glass-hover:    rgba(255, 255, 255, 0.06);
  --glass-border:   rgba(255, 255, 255, 0.06);
  --glass-border-hover: rgba(255, 255, 255, 0.12);

  /* Spacing scale (8px base) */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Radii */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Transitions */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast:   150ms;
  --duration-normal: 300ms;
  --duration-slow:   500ms;
  --duration-slower: 800ms;

  /* Z-index scale */
  --z-base:     1;
  --z-overlay:  10;
  --z-nav:      100;
  --z-modal:    200;
  --z-preloader: 9999;
}

/* ── Typography ──────────────────────────────────────────────── */
.t-hero {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.t-h1 {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.t-h2 {
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.t-h3 {
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.t-body {
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 400;
  line-height: 1.6;
}

.t-small {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
}

.t-caption {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.4;
}

.t-mono {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.t-muted { color: var(--text-muted); }
.t-secondary { color: var(--text-secondary); }
.t-accent { color: var(--accent); }
.t-center { text-align: center; }

/* ── Layout ──────────────────────────────────────────────────── */
.scene {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-inner {
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.scene-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.scene-content {
  position: relative;
  z-index: var(--z-base);
}

/* ── Glass Cards ─────────────────────────────────────────────── */
.glass-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all var(--duration-normal) var(--ease-out);
}

.glass-card:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border-hover);
  transform: translateY(-2px);
}

.glass-card--accent {
  border-color: rgba(92, 225, 230, 0.15);
  box-shadow: 0 0 30px rgba(92, 225, 230, 0.05);
}

.glass-card--accent:hover {
  border-color: rgba(92, 225, 230, 0.3);
  box-shadow: 0 0 50px rgba(92, 225, 230, 0.1);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 15px;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  backdrop-filter: blur(12px);
}

.btn-secondary:hover {
  background: var(--glass-hover);
  border-color: var(--glass-border-hover);
}

.btn-large {
  padding: var(--space-5) var(--space-10);
  font-size: 18px;
  font-weight: 600;
}

.btn-huge {
  padding: var(--space-6) var(--space-16);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-glow {
  animation: btnBreathe 3s ease-in-out infinite;
}

@keyframes btnBreathe {
  0%, 100% { box-shadow: 0 0 20px var(--accent-glow), 0 0 60px rgba(92, 225, 230, 0.1); }
  50%      { box-shadow: 0 0 40px var(--accent-glow), 0 0 100px rgba(92, 225, 230, 0.15); }
}

/* ── Preloader ───────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: var(--z-preloader);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  transition: opacity 0.8s var(--ease-out);
}

.preloader.loaded {
  opacity: 0;
  pointer-events: none;
}

.preloader-logo {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.preloader-bar {
  width: 200px;
  height: 2px;
  background: var(--border);
  border-radius: 1px;
  overflow: hidden;
}

.preloader-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.3s var(--ease-out);
  box-shadow: 0 0 10px var(--accent-glow);
}

.preloader-pct {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Navigation ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  padding: var(--space-5) var(--space-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--duration-slow) var(--ease-out);
}

.nav.scrolled {
  background: rgba(4, 4, 4, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-3) var(--space-8);
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-8);
  list-style: none;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  cursor: pointer;
}

.nav-link:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav-mobile-toggle {
  display: none;
  width: 32px;
  height: 32px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text);
  transition: all var(--duration-normal) var(--ease-out);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .nav-actions .btn-secondary { display: none; }
}

/* ── Mobile Drawer ───────────────────────────────────────────── */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-nav) + 1);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.mobile-drawer.open {
  pointer-events: all;
  opacity: 1;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 85vw);
  height: 100%;
  background: var(--surface);
  border-left: 1px solid var(--border);
  padding: var(--space-8);
  transform: translateX(100%);
  transition: transform var(--duration-slow) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.mobile-drawer.open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-drawer-close {
  align-self: flex-end;
  font-size: 14px;
  color: var(--text-muted);
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  list-style: none;
}

.mobile-drawer-links a {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: var(--space-2) 0;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  background: var(--bg);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) var(--space-8) var(--space-8);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-12);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 280px;
  line-height: 1.6;
}

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.footer-col-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
}

.footer-col-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--duration-fast);
}

.footer-col-links a:hover { color: var(--text); }

.footer-bottom {
  max-width: 1280px;
  margin: var(--space-12) auto 0;
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-social {
  display: flex;
  gap: var(--space-4);
}

.footer-social a {
  color: var(--text-muted);
  transition: color var(--duration-fast);
}

.footer-social a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: var(--space-3); text-align: center; }
}

/* ── Scene-specific Elements ─────────────────────────────────── */

/* Scan lines */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow), 0 0 30px var(--accent-dim);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
}

/* Bounding box */
.bounding-box {
  position: absolute;
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 10px var(--accent-dim);
  opacity: 0;
  transform: scale(0.95);
}

/* Floating label */
.float-label {
  position: absolute;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(8px);
}

/* Confidence badge */
.confidence-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--accent-subtle);
  border: 1px solid rgba(92, 225, 230, 0.1);
  border-radius: var(--radius-full);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

/* Data card (floating) */
.data-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  padding: var(--space-6);
  min-width: 200px;
  opacity: 0;
  transform: translateY(20px);
}

.data-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.data-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.data-card-trend {
  font-size: 13px;
  font-weight: 500;
  margin-top: var(--space-1);
}

.data-card-trend.up { color: var(--success); }
.data-card-trend.down { color: var(--error); }

/* Typewriter cursor */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--accent);
  margin-left: 2px;
  animation: cursorBlink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes cursorBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* SEO score bar */
.score-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--error), var(--warning), var(--success));
  transition: width 1.5s var(--ease-out);
  box-shadow: 0 0 8px var(--success-dim);
}

/* Pipeline node */
.pipeline-node {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--glass);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-slow) var(--ease-out);
  position: relative;
}

.pipeline-node.active {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.pipeline-node.done {
  border-color: var(--success);
  background: var(--success-dim);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
}

.pipeline-connector {
  width: 60px;
  height: 2px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}

.pipeline-connector-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  transition: width 0.6s var(--ease-out);
}

/* Pricing cards */
.pricing-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  backdrop-filter: blur(20px);
  padding: var(--space-10);
  transition: all var(--duration-slow) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--glass-border-hover);
}

.pricing-card.popular {
  border-color: rgba(92, 225, 230, 0.2);
  box-shadow: 0 0 40px rgba(92, 225, 230, 0.05);
}

.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pricing-card-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.pricing-card-price {
  font-size: 48px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-1);
}

.pricing-card-price span {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: var(--space-8);
}

.pricing-card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.pricing-card-features li {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.pricing-card-features li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

/* Pricing toggle */
.pricing-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: var(--space-1);
}

.pricing-toggle-option {
  padding: var(--space-2) var(--space-5);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--duration-normal) var(--ease-out);
}

.pricing-toggle-option.active {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

/* ── Glow Effects ────────────────────────────────────────────── */
.glow-accent {
  box-shadow: 0 0 30px var(--accent-dim), 0 0 60px rgba(92, 225, 230, 0.05);
}

.glow-success {
  box-shadow: 0 0 30px var(--success-dim), 0 0 60px rgba(34, 197, 94, 0.05);
}

.glow-text {
  text-shadow: 0 0 20px var(--accent-glow), 0 0 40px var(--accent-dim);
}

/* ── Utility Animations ──────────────────────────────────────── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

.fade-in {
  opacity: 0;
}

.fade-in.visible {
  opacity: 1;
  transition: opacity var(--duration-slower) var(--ease-out);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity var(--duration-slower) var(--ease-out),
              transform var(--duration-slower) var(--ease-out);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 80ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 160ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 240ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 320ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 400ms; }

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

/* ── Reduced Motion ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .scene { scroll-snap-align: none; }
}
