/* ==========================================================================
   RP Trucking — design system
   Neutral greyscale + signal red. Geometric sans, sentence-case headings,
   square edges. Restrained, industrial, high-contrast.

   1. Tokens      5. Buttons      9. Sections
   2. Reset       6. Header      10. Forms
   3. Layout      7. Hero        11. Footer
   4. Type        8. Cards       12. Motion & responsive
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
  /* Neutral ramp — deliberately untinted. Any hue here muddies the red. */
  --n-000: #000000;
  --n-050: #0a0a0a;
  --n-100: #141414;
  --n-200: #222222;
  --n-300: #343434;
  --n-400: #4a4a4a;
  --n-500: #757b82;
  --n-600: #9aa0a6;
  --n-700: #c9c9c9;
  --n-800: #e8eaed;
  --n-900: #f5f5f5;
  --white: #ffffff;

  /* Signal red — used sparingly, so it always means "act here". */
  --red-400: #f0331f;
  --red-500: #d81e05;
  --red-600: #b01704;
  --red-tint: rgba(216, 30, 5, .10);

  --font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --wrap: 1280px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --radius: 3px;
  --radius-sm: 2px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .10);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, .14);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, .40);

  --ease: cubic-bezier(.2, .7, .3, 1);
  --header-h: 88px;
}

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

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

body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  color: var(--n-200);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 3px solid var(--red-500);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--red-500);
  color: var(--white);
  padding: .8rem 1.2rem;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

.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;
}

/* 3. Layout ---------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-narrow { max-width: 820px; }

.section { padding-block: clamp(3.75rem, 8vw, 7rem); }
.section-tight { padding-block: clamp(2.75rem, 5vw, 4.25rem); }
.section-dark { background: var(--n-100); color: var(--n-800); }
.section-deep { background: var(--n-000); color: var(--n-800); }
.section-muted { background: var(--n-900); }

.grid { display: grid; gap: clamp(1.1rem, 2.2vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.icon { width: 24px; height: 24px; flex: none; }
.icon.xs { width: 15px; height: 15px; }
.icon.sm { width: 18px; height: 18px; }
.icon.lg { width: 30px; height: 30px; }

/* 4. Type ------------------------------------------------------------------ */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.022em;
}

h1 { font-size: clamp(2.35rem, 5vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.85rem); }
h3 { font-size: clamp(1.18rem, 1.7vw, 1.4rem); letter-spacing: -.015em; }
h4 { font-size: 1.05rem; letter-spacing: -.012em; }

p { max-width: 68ch; }
strong { font-weight: 700; }

/* Small uppercase category label — the workhorse of this system. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--red-500);
  margin-bottom: 1.1rem;
}
.section-dark .eyebrow, .section-deep .eyebrow, .hero .eyebrow, .page-hero .eyebrow { color: var(--white); }
.section-dark .eyebrow::before, .section-deep .eyebrow::before,
.hero .eyebrow::before, .page-hero .eyebrow::before { background: var(--red-500); }
.eyebrow::before {
  content: "";
  width: 30px;
  height: 3px;
  background: var(--red-500);
}

/* Short red rule under a heading — Q-Line-style divider. */
.rule {
  width: 54px;
  height: 4px;
  background: var(--red-500);
  margin: 1.5rem 0;
  border: 0;
}

.lead {
  font-size: clamp(1.03rem, 1.4vw, 1.15rem);
  color: var(--n-400);
  line-height: 1.75;
}
.section-dark .lead, .section-deep .lead, .hero .lead, .page-hero .lead { color: var(--n-700); }

.section-head { max-width: 780px; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.prose h2 { margin-top: 2.75rem; margin-bottom: 1rem; }
.prose h3 { margin-top: 2rem; margin-bottom: .7rem; }
.prose p, .prose ul { margin-bottom: 1.1rem; }
.prose ul { list-style: none; }
.prose ul li {
  position: relative;
  padding-left: 1.6rem;
  margin-bottom: .55rem;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: .68em;
  width: 9px; height: 3px;
  background: var(--red-500);
}
.prose a { color: var(--red-600); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.section-dark .prose a, .section-deep .prose a { color: var(--white); text-decoration-color: var(--red-500); }

.text-red { color: var(--red-500); }
.text-white { color: var(--white); }

/* 5. Buttons --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1rem 1.9rem;
  border: 2px solid transparent;
  border-radius: 0;
  background: var(--red-500);
  color: var(--white);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary:hover { background: var(--red-600); }

.btn-dark { background: var(--n-100); color: var(--white); }
.btn-dark:hover { background: var(--red-500); }

/* Outlined, for use on dark surfaces */
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, .55);
}
.btn-ghost:hover { background: var(--white); color: var(--n-000); border-color: var(--white); }

