/* ═══════════════════════════════════════════════════════════════════
   NEVOTIQ — UI LAYER (v2)
   Design polish, components, motion & accessibility.
   Loaded after style.css. No external dependency.
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 0. Tokens ────────────────────────────────────────────────── */
:root {
  --ui-radius-xs: 6px;
  --ui-radius-sm: 8px;
  --ui-radius: 12px;
  --ui-radius-lg: 18px;

  --ui-ease: cubic-bezier(.22, 1, .36, 1);
  --ui-ease-soft: cubic-bezier(.16, 1, .3, 1);
  --ui-accent-rgb: 250, 183, 0;

  --ui-surface: linear-gradient(180deg, #ffffff 0%, #fbfbf8 100%);
  --ui-surface-hover: linear-gradient(180deg, #ffffff 0%, #fdfbf3 100%);
  --ui-border: rgba(18, 16, 10, .09);
  --ui-border-hover: rgba(18, 16, 10, .16);
  --ui-card-shadow: 0 1px 2px rgba(18, 16, 10, .04), 0 14px 34px -22px rgba(18, 16, 10, .35);
  --ui-card-shadow-hover: 0 2px 6px rgba(18, 16, 10, .05), 0 28px 60px -28px rgba(18, 16, 10, .35);
  --ui-glow: 0 0 0 1px rgba(250, 183, 0, .18), 0 18px 44px -20px rgba(250, 183, 0, .35);
  --ui-hairline: linear-gradient(90deg, transparent, rgba(18, 16, 10, .12) 18%, rgba(18, 16, 10, .12) 82%, transparent);
  --ui-header-bg: rgba(250, 250, 248, .82);
  --ui-spot: rgba(250, 183, 0, .10);
}

.dark {
  --ui-surface: linear-gradient(180deg, rgba(255, 255, 255, .045) 0%, rgba(255, 255, 255, .012) 100%);
  --ui-surface-hover: linear-gradient(180deg, rgba(255, 255, 255, .07) 0%, rgba(250, 183, 0, .03) 100%);
  --ui-border: rgba(255, 255, 255, .09);
  --ui-border-hover: rgba(250, 183, 0, .34);
  --ui-card-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 60px -30px rgba(0, 0, 0, .9);
  --ui-card-shadow-hover: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 34px 80px -32px rgba(0, 0, 0, .95);
  --ui-glow: 0 0 0 1px rgba(250, 183, 0, .28), 0 22px 60px -24px rgba(250, 183, 0, .28);
  --ui-hairline: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14) 18%, rgba(255, 255, 255, .14) 82%, transparent);
  --ui-header-bg: rgba(10, 10, 10, .72);
  --ui-spot: rgba(250, 183, 0, .13);
}

/* ─── 1. Base & accessibility ──────────────────────────────────── */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
  -webkit-tap-highlight-color: transparent;
}

body {
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, h5 {
  letter-spacing: -.024em;
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

[id] {
  scroll-margin-top: 7rem;
}

::selection {
  background: rgba(var(--ui-accent-rgb), .28);
  color: inherit;
}

/* Visible, consistent focus ring (keyboard users) */
:where(a, button, summary, [tabindex], input, select, textarea):focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.dark :where(a, button, summary, [tabindex], input, select, textarea):focus-visible {
  outline-color: #FAB700;
}

/* Thin, theme-aware scrollbar (desktop only) */
@media (pointer: fine) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--color-border-strong) transparent;
  }
  ::-webkit-scrollbar { width: 10px; height: 10px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: var(--color-border-strong);
    border: 3px solid transparent;
    background-clip: content-box;
    border-radius: 999px;
  }
  ::-webkit-scrollbar-thumb:hover { background-clip: content-box; background-color: var(--color-border-hover); }
}

