/* ==========================================================================
   Seller Analytics Hub V2 - Core Design System & Styling
   ========================================================================== */

:root {
  /* Colors - Gabrun / Lovable light finance palette */
  --c-bg: oklch(0.99 0.005 240);
  --c-surface: oklch(1 0 0);
  --c-surface-2: oklch(0.965 0.012 250);
  --c-border: oklch(0.92 0.015 250);
  --c-border-hover: oklch(0.62 0.22 256 / 0.32);
  
  --c-text: oklch(0.12 0.04 255);
  --c-text-dim: oklch(0.52 0.03 255);
  --c-text-faint: oklch(0.58 0.025 255);
  
  --c-accent: oklch(0.62 0.22 256);
  --c-accent-light: oklch(0.78 0.17 240);
  --c-accent-glow: oklch(0.62 0.22 256 / 0.16);
  --c-gradient: radial-gradient(ellipse 120% 80% at 50% 0%, oklch(0.78 0.17 240) 0%, oklch(0.62 0.22 256) 45%, oklch(0.5 0.24 262) 100%);
  --c-gradient-glow: radial-gradient(circle, oklch(0.7 0.2 245 / 0.28) 0%, oklch(0.62 0.22 256 / 0.08) 70%, transparent 100%);
  
  --c-warning: oklch(0.78 0.16 70);
  --c-danger: oklch(0.62 0.22 25);
  --c-success: oklch(0.7 0.16 155);
  --c-info: oklch(0.72 0.18 200);

  /* Font Families */
  --font-display: 'Plus Jakarta Sans', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;

  /* Sizing and transition tokens */
  --radius: 28px;
  --radius-md: 24px;
  --radius-sm: 12px;
  --transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-sm: 0 1px 2px oklch(0.5 0.1 256 / 0.06);
  --shadow-md: 0 8px 24px -8px oklch(0.5 0.15 256 / 0.18);
  --shadow-lg: 0 24px 60px -20px oklch(0.5 0.2 256 / 0.28);
  --shadow-glow: 0 0 60px oklch(0.7 0.2 245 / 0.45);
  --shadow-ink: 0 10px 30px -10px oklch(0.1 0.05 260 / 0.5);
  --hero-gradient: radial-gradient(ellipse 120% 80% at 50% 0%, oklch(0.78 0.17 240) 0%, oklch(0.62 0.22 256) 45%, oklch(0.5 0.24 262) 100%);
  --soft-gradient: linear-gradient(135deg, oklch(0.97 0.025 245), oklch(0.94 0.05 250));
  --card-gradient: linear-gradient(160deg, oklch(1 0 0 / 0.85), oklch(1 0 0 / 0.5));
  --ink-gradient: linear-gradient(180deg, oklch(0.2 0.04 255), oklch(0.1 0.04 260));
  --shine-gradient: linear-gradient(110deg, transparent 30%, oklch(1 0 0 / 0.4) 50%, transparent 70%);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: var(--c-border);
}

html {
  scroll-behavior: smooth;
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  overflow-x: clip;
}

/* Typography styling */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-text);
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--c-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--c-surface-2);
  border: 2px solid var(--c-bg);
  border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--c-accent);
}

/* ==========================================================================
   Ambient Background (Floating Orbs)
   ========================================================================== */
.v2-ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.v2-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
}

.v2-orb-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #7ec8ff 0%, transparent 76%);
  animation: floatOrb 15s ease-in-out infinite alternate;
}

.v2-orb-2 {
  bottom: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, #1b6df2 0%, transparent 80%);
  animation: floatOrb 20s ease-in-out infinite alternate-reverse;
}

.v2-orb-3 {
  top: 40%;
  left: 30%;
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, #c7efff 0%, transparent 80%);
  opacity: 0.22;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 8%) scale(1.1); }
}

/* ==========================================================================
   Structural Layout Containers
   ========================================================================== */
.v2-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  min-width: 0;
}

@media (max-width: 768px) {
  .v2-container {
    padding: 0 16px;
  }
}

.v2-layout-wrapper,
.v2-layout-wrapper section,
.v2-layout-wrapper div,
.v2-layout-wrapper article,
.v2-layout-wrapper aside,
.v2-layout-wrapper nav {
  min-width: 0;
}

