/* ============================================================
   CHARGING BULL S.A.S. — Design System
   ============================================================ */

:root {
  --color-primary: #0F172A;
  --color-secondary: #2563EB;
  --color-accent: #06B6D4;
  --color-bg: #F8FAFC;
  --color-text: #111827;
  --color-success: #22C55E;
  --color-error: #EF4444;

  --surface: #FFFFFF;
  --surface-glass: rgba(255, 255, 255, 0.6);
  --border-glass: rgba(15, 23, 42, 0.08);
  --shadow-soft: 0 8px 30px rgba(15, 23, 42, 0.06);
  --shadow-lift: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html.dark {
  --color-bg: #0B1220;
  --color-text: #E5E7EB;
  --surface: #111827;
  --surface-glass: rgba(17, 24, 39, 0.55);
  --border-glass: rgba(255, 255, 255, 0.08);
  --shadow-soft: 0 8px 30px rgba(0, 0, 0, 0.35);
  --shadow-lift: 0 20px 60px rgba(0, 0, 0, 0.5);
}

* { -webkit-tap-highlight-color: transparent; }

html { scroll-behavior: smooth; }

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  transition: background-color .4s var(--ease), color .4s var(--ease);
}

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

/* Glassmorphism */
.glass {
  background: var(--surface-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--border-glass);
}

.glass-card {
  background: var(--surface-glass);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
}

/* Gradient text / accents */
.text-gradient {
  background: linear-gradient(120deg, var(--color-secondary), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  pointer-events: none;
  z-index: 0;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(120deg, var(--color-secondary), var(--color-accent));
  color: #fff;
  border-radius: 999px;
  font-weight: 600;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), filter .35s var(--ease);
  box-shadow: 0 10px 30px -8px rgba(37, 99, 235, 0.55);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.015); filter: brightness(1.06); }
.btn-primary:active { transform: translateY(0) scale(0.99); }

.btn-secondary {
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid var(--border-glass);
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--color-secondary); }

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Reveal-on-scroll (Framer-Motion-like without the runtime cost) */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

/* Stagger children helper */
.stagger > * { transition-delay: calc(var(--i, 0) * 80ms); }

/* Navbar */
#navbar {
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
#navbar.scrolled {
  box-shadow: var(--shadow-soft);
}

/* Nav link underline */
.nav-link {
  position: relative;
  color: var(--color-text);
  opacity: .75;
  transition: opacity .3s var(--ease);
}
.nav-link:hover { opacity: 1; }
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-accent));
  transition: width .35s var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { opacity: 1; }

/* FAQ accordion */
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .45s var(--ease);
}
.faq-item[open] .faq-panel { max-height: 400px; }

/* Data-center illustration float */
@keyframes floaty {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
.floaty { animation: floaty 6s ease-in-out infinite; }

@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: .6; }
  100% { transform: scale(1.6); opacity: 0; }
}
.pulse-ring { animation: pulse-ring 2.4s var(--ease) infinite; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--color-secondary); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(37,99,235,.35); border-radius: 999px; }

/* Prose for legal pages */
.legal-prose h2 { font-weight: 700; font-size: 1.35rem; margin-top: 2.25rem; margin-bottom: .75rem; }
.legal-prose h3 { font-weight: 600; font-size: 1.1rem; margin-top: 1.5rem; margin-bottom: .5rem; }
.legal-prose p, .legal-prose li { line-height: 1.75; opacity: .9; }
.legal-prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-prose a { color: var(--color-secondary); text-decoration: underline; }
