/* =========================================================================
   Base reset + shared primitives.
   Variant-specific styles live in v1.css / v2.css / v3.css.
   ======================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); letter-spacing: -0.015em; }
h4 { font-size: var(--step-1); letter-spacing: -0.01em; }

p { margin: 0; text-wrap: pretty; }

.container {
  max-width: var(--max-w);
  padding-inline: clamp(1.1rem, 3.5vw, 2.5rem);
  margin-inline: auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
  display: inline-flex;
  align-items: center;
  gap: 0.65em;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.hairline { height: 1px; background: var(--rule); border: 0; }

/* CTA button — consistent across variants, accent color overriden per variant */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1.1em 1.8em;
  background: var(--accent);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step-0);
  letter-spacing: -0.01em;
  border-radius: 999px;
  transition: transform 180ms var(--ease-out), background 180ms;
  position: relative;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}
.cta:hover { transform: translateY(-2px); }
.cta:active { transform: translateY(0); }
.cta .arrow {
  width: 1.1em;
  height: 1.1em;
  transition: transform 220ms var(--ease-out);
}
.cta:hover .arrow { transform: translateX(3px); }

.cta--ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--rule);
}
.cta--ghost:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

/* A universal section anchor */
section { scroll-margin-top: 80px; }

/* Fade-in-on-scroll helper — content is always visible; JS adds .is-revealed
   to trigger a subtle translate. If JS is off or IO misses, content still shows. */
[data-reveal] {
  transform: translateY(10px);
  opacity: 0.95;
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}
/* JS-off fallback: reveal everything. */
html.no-js [data-reveal] { opacity: 1; transform: none; }

/* Print-safe fallback */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Utility */
.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;
}

/* ------------ Video testimonial modal ------------------------------------- */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(8, 6, 4, 0.92);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  transition: opacity 180ms var(--ease-out);
  backdrop-filter: blur(8px);
}
.video-modal.is-open { opacity: 1; }
.video-modal.is-closing { opacity: 0; }
.video-modal__frame {
  position: relative;
  display: block;
  background: #000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.video-modal__frame--portrait {
  width: min(90vw, calc(90vh * 9 / 16));
  height: min(90vh, calc(90vw * 16 / 9));
  aspect-ratio: 9 / 16;
}
.video-modal__frame--embed {
  width: min(90vw, 1100px);
  max-height: 90vh;
  aspect-ratio: 16 / 9;
}
.video-modal__frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
}
.video-modal__frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-modal__close {
  position: absolute;
  top: clamp(1rem, 2.5vw, 1.6rem);
  right: clamp(1rem, 2.5vw, 1.6rem);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  line-height: 1;
  color: #FFFFFF;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: background 160ms, transform 160ms var(--ease-out);
}
.video-modal__close:hover { background: rgba(255,255,255,0.22); transform: scale(1.05); }
