/* ============================================================
   AxisEV — Core Design System
   main.css
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ── */
:root {
  /* Brand Palette */
  --color-bg:           hsl(220, 30%, 8%);
  --color-bg-2:         hsl(220, 28%, 11%);
  --color-bg-3:         hsl(220, 24%, 14%);
  --color-surface:      hsl(220, 22%, 16%);
  --color-border:       hsl(220, 18%, 22%);

  --color-primary:      hsl(186, 80%, 48%);
  --color-primary-dim:  hsl(186, 70%, 36%);
  --color-primary-glow: hsl(186, 90%, 58%);

  --color-white:        hsl(210, 20%, 98%);
  --color-white-70:     hsla(210, 20%, 98%, 0.70);
  --color-white-40:     hsla(210, 20%, 98%, 0.40);
  --color-white-15:     hsla(210, 20%, 98%, 0.15);
  --color-white-08:     hsla(210, 20%, 98%, 0.08);

  --color-accent-red:   hsl(355, 72%, 52%);

  /* Typography */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  /* Spacing */
  --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-pill: 9999px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);
  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  /* Shadows */
  --shadow-sm: 0 1px 3px hsla(220, 40%, 4%, 0.5);
  --shadow-md: 0 4px 20px hsla(220, 40%, 4%, 0.6);
  --shadow-lg: 0 12px 48px hsla(220, 40%, 4%, 0.7);
  --shadow-glow: 0 0 32px hsla(186, 80%, 48%, 0.25);

  /* Layout */
  --nav-height: 56px;
  --promo-height: 40px;
  --container-max: 1280px;
  --container-pad: clamp(var(--space-6), 5vw, var(--space-16));
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.promo-visible {
  --offset: calc(var(--nav-height) + var(--promo-height));
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ── Utility ── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.hidden { display: none !important; }

/* ── Reveal Animations ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.32s; }
.reveal-delay-4 { transition-delay: 0.42s; }

/* ── Promo Banner ── */
#promo-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: linear-gradient(135deg, var(--color-primary-dim), var(--color-primary));
  height: var(--promo-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.promo-banner__inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-inline: var(--container-pad);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-bg);
}

.promo-banner__cta {
  font-weight: 700;
  padding: 2px 12px;
  background: var(--color-bg);
  color: var(--color-primary);
  border-radius: var(--radius-pill);
  font-size: 12px;
  transition: opacity var(--duration-fast);
  white-space: nowrap;
}
.promo-banner__cta:hover { opacity: 0.8; }

.promo-banner__close {
  margin-left: auto;
  color: var(--color-bg);
  opacity: 0.7;
  transition: opacity var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}
.promo-banner__close:hover { opacity: 1; }

/* ── Toast ── */
#site-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--color-bg-3);
  color: var(--color-white);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  transition: opacity var(--duration-base), transform var(--duration-base) var(--ease-out);
  white-space: nowrap;
}
#site-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Chat FAB ── */
#chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
  transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base);
}
#chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}
#chat-fab svg { width: 26px; height: 26px; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 3px; }
