/* =====================================================================
   SIERRASOFT LABS — Premium Light Theme v3
   Design System: White canvas, blue accents, Stripe-level polish
   ===================================================================== */

:root {
  /* Brand */
  --primary-blue: #2563eb;
  --primary-blue-dark: #1d4ed8;
  --accent-blue: #38bdf8;
  --accent-blue-mid: #0ea5e9;
  --indigo: #6366f1;

  /* Backgrounds */
  --bg-main: #f8fafc;
  --bg-alt: #ffffff;
  --card-bg: #ffffff;

  /* Borders */
  --card-border: rgba(15, 23, 42, 0.07);
  --divider: rgba(15, 23, 42, 0.06);

  /* Typography */
  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Shadows — Stripe-inspired */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 24px rgba(15, 23, 42, 0.07), 0 1px 4px rgba(15, 23, 42, 0.04);
  --shadow-card-hover: 0 20px 48px rgba(15, 23, 42, 0.10), 0 4px 12px rgba(37, 99, 235, 0.08);
  --shadow-blue: 0 8px 28px rgba(37, 99, 235, 0.28);
  --shadow-navbar: 0 1px 0 var(--divider), 0 4px 24px rgba(15, 23, 42, 0.05);
}

/* ── Scrollbar ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Base ────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-main);
  color: var(--text-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── NAVBAR ──────────────────────────────────────────────────────────── */
nav.navbar {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--divider);
  box-shadow: var(--shadow-navbar);
  transition: all 0.3s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  color: var(--primary-blue) !important;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  transition: color 0.25s ease;
}
.navbar-brand:hover { color: var(--primary-blue-dark) !important; }

.navbar-logo {
  height: 30px;
  margin-right: 10px;
}

.nav-link {
  color: var(--text-body) !important;
  font-weight: 500;
  font-size: 0.9rem;
  margin: 0 2px;
  padding: 8px 14px !important;
  border-radius: 8px;
  transition: all 0.22s ease;
}
.nav-link:hover {
  color: var(--primary-blue) !important;
  background: rgba(37, 99, 235, 0.06);
}
.nav-link.active {
  color: var(--primary-blue) !important;
  background: rgba(37, 99, 235, 0.08);
}

.navbar-toggler { border-color: var(--card-border); }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2815,23,42,0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

nav img.flag {
  width: 22px;
  cursor: pointer;
  margin-left: 8px;
  opacity: 0.6;
  border-radius: 3px;
  transition: 0.25s;
}
nav img.flag:hover { opacity: 1; transform: scale(1.1); }

/* ── HERO ────────────────────────────────────────────────────────────── */
.hero-gradient-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 80px;
  background: transparent;
  overflow: hidden;
}

/* Subtle dot-grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(37, 99, 235, 0.12) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

#particles-js {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 40px 20px;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.06;
  margin-bottom: 24px;
  background: linear-gradient(135deg, #0f172a 0%, var(--primary-blue) 55%, var(--accent-blue-mid) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.75;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 400;
}

.hero-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-body);
  box-shadow: var(--shadow-xs);
  transition: all 0.22s ease;
}
.hero-chip:hover {
  border-color: rgba(37, 99, 235, 0.3);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}
.hero-chip i { color: var(--primary-blue); font-size: 0.85rem; }

@media (max-width: 991px) {
  .hero { padding-top: 100px; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
}

/* ── HERO AI INPUT ───────────────────────────────────────────────────── */
.hero-ai-wrapper {
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

.ai-input-group {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1.5px solid rgba(37, 99, 235, 0.18);
  border-radius: 9999px;
  padding: 8px 10px 8px 24px;
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.10), 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}
.ai-input-group:focus-within {
  border-color: var(--primary-blue);
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.18), 0 0 0 4px rgba(37, 99, 235, 0.07);
  transform: translateY(-2px);
}
.ai-input-group .ai-icon {
  color: var(--primary-blue);
  font-size: 1.15rem;
  margin-right: 12px;
}
.ai-input-group input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-dark);
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
}
.ai-input-group input::placeholder { color: var(--text-light); }
.ai-input-group input:focus { outline: none; box-shadow: none; }
.ai-input-group button {
  border-radius: 50% !important;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  border: none;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.ai-input-group button:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.ai-response-box {
  background: #ffffff;
  border: 1px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  font-family: inherit;
  color: var(--text-body);
}

/* ── SECTIONS ────────────────────────────────────────────────────────── */
section { padding: 100px 0; }

#servicios   { background: var(--bg-main); }
#agentes     { background: var(--bg-alt); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
#soluciones  { background: var(--bg-main); }
#nosotros    { background: var(--bg-alt); border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); }
#diagnostico { background: var(--bg-main); }
#contacto    { background: var(--bg-alt); border-top: 1px solid var(--divider); }

.section-label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary-blue);
  background: rgba(37, 99, 235, 0.07);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 9999px;
  padding: 4px 14px;
  margin-bottom: 14px;
}

