/* ================================================
   AI Automation Agency — Global Styles
   ================================================ */

:root {
  --bg: #06060A;
  --bg-elev: #0B0B12;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #F5F5F7;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;
  --accent-1: #7C5CFF;
  --accent-2: #22D3EE;
  --accent-3: #F472B6;
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --grad-primary: linear-gradient(135deg, #7C5CFF 0%, #22D3EE 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 255, 0.18) 0%, rgba(34, 211, 238, 0.12) 100%);
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  letter-spacing: -0.01em;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Ambient background gradients */
.bg-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-ambient::before,
.bg-ambient::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
}

.bg-ambient::before {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, #7C5CFF 0%, transparent 70%);
}

.bg-ambient::after {
  width: 620px;
  height: 620px;
  top: 20%;
  right: -200px;
  background: radial-gradient(circle, #22D3EE 0%, transparent 70%);
  opacity: 0.22;
}

/* Grid overlay */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
}

/* Typography */
.display {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.gradient-text {
  background: linear-gradient(135deg, #F5F5F7 0%, #9CA3AF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.accent-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glass card */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  transition: border-color 0.35s ease, background 0.35s ease, transform 0.35s ease;
}

.glass:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.glass-strong {
  background: rgba(12, 12, 18, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.72rem 1.25rem;
  border-radius: 0.7rem;
  transition: all 0.22s ease;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: #F5F5F7;
  color: #06060A;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 28px -10px rgba(255, 255, 255, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px -10px rgba(255, 255, 255, 0.45);
}

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

.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.22);
}

.btn-gradient {
  background: var(--grad-primary);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 10px 30px -10px rgba(124, 92, 255, 0.55);
}

.btn-gradient:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 38px -10px rgba(124, 92, 255, 0.7);
}

/* Chips / Tags */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

/* Navbar */
.nav-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 450;
  transition: color 0.2s ease;
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -18px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-primary);
  border-radius: 2px;
}

/* Section heading */
.eyebrow {
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* Service card */
.service-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 92, 255, 0.08), transparent 40%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--surface-hover);
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-soft);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Flow diagram */
.flow-pipe {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  overflow: hidden;
}

.flow-pipe::after {
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  width: 30%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent-2), var(--accent-1), transparent);
  animation: flow 2.8s linear infinite;
}

@keyframes flow {
  0% { left: -30%; }
  100% { left: 100%; }
}

.flow-node {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  font-size: 0.82rem;
  color: var(--text);
  white-space: nowrap;
}

.flow-node-icon {
  width: 22px;
  height: 22px;
  border-radius: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--grad-soft);
  color: var(--text);
}

/* Pulsing dot */
.pulse-dot {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: var(--accent-2);
  opacity: 0.4;
  animation: pulse 1.8s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Flow line SVG animations */
.flow-line {
  stroke-dasharray: 6 6;
  animation: dash 1.2s linear infinite;
}

@keyframes dash {
  to { stroke-dashoffset: -12; }
}

.flow-line-static {
  stroke: rgba(255, 255, 255, 0.12);
  fill: none;
  stroke-width: 1.5;
}

/* Stat card */
.stat-card {
  padding: 1.75rem;
  border-radius: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Step card (How it works) */
.step-number {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent-2);
}

/* Problem vs solution */
.diagram-problem {
  position: relative;
  padding: 2rem;
  border: 1px dashed rgba(248, 113, 113, 0.3);
  border-radius: 1rem;
  background: rgba(248, 113, 113, 0.03);
}

.diagram-solution {
  position: relative;
  padding: 2rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.04), rgba(34, 211, 238, 0.04));
}

/* Timeline message bubbles */
.bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 0.9rem;
  font-size: 0.82rem;
  background: var(--surface);
  border: 1px solid var(--border);
  max-width: 80%;
}

.bubble-out {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  margin-left: auto;
}

/* Counter */
.counter {
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

/* Hover glow */
.hover-glow {
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.hover-glow:hover {
  box-shadow: 0 20px 60px -20px rgba(124, 92, 255, 0.35);
  transform: translateY(-2px);
}

/* Utility */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.16);
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.mobile-menu.open {
  max-height: 400px;
}

/* Marquee-like continuous motion for data */
@keyframes driftY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.drift-y {
  animation: driftY 3s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.sparkle {
  animation: sparkle 2.2s ease-in-out infinite;
}

/* Before / after transform */
.before-state {
  filter: grayscale(0.6) brightness(0.7);
  opacity: 0.6;
}

/* Bar chart */
.bar {
  background: var(--grad-primary);
  border-radius: 6px 6px 0 0;
  transform-origin: bottom;
  animation: grow 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* Focus states */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ================================================
   Emphasis / Highlight utilities
   Used inside paragraphs, captions, and muted text
   to direct the viewer's attention to key points.
   ================================================ */
.hl {
  color: var(--text);
  font-weight: 600;
}

.hl-accent {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 600;
}

.hl-mark {
  background-image: linear-gradient(180deg, transparent 62%, rgba(34, 211, 238, 0.28) 62%);
  padding: 0 3px;
  color: var(--text);
  font-weight: 500;
  border-radius: 2px;
}

.hl-mark-violet {
  background-image: linear-gradient(180deg, transparent 62%, rgba(124, 92, 255, 0.28) 62%);
  padding: 0 3px;
  color: var(--text);
  font-weight: 500;
  border-radius: 2px;
}

.hl-green { color: #34D399; font-weight: 600; }
.hl-cyan  { color: #22D3EE; font-weight: 600; }
.hl-violet { color: #A78BFA; font-weight: 600; }
.hl-pink  { color: #F472B6; font-weight: 600; }
.hl-amber { color: #FBBF24; font-weight: 600; }
.hl-red   { color: #F87171; font-weight: 600; }

.hl-bigger { font-size: 1.12em; letter-spacing: -0.015em; }
.hl-huge   { font-size: 1.25em; font-weight: 600; letter-spacing: -0.02em; }

/* Pulsing attention */
.hl-pulse {
  animation: hlpulse 2.4s ease-in-out infinite;
}
@keyframes hlpulse {
  0%, 100% { opacity: 1; text-shadow: 0 0 0 rgba(34, 211, 238, 0); }
  50% { opacity: 0.92; text-shadow: 0 0 22px rgba(34, 211, 238, 0.35); }
}

/* Underline sweep for emphasis */
.hl-underline {
  position: relative;
  color: var(--text);
  font-weight: 600;
  display: inline-block;
}
.hl-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--grad-primary);
  transform-origin: left center;
  animation: underline-grow 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s both;
}
@keyframes underline-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Number chip — small inline badge for metrics inside copy */
.num-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.4rem;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.3);
  color: #22D3EE;
  font-weight: 600;
  font-size: 0.92em;
  font-variant-numeric: tabular-nums;
}
.num-chip-violet {
  background: rgba(124, 92, 255, 0.14);
  border-color: rgba(124, 92, 255, 0.35);
  color: #A78BFA;
}
.num-chip-green {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
  color: #34D399;
}
.num-chip-red {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
  color: #F87171;
}

/* ROI math block used on each service page */
.roi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.roi-step {
  position: relative;
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
}

.roi-step .roi-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  font-weight: 600;
}

.roi-step .roi-value {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-top: 0.35rem;
  font-variant-numeric: tabular-nums;
}

.roi-step .roi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.roi-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-2);
  font-weight: 600;
}

.roi-final {
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.18), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(34, 211, 238, 0.35);
}

.roi-final .roi-value {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