/* ─── 2. Section heads & editorial rhythm ──────────────────────── */
.section-title {
  font-size: clamp(1.625rem, 1.05rem + 2.35vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.028em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  color: var(--color-text-muted);
  font-size: .6875rem;
  line-height: 1;
  letter-spacing: .2em;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  flex: none;
  background: currentColor;
  opacity: .55;
}

.eyebrow--accent {
  color: var(--color-accent);
}

.section-rule {
  height: 1px;
  width: 100%;
  border: 0;
  background: var(--ui-hairline);
}

.lead {
  font-size: clamp(.9375rem, .9rem + .18vw, 1.0625rem);
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-width: 62ch;
}

/* ─── 3. Header & navigation ───────────────────────────────────── */
header.fixed {
  background: var(--ui-header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--ui-border);
  box-shadow: none;
  transition: background-color .4s var(--ui-ease), box-shadow .4s var(--ui-ease), border-color .4s var(--ui-ease);
}

header.fixed.is-scrolled {
  background: var(--ui-header-bg);
  box-shadow: 0 10px 40px -24px rgba(0, 0, 0, .45);
  border-bottom-color: var(--ui-border-hover);
}

/* No backdrop-filter (older Firefox): use the near-opaque token instead. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  header.fixed,
  header.fixed.is-scrolled {
    background: var(--color-bg-overlay);
  }
}

/* The utility bar retracts once the page is scrolled */
.header-topbar {
  overflow: hidden;
  max-height: 2.75rem;
  opacity: 1;
  transition: max-height .45s var(--ui-ease), opacity .3s ease, padding .45s var(--ui-ease), border-color .3s;
}

header.is-scrolled .header-topbar {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-bottom-width: 0;
  border-color: transparent;
}

.header-main {
  transition: padding .45s var(--ui-ease);
}

header.is-scrolled .header-main {
  padding-top: .5rem;
  padding-bottom: .5rem;
}

/* Comfortable touch target for the burger (icon stays centered). */
#mobile-menu-toggle {
  min-width: 2.75rem;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
}

/* Desktop navigation */
.primary-menu {
  gap: 1.75rem;
}

.primary-menu > li > a {
  position: relative;
  color: var(--color-text-secondary);
  font-size: .8125rem;
  letter-spacing: .01em;
  transition: color .25s ease;
}

.primary-menu > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .35s var(--ui-ease);
  opacity: .8;
}

.primary-menu > li > a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a,
.primary-menu .current-menu-parent > a {
  color: var(--color-accent);
}

.primary-menu > li > a:hover::after,
.primary-menu .current-menu-item > a::after,
.primary-menu .current-menu-ancestor > a::after,
.primary-menu .current-menu-parent > a::after {
  transform: scaleX(1);
}

.primary-menu .sub-menu {
  top: calc(100% + .55rem);
  left: -.75rem;
  min-width: 240px;
  padding: .5rem;
  border-radius: var(--ui-radius);
  background: var(--color-bg);
  border: 1px solid var(--ui-border);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .35), 0 2px 8px rgba(0, 0, 0, .04);
  transform: translateY(10px) scale(.98);
  transform-origin: top left;
  transition: opacity .25s var(--ui-ease), transform .3s var(--ui-ease), visibility .25s;
}

.dark .primary-menu .sub-menu {
  box-shadow: 0 28px 70px -24px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .04) inset;
}

.primary-menu li:focus-within > .sub-menu,
.primary-menu li:hover > .sub-menu {
  transform: translateY(0) scale(1);
}

.primary-menu .sub-menu a {
  padding: .6rem .75rem;
  border-radius: var(--ui-radius-xs);
  font-size: .8125rem;
  transition: background-color .2s ease, color .2s ease, padding-left .25s var(--ui-ease);
}

.primary-menu .sub-menu a:hover {
  padding-left: 1rem;
  background: var(--color-bg-card-hover);
  color: var(--color-accent);
}

.primary-menu .menu-item-has-children > a::after {
  transition: transform .25s ease;
}

.primary-menu .menu-item-has-children:hover > a::after {
  transform: rotate(225deg) translateY(-1px);
}

/* Mobile menu panel */
#mobile-menu {
  background: var(--color-bg);
  border-top: 1px solid var(--ui-border);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .35);
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  transition: opacity .26s var(--ui-ease), transform .32s var(--ui-ease);
}

#mobile-menu.is-open {
  opacity: 1;
  transform: none;
}

/* Keep the panel usable on short/landscape screens. */
#mobile-menu,
#mobile-menu:not(.hidden) {
  max-height: calc(100vh - 3.5rem);
  max-height: calc(100dvh - 3.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu a {
  padding: .7rem 0;
  color: var(--color-text);
  font-size: .9375rem;
  border-bottom: 1px solid var(--color-border-light);
  transition: color .2s ease, padding-left .25s var(--ui-ease);
}

.mobile-menu a:hover,
.mobile-menu .current-menu-item > a {
  color: var(--color-accent);
  padding-left: .35rem;
}

.mobile-menu .sub-menu {
  margin: .25rem 0 .5rem .75rem;
  padding-left: .75rem;
  border-left: 1px solid var(--ui-border);
}

.mobile-menu .sub-menu a {
  padding: .5rem 0;
  font-size: .875rem;
  border-bottom: 0;
}

/* Language and theme controls sit in a touch-first panel: give them a
   comfortable target while keeping the underline close to the label. */
#mobile-menu .nevotiq-lang-btn,
#mobile-menu #theme-toggle-mobile {
  min-height: 2.5rem;
  padding-top: .5rem;
  padding-bottom: .5rem;
}