.section-title {
  text-align: center;
  font-weight: 700;
  margin-bottom: 56px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  color: var(--text-dark);
  letter-spacing: -0.025em;
}

/* ── CARDS — Stripe-level polish ─────────────────────────────────────── */
.minimal-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 36px 28px;
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.35s ease, transform 0.35s ease, border-color 0.35s ease;
}

/* Top accent line */
.minimal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mouse-tracking highlight */
.minimal-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background: radial-gradient(500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(37, 99, 235, 0.035), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.minimal-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.14);
}
.minimal-card:hover::before { transform: scaleX(1); }
.minimal-card:hover::after  { opacity: 1; }

.minimal-card i {
  font-size: 2rem;
  margin-bottom: 18px;
  color: var(--primary-blue);
  display: block;
  transition: all 0.3s ease;
}
.minimal-card:hover i { transform: scale(1.12) translateY(-2px); }

.minimal-card h5 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-dark) !important;
}
.minimal-card p  { color: var(--text-muted); line-height: 1.65; font-size: 0.92rem; }
.minimal-card h3 { color: var(--text-dark); }
.minimal-card h4 { color: var(--text-dark); }

/* Override Bootstrap text-white in cards for light theme */
.minimal-card .text-white,
.diag-card .text-white { color: var(--text-dark) !important; }

/* ── BUTTON — Premium Pill ────────────────────────────────────────────── */
.btn-minimal {
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
  border: none;
  border-radius: 9999px;
  padding: 14px 36px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-blue);
}
.btn-minimal:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.42);
  color: white;
}
.btn-minimal::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.6s ease;
}
.btn-minimal:hover::before { left: 100%; }

/* ── AI PANEL ────────────────────────────────────────────────────────── */
.ai-analysis-panel { display: flex; flex-direction: column; }

.ai-badge {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.16);
  color: var(--text-body);
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 7px;
  animation: fadeInBadge 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.ai-badge.ai-badge-empty {
  color: var(--text-muted);
  font-style: italic;
  animation: none;
  background: var(--bg-main);
  border-color: var(--card-border);
}

.ai-pulse { animation: pulse-magic 2s infinite ease-in-out; }

.ai-scanner-line {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-blue), transparent);
  animation: scan 2s linear infinite;
  z-index: 10;
}

/* ── ABOUT / STARTUP SECTION ─────────────────────────────────────────── */
.startup-section {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 56px 48px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-card);
  transition: all 0.35s ease;
}
.startup-section:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}
.startup-icon {
  font-size: 3rem;
  margin-bottom: 24px;
  color: var(--primary-blue);
  transition: all 0.3s ease;
}
.startup-section:hover .startup-icon { transform: scale(1.1); }
.startup-description {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 700px;
  margin: 0 auto;
}

/* Founder avatar */
.founder-avatar {
  background: rgba(37, 99, 235, 0.07) !important;
  border-color: rgba(37, 99, 235, 0.3) !important;
}
.founder-avatar i { color: var(--primary-blue) !important; }

/* ── FORM ────────────────────────────────────────────────────────────── */
.form-minimal .form-control {
  background: var(--bg-main);
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-dark);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  transition: all 0.28s ease;
}
.form-minimal .form-control:focus {
  background: #ffffff;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
  color: var(--text-dark);
  outline: none;
  transform: translateY(-1px);
}
.form-minimal .form-control::placeholder { color: #94a3b8; }
.form-minimal .form-label {
  color: var(--text-body);
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.88rem;
}

/* Alert overrides */
#alert-success { background:#f0fdf4; border-color:#bbf7d0; color:#15803d; }
#alert-error   { background:#fef2f2; border-color:#fecaca; color:#dc2626; }

/* ── DIAG CARDS ──────────────────────────────────────────────────────── */
.diag-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1.5px solid var(--card-border);
}
.diag-card h5 { color: var(--text-dark) !important; }