/* Outlined, for use on light surfaces */
.btn-outline {
  background: transparent;
  color: var(--n-100);
  border-color: var(--n-300);
}
.btn-outline:hover { background: var(--n-100); color: var(--white); border-color: var(--n-100); }

.btn-sm { padding: .72rem 1.3rem; font-size: .74rem; }
.btn-lg { padding: 1.15rem 2.3rem; font-size: .84rem; }
.btn-block { width: 100%; }

.btn-group { display: flex; flex-wrap: wrap; gap: .8rem; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: .76rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--n-100);
}
.link-arrow svg { color: var(--red-500); transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }
.section-dark .link-arrow, .section-deep .link-arrow, .card-dark .link-arrow, .tile-dark .link-arrow { color: var(--white); }

/* 6. Header ---------------------------------------------------------------- */
.topbar {
  background: var(--n-000);
  color: var(--n-600);
  font-size: .8rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 40px;
}
.topbar-msg { display: flex; align-items: center; gap: .5rem; margin: 0; }
.topbar-msg svg { color: var(--red-500); }
.topbar-links { display: flex; gap: 1.4rem; }
.topbar-links a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  transition: color .2s;
}
.topbar-links a:hover { color: var(--white); }
.topbar-links svg { color: var(--red-500); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, .92);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .09);
  color: var(--white);
  transition: background .3s var(--ease);
}
.site-header.is-stuck { background: var(--n-000); border-bottom-color: rgba(255, 255, 255, .14); }

.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
}

.brand { display: inline-flex; align-items: center; }

/* Real brand mark. Wide lockup (~4.5:1) that already contains the company name
   and city, so no separate text is rendered beside it. */
.brand-logo {
  /* The lockup is ~4.5:1 and carries two lines of small type, so it needs real
     height to stay legible — hence the taller header. */
  height: clamp(40px, 5vw, 58px);
  width: auto;
  max-width: min(62vw, 300px);
  object-fit: contain;
}
/* max-width raised alongside the height — at 4.5:1 a 71px tall mark is ~320px
   wide, so the old 280px cap would have clipped it back down. */
.brand-footer .brand-logo { height: 71px; max-width: 340px; }

.main-nav ul { display: flex; align-items: center; gap: .1rem; }
.main-nav a {
  display: block;
  padding: .6rem .8rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--n-700);
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.main-nav a:hover { color: var(--white); }
.main-nav a.is-active { color: var(--white); border-bottom-color: var(--red-500); }
.main-nav .nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: .7rem; }

.nav-toggle {
  display: none;
  place-items: center;
  width: 46px; height: 46px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.nav-toggle .menu-close { display: none; }
.nav-open .nav-toggle .menu-close { display: block; }
.nav-open .nav-toggle .menu-open { display: none; }

/* 7. Hero ------------------------------------------------------------------ */
.hero {
  position: relative;
  isolation: isolate;
  background: var(--n-000);
  color: var(--white);
  padding-block: clamp(3.5rem, 8vw, 7rem);
  overflow: hidden;
}
/* Hero stacking, inside the section's isolation context:
   0 video · 1 tint · 2 grid texture · 3 content. */

/* Background footage. Sits behind everything; the black on .hero shows through
   if the files are missing or the browser blocks autoplay. */
.hero-video {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

/* Dark tint over the video — heavier on the left so the headline and stats stay
   legible, and at top/bottom so the section blends into the black around it. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Two stacked layers — their alphas multiply, so keep each one modest.
     Combined this lands around 75% over the copy and 45% mid-frame. */
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .34) 58%, rgba(0, 0, 0, .46) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .42) 0%, rgba(0, 0, 0, .18) 40%, rgba(0, 0, 0, .55) 100%);
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(110% 85% at 50% 0%, #000 15%, transparent 75%);
  -webkit-mask-image: radial-gradient(110% 85% at 50% 0%, #000 15%, transparent 75%);
  pointer-events: none;
}

.hero-in {
  position: relative;
  z-index: 3;
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 1000px) {
  .hero-in { grid-template-columns: 1.1fr .9fr; }
}

.hero h1 { margin-bottom: 0; }
.hero .lead { max-width: 54ch; margin-bottom: 2.1rem; }

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .42rem .9rem;
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--n-700);
}
.badge svg { color: var(--red-500); }