#mobile-menu .nevotiq-lang-btn.is-active::after {
  bottom: .3rem;
}

/* ─── 4. Buttons ───────────────────────────────────────────────── */
.btn-primary,
.btn-secondary,
.btn-ghost {
  position: relative;
  border-radius: var(--ui-radius-sm);
  letter-spacing: .01em;
}

.btn-primary {
  background-image: linear-gradient(110deg, #ffd75e 0%, #fab700 38%, #f6b400 62%, #dfa000 100%);
  background-size: 220% 100%;
  background-position: 0% 50%;
  color: #0a0a0a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 8px 22px -12px rgba(250, 183, 0, .75);
  transition: background-position .6s var(--ui-ease), transform .3s var(--ui-ease), box-shadow .35s var(--ui-ease);
}

.btn-primary:hover {
  background-color: transparent;
  background-image: linear-gradient(110deg, #ffd75e 0%, #fab700 38%, #f6b400 62%, #dfa000 100%);
  background-position: 100% 50%;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), 0 18px 38px -16px rgba(250, 183, 0, .85);
}

.btn-primary:active {
  transform: translateY(0) scale(.99);
  transition-duration: .1s;
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  transition: background-color .3s var(--ui-ease), border-color .3s var(--ui-ease), color .3s, transform .3s var(--ui-ease), box-shadow .3s;
}

.btn-secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-soft);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--color-text-secondary);
  transition: color .25s ease, background-color .25s ease;
}

.btn-ghost:hover {
  color: var(--color-accent);
  background: var(--color-bg-card-hover);
}

.btn-icon {
  transition: transform .35s var(--ui-ease), background-color .3s ease;
}

.group:hover .btn-icon {
  transform: translate(2px, -2px) scale(1.05);
}

.btn-primary:hover .btn-icon {
  background-color: rgba(10, 10, 10, .14);
}

/* Tap targets on touch devices */
@media (max-width: 1023px) {
  .btn-sm { min-height: 2.75rem; }
  .btn-lg { min-height: 3rem; }
}

/* ─── 5. Cards & surfaces ──────────────────────────────────────── */
.service-card,
.solution-card,
.expertise-card,
.study-card,
.blog-card,
.testimonial-card,
.secteur-card,
.insight-card,
.client-logo-item {
  border-radius: var(--ui-radius);
  border-color: var(--ui-border);
  transition: transform .5s var(--ui-ease-soft),
              border-color .4s ease,
              background-color .4s ease,
              box-shadow .5s var(--ui-ease-soft);
}

.service-card,
.solution-card,
.expertise-card,
.blog-card,
.testimonial-card,
.insight-card {
  background-image: var(--ui-surface);
  box-shadow: var(--ui-card-shadow);
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover,
  .solution-card:hover,
  .expertise-card:hover,
  .blog-card:hover,
  .testimonial-card:hover,
  .insight-card:hover,
  .study-card:hover {
    transform: translateY(-4px);
    border-color: var(--ui-border-hover);
    background-image: var(--ui-surface-hover);
    box-shadow: var(--ui-card-shadow-hover);
  }

  .service-card:hover .card-hover-gradient,
  .solution-card:hover .card-hover-gradient,
  .expertise-card:hover .card-hover-gradient {
    opacity: 1;
  }
}

/* Icon tile inside service cards */
.service-card > .relative > div:first-child,
.expertise-card > .relative > div:first-child {
  border-radius: var(--ui-radius-sm);
  background: linear-gradient(160deg, rgba(var(--ui-accent-rgb), .10), transparent 65%);
  transition: border-color .35s ease, background-color .35s ease, transform .45s var(--ui-ease), box-shadow .35s;
}

.service-card:hover > .relative > div:first-child,
.expertise-card:hover > .relative > div:first-child {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -16px rgba(var(--ui-accent-rgb), .9);
}

/* Pointer spotlight (enabled by JS) */
.has-spot {
  position: relative;
  isolation: isolate;
}

.has-spot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(340px circle at var(--spot-x, 50%) var(--spot-y, 0%), var(--ui-spot), transparent 62%);
  transition: opacity .4s ease;
}