.diag-card.active {
  background: rgba(37, 99, 235, 0.04);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), 0 8px 24px rgba(37, 99, 235, 0.12);
  transform: translateY(-5px);
}
.diag-card:hover:not(.active) {
  border-color: rgba(37, 99, 235, 0.22);
}

#diag-action-footer.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* ── FOOTER ──────────────────────────────────────────────────────────── */
footer {
  background: #0f172a;
  color: #64748b;
  padding: 40px 0 25px;
  border-top: 1px solid rgba(255,255,255,0.04);
}
footer p { margin: 0; font-size: 0.88rem; }

/* ── BADGE overrides ─────────────────────────────────────────────────── */
.badge.bg-secondary {
  background: rgba(37, 99, 235, 0.09) !important;
  color: var(--primary-blue) !important;
  border: 1px solid rgba(37, 99, 235, 0.2);
  font-weight: 500;
}

/* ── SCROLL TO TOP ───────────────────────────────────────────────────── */
#scroll-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
  color: white;
  border: none;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-blue);
  z-index: 1000;
}
#scroll-top.show  { opacity: 1; visibility: visible; transform: translateY(0); }
#scroll-top:hover { transform: translateY(-4px); color: white; box-shadow: 0 10px 28px rgba(37,99,235,0.5); }

/* ── ANIMATIONS ──────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.65; }
}
@keyframes pulse-magic {
  0%, 100% { opacity: 0.5; filter: drop-shadow(0 0 2px var(--primary-blue)); }
  50%       { opacity: 1;   filter: drop-shadow(0 0 8px var(--primary-blue)); }
}
@keyframes scan {
  0%   { top: 0;    opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
@keyframes fadeInBadge {
  0%   { opacity: 0; transform: scale(0.9) translateY(8px); }
  100% { opacity: 1; transform: scale(1)   translateY(0); }
}
@keyframes barPulse {
  0%, 100% { height: 30%; }
  50%       { height: 90%; }
}
@keyframes boxPulse {
  0%, 100% { transform: scale(0.95); opacity: 0.5; }
  50%       { transform: scale(1.05); opacity: 1; border-color: var(--primary-blue); }
}
@keyframes pingFade {
  0%   { transform: scale(0); opacity: 1; }
  100% { transform: scale(3); opacity: 0; }
}

/* ── UTILITY ─────────────────────────────────────────────────────────── */
.fade-in-up      { animation: fadeInUp 0.65s ease-out; }
.float-animation { animation: float 3s ease-in-out infinite; }
.pulse-animation { animation: pulse 2s ease-in-out infinite; }

.stagger-item { opacity: 0; animation: fadeInUp 0.6s ease-out forwards; }
.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }

.parallax { transform: translateY(0); transition: transform 0.1s ease-out; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1    { font-size: 2.2rem; }
  .minimal-card  { padding: 24px 20px; }
  .startup-section { padding: 40px 24px; }
  section { padding: 72px 0; }
}

/* ── AGENTES inline overrides ────────────────────────────────────────── */
#agentes h3 { color: var(--text-dark); }
#agentes span { color: var(--text-body); }

/* ── CONTACT INFO ────────────────────────────────────────────────────── */
#contacto .minimal-card p.small { color: var(--text-body); }
#contacto .minimal-card h5      { color: var(--text-dark) !important; }

/* ── AI ANALYSIS TEXT ────────────────────────────────────────────────── */
#ai-analysis-text { color: var(--text-body) !important; border-color: var(--divider) !important; }

/* =====================================================================
   ✨ ANIMATIONS v2 — Premium Motion Layer
   ===================================================================== */

/* ── PAGE LOADER ─────────────────────────────────────────────────────── */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
#page-loader.hidden { opacity: 0; visibility: hidden; }

