/* ==========================================================================
   ESPER GLOBAL — Version 1: Command Grid
   Main Stylesheet
   ========================================================================== */

/* ── Font Face ── */
@font-face {
  font-family: 'Equinox';
  src: url('../fonts/equinox/Equinox-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-darkest);
  overflow-x: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
input, select, textarea { font-family: inherit; }

/* ── Utility ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── Reveal Animation ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--duration-reveal) var(--ease-out-expo),
              transform var(--duration-reveal) var(--ease-out-expo);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: var(--color-text-primary);
  color: var(--color-bg-darkest);
  border: 1px solid transparent;
}

.btn--primary:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255,255,255,0.08);
}

.btn--ghost {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-hover);
}

.btn--ghost:hover {
  border-color: var(--color-chrome);
  background: rgba(255,255,255,0.03);
}

.btn--sm {
  padding: 0.5rem 1.25rem;
  font-size: var(--text-caption);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(10, 13, 14, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-normal) var(--ease-out),
              background-color var(--duration-normal) var(--ease-out);
}

.nav.is-scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(10, 13, 14, 0.95);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.nav__logo-mark {
  height: 36px;
  width: auto;
  color: var(--color-chrome-light);
}

.nav__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-ultra);
  color: var(--color-chrome-light);
  text-transform: uppercase;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.nav__item {
  position: static;
}

.nav__link {
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
  display: inline-block;
  padding: 4px 0;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-primary);
  transition: width var(--duration-normal) var(--ease-out-expo);
}

.nav__link:hover,
.nav__item--mega:hover .nav__link {
  color: var(--color-text-primary);
}

.nav__link:hover::after,
.nav__item--mega:hover .nav__link::after {
  width: 100%;
}

/* ── Mega Menu ── */
.mega {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: var(--color-bg-dark);
  border-bottom: 1px solid var(--color-border);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out),
              visibility var(--duration-normal);
  z-index: 999;
}

.nav__item--mega:hover .mega {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mega__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

.mega__col {
  display: flex;
  flex-direction: column;
}

/* Category card with image placeholder */
.mega__category {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.mega__category:hover {
  border-color: var(--color-border-hover);
  background: var(--color-bg-card);
}

.mega__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.mega__img svg {
  width: 32px;
  height: 32px;
  color: var(--color-chrome-dark);
  opacity: 0.5;
  transition: opacity var(--duration-fast), color var(--duration-fast);
}

.mega__category:hover .mega__img svg {
  opacity: 0.8;
  color: var(--color-primary);
}

.mega__label {
  font-family: var(--font-display);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-primary);
}

.mega__desc {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
}

/* CTA column */
.mega__col--cta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: var(--space-3);
  border-left: 1px solid var(--color-border);
}

.mega__heading {
  font-family: var(--font-display);
  font-size: var(--text-label);
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--color-chrome);
  margin-bottom: var(--space-2);
}

.mega__text {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-3);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__shield {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast), background var(--duration-fast);
  position: relative;
}

.nav__shield svg {
  width: 18px;
  height: 18px;
}

.nav__shield:hover {
  color: var(--color-chrome);
  background: rgba(255,255,255,0.04);
}

.nav__shield-tooltip {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  padding: 0.5rem 0.75rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border-visible);
  border-radius: var(--radius-md);
  font-size: var(--text-caption);
  color: var(--color-text-secondary);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: all var(--duration-fast) var(--ease-out);
}

.nav__shield:hover .nav__shield-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* Hamburger */
.nav__hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px;
}

.nav__hamburger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-text-primary);
  transition: all var(--duration-normal) var(--ease-out-expo);
  transform-origin: center;
}

.nav__hamburger.is-open span:first-child {
  transform: rotate(45deg) translate(2.5px, 2.5px);
}

.nav__hamburger.is-open span:last-child {
  transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* Mobile nav */
.nav__mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 13, 14, 0.98);
  backdrop-filter: blur(20px);
  padding: var(--space-6) var(--container-padding);
  z-index: 999;
}

.nav__mobile.is-open {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.nav__mobile a {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-secondary);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  transition: color var(--duration-fast);
}

.nav__mobile a:hover {
  color: var(--color-text-primary);
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: var(--esper-hero-height, 100vh);
  min-height: var(--esper-hero-height, 100svh);
  display: flex;
  align-items: center;
  /* Equal top + bottom padding keeps the content vertically centered
     while still leaving room for the fixed nav at the top. */
  padding-top: var(--nav-height);
  padding-bottom: var(--nav-height);
  background: var(--color-bg-darkest);
  overflow: hidden;
}