.has-spot:hover::before { opacity: 1; }

/* ─── 6. Stats strip ───────────────────────────────────────────── */
.stats-strip {
  position: relative;
  --stat-gap: 2rem;
}

@media (min-width: 768px) {
  .stats-strip { --stat-gap: 3rem; }
}

@media (min-width: 1024px) {
  .stats-strip { --stat-gap: 4rem; }
}

.stat-item {
  position: relative;
  padding-block: .25rem;
}

@media (min-width: 768px) {
  .stat-item + .stat-item::before {
    content: "";
    position: absolute;
    left: calc(var(--stat-gap, 3rem) / -2);
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 70%;
    background: var(--ui-hairline);
    background: linear-gradient(180deg, transparent, var(--color-border-strong), transparent);
    opacity: .6;
  }
}

.stat-number {
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -.04em;
  background-image: linear-gradient(175deg, var(--color-text) 8%, var(--color-accent-bright) 100%);
  background-image: linear-gradient(175deg, var(--color-text) 8%, color-mix(in srgb, var(--color-accent) 72%, var(--color-text)) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-separator {
  transition: width .5s var(--ui-ease), opacity .5s;
}

.stat-item:hover .stat-separator {
  width: 3.25rem;
  opacity: .8;
}

/* High-contrast / forced colours: drop the text gradient. */
@media (forced-colors: active) {
  .stat-number {
    background-image: none;
    -webkit-text-fill-color: currentColor;
    color: CanvasText;
  }
}

/* ─── 7. Hero refinements ──────────────────────────────────────── */
.hero-home {
  isolation: isolate;
}

.hero-aurora {
  position: absolute;
  z-index: 0;
  top: -18%;
  right: -12%;
  width: min(760px, 80vw);
  aspect-ratio: 1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(var(--ui-accent-rgb), .16), transparent 62%);
  filter: blur(10px);
  opacity: .9;
}

.dark .hero-aurora {
  background: radial-gradient(circle at 50% 50%, rgba(var(--ui-accent-rgb), .18), transparent 60%);
  opacity: 1;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem .875rem;
  margin-top: 1.75rem;
  color: var(--color-text-muted);
  font-family: 'JetBrains Mono', 'JetBrainsMono-Fallback', monospace;
  font-size: .6875rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

/* The separator trails its item so a wrapped line never starts with a
   lone bullet. */
.hero-proof span:not(:last-child)::after {
  content: "";
  width: 3px;
  height: 3px;
  margin-left: .5rem;
  border-radius: 50%;
  background: currentColor;
  opacity: .5;
}

.hero-proof svg {
  width: .75rem;
  height: .75rem;
  color: var(--color-accent);
  flex: none;
}

.hero-with-media .hero-proof {
  color: var(--hero-ink-muted, var(--color-text-muted));
  text-shadow: var(--hero-text-shadow-body, none);
}

.hero-with-media .hero-proof svg {
  color: var(--hero-accent, var(--color-accent));
}

.hero-parallax {
  will-change: transform;
  transform: translate3d(0, var(--parallax-y, 0px), 0) scale(1.1);
}

/* ─── 8. Insights slider refinements ───────────────────────────── */
.insights-track {
  scroll-padding-left: .5rem;
}

.insight-card {
  border-radius: var(--ui-radius);
}

.insight-media {
  border-radius: calc(var(--ui-radius) - 2px) calc(var(--ui-radius) - 2px) 0 0;
}

.insight-title {
  letter-spacing: -.012em;
}

.insight-cta {
  transition: color .25s ease, gap .25s ease;
}

.insight-card:hover .insight-cta {
  gap: .7rem;
  color: var(--color-accent-bright);
}

.dark .insight-card:hover .insight-cta {
  color: #FAB700;
}

/* ─── 9. CTA band ──────────────────────────────────────────────── */
.cta-section .cta-title {
  letter-spacing: -.03em;
  font-size: clamp(1.875rem, 1.15rem + 2.9vw, 3.75rem);
  line-height: 1.04;
}

.cta-section::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% 110%, rgba(var(--ui-accent-rgb), .10), transparent 70%);
  opacity: .9;
}

.cta-section > .relative {
  position: relative;
  z-index: 1;
}

/* ─── 10. FAQ ──────────────────────────────────────────────────── */
.faq-item {
  border-radius: var(--ui-radius);
  background-image: var(--ui-surface);
  transition: border-color .3s ease, background-color .3s ease, box-shadow .35s var(--ui-ease);
}