.loader-logo-wrap {
  position: relative;
  width: 76px; height: 76px;
  display: flex; align-items: center; justify-content: center;
}
.loader-ring {
  position: absolute; inset: 0;
  border: 2.5px solid rgba(37, 99, 235, 0.14);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: loaderSpin 0.85s linear infinite;
}
.loader-ring-2 {
  position: absolute; inset: 6px;
  border: 1.5px solid transparent;
  border-bottom-color: var(--accent-blue);
  border-radius: 50%;
  animation: loaderSpin 1.3s linear infinite reverse;
}
.loader-initials {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-blue);
  letter-spacing: -0.06em;
  z-index: 1;
  animation: pulse 1.2s ease-in-out infinite;
}
.loader-bar {
  width: 120px; height: 3px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 9999px;
  overflow: hidden;
}
.loader-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
  border-radius: 9999px;
  animation: loaderFill 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes loaderSpin { to { transform: rotate(360deg); } }
@keyframes loaderFill {
  0%   { width: 0%; }
  60%  { width: 75%; }
  100% { width: 100%; }
}

/* ── SCROLL PROGRESS BAR ─────────────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue), var(--indigo));
  background-size: 200% 100%;
  animation: gradientShift 3s linear infinite;
  z-index: 100001;
  transition: width 0.08s linear;
  border-radius: 0 2px 2px 0;
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ── NAVBAR SCROLL SHRINK ────────────────────────────────────────────── */
nav.navbar {
  transition: padding 0.3s ease, box-shadow 0.3s ease;
}
nav.navbar.scrolled {
  box-shadow: 0 2px 32px rgba(15, 23, 42, 0.09) !important;
}
nav.navbar.scrolled .navbar-brand { font-size: 0.98rem; }
nav.navbar.scrolled .navbar-logo  { height: 26px; }

/* ── SECTION TITLE UNDERLINE DRAW ────────────────────────────────────── */
.section-title {
  position: relative;
  display: block;
  padding-bottom: 20px;
}
.section-title::after {
  content: '';
  display: block;
  margin: 14px auto 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
  border-radius: 2px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.section-title.in-view::after { width: 56px; }

/* ── STATS / COUNTER SECTION ─────────────────────────────────────────── */
#stats-bar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--divider);
  padding: 56px 0;
}
.stat-item {
  padding: 8px 20px;
  position: relative;
  transition: transform 0.3s ease;
}
.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0; top: 20%; bottom: 20%;
  width: 1px;
  background: var(--divider);
}
.stat-item:hover { transform: translateY(-4px); }

.stat-number-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-number {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 800;
  color: var(--primary-blue);
  letter-spacing: -0.05em;
  display: inline-block;
  transition: color 0.3s ease;
}
.stat-suffix {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary-blue);
  letter-spacing: -0.03em;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.stat-item:hover .stat-number { color: var(--primary-blue-dark); }

/* Entrance animation for stat items */
.stat-item {
  opacity: 0;
  transform: translateY(20px);
}
.stat-item.in-view {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.stat-item:nth-child(1).in-view { transition-delay: 0.05s; }
.stat-item:nth-child(2).in-view { transition-delay: 0.15s; }
.stat-item:nth-child(3).in-view { transition-delay: 0.25s; }
.stat-item:nth-child(4).in-view { transition-delay: 0.35s; }

/* ── TECH MARQUEE ────────────────────────────────────────────────────── */
#tech-marquee {
  background: var(--bg-main);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
  padding: 16px 0;
  overflow: hidden;
}
.tech-track {
  position: relative;
  overflow: hidden;
}
.tech-track::before,
.tech-track::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 100px;
  z-index: 2;
  pointer-events: none;
}
.tech-track::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-main), transparent);
}
.tech-track::after {
  right: 0;
  background: linear-gradient(-90deg, var(--bg-main), transparent);
}
.tech-items {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marqueeScroll 28s linear infinite;
}
.tech-items:hover { animation-play-state: paused; }
.tech-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 28px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: color 0.25s ease;
  cursor: default;
}
.tech-item:hover { color: var(--primary-blue); }
.tech-item i {
  font-size: 1rem;
  color: var(--primary-blue);
  opacity: 0.6;
  transition: opacity 0.25s;
}
.tech-item:hover i { opacity: 1; }
.tech-sep {
  color: var(--divider);
  font-size: 1.2rem;
  opacity: 0.5;
}
@keyframes marqueeScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ── HERO ENTRANCE STAGGER ───────────────────────────────────────────── */
.hero h1     { animation: fadeInUp 0.7s 0.1s ease-out both; }
.hero p      { animation: fadeInUp 0.7s 0.25s ease-out both; }
.hero-chips  { animation: fadeInUp 0.7s 0.4s ease-out both; }
.hero-ai-wrapper { animation: fadeInUp 0.7s 0.55s ease-out both; }