/* Video / image background */
.hero__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero__video-el {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 1;
  border: 0;
}

/* Image background — uses a div with background-image so we can use
   background-position / background-size cleanly. */
.hero__image {
  position: absolute;
  inset: 0;
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Overlay layer — sits between background and content. The colour is
   driven by the --esper-hero-overlay CSS variable set on .hero by
   render.php (or by useBlockProps in the editor). */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--esper-hero-overlay, rgba(10, 13, 14, 0.55));
  pointer-events: none;
}

/* Hero content sits above both the background and the overlay. */
.hero__inner {
  position: relative;
  z-index: 2;
}

/* YouTube iframe needs explicit sizing */
iframe.hero__video-el {
  width: 100vw;
  height: 56.25vw; /* 16:9 */
  min-height: 100vh;
  min-width: 177.78vh; /* 16:9 */
}

/* Subtle noise/grain texture — above video */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-size: 200px;
  opacity: 0.4;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero__content {
  max-width: 720px;
  padding: var(--space-6) 0;
}

.hero__overline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--color-chrome-dark);
  margin-bottom: var(--space-4);
}

.hero__overline .rule {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--color-chrome-dark);
}

.hero__headline {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 400;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
}

.hero__subhead {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 540px;
  margin-bottom: var(--space-5);
}

.hero__ctas {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

/* Scroll indicator */
.hero__scroll {
  position: absolute;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 40px;
  overflow: hidden;
  opacity: 1;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.hero__scroll.is-hidden {
  opacity: 0;
}

.hero__scroll-line {
  width: 100%;
  height: 100%;
  background: var(--color-chrome-dark);
  animation: scrollPulse 2s var(--ease-in-out) infinite;
}

@keyframes scrollPulse {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

/* ==========================================================================
   DIVISIONS — Command Grid
   ========================================================================== */
.divisions {
  padding: var(--space-9) 0;
  min-height: var(--esper-divisions-height, auto);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg-base);
}

.divisions__header {
  text-align: center;
  margin-bottom: var(--space-7);
}

.divisions__overline {
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--color-chrome-dark);
  margin-bottom: var(--space-2);
}

.divisions__title {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  letter-spacing: var(--tracking-tight);
}

.divisions__subtitle {
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.divisions__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--grid-gutter);
}

/* Card base */
.card {
  position: relative;
  min-height: 340px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  transition: border-color var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.card:hover {
  border-color: var(--color-border-hover);
  transform: translateY(-2px);
}

.card__content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card__image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-elevated);
  border-left: 1px solid var(--color-border);
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--color-chrome-dark);
  opacity: 0.3;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.card:hover .card__image-placeholder {
  opacity: 0.5;
}

.card__image-placeholder svg {
  width: 64px;
  height: 64px;
}

/* Card content */
.card__label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--color-chrome-dark);
  margin-bottom: 1rem;
}

.card__label svg {
  width: 12px;
  height: 12px;
  opacity: 0.6;
}

/* Card icon */
.card__icon {
  margin-bottom: var(--space-2);
}

.card__icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--color-chrome-dark);
  transition: color var(--duration-normal) var(--ease-out);
}

.card:hover .card__icon svg {
  color: var(--color-chrome);
}

.card--security .card__icon svg {
  color: var(--color-security-accent);
  opacity: 0.6;
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-1);
}

.card__desc {
  font-size: var(--text-small);
  line-height: var(--leading-normal);
  color: var(--color-text-secondary);
  max-width: 400px;
  margin-bottom: var(--space-3);
}

/* Sub-category tags */
.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-3);
}

.card__tag {
  display: inline-block;
  padding: 3px 10px;
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-hover);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast), color var(--duration-fast);
}

.card:hover .card__tag {
  border-color: var(--color-chrome-dark);
  color: var(--color-chrome);
}

.card__tag--muted {
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.card--security:hover .card__tag--muted {
  border-color: var(--color-security-border);
  color: var(--color-security-accent);
}

.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-small);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--color-chrome);
  transition: color var(--duration-fast), gap var(--duration-normal);
}

.card__cta:hover {
  color: var(--color-primary);
  gap: 0.75rem;
}

.card__cta span {
  transition: transform var(--duration-normal) var(--ease-out-expo);
}

.card__cta:hover span {
  transform: translateX(2px);
}

/* Grid placement — all full width */
.card--outdoor,
.card--oem,
.card--b8lab,
.card--security  { grid-column: 1 / -1; }

