/* style.css — Run Direct design tokens + components */

:root,
[data-theme='light'] {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.9rem, 0.85rem + 0.25vw, 1rem);
  --text-base: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --text-lg: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
  --text-xl: clamp(1.6rem, 1.3rem + 1.2vw, 2.25rem);
  --text-2xl: clamp(2.1rem, 1.4rem + 2.6vw, 3.75rem);
  --text-3xl: clamp(2.6rem, 1.2rem + 4.2vw, 5.5rem);
  --text-hero: clamp(3rem, 0.8rem + 6.8vw, 7rem);

  /* Spacing (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Brand colors — Run Direct */
  --rd-blue: #325fa9;
  --rd-blue-hover: #274a87;
  --rd-blue-active: #1e3a6b;
  --rd-blue-highlight: #dce6f4;
  --rd-black: #0a0c10;
  --rd-white: #ffffff;

  /* Surfaces */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-2: #f6f7f9;
  --color-surface-offset: #eef0f3;
  --color-surface-dynamic: #e3e6ea;
  --color-divider: #dde1e6;
  --color-border: #cfd4da;

  /* Text */
  --color-text: #0a0c10;
  --color-text-muted: #565d68;
  --color-text-faint: #8b929c;
  --color-text-inverse: #ffffff;

  /* Primary accent */
  --color-primary: var(--rd-blue);
  --color-primary-hover: var(--rd-blue-hover);
  --color-primary-active: var(--rd-blue-active);
  --color-primary-highlight: var(--rd-blue-highlight);

  /* Dark section surfaces (used within both modes as an intentional contrast band) */
  --color-ink: #0a0c10;
  --color-ink-2: #12151b;
  --color-ink-border: #262b34;
  --color-ink-text: #f4f5f7;
  --color-ink-text-muted: #a7adb6;

  --color-success: #1f7a4d;
  --color-warning: #b4720a;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  --transition-interactive: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --shadow-sm: 0 1px 2px rgb(10 12 16 / 0.06);
  --shadow-md: 0 8px 24px rgb(10 12 16 / 0.10);
  --shadow-lg: 0 20px 48px rgb(10 12 16 / 0.16);

  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;
  --content-max: 1360px;
  --content-full: 100%;

  --font-display: 'Archivo', 'Arial Narrow', sans-serif;
  --font-body: 'Inter', -apple-system, 'Helvetica Neue', sans-serif;
}

[data-theme='dark'] {
  --color-bg: #0a0c10;
  --color-surface: #12151b;
  --color-surface-2: #171b22;
  --color-surface-offset: #1b1f27;
  --color-surface-dynamic: #232830;
  --color-divider: #262b34;
  --color-border: #313742;
  --color-text: #f4f5f7;
  --color-text-muted: #a7adb6;
  --color-text-faint: #6b7280;
  --color-text-inverse: #0a0c10;
  --color-primary: #5b86c9;
  --color-primary-hover: #7ba0d9;
  --color-primary-active: #4a70ab;
  --color-primary-highlight: #1c2c45;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 0.5);
  --shadow-lg: 0 20px 48px rgb(0 0 0 / 0.6);
}

/* ---------- Base ---------- */

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-bg);
}

.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(var(--space-5), 5vw, var(--space-16));
}

.container--narrow {
  max-width: var(--content-default);
}

section {
  padding-block: clamp(var(--space-16), 8vw, var(--space-32));
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h1 {
  font-size: var(--text-3xl);
  line-height: 1.02;
}
h2 {
  font-size: var(--text-2xl);
  line-height: 1.05;
}
h3 {
  font-size: var(--text-xl);
  line-height: 1.1;
}
h4 {
  font-size: var(--text-lg);
  line-height: 1.2;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}

/* ---------- Section tone variants ---------- */

.section--dark {
  background: var(--color-ink);
  color: var(--color-ink-text);
}
.section--dark p {
  color: var(--color-ink-text-muted);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-ink-text);
}
.section--dark .eyebrow {
  color: #7ba0d9;
}
.section--dark .eyebrow::before {
  background: #7ba0d9;
}

.section--gray {
  background: var(--color-surface-2);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  min-height: 52px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--rd-blue);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
  background: var(--rd-blue-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn-primary:active {
  background: var(--rd-blue-active);
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
.btn-outline:hover {
  background: color-mix(in oklab, currentColor 8%, transparent);
}

.btn-white {
  background: #fff;
  color: var(--rd-black);
}
.btn-white:hover {
  background: #e7e9ec;
}

.btn-lg {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-base);
  min-height: 60px;
}

.btn-block {
  width: 100%;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-divider);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  padding-block: var(--space-3);
}

.site-header__logo img {
  height: clamp(28px, 4vw, 36px);
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.site-nav__links {
  display: flex;
  gap: var(--space-6);
  list-style: none;
}

.site-nav__links a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
}
.site-nav__links a:hover {
  color: var(--color-primary);
}

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

.nav-phone {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  display: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--space-2);
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
  display: block;
}

@media (max-width: 860px) {
  .site-nav__links {
    display: none;
  }
  .site-nav__links.is-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-2) clamp(var(--space-4), 5vw, var(--space-8)) var(--space-4);
  }
  .site-nav__links.is-open a {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-divider);
  }
  .nav-toggle {
    display: flex;
  }
  .nav-phone {
    display: none;
  }
  .site-header .container {
    position: relative;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--color-ink);
  color: var(--color-ink-text-muted);
  padding-block: var(--space-20) var(--space-10);
}

.site-footer a {
  color: var(--color-ink-text-muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-12);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--color-ink-border);
  margin-bottom: var(--space-8);
}

.footer-grid h5 {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-4);
}

.footer-grid ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--text-xs);
}

