/* ============================================
   GLOBAL STYLES — Automation AI
   ============================================ */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  color: var(--color-text-secondary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

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

/* ── Section ── */
.section {
  padding: var(--section-padding-y) 0;
  position: relative;
}

.section--alt {
  background-color: var(--color-bg-secondary);
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, var(--text-7xl)); font-weight: var(--weight-bold); }
h2 { font-size: clamp(2rem, 4vw, var(--text-5xl));   font-weight: var(--weight-bold); }
h3 { font-size: clamp(1.25rem, 2vw, var(--text-2xl)); font-weight: var(--weight-semibold); }
h4 { font-size: var(--text-xl); font-weight: var(--weight-semibold); }

p {
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ── Gradient Text ── */
.gradient-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section Header ── */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 72px;
}

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-brand-300);
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 16px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Glowing Orb ── */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.6;
}

.orb--hero {
  width: 600px;
  height: 600px;
  background: var(--gradient-orb);
  left: 50%;
  transform: translateX(-50%);
  top: 40%;
  animation: orb-pulse 8s ease-in-out infinite;
  filter: blur(80px);
}

.orb--section {
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse at center, rgba(109,40,217,0.5) 0%, transparent 70%);
  left: 50%;
  transform: translateX(-50%);
  top: 50%;
  margin-top: -200px;
  animation: orb-pulse 10s ease-in-out infinite;
}

.orb--left {
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.3) 0%, transparent 70%);
  left: -200px;
  top: 0;
  filter: blur(100px);
}

.orb--right {
  width: 500px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(124,58,237,0.3) 0%, transparent 70%);
  right: -200px;
  top: 0;
  filter: blur(100px);
}

/* ── Divider Glow ── */
.divider-glow {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.5), transparent);
  margin: 0;
}

/* ── Noise Overlay ── */
.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ── Keyframes ── */
@keyframes orb-pulse {
  0%, 100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
  50%       { opacity: 0.8; transform: translateX(-50%) scale(1.08); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fade-left {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fade-right {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes count-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Scroll Animations ── */
.animate-hidden {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-hidden.from-left {
  transform: translateX(-40px);
}

.animate-hidden.from-right {
  transform: translateX(40px);
}

.animate-hidden.scale-in {
  transform: scale(0.95) translateY(20px);
}

.animate-visible {
  opacity: 1 !important;
  transform: translateY(0) translateX(0) scale(1) !important;
}

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .animate-hidden {
    opacity: 1;
    transform: none;
  }
}

/* ── Utility ── */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.relative    { position: relative; }
.overflow-hidden { overflow: hidden; }