.hero-trust {
  margin-top: 2.5rem;
  padding-top: 1.9rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 3.2rem);
}
.hero-trust div strong {
  display: block;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  color: var(--white);
  margin-bottom: .3rem;
}
.hero-trust div span {
  font-size: .72rem;
  font-weight: 600;
  color: var(--n-500);
  letter-spacing: .11em;
  text-transform: uppercase;
}

/* Hero quote card.
   Smoked glass rather than a solid panel: the footage reads through it, and it
   belongs to the black/red system in a way the old white card never did. */
.quote-card {
  background: rgba(8, 8, 8, .62);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  color: var(--n-800);
  padding: clamp(1.6rem, 3vw, 2.15rem);
  border: 1px solid rgba(255, 255, 255, .16);
  border-top: 4px solid var(--red-500);
  box-shadow: var(--shadow-lg);
}
/* Browsers without backdrop-filter get a solid dark panel instead of a
   washed-out one that the video would show through illegibly. */
@supports not (backdrop-filter: blur(4px)) {
  .quote-card { background: rgba(8, 8, 8, .92); }
}
.quote-card h2 { font-size: 1.5rem; margin-bottom: .4rem; }
.quote-card h2 { color: var(--white); }
.quote-card .quote-sub {
  font-size: .88rem;
  color: var(--n-600);
  margin-bottom: 1.4rem;
}
/* Narrower than a full section, so pairs need a smaller floor to sit inline. */
.quote-card .form-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr)); }
.quote-card .form-grid { gap: .85rem; }
.quote-card .form-note { color: var(--n-600); }
.quote-card .form-note a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

/* Video clips used as the hero background. Source footage is 640x360, so it is
   upscaled heavily on desktop — the hero tint doubles as cover for the softness. */
.vb-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  /* --vb-dim is set per clip in the markup so bright and dark footage sit at a
     similar tone under the one fixed tint. */
  filter: brightness(var(--vb-dim, 1));
  transition: opacity .8s var(--ease);
  pointer-events: none;
}
.vb-media.is-active { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  /* JS also pauses playback; this stops the first frame fading in. */
  .vb-media { transition: none; }
}

/* Fleet gallery ------------------------------------------------------------
   Slides share a height and keep their natural width, so portrait and
   landscape shots sit together without being cropped to a common box. */
.gallery-section {
  overflow: hidden;
  /* Distance from the viewport edge to the page gutter. Used for both the
     track padding and scroll-padding so the two can never drift apart.
     Note: vw, not %, because percentages in scroll-padding never resolve. */
  --gal-edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}

.gallery-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.gallery-nav { display: flex; gap: .6rem; flex: none; }
.gallery-btn {
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: transparent;
  color: var(--white);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.gallery-btn:hover:not(:disabled) { background: var(--red-500); border-color: var(--red-500); }
.gallery-btn:disabled { opacity: .3; cursor: default; }
.gallery-btn[data-gallery-prev] svg { transform: rotate(180deg); }

.gallery {
  overflow-x: auto;
  overflow-y: hidden;
  /* No scroll snapping: the strip drifts continuously, and snap would fight
     every frame of that (it also cancels programmatic scrolls outright, which
     is what broke the arrow buttons before). No `scroll-behavior: smooth`
     either — inside a scroll container it swallows scrollLeft assignments. */
  scroll-snap-type: none;
  /* Must match the track's leading padding, or snapping scrolls straight past
     it and the first slide sits flush against the viewport edge. */
  scroll-padding-inline: var(--gal-edge);
  /* Scrollbar hidden — the arrows and swipe are the interface. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery:focus-visible { outline: 3px solid var(--red-500); outline-offset: -3px; }

.gallery-track {
  display: flex;
  gap: clamp(.7rem, 1.2vw, 1.1rem);
  /* Align the first slide with the page gutter, then let the rest bleed off. */
  padding-inline: var(--gal-edge);
  margin: 0;
}

.gallery-item {
  flex: 0 0 auto;
  height: clamp(240px, 34vw, 420px);
}

.gallery-open {
  position: relative;
  display: block;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--n-200);
  cursor: zoom-in;
  overflow: hidden;
}
.gallery-open img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
  transition: transform .5s var(--ease), filter .3s var(--ease);
  filter: saturate(.92);
}
.gallery-open:hover img { transform: scale(1.04); filter: saturate(1); }

