@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #0F172A;
  --color-secondary: #334155;
  --color-cta: #0369A1;
  --color-cta-dark: #075985;
  --color-bg: #F8FAFC;
  --color-text: #020617;
}

html {
  scroll-behavior: smooth;
}

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

body {
  font-family: 'Source Sans 3', system-ui, sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
}

h1, h2, h3, h4, h5, .font-display {
  font-family: 'Lexend', system-ui, sans-serif;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Fiber signal animation for hero background */
@keyframes pulse-line {
  0%, 100% { opacity: .25; }
  50% { opacity: .75; }
}
.signal-line {
  animation: pulse-line 3.5s ease-in-out infinite;
}

/* Hero background slow zoom (Ken Burns) */
@keyframes kenburns {
  0% { transform: scale(1.04); }
  100% { transform: scale(1.16); }
}
.hero-bg-img {
  animation: kenburns 22s ease-in-out infinite alternate;
  will-change: transform;
}

/* Floating badge */
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.float-badge {
  animation: float-y 4s ease-in-out infinite;
}

/* Soft ambient glow blobs */
@keyframes glow-pulse {
  0%, 100% { opacity: .35; transform: scale(1); }
  50% { opacity: .6; transform: scale(1.15); }
}
.glow-blob {
  animation: glow-pulse 6s ease-in-out infinite;
  filter: blur(60px);
  pointer-events: none;
}

/* Staggered reveal for sibling grids/rows */
.grid > .reveal:nth-child(1), .flex > .reveal:nth-child(1), .reveal-stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.grid > .reveal:nth-child(2), .flex > .reveal:nth-child(2), .reveal-stagger > .reveal:nth-child(2) { transition-delay: 90ms; }
.grid > .reveal:nth-child(3), .flex > .reveal:nth-child(3), .reveal-stagger > .reveal:nth-child(3) { transition-delay: 180ms; }
.grid > .reveal:nth-child(4), .flex > .reveal:nth-child(4), .reveal-stagger > .reveal:nth-child(4) { transition-delay: 270ms; }
.grid > .reveal:nth-child(5), .flex > .reveal:nth-child(5), .reveal-stagger > .reveal:nth-child(5) { transition-delay: 360ms; }
.grid > .reveal:nth-child(6), .flex > .reveal:nth-child(6), .reveal-stagger > .reveal:nth-child(6) { transition-delay: 450ms; }

/* Button lift micro-interaction */
.btn-lift {
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
}
.btn-lift:hover {
  transform: translateY(-2px);
}
.btn-lift:active {
  transform: translateY(0) scale(0.97);
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #0369A1, #38BDF8);
  z-index: 60;
  transition: width 100ms ease-out;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-img, .float-badge, .glow-blob { animation: none; }
}

/* Honeypot anti-spam field: hidden from real users, visible to bots that fill every field */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #E2E8F0; }
::-webkit-scrollbar-thumb { background: #94A3B8; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #64748B; }

/* Focus visibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--color-cta);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: white;
  padding: 12px 20px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* Nav link underline */
.nav-link {
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: var(--color-cta);
  transition: width 200ms ease;
}
.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Accordion chevron */
.accordion-trigger[aria-expanded="true"] .chevron {
  transform: rotate(180deg);
}
.chevron {
  transition: transform 200ms ease;
}

/* Mobile menu */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 300ms ease;
}
#mobile-menu.open {
  max-height: 32rem;
}
