/*
 * Commarda -- style.css
 * Design tokens (:root), keyframe animations, scroll reveal, and pseudo-element effects.
 * Everything else uses Tailwind utility classes in HTML.
 */

/* ---------------------------------------------
   DESIGN TOKENS
   --------------------------------------------- */
:root {
  /* Colors */
  --color-primary: #6366f1;
  --color-primary-light: #818cf8;
  --color-primary-dark: #4f46e5;
  --color-accent: #06b6d4;

  --color-bg: #0a0b14;
  --color-bg-alt: #0f1120;
  --color-bg-card: #12142a;
  --color-text: #f1f5f9;
  --color-text-muted: #64748b;
  --color-border: rgba(255, 255, 255, 0.07);

  /* Typography */
  --font-heading: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-width: 1280px;

  /* ── Standard Tokens (auto-injected) ── */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;
  --radius-default: 4px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ---------------------------------------------
   BASE BODY STYLES
   --------------------------------------------- */
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* Tailwind design token aliases so Tailwind classes resolve correctly */
.bg-site       { background-color: var(--color-bg); }
.text-site     { color: var(--color-text); }
.bg-card       { background-color: var(--color-bg-card); }
.border-subtle { border-color: var(--color-border); }

/* ---------------------------------------------
   NAV HEADER BEHAVIOUR
   --------------------------------------------- */
.site-header {
  background: rgba(10, 11, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: 72px;
}

.site-header.is-scrolled {
  background: rgba(10, 11, 20, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ---------------------------------------------
   MOBILE MENU OVERLAY
   --------------------------------------------- */
.mobile-menu-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--item-index, 0) * 60ms + 80ms);
}

.mobile-menu-overlay.is-open .mobile-menu-item {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------
   GLOW EFFECTS
   --------------------------------------------- */
.shadow-glow-sm {
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.shadow-glow {
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.6);
}

.shadow-glow-lg {
  box-shadow: 0 0 48px rgba(99, 102, 241, 0.35), 0 0 96px rgba(99, 102, 241, 0.15);
}

.text-glow {
  text-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
}

/* ---------------------------------------------
   GRADIENT TEXT
   --------------------------------------------- */
.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 50%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-accent {
  background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------------------------------------------
   GRID OVERLAY (hero decorative background)
   --------------------------------------------- */
.grid-overlay {
  background-image:
    linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ---------------------------------------------
   GLASS CARD
   --------------------------------------------- */
.glass-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(99, 102, 241, 0.3);
}

/* ---------------------------------------------
   ANIMATED GRADIENT CTA
   --------------------------------------------- */
.animated-gradient {
  background: linear-gradient(135deg, #4f46e5, #6366f1, #7c3aed, #4f46e5);
  background-size: 300% 300%;
  animation: gradientShift 8s ease infinite;
}

/* ---------------------------------------------
   SCROLL REVEAL
   --------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal-stagger].is-visible > *:nth-child(1) { transition-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { transition-delay: 100ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { transition-delay: 200ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { transition-delay: 300ms; }
[data-reveal-stagger].is-visible > *:nth-child(5) { transition-delay: 400ms; }
[data-reveal-stagger].is-visible > *:nth-child(6) { transition-delay: 500ms; }

[data-reveal-stagger].is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------------------
   ICON SIZING
   --------------------------------------------- */
.icon {
  display: inline-block;
  width: 1.25em;
  height: 1.25em;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em; height: 2em; }

/* ---------------------------------------------
   KEYFRAME ANIMATIONS
   --------------------------------------------- */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(99, 102, 241, 0.4); }
  50%       { box-shadow: 0 0 28px rgba(99, 102, 241, 0.8); }
}

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

@keyframes spin-slow {
  to { transform: rotate(360deg); }
}

.float        { animation: float 4s ease-in-out infinite; }
.pulse-glow   { animation: pulse-glow 2.5s ease-in-out infinite; }

/* ---------------------------------------------
   HERO SCROLL INDICATOR
   --------------------------------------------- */
.scroll-indicator {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}

.scroll-indicator::before {
  content: '';
  width: 4px;
  height: 8px;
  background: rgba(99, 102, 241, 0.8);
  border-radius: 2px;
  animation: scrollBounce 1.8s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  80%       { transform: translateY(12px); opacity: 0; }
}

/* ---------------------------------------------
   STAT COUNTER ITEMS
   --------------------------------------------- */
.stat-divider + .stat-divider {
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

/* ---------------------------------------------
   FORM STYLES
   --------------------------------------------- */
.form-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
  color: #475569;
}

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