.gallery-caption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 2.5rem .9rem .8rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--white);
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .85));
  pointer-events: none;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox[hidden] { display: none; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .93);
  cursor: zoom-out;
}
.lightbox-inner {
  position: relative;
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
}
.lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 9rem);
  width: auto;
  height: auto;
  border-top: 3px solid var(--red-500);
}
.lightbox-caption {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--n-600);
  margin: 0;
}

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(0, 0, 0, .55);
  color: var(--white);
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.lightbox-btn:hover { background: var(--red-500); border-color: var(--red-500); }
.lightbox-close { top: -0.5rem; right: -0.5rem; }
.lightbox-prev { left: -1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev svg { transform: rotate(180deg); }

@media (max-width: 760px) {
  .gallery-head { flex-direction: column; align-items: flex-start; gap: 1.25rem; }
  .lightbox-prev { left: .25rem; }
  .lightbox-next { right: .25rem; }
  .lightbox-close { top: .25rem; right: .25rem; }

  /* On a narrow phone the hero is very tall (everything in .hero-in stacks
     into one column below 1000px), but the source footage is a fixed 640x360.
     Left at inset:0 the video was forced to cover that whole tall box, which
     meant scaling it up until only a thin vertical sliver of the frame was
     visible — a blurry, unrecognizable crop.

     This aspect-ratio is the no-JS / before-JS-runs fallback, so there is
     never a flash of the old full-height stretch. main.js then measures the
     real position of the "Drive With Us" / "Ship Freight" buttons and sets
     an explicit inline height reaching just past them — see
     heroVideoMobileHeight() — which overrides this. max-height is a sanity
     cap for that JS value (very large accessibility font sizes, unusually
     short viewports) set high enough that it should not bind on any real
     phone in portrait — if it does, the video simply ends a little short of
     the buttons rather than overflowing past them. */
  .hero-video {
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: 98vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-open:hover img { transform: none; }
}

/* Page hero (interior) */
.page-hero {
  position: relative;
  isolation: isolate;
  background: var(--n-000);
  color: var(--white);
  padding-block: clamp(3rem, 6.5vw, 5.25rem);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(90% 110% at 85% 0%, #262626 0%, transparent 60%),
    linear-gradient(180deg, #131313, #050505);
}
.page-hero h1 { margin-bottom: 1.35rem; }
.page-hero h1 + .rule { margin-top: 0; }
.page-hero .lead { max-width: 62ch; }
.page-hero .btn-group { margin-top: 2.1rem; }

/* 8. Tiles — the flat greyscale block grid ---------------------------------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
}
.tile {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  min-height: 330px;
  padding: clamp(1.75rem, 2.6vw, 2.4rem);
  transition: background .3s var(--ease);
}
.tile h3 { max-width: 19ch; text-wrap: balance; }
.tile p { font-size: .93rem; margin: 0; }
.tile .link-arrow { margin-top: auto; }
.tile .eyebrow { margin-bottom: .2rem; }

/* Stepping ramp, darkest to lightest — reads as one continuous band. */
.tile-1 { background: var(--n-000); color: var(--white); }
.tile-2 { background: var(--n-200); color: var(--white); }
.tile-3 { background: var(--n-400); color: var(--white); }
.tile-4 { background: var(--n-900); color: var(--n-100); }
.tile-red { background: var(--red-500); color: var(--white); }

.tile-1 p, .tile-2 p, .tile-3 p { color: rgba(255, 255, 255, .74); }
.tile-4 p { color: var(--n-400); }
.tile-red p { color: rgba(255, 255, 255, .88); }

.tile-1:hover, .tile-2:hover, .tile-3:hover { background: var(--red-500); }
.tile-4:hover { background: var(--n-800); }
.tile-red:hover { background: var(--red-600); }

.tile-1 .eyebrow, .tile-2 .eyebrow, .tile-3 .eyebrow, .tile-red .eyebrow { color: var(--white); }
.tile-red .eyebrow::before, .tile-1:hover .eyebrow::before,
.tile-2:hover .eyebrow::before, .tile-3:hover .eyebrow::before { background: var(--white); }
.tile-4 .eyebrow { color: var(--red-500); }
.tile-4 .link-arrow { color: var(--n-100); }
.tile-red .link-arrow svg, .tile-1:hover .link-arrow svg,
.tile-2:hover .link-arrow svg, .tile-3:hover .link-arrow svg { color: var(--white); }

/* 8b. Cards ---------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: clamp(1.5rem, 2.4vw, 1.9rem);
  background: var(--white);
  border: 1px solid var(--n-800);
  border-top: 3px solid var(--n-800);
  border-radius: var(--radius-sm);
  transition: border-top-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover { border-top-color: var(--red-500); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card h3 { margin-bottom: 0; }
.card p { color: var(--n-400); font-size: .94rem; margin: 0; }
.card .link-arrow { margin-top: auto; padding-top: .5rem; }

.card-dark {
  background: var(--n-200);
  border-color: var(--n-300);
  border-top-color: var(--n-300);
  color: var(--n-800);
}
.card-dark p { color: var(--n-600); }
.card-dark:hover { border-top-color: var(--red-500); }

.card-icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  background: var(--red-tint);
  color: var(--red-500);
  margin-bottom: .25rem;
}
.card-dark .card-icon { background: rgba(255, 255, 255, .07); color: var(--red-400); }

.card-link::after { content: ""; position: absolute; inset: 0; }

.card-num {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  color: var(--n-800);
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .14);
}
.stat {
  background: var(--n-100);
  padding: clamp(1.6rem, 3vw, 2.3rem) 1.3rem;
  text-align: center;
}
.stat strong {
  display: block;
  font-size: clamp(2rem, 3.6vw, 2.7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.035em;
  color: var(--white);
  margin-bottom: .45rem;
}
.stat span {
  font-size: .73rem;
  font-weight: 600;
  color: var(--n-500);
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Feature list */
.feature-list { display: grid; gap: 1.05rem; }
.feature-list li { display: flex; gap: .85rem; align-items: flex-start; }
.feature-list svg { color: var(--red-500); margin-top: .28rem; }
.feature-list strong { display: block; font-size: .98rem; font-weight: 700; }
.feature-list p { font-size: .92rem; color: var(--n-400); margin: 0; }
.section-dark .feature-list p, .section-deep .feature-list p { color: var(--n-600); }

/* Steps */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
  position: relative;
  padding: 1.5rem 1.5rem 1.5rem 4.4rem;
  background: var(--white);
  border: 1px solid var(--n-800);
  border-left: 3px solid var(--red-500);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 1.4rem; top: 1.4rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--red-500);
}
.section-dark .step, .section-deep .step {
  background: var(--n-200);
  border-color: var(--n-300);
  border-left-color: var(--red-500);
}
.step p { font-size: .93rem; color: var(--n-400); margin: .3rem 0 0; }
.section-dark .step p, .section-deep .step p { color: var(--n-600); }

/* Testimonials */
.quote-block {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: clamp(1.6rem, 3vw, 2rem);
  background: var(--n-200);
  border-top: 3px solid var(--red-500);
}
.quote-block blockquote { font-size: 1rem; line-height: 1.7; color: var(--n-800); }
.quote-block footer { font-size: .82rem; color: var(--n-500); }
.quote-block footer strong {
  display: block;
  color: var(--white);
  font-size: .92rem;
  font-weight: 700;
  margin-bottom: .1rem;
}

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spec-table th, .spec-table td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  vertical-align: top;
}
.spec-table th {
  width: 38%;
  color: var(--n-600);
  font-weight: 600;
  font-size: .74rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.table-scroll { overflow-x: auto; }

/* FAQ */
.faq { display: grid; gap: .6rem; }
.faq details {
  border: 1px solid var(--n-800);
  background: var(--white);
  overflow: hidden;
}
.section-dark .faq details, .section-deep .faq details {
  background: var(--n-200);
  border-color: var(--n-300);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  color: var(--red-500);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { color: var(--red-500); }
.section-dark .faq details[open] summary, .section-deep .faq details[open] summary { color: var(--white); }
.faq .faq-body { padding: 0 1.35rem 1.25rem; }
.faq .faq-body p { font-size: .94rem; color: var(--n-400); }
.section-dark .faq .faq-body p, .section-deep .faq .faq-body p { color: var(--n-600); }

/* Credential strip */
.strip {
  background: var(--n-900);
  color: var(--n-400);
  padding-block: 1.5rem;
  border-bottom: 1px solid var(--n-800);
}
.section-deep + .strip, .page-hero + .strip { border-top: 0; }
.strip-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.1rem, 3.5vw, 2.8rem);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.strip-in span { display: inline-flex; align-items: center; gap: .5rem; }
.strip-in svg { color: var(--red-500); }

/* Breadcrumbs */
.breadcrumbs {
  background: var(--n-000);
  color: var(--n-500);
  font-size: .78rem;
  padding-block: .85rem;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.breadcrumbs a { transition: color .2s; }
.breadcrumbs a:hover { color: var(--white); }
.breadcrumbs .sep { margin-inline: .55rem; opacity: .5; }
.breadcrumbs [aria-current] { color: var(--n-700); }

/* Callout */
.callout {
  display: flex;
  gap: 1.05rem;
  align-items: flex-start;
  padding: 1.35rem 1.5rem;
  background: var(--red-tint);
  border-left: 3px solid var(--red-500);
}
.callout svg { color: var(--red-500); margin-top: .2rem; }
.callout p { font-size: .94rem; margin: 0; }
.section-dark .callout, .section-deep .callout { background: rgba(255, 255, 255, .05); }

/* CTA band */
.cta-band {
  background: var(--red-500);
  color: var(--white);
  padding-block: clamp(2.75rem, 5.5vw, 4rem);
}
.cta-band-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.8rem;
}
.cta-band h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: .5rem; max-width: 24ch; }
.cta-band p { opacity: .9; max-width: 54ch; font-size: .97rem; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.cta-band .btn-primary { background: var(--n-000); color: var(--white); }
.cta-band .btn-primary:hover { background: var(--white); color: var(--n-000); }
.cta-band .btn-ghost { border-color: rgba(255, 255, 255, .7); }
.cta-band .btn-ghost:hover { background: var(--white); color: var(--red-600); }

/* 10. Forms ---------------------------------------------------------------- */
.form-grid { display: grid; gap: 1rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }

.field { display: flex; flex-direction: column; gap: .38rem; }
.field label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--n-500);
}
.field .req { color: var(--red-500); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: .82rem 1rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 0;
  color: var(--white);
  font-size: .95rem;
  transition: border-color .18s, background .18s;
}
.field textarea { resize: vertical; min-height: 118px; }
.field input::placeholder, .field textarea::placeholder { color: var(--n-500); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--red-500);
  background: rgba(255, 255, 255, .09);
}
.field select option { background: var(--n-200); color: var(--white); }