.footer-logo img {
  height: 30px;
  margin-bottom: var(--space-4);
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  background: var(--color-ink);
  color: #fff;
  overflow: hidden;
  min-height: clamp(560px, 88vh, 760px);
  display: flex;
  align-items: flex-end;
  padding-block: var(--space-8) clamp(var(--space-8), 5vw, var(--space-12));
}
.hero > .container {
  width: 100%;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero__bg img[src*="flatbed-hero-truck"] {
  object-position: 22% 45%;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 12, 16, 0.1) 0%,
    rgba(10, 12, 16, 0.05) 45%,
    rgba(10, 12, 16, 0.55) 82%,
    rgba(10, 12, 16, 0.75) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
}
.hero__content--card {
  background: rgba(8, 10, 14, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 20px;
  padding: clamp(1.25rem, 3.5vw, 2rem);
  display: inline-block;
  max-width: min(92vw, 520px);
}

.hero__kicker {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #9fbce5;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.85), 0 1px 2px rgba(0, 0, 0, 0.9);
}

.hero h1 {
  font-size: var(--text-hero);
  color: #fff;
  margin-bottom: var(--space-3);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.9);
}

.hero__sub {
  font-size: var(--text-lg);
  font-weight: 700;
  color: #fff;
  text-transform: none;
  font-family: var(--font-body);
  margin-bottom: var(--space-6);
  max-width: 620px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.9);
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.hero__facts li {
  list-style: none;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

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

.hero__note {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: #cfd8e8;
}

/* ---------- Stat callouts ---------- */

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
}

.stat {
  border-top: 3px solid var(--color-primary);
  padding-top: var(--space-4);
}

.stat__num {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
}
.section--dark .stat__num {
  color: #fff;
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
}
.section--dark .stat__label {
  color: var(--color-ink-text-muted);
}

/* ---------- Section header ---------- */

.section-head {
  max-width: 760px;
  margin-bottom: var(--space-12);
}

.section-head--center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  margin-top: var(--space-3);
}

.section-head p {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
}

/* ---------- Two-col layout ---------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--space-8), 6vw, var(--space-20));
  align-items: center;
}

.split--reverse {
  direction: rtl;
}
.split--reverse > * {
  direction: ltr;
}

.split img,
.split .media {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
  .split--reverse {
    direction: ltr;
  }
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-6);
}

.pay-tier-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compare-grid,
.dual-video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .pay-tier-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .compare-grid,
  .dual-video-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .cta-band .btn-lg {
    padding-inline: var(--space-5);
    font-size: var(--text-sm);
  }
  .card-grid[style*="repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 760px) {
  .hero {
    display: block;
    min-height: auto;
    padding: 0;
  }
  .hero__bg {
    position: relative;
    inset: auto;
    height: 46vh;
    min-height: 260px;
  }
  .hero__bg img[src*="flatbed-hero-truck"] {
    object-position: 15% 42%;
  }
  .hero__bg::after {
    background: linear-gradient(
      180deg,
      rgba(10, 12, 16, 0) 55%,
      rgba(10, 12, 16, 0.5) 88%,
      rgba(10, 12, 16, 0.75) 100%
    );
  }
  .hero > .container {
    padding: var(--space-6) var(--space-4) var(--space-8);
  }
  .hero__content--card {
    max-width: 100%;
    width: 100%;
    background: rgba(8, 10, 14, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: 0;
    padding: var(--space-6) 0 0;
    display: block;
    margin-top: calc(-1 * var(--space-6));
    position: relative;
    z-index: 2;
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.card--dark {
  background: var(--color-ink-2);
  border-color: var(--color-ink-border);
}

.card h4 {
  margin-bottom: var(--space-2);
}

.card p {
  font-size: var(--text-sm);
}

/* ---------- Media frame ---------- */

.media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media--tall {
  aspect-ratio: 3/4;
}
.media--wide {
  aspect-ratio: 16/9;
}
.media figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
  color: #fff;
  font-size: var(--text-xs);
  max-width: none;
}

/* ---------- Driver story video card ---------- */

.video-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 9/16;
  max-width: 340px;
  margin-inline: auto;
  background: #000;
}
.video-card img,
.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 16, 0.28);
  border: none;
  cursor: pointer;
}
.video-card__play-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}
.video-card__play-icon svg {
  width: 26px;
  height: 26px;
  color: var(--rd-black);
}
.video-card.is-playing .video-card__play {
  display: none;
}

/* ---------- FAQ ---------- */

.faq {
  max-width: 780px;
  margin-inline: auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-divider);
}
.section--dark .faq-item {
  border-color: var(--color-ink-border);
}

.faq-item__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding-block: var(--space-6);
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-base);
  color: inherit;
}

.faq-item__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
}
.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  background: var(--color-primary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.faq-item__icon::before {
  width: 14px;
  height: 2px;
}
.faq-item__icon::after {
  width: 2px;
  height: 14px;
  transition: transform var(--transition-interactive);
}
.faq-item.is-open .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg) scaleY(0);
}

.faq-item__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 260ms cubic-bezier(0.16, 1, 0.3, 1);
}
.faq-item__a p {
  padding-bottom: var(--space-6);
  font-size: var(--text-base);
}
.section--dark .faq-item__a p {
  color: var(--color-ink-text-muted);
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--rd-blue);
  color: #fff;
  text-align: center;
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-12), 6vw, var(--space-20));
}
.cta-band h2,
.cta-band p {
  color: #fff;
}
.cta-band .btn-white:hover {
  background: #edf1f8;
}

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

.mt-8 {
  margin-top: var(--space-8);
}
.mt-12 {
  margin-top: var(--space-12);
}
.text-center {
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: var(--space-2);
  background: var(--rd-blue);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus {
  left: var(--space-2);
}