/* ── HERO CHIP STAGGER ───────────────────────────────────────────────── */
.hero-chip { animation: fadeInUp 0.5s ease-out both; }
.hero-chip:nth-child(1) { animation-delay: 0.45s; }
.hero-chip:nth-child(2) { animation-delay: 0.55s; }
.hero-chip:nth-child(3) { animation-delay: 0.65s; }
.hero-chip:nth-child(4) { animation-delay: 0.75s; }

/* ── CARD SCROLL-REVEAL ──────────────────────────────────────────────── */
.reveal-card {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.reveal-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-card:nth-child(1) { transition-delay: 0.05s; }
.reveal-card:nth-child(2) { transition-delay: 0.14s; }
.reveal-card:nth-child(3) { transition-delay: 0.23s; }
.reveal-card:nth-child(4) { transition-delay: 0.32s; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .stat-item::after { display: none; }
  #stats-bar { padding: 40px 0; }
  .tech-item { padding: 6px 18px; }
}

/* ── AI DEMO & MAGIC DUST ────────────────────────────────────────────── */
.ai-demo-wrapper {
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.magic-dust-canvas {
  position: absolute;
  inset: -40px;
  width: calc(100% + 80px);
  height: calc(100% + 80px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.8;
}

.ai-demo-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.chat-bubble {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 18px 22px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.4);
  max-width: 85%;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text-dark);
}

.user-bubble {
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  background: white;
}

.ai-bubble {
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  border-left: 3px solid var(--accent-blue);
}

.demo-product-card {
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  transition: all 0.3s ease;
}

.demo-product-card:hover {
  background: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.demo-product-img {
  height: 60px;
  background: white;
  border-radius: 8px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--primary-blue);
}

.demo-product-card h6 {
  font-size: 0.82rem;
  margin-bottom: 2px;
  font-weight: 600;
}

.demo-product-card span {
  font-size: 0.72rem;
  color: var(--text-light);
  display: block;
}


/* ── COOKIE BANNER ─────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 16px;
  padding: 16px 20px;
  z-index: 10000;
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.15);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateY(0);
  opacity: 1;
}

.cookie-banner.hidden {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}

.cookie-content {
  font-size: 0.9rem;
  color: var(--text-body);
}

.cookie-content i {
  font-size: 1.1rem;
}

@media (max-width: 768px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    padding: 20px;
  }
}

/* ── AI CIRCULAR CORE ───────────────────────────────────────────────── */
.ai-core-circle {
  position: relative;
  width: 140px;
  height: 140px;
  z-index: 2;
}

.ai-core-inner {
  position: absolute;
  inset: 0;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 40px rgba(37, 99, 235, 0.2), inset 0 0 20px rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.15);
  z-index: 3;
}

.ai-core-icon {
  font-size: 3.5rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: coreFloat 4s ease-in-out infinite;
}

.ai-core-pulse {
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.15) 0%, transparent 70%);
  animation: corePulse 3s ease-in-out infinite;
  z-index: 1;
}

.ai-bubbles-wrapper {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.core-bubble {
  position: absolute;
  top: -40px;
  right: -160px;
  width: 240px;
  max-width: none;
  pointer-events: auto;
  transform-origin: left bottom;
  animation: bubbleAppear 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes corePulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 0.2; }
}

@keyframes coreFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(5deg); }
}

@keyframes bubbleAppear {
  from { opacity: 0; transform: scale(0.5) translate(-20px, 20px); }
  to { opacity: 1; transform: scale(1) translate(0, 0); }
}

@media (max-width: 991px) {
  .core-bubble {
    right: auto;
    left: 50%;
    top: -100px;
    transform: translateX(-50%);
    width: 280px;
  }
}