.v2-layout-wrapper [id] {
  scroll-margin-top: 112px;
}

.v2-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px auto;
}

.v2-section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(24, 101, 242, 0.07);
  border: 1px solid rgba(24, 101, 242, 0.14);
  color: var(--c-accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.v2-section-title {
  font-size: clamp(34px, 4.2vw, 56px);
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.v2-section-subtitle {
  color: var(--c-text-dim);
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.7;
}

/* ==========================================================================
   Premium Common Components (Cards, Buttons, Inputs)
   ========================================================================== */
.v2-card {
  background: var(--card-gradient);
  border: 1px solid oklch(1 0 0 / 0.6);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transition: var(--transition);
}

.v2-card:hover {
  border-color: var(--c-border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  transform: translateY(-4px);
}

.v2-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--c-gradient);
  color: #fff;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(24, 101, 242, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.v2-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(24, 101, 242, 0.38);
}

.v2-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(24, 101, 242, 0.05);
  color: var(--c-text);
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 700;
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: var(--transition);
}

.v2-btn-secondary:hover {
  background: rgba(24, 101, 242, 0.09);
  border-color: var(--c-border-hover);
  transform: translateY(-2px);
}

.v2-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v2-input-group label {
  font-size: 11px;
  font-weight: 700;
  color: var(--c-text-faint);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.v2-input-group input, .v2-input-group select {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  background: rgba(255, 255, 255, 0.86);
  color: var(--c-text);
  font-family: inherit;
  font-size: 14px;
  transition: var(--transition);
}

.v2-input-group input:hover, .v2-input-group select:hover {
  border-color: var(--c-border-hover);
}

.v2-input-group input:focus, .v2-input-group select:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(124, 131, 255, 0.18), inset 0 0 0 1px rgba(124, 131, 255, 0.1);
  background: #fff;
}

/* ==========================================================================
   Utilities & Common layout helper classes
   ========================================================================== */
.text-gradient {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-green { color: var(--c-success) !important; }
.text-red { color: var(--c-danger) !important; }
.text-yellow { color: var(--c-warning) !important; }
.text-indigo { color: var(--c-accent) !important; }

.grid-bg-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(oklch(0.62 0.22 256 / 0.06) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.62 0.22 256 / 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 80%);
  pointer-events: none;
}

/* Floating animation */
@keyframes v2Float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}
.v2-float-anim {
  animation: v2Float 6s ease-in-out infinite;
}

/* Pulse animation */
@keyframes v2Pulse {
  0% { box-shadow: 0 0 0 0 rgba(124, 131, 255, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(124, 131, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(124, 131, 255, 0); }
}
.v2-pulse-glow {
  animation: v2Pulse 2.5s infinite;
}

/* Pulse Dot animation */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #20d798;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulseDot 1.8s infinite;
}

.v2-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.v2-reveal.is-visible,
.v2-animate-in {
  opacity: 1;
  transform: translateY(0);
}

.v2-animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: v2FadeUp 0.52s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  will-change: opacity, transform;
}

.v2-nav,
.v2-hero-inner,
.v2-stats-box,
.v2-tools-wide-banner,
.v2-cta-inner {
  isolation: isolate;
}

.v2-nav::after,
.v2-hero-inner::after,
.v2-stats-box::after,
.v2-tools-wide-banner::after,
.v2-cta-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--shine-gradient);
  transform: translateX(-120%);
  animation: v2Shine 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

.v2-nav-inner,
.v2-hero-inner > *,
.v2-stats-box > *,
.v2-tools-wide-banner > *,
.v2-cta-inner > * {
  position: relative;
  z-index: 2;
}

.v2-hero-title.v2-animate-in { animation-delay: 0.06s; }
.v2-hero-sub.v2-animate-in { animation-delay: 0.14s; }
.v2-hero-form.v2-animate-in, .v2-hero-actions.v2-animate-in { animation-delay: 0.2s; }
.v2-hero-trust.v2-animate-in { animation-delay: 0.26s; }

@keyframes v2FadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes v2Shine {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
