:root {
  --color-primary: #1E3A8A;
  --color-primary-foreground: #FFFFFF;
  --color-secondary: #3B82F6;
  --color-accent: #7C3AED;
  --color-background: #F8FAFC;
  --color-foreground: #0F172A;
  --color-muted: #64748B;
  --color-muted-bg: #F1F5F9;
  --color-border: #E2E8F0;
  --color-ring: #1E3A8A;

  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'DM Sans', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--color-background);
  color: var(--color-foreground);
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.avatar-placeholder {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}

a, button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--color-ring);
  outline-offset: 2px;
}

/* Scroll progress bar */
#scroll-progress {
  transition: width 100ms linear;
}

/* Elements animated by js/animations.js start hidden to avoid a flash of
   fully-visible content before GSAP runs; JS removes this class immediately
   if motion is disabled or GSAP fails to load. */
[data-reveal],
[data-reveal-group] > * {
  visibility: hidden;
}
.reveal-ready [data-reveal],
.reveal-ready [data-reveal-group] > * {
  visibility: visible;
}

/* Chat demo cursor */
.chat-cursor {
  display: inline-block;
  width: 2px;
  margin-left: 2px;
  background: currentColor;
  animation: chat-blink 0.9s step-start infinite;
}
@keyframes chat-blink {
  50% { opacity: 0; }
}

/* Decorative glow blobs behind hero / feature graphics */
.glow-blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

/* Phone mockup */
.phone-frame {
  position: relative;
  width: 260px;
  max-width: 78vw;
  aspect-ratio: 9 / 19.3;
  background: var(--color-foreground);
  border-radius: 2.5rem;
  padding: 10px;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.35), 0 0 0 2px rgba(15, 23, 42, 0.06);
}
.phone-frame__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--color-background);
  border-radius: 1.85rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.phone-frame__notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 20px;
  background: var(--color-foreground);
  border-radius: 999px;
  z-index: 10;
}
.phone-frame__statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px 2px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-foreground);
  flex-shrink: 0;
}

/* AI demo tab buttons (Services page) */
.ai-demo-tab {
  text-align: left;
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  transition: border-color 150ms ease, background 150ms ease;
}
.ai-demo-tab[aria-selected="true"] {
  border-color: var(--color-secondary);
  background: var(--color-muted-bg);
}

/* Voice call waveform */
.waveform {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
}
.waveform span {
  display: block;
  width: 4px;
  border-radius: 999px;
  background: currentColor;
  animation: waveform-pulse 1.1s ease-in-out infinite;
}
.waveform span:nth-child(1) { height: 30%; animation-delay: 0ms; }
.waveform span:nth-child(2) { height: 60%; animation-delay: 90ms; }
.waveform span:nth-child(3) { height: 100%; animation-delay: 180ms; }
.waveform span:nth-child(4) { height: 45%; animation-delay: 270ms; }
.waveform span:nth-child(5) { height: 75%; animation-delay: 360ms; }
.waveform span:nth-child(6) { height: 35%; animation-delay: 450ms; }
.waveform span:nth-child(7) { height: 55%; animation-delay: 540ms; }
@keyframes waveform-pulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.6; }
  50% { transform: scaleY(1); opacity: 1; }
}
.waveform.is-paused span {
  animation-play-state: paused;
  transform: scaleY(0.25);
}

/* Browser mockup (Work page) */
.browser-frame {
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-background);
  box-shadow: 0 20px 45px -20px rgba(15, 23, 42, 0.3);
}
.browser-frame__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  background: var(--color-muted-bg);
  border-bottom: 1px solid var(--color-border);
}
.browser-frame__dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}
.browser-frame__viewport {
  position: relative;
  overflow: hidden;
}
.browser-frame__scroll {
  animation: browser-scroll 12s ease-in-out infinite;
}
@keyframes browser-scroll {
  0%, 10% { transform: translateY(0); }
  45%, 60% { transform: translateY(var(--scroll-distance, -140px)); }
  95%, 100% { transform: translateY(0); }
}