/* Light-surface variant — for forms on light sections. The hero card is dark
   glass, so it deliberately keeps the default dark field styling. */
.form-light .field input,
.form-light .field select,
.form-light .field textarea {
  background: var(--n-900);
  border-color: var(--n-800);
  color: var(--n-100);
}
.form-light .field input:focus, .form-light .field select:focus, .form-light .field textarea:focus {
  background: var(--white);
  border-color: var(--red-500);
}
.form-light .field input::placeholder,
.form-light .field textarea::placeholder { color: var(--n-600); }

.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red-400); }
.field-error { font-size: .78rem; color: var(--red-400); font-weight: 600; }
.form-light .field-error { color: var(--red-600); }

.honeypot {
  position: absolute !important;
  left: -9999px !important;
  opacity: 0;
  height: 0;
  width: 0;
  pointer-events: none;
}

.form-note { font-size: .78rem; color: var(--n-500); }

.checkbox {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-size: .86rem;
  color: var(--n-600);
  line-height: 1.5;
}
.checkbox input { width: 18px; height: 18px; flex: none; margin-top: .15rem; accent-color: var(--red-500); }

.alert {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border-left: 3px solid currentColor;
}
.alert-success { background: rgba(22, 163, 74, .1); color: #15803d; }
.alert-error { background: var(--red-tint); color: var(--red-600); }
.section-dark .alert-success, .section-deep .alert-success { background: rgba(34, 197, 94, .12); color: #4ade80; }
.section-dark .alert-error, .section-deep .alert-error { background: rgba(216, 30, 5, .16); color: #fca5a5; }
.alert svg { flex: none; margin-top: .12rem; }

/* 11. Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--n-000);
  color: var(--n-600);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  font-size: .9rem;
}
.footer-grid {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-bottom: 3rem;
}
.footer-brand { max-width: 360px; }
.footer-brand .brand { color: var(--white); margin-bottom: 1.1rem; }
.footer-blurb { font-size: .9rem; color: var(--n-500); margin-bottom: 1.2rem; }

.footer-creds { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.3rem; }
.footer-creds li {
  padding: .3rem .7rem;
  border: 1px solid rgba(255, 255, 255, .16);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--n-500);
}

.footer-col h3 {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1.2rem;
}
.footer-col ul { display: grid; gap: .58rem; }
.footer-col a { color: var(--n-500); transition: color .2s; }
.footer-col a:hover { color: var(--white); }

.footer-contact li { display: flex; gap: .7rem; align-items: flex-start; }
.footer-contact svg { color: var(--red-500); margin-top: .2rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: .78rem;
  color: var(--n-500);
}
.footer-bottom nav { display: flex; gap: 1.4rem; }
.footer-legal { display: grid; gap: .45rem; }

/* Developer credit: present but deliberately quiet — barely there at rest,
   legible on hover and focus so it is still reachable by keyboard. */
.footer-credit { font-size: .72rem; margin: 0; }
.footer-credit a {
  color: rgba(255, 255, 255, .26);
  letter-spacing: .04em;
  transition: color .25s var(--ease);
}
.footer-credit a:hover,
.footer-credit a:focus-visible { color: var(--n-600); }
.footer-bottom a:hover { color: var(--white); }

/* 12. Motion & responsive -------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .topbar-msg { display: none; }
  .topbar-in { justify-content: center; }
}

@media (max-width: 1000px) {
  .nav-toggle { display: grid; }
  .hide-sm { display: none; }

  /* backdrop-filter makes an element a containing block for position:fixed
     descendants, which collapsed the nav panel against the 78px header instead
     of the viewport. Solid background on mobile so the panel escapes it. */
  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--n-000);
  }

  .main-nav {
    position: fixed;
    /* Full viewport. inset:0 is scroll-position independent — anchoring to the
       header height breaks once the topbar scrolls away. */
    inset: 0;
    z-index: 1;
    background: var(--n-000);
    padding: calc(var(--header-h) + 3.75rem) var(--gutter) 3rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .32s var(--ease), visibility .32s;
  }
  /* The panel is a child of .site-header, so it paints inside the header's own
     stacking context. Lift the brand and toggle above it or they get covered. */
  .brand,
  .header-actions { position: relative; z-index: 2; }

  .nav-open .main-nav { transform: none; visibility: visible; }
  /* Class lives on <body>; leaving <html> alone keeps the sticky header working. */
  .nav-open { overflow: hidden; }

  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a {
    padding: 1rem .25rem;
    font-size: .95rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }
  .main-nav a.is-active { border-bottom-color: var(--red-500); }
  .main-nav .nav-cta { display: block; margin-top: 1.5rem; }
  .main-nav .nav-cta a { border: 0; padding: 0; }
  .main-nav .nav-cta .btn { width: 100%; padding: 1.05rem; font-size: .82rem; }
}

@media (max-width: 620px) {
  .topbar-links { font-size: .74rem; gap: .85rem; }
  .btn { width: 100%; }
  .btn-group .btn, .cta-band-actions .btn { width: auto; flex: 1 1 190px; }
  .hero-trust { gap: 1.4rem 2rem; }
  .tile { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .topbar, .site-header, .cta-band, .site-footer, .btn { display: none !important; }
  body { color: #000; background: #fff; }
}