/* Card hover backgrounds */
.card--outdoor::before,
.card--oem::before,
.card--b8lab::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
  background: var(--gradient-card-hover);
  pointer-events: none;
}

.card--outdoor:hover::before,
.card--oem:hover::before,
.card--b8lab:hover::before {
  opacity: 1;
}

/* Security card — special treatment */
.card--security {
  border-style: dashed;
  border-color: var(--color-security-border);
  background: var(--color-security-bg);
}

.card--security:hover {
  border-color: var(--color-security-accent);
}

.card--security .card__label {
  color: var(--color-security-accent);
}

.card--security .card__cta {
  color: var(--color-security-accent);
}

.card--security .card__cta:hover {
  color: var(--color-chrome);
}

/* ==========================================================================
   PROCESS — Six-Step Interactive Form
   ========================================================================== */
.process {
  padding: var(--space-9) 0;
  min-height: var(--esper-process-height, auto);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg-darkest);
}

/* ── B8LAB Success Story CTA ── */
.b8lab-cta {
  padding: var(--space-9) 0;
  min-height: var(--esper-b8lab-cta-height, auto);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg-darkest);
  position: relative;
  overflow: hidden;
}

.b8lab-cta::before,
.b8lab-cta::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.b8lab-cta::before { top: 0; }
.b8lab-cta::after  { bottom: 0; }

.b8lab-cta__inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.b8lab-cta__overline {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.b8lab-cta__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text-primary);
  margin-bottom: var(--space-4);
}

.b8lab-cta__desc {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.b8lab-cta__actions {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

/* ── Process ── */
.process__header {
  text-align: center;
  margin-bottom: var(--space-7);
}

.process__overline {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--color-chrome-dark);
  margin-bottom: var(--space-2);
}

.process__title {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-2);
}

.process__subtitle {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
}

.process__body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--space-5);
  align-items: start;
}

/* ── Stepper (left sidebar) ── */
.stepper {
  position: relative;
  padding-left: var(--space-3);
}

.stepper__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  background: var(--color-border-visible);
}

.stepper__progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: var(--color-success);
  transition: height var(--duration-slow) var(--ease-out-expo);
}

.stepper__step {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-2) 0;
  cursor: pointer;
  position: relative;
  transition: all var(--duration-fast);
}

/* Active dot on the line */
.stepper__step::before {
  content: '';
  position: absolute;
  left: calc(var(--space-3) * -1);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-bg-darkest);
  border: 1.5px solid var(--color-text-muted);
  transition: all var(--duration-normal) var(--ease-out);
  z-index: 1;
}

.stepper__step.is-active::before {
  background: var(--color-primary);
  border-color: var(--color-primary);
  width: 9px;
  height: 9px;
}

.stepper__step.is-complete::before {
  background: var(--color-success);
  border-color: var(--color-success);
}

.stepper__num {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-h3);
  letter-spacing: var(--tracking-wide);
  color: var(--color-text-muted);
  margin-bottom: 2px;
  transition: color var(--duration-fast);
}

.stepper__step.is-active .stepper__num {
  color: var(--color-text-primary);
}

.stepper__step.is-complete .stepper__num {
  color: var(--color-success);
}

.stepper__name {
  display: block;
  font-size: var(--text-small);
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.stepper__step.is-active .stepper__name {
  color: var(--color-text-secondary);
}

.stepper__step.is-complete .stepper__name {
  color: var(--color-text-secondary);
}

.stepper__bar {
  margin-top: 6px;
  height: 2px;
  background: var(--color-border-visible);
  border-radius: 1px;
  overflow: hidden;
}

.stepper__bar::after {
  content: '';
  display: block;
  width: 0%;
  height: 100%;
  background: var(--color-chrome);
  transition: width var(--duration-normal) var(--ease-out-expo);
}

.stepper__step.is-active .stepper__bar::after {
  width: 100%;
  background: var(--color-primary);
}

.stepper__step.is-complete .stepper__bar::after {
  width: 100%;
  background: var(--color-success);
}

/* ── Step Panels (right content) ── */
.process__panels {
  position: relative;
  min-height: 520px;
}

.step-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-out-expo),
              transform var(--duration-slow) var(--ease-out-expo);
  display: flex;
  flex-direction: column;
}

.step-panel.is-active {
  position: relative;
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.step-panel__header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.step-panel__icon {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-chrome);
}

.step-panel__icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--color-chrome-dark);
  stroke-width: 1.5;
  fill: none;
}

