/* ==========================================================================
   SenseHire Marketing Site — Base: reset, typography, layout, utilities
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-secondary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color var(--t-med) ease, color var(--t-med) ease;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, svg { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(4, 193, 184, 0.30); color: var(--text-primary); }

/* ---- Typography scale ---------------------------------------------------- */

h1, h2, h3, h4, h5 {
  color: var(--text-primary);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.display {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.035em;
}

h2, .h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3, .h3 { font-size: clamp(1.35rem, 2.2vw, 1.7rem); }
h4, .h4 { font-size: 1.15rem; font-weight: 700; }

p { color: var(--text-secondary); }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--text-muted);
}

.mono { font-family: var(--font-mono); }

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

/* ---- Layout containers --------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.container-wide { max-width: var(--container-wide); }

.section { padding-block: clamp(3.5rem, 8vw, 7rem); position: relative; }
.section-tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

.stack > * + * { margin-top: var(--space-4); }
.stack-lg > * + * { margin-top: var(--space-6); }

/* Grids */
.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Prevent intrinsic-width grid blowout on narrow screens: grid/flex children
   default to min-width:auto, which lets wide content stretch the track past
   the viewport. */
.grid > *, .split > *, .hero-grid > *, .usecase-grid > *, .calc-grid > *,
.footer-grid > *, .ba-grid > *, .contact-grid > *, .pricing-grid > * { min-width: 0; }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

.flow-center { text-align: center; margin-inline: auto; }
.measure { max-width: 64ch; }
.measure-sm { max-width: 52ch; }

/* ---- Utility ------------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.relative { position: relative; }
.full { width: 100%; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-top);
  background: var(--brand-primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---- Background layers --------------------------------------------------- */

.bg-aurora {
  position: absolute;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  overflow: hidden;
}
.bg-aurora::before,
.bg-aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.9;
  will-change: transform;
}
.bg-aurora::before {
  width: 60vw; height: 60vw;
  max-width: 760px; max-height: 760px;
  top: -22%; left: -12%;
  background: radial-gradient(circle, var(--aurora-1) 0%, transparent 70%);
  animation: auroraDrift1 22s ease-in-out infinite alternate;
}
.bg-aurora::after {
  width: 56vw; height: 56vw;
  max-width: 720px; max-height: 720px;
  top: -10%; right: -14%;
  background: radial-gradient(circle, var(--aurora-2) 0%, transparent 70%);
  animation: auroraDrift2 26s ease-in-out infinite alternate;
}

.bg-aurora .orb {
  position: absolute;
  width: 48vw; height: 48vw;
  max-width: 620px; max-height: 620px;
  bottom: -26%; left: 30%;
  border-radius: 50%;
  filter: blur(90px);
  background: radial-gradient(circle, var(--aurora-3) 0%, transparent 70%);
  animation: auroraDrift3 30s ease-in-out infinite alternate;
}

@keyframes auroraDrift1 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(8%, 6%, 0) scale(1.15); } }
@keyframes auroraDrift2 { from { transform: translate3d(0,0,0) scale(1.05); } to { transform: translate3d(-7%, 9%, 0) scale(0.95); } }
@keyframes auroraDrift3 { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(-9%, -6%, 0) scale(1.2); } }

.bg-grid {
  position: absolute;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 25%, transparent 75%);
}

.bg-dots {
  position: absolute;
  inset: 0;
  z-index: var(--z-bg);
  pointer-events: none;
  background-image: radial-gradient(var(--dot-color) 1.1px, transparent 1.1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000 10%, transparent 70%);
}

/* ---- Scroll reveal ------------------------------------------------------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal][data-reveal-delay="5"] { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .bg-aurora::before, .bg-aurora::after, .bg-aurora .orb { animation: none !important; }
  .marquee-track { animation: none !important; transform: none !important; flex-wrap: wrap; justify-content: center; }
  .timeline::before { transform: none !important; transition: none !important; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
}

/* ---- Screen-reader-only utility ------------------------------------------- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