.faq-item:hover {
  border-color: var(--ui-border-hover);
  box-shadow: var(--ui-card-shadow);
}

.faq-item summary {
  border-radius: inherit;
  transition: color .25s ease;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -2px;
}

.faq-item[open] {
  border-color: var(--ui-border-hover);
  box-shadow: var(--ui-card-shadow);
}

.faq-item[open] .faq-q {
  color: var(--color-accent);
}

.faq-item[open] .faq-answer {
  animation: faq-in .38s var(--ui-ease-soft) both;
}

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

/* ─── 11. Forms ────────────────────────────────────────────────── */
#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form input[type="tel"],
#contact-form select,
#contact-form textarea,
#demo-form input,
#demo-form select,
#demo-form textarea,
#apply-form input,
#apply-form select,
#apply-form textarea,
#newsletter-form input[type="email"] {
  border-radius: var(--ui-radius-sm);
  border-color: var(--ui-border);
  transition: border-color .25s ease, box-shadow .25s ease, background-color .25s ease;
}

#contact-form input:not([type="checkbox"]):hover,
#contact-form select:hover,
#contact-form textarea:hover,
#demo-form input:hover,
#demo-form select:hover,
#apply-form input:hover {
  border-color: var(--ui-border-hover);
}

#contact-form input:not([type="checkbox"]):focus,
#contact-form select:focus,
#contact-form textarea:focus,
#demo-form input:focus,
#demo-form select:focus,
#demo-form textarea:focus,
#apply-form input:focus,
#apply-form select:focus,
#apply-form textarea:focus,
#newsletter-form input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(var(--ui-accent-rgb), .14);
}

/* ─── 12. Footer ───────────────────────────────────────────────── */
footer h4,
footer h3 {
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-family: 'JetBrains Mono', 'JetBrainsMono-Fallback', monospace;
  font-weight: 500;
}

.footer-menu a {
  position: relative;
  transition: color .25s ease, padding-left .3s var(--ui-ease);
}

.footer-menu li a:hover {
  padding-left: .25rem;
}

.footer-menu a:focus-visible {
  outline-offset: 2px;
}

/* ─── 13. Motion utilities (reveal) ────────────────────────────── */
/* Hidden state has no transition: the class is added by JS after the
   first paint, so transitioning here would create a visible fade-out.
   The transition only runs on the .is-in state. */
.rv {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  will-change: opacity, transform;
}

.rv.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity .7s var(--ui-ease-soft) var(--rv-delay, 0ms),
    transform .7s var(--ui-ease-soft) var(--rv-delay, 0ms);
  will-change: auto;
}

/* 404 entrance */
@media (prefers-reduced-motion: no-preference) {
  .error-code,
  .error-badge,
  .error-title,
  .error-desc,
  .error-actions,
  .error-search,
  .error-terminal {
    animation: rise-in .7s var(--ui-ease-soft) both;
  }
  .error-badge { animation-delay: .05s; }
  .error-title { animation-delay: .1s; }
  .error-desc { animation-delay: .16s; }
  .error-actions { animation-delay: .22s; }
  .error-search { animation-delay: .28s; }
  .error-terminal { animation-delay: .34s; }
  .error-cards a { animation: rise-in .6s var(--ui-ease-soft) both; }
  .error-cards a:nth-child(2) { animation-delay: .08s; }
  .error-cards a:nth-child(3) { animation-delay: .16s; }
}

@keyframes rise-in {
  from { opacity: 0; transform: translate3d(0, 22px, 0); }
  to { opacity: 1; transform: none; }
}

/* ─── 14. Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }

  .rv {
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-parallax {
    transform: none !important;
  }
}

/* ─── 15. Small-screen polish ──────────────────────────────────── */
@media (max-width: 767px) {
  .eyebrow {
    font-size: .625rem;
    letter-spacing: .16em;
  }

  .lead {
    font-size: .9375rem;
    line-height: 1.65;
  }

  .stat-number {
    letter-spacing: -.03em;
  }

  .hero-proof {
    font-size: .625rem;
    letter-spacing: .08em;
    gap: .45rem .8rem;
  }

  /* Icons already separate the items: dropping the bullets keeps wrapped
     lines clean on narrow screens. */
  .hero-proof span::after {
    display: none;
  }

  .insight-body {
    padding: 1.25rem;
  }
}

/* Landscape phones: keep hero copy above the fold */
@media (max-height: 620px) and (max-width: 1023px) {
  .hero-proof { margin-top: 1rem; }
}
