/* ═══════════════════════════════════════════════════════════════════════════
   EXTREME SOLUTION Y26 DECK - THEME CSS
   Design System: Precision Futurism
   Typography: Clash Display + General Sans
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ───────────────────────────────────────────────────────────────────────────── */
:root {
  /* Brand Colors */
  --es-red: #D71920;
  --es-red-dark: #B31519;
  --es-red-glow: rgba(215, 25, 32, 0.4);

  /* Light Theme */
  --bg-light: #FFFFFF;
  --bg-surface: #F8F9FA;
  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --border-light: #E5E7EB;

  /* Dark Theme */
  --bg-dark: #0D1117;
  --bg-dark-surface: #161B22;
  --text-on-dark: #FFFFFF;
  --text-muted-dark: #9CA3AF;
  --border-dark: #30363D;

  /* AI Accent Colors */
  --ai-purple: #6366F1;
  --ai-purple-light: #818CF8;
  --ai-gradient: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  --ai-glow: rgba(99, 102, 241, 0.4);

  /* Semantic Colors */
  --success: #22C55E;
  --warning: #F97316;
  --error: #EF4444;
  --cloud-blue: #0EA5E9;

  /* Typography */
  --font-display: 'Clash Display', 'SF Pro Display', system-ui, sans-serif;
  --font-body: 'General Sans', 'SF Pro Text', system-ui, sans-serif;

  /* Font Sizes */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 2rem;      /* 32px */
  --text-4xl: 2.5rem;    /* 40px */
  --text-5xl: 3rem;      /* 48px */
  --text-6xl: 4rem;      /* 64px */
  --text-7xl: 5rem;      /* 80px */

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow-red: 0 0 40px var(--es-red-glow);
  --shadow-glow-ai: 0 0 40px var(--ai-glow);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Z-index layers */
  --z-base: 1;
  --z-overlay: 10;
  --z-modal: 100;
  --z-preloader: 1000;
}

/* ─────────────────────────────────────────────────────────────────────────────
   UTILITY CLASSES
   ───────────────────────────────────────────────────────────────────────────── */

.es-red {
  color: var(--es-red);
}

.text-gradient {
  background: var(--ai-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─────────────────────────────────────────────────────────────────────────────
   BASE STYLES & REVEAL.JS OVERRIDES
   ───────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.reveal {
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--text-primary);
}

.reveal .slides {
  text-align: left;
}

.reveal .slides section {
  padding: var(--space-16);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.reveal h1, .reveal h2, .reveal h3, .reveal h4 {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: none;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4) 0;
  line-height: 1.1;
}

.reveal h1 { font-size: var(--text-6xl); font-weight: 700; }
.reveal h2 { font-size: var(--text-4xl); }
.reveal h3 { font-size: var(--text-2xl); }
.reveal h4 { font-size: var(--text-xl); font-weight: 500; }

.reveal p {
  margin: 0;
  line-height: 1.6;
}

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

.reveal a:hover {
  color: var(--es-red);
}

.reveal ul, .reveal ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Disable default Reveal transitions for custom control */
.reveal .slides section.present {
  display: flex !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRELOADER
   ───────────────────────────────────────────────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-preloader);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-8);
}

.preloader-logo {
  width: 80px;
  height: auto;
  animation: pulse 2s ease-in-out infinite;
}

