/* ============================================
   DELIA AUTOMATION - Global Styles
   Light mode, warm off-white, electric blue accents
   ============================================ */

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

:root {
  --bg-primary: #f8f7f4;
  --bg-secondary: #f0efe9;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f4f0;
  --accent: #3b82f6;
  --accent-light: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.08);
  --accent-glow-strong: rgba(59, 130, 246, 0.15);
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(59, 130, 246, 0.3);
  --gradient-accent: linear-gradient(135deg, #3b82f6, #6366f1);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: #2563eb;
}

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

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-title {
  margin-bottom: 20px;
}

.section-subtitle {
  max-width: 600px;
  margin-bottom: 48px;
}

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 100px 0;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 24px;
  transition: var(--transition);
  background: transparent;
}

.nav.scrolled {
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo span {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Mobile menu */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(248, 247, 244, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 32px 24px;
    gap: 24px;
    transform: translateY(-120%);
    transition: var(--transition);
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open {
    transform: translateY(0);
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--text-primary);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.85rem;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.1);
}

/* ============================================
   Stats Row
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  padding: 48px 0;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  background: var(--bg-secondary);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 300px;
  margin-top: 8px;
}

.footer-links h4 {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* Glow pulse on accent elements */
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(59, 130, 246, 0.15); }
  50% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.3); }
}

/* Count-up animation handled by JS */

/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 768px) {
  section { padding: 64px 0; }
  .stats-row { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-inner { flex-direction: column; gap: 32px; }

  /* Nav mobile menu - light theme */
  .nav-links {
    background: rgba(248, 247, 244, 0.98);
  }

  .nav-links a {
    font-size: 1rem;
    padding: 8px 0;
  }

  .nav-toggle span {
    background: var(--text-primary);
  }
}

/* Mobile */
@media (max-width: 480px) {
  html { font-size: 15px; }
  .container { padding: 0 20px; }

  /* Bigger tap targets */
  .btn {
    padding: 16px 24px;
    font-size: 0.95rem;
    width: 100%;
    justify-content: center;
  }

  .btn-sm {
    width: auto;
    padding: 12px 20px;
    font-size: 0.85rem;
  }

  /* Typography - bigger on mobile for readability */
  h1 { font-size: 2rem; line-height: 1.15; }
  h2 { font-size: 1.6rem; }
  h3 { font-size: 1.15rem; }
  p { font-size: 0.95rem; }

  .section-label { font-size: 0.75rem; }
  .section-title { margin-bottom: 12px; }
  .section-subtitle { margin-bottom: 32px; font-size: 0.9rem; }

  /* Stats - 2x2 grid on mobile */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 32px 0;
  }

  .stat-number { font-size: 2rem; }
  .stat-label { font-size: 0.8rem; }

  /* Cards - full width, comfortable padding */
  .card { padding: 24px; }

  /* Footer mobile */
  .footer { padding: 40px 0 24px; }
  .footer-inner { gap: 28px; }
  .footer-brand p { max-width: 100%; }
  .footer-links { width: 100%; }
  .footer-bottom { margin-top: 28px; padding-top: 20px; }

  /* Nav mobile refinements */
  .nav-inner { height: 64px; }
  .nav-logo { font-size: 1.15rem; }
  .nav-links {
    top: 64px;
    padding: 24px 20px;
    gap: 20px;
  }
  .nav-links .btn { width: 100%; text-align: center; justify-content: center; }
}
