/* ==========================================================================
   VeracityIQ LLC - custom styles
   Tailwind (CDN) handles most utilities; this file holds the few things
   that are cleaner as plain CSS: scroll behavior, reveal animation, focus.
   ========================================================================== */

:root {
  --accent: #10B981;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Visually-hidden utility for the skip link (Tailwind sr-only equivalent kept
   here so it works even if a utility is purged). */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Reveal-on-scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Stagger children within the same group slightly for polish */
.reveal.is-visible {
  transition-delay: var(--reveal-delay, 0ms);
}

/* ---- Section hover highlight ----
   A faint accent wash + brighter divider when the cursor is over a section,
   so it "pops" on-brand. The inset box-shadow overlays whatever background the
   section already has, so it works on both tinted and transparent sections. */
main > section {
  transition: box-shadow 0.45s ease, border-color 0.45s ease;
}
main > section:hover {
  box-shadow: inset 0 0 0 100vmax rgba(16, 185, 129, 0.04);
  border-color: rgba(16, 185, 129, 0.32);
}

/* ---- Nav scrolled state (toggled by JS) ---- */
#nav.scrolled {
  background-color: rgba(14, 14, 18, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* ---- Focus visibility (keyboard users) ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Respect reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