.step-panel__intro h3 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  letter-spacing: var(--tracking-tight);
  margin-bottom: 0.25rem;
}

.step-panel__intro p {
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
}

/* ── Form Styles ── */
.step-form {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group--full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

/* AI Button */
.btn-ai {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.08);
  border: 1px solid rgba(var(--color-primary-rgb), 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.btn-ai__icon {
  width: 12px;
  height: 12px;
  transition: transform var(--duration-normal) var(--ease-out);
}

.btn-ai:hover {
  background: rgba(var(--color-primary-rgb), 0.15);
  border-color: rgba(var(--color-primary-rgb), 0.4);
  color: var(--color-primary-light);
}

.btn-ai:hover .btn-ai__icon {
  transform: translateX(1px);
}

.btn-ai.is-generating {
  pointer-events: none;
  color: var(--color-primary-light);
  border-color: rgba(var(--color-primary-rgb), 0.4);
  background: rgba(var(--color-primary-rgb), 0.12);
}

.btn-ai.is-generating .btn-ai__icon {
  animation: aiPulse 1.2s var(--ease-in-out) infinite;
}

@keyframes aiPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Textarea streaming state */
.form-textarea.is-streaming {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.1);
  caret-color: var(--color-primary);
}

.btn-ai.is-done {
  color: var(--color-success);
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.08);
  transition: all var(--duration-slow) var(--ease-out);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: var(--text-small);
  color: var(--color-text-primary);
  background: var(--color-bg-darkest);
  border: 1px solid var(--color-border-visible);
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), 0.12);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7779'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 2rem;
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Radio / Checkbox groups */
.form-options {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  cursor: pointer;
}

.form-option input[type="radio"],
.form-option input[type="checkbox"] {
  accent-color: var(--color-primary);
  width: 14px;
  height: 14px;
}

/* File upload */
.form-upload {
  grid-column: 1 / -1;
  border: 1px dashed var(--color-border-visible);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-small);
  cursor: pointer;
  transition: border-color var(--duration-fast), background var(--duration-fast);
}

.form-upload:hover,
.form-upload.is-dragover {
  border-color: var(--color-primary);
  background: rgba(var(--color-primary-rgb), 0.03);
}

.form-upload svg {
  display: block;
  margin: 0 auto var(--space-1);
  width: 24px;
  height: 24px;
  stroke: var(--color-chrome-dark);
}

.form-note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: var(--space-2);
  font-size: var(--text-caption);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
}

.form-note svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: var(--color-chrome-dark);
}

/* Step navigation */
.step-panel__nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-4);
}

.step-panel__nav .btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Success state */
.step-success {
  text-align: center;
  padding: var(--space-7) var(--space-4);
}

.step-success__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-3);
  border-radius: 50%;
  background: var(--color-success-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-success__icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-success);
  stroke-width: 2;
  fill: none;
}

.step-success h3 {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  margin-bottom: var(--space-1);
}

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

/* ==========================================================================
   CONTACT / CTA
   ========================================================================== */
.contact {
  padding: var(--space-9) 0;
  min-height: var(--esper-contact-height, auto);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg-base);
  position: relative;
  overflow: hidden;
}

/* Topographic pattern hint */
.contact::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cpath d='M0 200 Q100 150 200 200 T400 200' fill='none' stroke='%23b1bbbd' stroke-width='0.5'/%3E%3Cpath d='M0 220 Q100 170 200 220 T400 220' fill='none' stroke='%23b1bbbd' stroke-width='0.5'/%3E%3Cpath d='M0 180 Q100 130 200 180 T400 180' fill='none' stroke='%23b1bbbd' stroke-width='0.5'/%3E%3Cpath d='M0 240 Q100 190 200 240 T400 240' fill='none' stroke='%23b1bbbd' stroke-width='0.5'/%3E%3Cpath d='M0 160 Q100 110 200 160 T400 160' fill='none' stroke='%23b1bbbd' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 400px;
  pointer-events: none;
}

.contact__inner {
  position: relative;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.contact__overline {
  font-family: var(--font-display);
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-ultra);
  text-transform: uppercase;
  color: var(--color-chrome-dark);
  margin-bottom: var(--space-2);
}

.contact__title {
  font-family: var(--font-display);
  font-size: var(--text-h1);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--space-3);
}

.contact__desc {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-5);
}

.contact__ctas {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
}

.contact__info {
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.contact__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
}

