/* ============================================================
   Vouchq landing — custom styles (Control Room dark)
   Tailwind handles the bulk; this file owns things Tailwind
   utilities can't express cleanly: keyframes, masks, the
   animated hero accent, scroll-reveal, and a few polish bits.
   ============================================================ */

:root {
  --bg: #0B0E14;
  --surface: #141922;
  --surface-2: #1C2230;
  --border: #2A3242;
  --border-strong: #3A4459;
  --text: #E6EDF3;
  --muted: #8B97A8;
  --dim: #5A6678;
  --primary: #388BFD;
  --approved: #3FB950;
  --warn: #D29922;
  --drift: #DB6D28;
  --critical: #F85149;
}

html { background: var(--bg); scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

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

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- decorative grid behind hero ---------- */
.grid-bg {
  background-image:
    linear-gradient(to right, rgba(42,50,66,.40) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42,50,66,.40) 1px, transparent 1px);
  background-size: 52px 52px;
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 35%, transparent 100%);
}

/* ---------- animated hero accent: a slow drifting aurora ---------- */
.hero-aurora {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 70%;
  pointer-events: none;
  filter: blur(60px);
  opacity: .55;
  background:
    radial-gradient(40% 60% at 25% 30%, rgba(56,139,253,.32), transparent 70%),
    radial-gradient(35% 55% at 75% 25%, rgba(63,185,80,.16), transparent 70%),
    radial-gradient(30% 50% at 55% 60%, rgba(219,109,40,.14), transparent 70%);
  animation: aurora 18s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(-4%, -2%, 0) scale(1);    opacity: .45; }
  50%  { transform: translate3d(3%, 2%, 0)  scale(1.08);  opacity: .60; }
  100% { transform: translate3d(5%, -3%, 0) scale(1.04);  opacity: .50; }
}

/* a thin scanning line that sweeps the hero — evokes "continuous verification" */
.scanline {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(56,139,253,.55), transparent);
  animation: scan 7s linear infinite;
}
@keyframes scan {
  0%   { transform: translateY(0);     opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { transform: translateY(640px); opacity: 0; }
}

/* ---------- depth helpers ---------- */
.glow {
  box-shadow:
    0 0 0 1px rgba(56,139,253,.15),
    0 24px 70px -28px rgba(56,139,253,.35);
}
.card-depth {
  box-shadow: 0 1px 0 0 rgba(255,255,255,.02) inset, 0 12px 30px -22px rgba(0,0,0,.8);
}

/* ---------- card lift on hover ---------- */
.lift { transition: transform .25s cubic-bezier(.2,.6,.2,1), border-color .25s, box-shadow .25s; }
.lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 40px -24px rgba(0,0,0,.85);
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s cubic-bezier(.2,.6,.2,1), transform .7s cubic-bezier(.2,.6,.2,1);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .07s; }
.reveal[data-delay="2"] { transition-delay: .14s; }
.reveal[data-delay="3"] { transition-delay: .21s; }
.reveal[data-delay="4"] { transition-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- pulsing dot (drift alarm) ---------- */
.dot-pulse { position: relative; }
.dot-pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 1px solid currentColor;
  opacity: .6;
  animation: ping 1.8s cubic-bezier(0,0,.2,1) infinite;
}
@keyframes ping {
  0%   { transform: scale(.8); opacity: .6; }
  80%, 100% { transform: scale(2.2); opacity: 0; }
}

/* ---------- language toggle ---------- */
.lang-btn[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
}

/* hide elements for the inactive language until JS resolves (avoids flash) */
[data-i18n-html] { }

/* ---------- subtle divider gradient between sections ---------- */
.edge-top { position: relative; }
.edge-top::before {
  content: "";
  position: absolute; left: 0; right: 0; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(42,50,66,.9) 20%, rgba(42,50,66,.9) 80%, transparent);
}

/* connector arrows in the pipeline (desktop only) */
.pipe-arrow { color: var(--dim); }