.preloader-bar {
  width: 200px;
  height: 3px;
  background: var(--border-dark);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.preloader-progress {
  height: 100%;
  background: var(--es-red);
  border-radius: var(--radius-full);
  animation: loading 1.5s ease-in-out forwards;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

@keyframes loading {
  0% { width: 0; }
  100% { width: 100%; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   COMMON SLIDE ELEMENTS
   ───────────────────────────────────────────────────────────────────────────── */
.slide-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Red accent bar on left edge */
.accent-bar {
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: var(--es-red);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

section.present .accent-bar {
  transform: scaleY(1);
}

/* Section title with red underline */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-2);
}

.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 60px;
  height: 4px;
  background: var(--es-red);
  border-radius: var(--radius-sm);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  margin-bottom: var(--space-10);
}

/* Slide logo positioning */
.slide-logo {
  position: absolute;
  bottom: var(--space-8);
  left: var(--space-8);
  right: auto;
  width: 48px;
  height: auto;
  opacity: 0.7;
  z-index: 10;
}

.slide-logo-dark {
  position: absolute;
  bottom: var(--space-8);
  left: var(--space-8);
  right: auto;
  width: 48px;
  height: auto;
  opacity: 0.8;
  z-index: 10;
}

/* ─────────────────────────────────────────────────────────────────────────────
   DARK SLIDE BACKGROUNDS
   ───────────────────────────────────────────────────────────────────────────── */
.ai-gradient-bg,
.cta-gradient-bg,
.contact-gradient-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(215, 25, 32, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.ai-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GLASSMORPHISM CARDS (AI & CTA Slides)
   ───────────────────────────────────────────────────────────────────────────── */
.ai-card,
.cta-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.ai-card:hover,
.cta-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.4);
}

.ai-card-glow,
.cta-card-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, var(--ai-glow) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.ai-card:hover .ai-card-glow,
.cta-card:hover .cta-card-glow {
  opacity: 1;
}

.ai-card-content,
.cta-card-content {
  position: relative;
  padding: var(--space-6);
  color: var(--text-on-dark);
}

.ai-card-content h3,
.cta-card-content h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.ai-card-content p,
.cta-card-content p {
  font-size: var(--text-sm);
  color: var(--text-muted-dark);
  line-height: 1.5;
}

.ai-card-icon,
.cta-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--ai-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-glow-ai);
}

.ai-card-icon svg,
.cta-icon svg {
  width: 24px;
  height: 24px;
  stroke: white;
  stroke-width: 2;
}

/* ─────────────────────────────────────────────────────────────────────────────
   LIGHT THEME CARDS
   ───────────────────────────────────────────────────────────────────────────── */
.stat-card,
.pillar-card,
.software-card,
.industry-card,
.service-item {
  background: var(--bg-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover,
.pillar-card:hover,
.software-card:hover,
.industry-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ─────────────────────────────────────────────────────────────────────────────
   ICONS
   ───────────────────────────────────────────────────────────────────────────── */
[data-lucide] {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

/* ─────────────────────────────────────────────────────────────────────────────
   REVEAL.JS PROGRESS BAR & CONTROLS
   ───────────────────────────────────────────────────────────────────────────── */
.reveal .progress {
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
}

.reveal .progress span {
  background: var(--es-red);
  transition: width 0.8s ease;
}

.reveal .controls {
  color: var(--es-red);
}

.reveal .controls button {
  color: var(--es-red);
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.reveal .controls button:hover {
  opacity: 1;
}

.reveal .slide-number {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.9);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  top: var(--space-4);
  bottom: auto;
  right: var(--space-4);
}

/* Dark slides number styling */
section[data-background-color="#0D1117"] ~ .slide-number,
.reveal .slide-number-a {
  color: var(--text-muted-dark);
  background: rgba(13, 17, 23, 0.8);
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE ADJUSTMENTS
   ───────────────────────────────────────────────────────────────────────────── */
@media screen and (max-width: 768px) {
  :root {
    --text-6xl: 2.5rem;
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.5rem;
  }

  .reveal .slides section {
    padding: var(--space-8);
  }

  .slide-container {
    padding: 0 var(--space-4);
  }

  .slide-logo,
  .slide-logo-dark {
    width: 36px;
    bottom: var(--space-4);
    left: var(--space-4);
    right: auto;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   PRINT STYLES
   ───────────────────────────────────────────────────────────────────────────── */
@media print {
  .preloader,
  .scroll-indicator,
  .particles-container {
    display: none !important;
  }

  .accent-bar {
    transform: scaleY(1) !important;
  }

  .reveal .slides section {
    page-break-after: always;
  }
}