.contact__item svg {
  width: 16px;
  height: 16px;
  stroke: var(--color-chrome-dark);
  stroke-width: 1.5;
  fill: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  padding: var(--space-5) 0;
  background: var(--color-bg-darkest);
  border-top: 1px solid transparent;
  background-image: linear-gradient(var(--color-bg-darkest), var(--color-bg-darkest)),
                    var(--gradient-chrome);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-top: 1px solid transparent;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-4);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__logo-mark {
  height: 24px;
  width: auto;
  color: var(--color-chrome);
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-small);
  letter-spacing: var(--tracking-ultra);
  color: var(--color-chrome);
  text-transform: uppercase;
}

.footer__brand p {
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

.footer__badge {
  font-size: var(--text-caption);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  opacity: 0.7;
  margin-top: var(--space-1);
}

.footer__nav {
  display: flex;
  gap: var(--space-3);
}

.footer__nav a {
  font-size: var(--text-caption);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.footer__nav a:hover {
  color: var(--color-text-secondary);
}

.footer__legal {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  font-size: var(--text-caption);
  color: var(--color-text-muted);
}

.footer__legal a {
  transition: color var(--duration-fast);
}

.footer__legal a:hover {
  color: var(--color-text-secondary);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet */
@media (max-width: 1024px) {
  .mega__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .mega__col--cta {
    grid-column: 1 / -1;
    border-left: none;
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-3);
  }

  .process__body {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  .stepper {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0;
    margin-bottom: var(--space-2);
  }

  /* Horizontal progress line */
  .stepper__line {
    position: absolute;
    top: 0;
    bottom: auto;
    left: 0;
    right: 0;
    width: 100%;
    height: 1px;
  }

  .stepper__progress {
    width: 0%;
    height: 100% !important;
    transition: width var(--duration-slow) var(--ease-out-expo);
  }

  .stepper__step {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-2) 4px 0;
    position: relative;
  }

  /* Dot repositioned to top center on the horizontal line */
  .stepper__step::before {
    left: 50%;
    top: 0;
    transform: translate(-50%, -50%);
  }

  .stepper__num {
    font-size: var(--text-body);
  }

  .stepper__name {
    font-size: var(--text-caption);
  }

  .stepper__bar {
    width: 100%;
    max-width: 60px;
  }
}

@media (max-width: 768px) {
  .nav__links,
  .nav__actions .btn {
    display: none;
  }

  .nav__hamburger {
    display: flex;
  }

  .nav__actions {
    gap: var(--space-1);
  }

  .card {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .card__image {
    min-height: 200px;
    border-left: none;
    border-top: 1px solid var(--color-border);
  }

  .hero__headline {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .step-form {
    grid-template-columns: 1fr;
  }

  .step-panel__header {
    flex-direction: column;
    gap: var(--space-2);
  }

  .contact__info {
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-3);
  }

  .footer__nav {
    justify-content: center;
  }

  .footer__legal {
    justify-content: center;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .hero__ctas {
    flex-direction: column;
  }

  .hero__ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .contact__ctas {
    flex-direction: column;
    align-items: center;
  }

  .contact__ctas .btn {
    width: 100%;
    justify-content: center;
  }

  .stepper__step {
    padding: var(--space-1) 2px 0;
  }

  .stepper__num {
    font-size: var(--text-small);
  }

  .stepper__name {
    display: none;
  }

  .stepper__bar {
    max-width: 40px;
  }
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   WORDPRESS COMPATIBILITY
   Offsets the fixed nav so the WP admin bar doesn't cover it.
   ========================================================================== */

body.admin-bar .nav {
  top: 32px;
}

body.admin-bar .nav__mobile {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .nav,
  body.admin-bar .nav__mobile {
    top: 46px;
  }
}

@media screen and (max-width: 600px) {
  /* WP admin bar disappears entirely below 600px */
  body.admin-bar .nav,
  body.admin-bar .nav__mobile {
    top: 0;
  }
}

/* ==========================================================================
   STATS COUNTERS — section used on subpages
   ========================================================================== */

.stats {
  padding: var(--space-8) 0;
  min-height: var(--esper-stats-height, auto);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-bg-base);
}

.stats__inner {
  width: 100%;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

.stat {
  text-align: center;
  padding: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-card);
}

.stat__number {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  color: var(--color-primary);
  letter-spacing: var(--tracking-tight);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat__label {
  display: block;
  font-size: var(--text-small);
  color: var(--color-text-secondary);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.stat__desc {
  margin: var(--space-2) 0 0;
  font-size: var(--text-small);
  color: var(--color-text-muted);
  line-height: var(--leading-normal);
}

