/* =========================================================
   A1 CDL School — styles
   ========================================================= */

:root {
  --red: #e31b23;
  --red-600: #c8141c;
  --red-700: #a50f16;
  --ink: #111318;
  --ink-2: #181b21;
  --ink-3: #22262e;
  --line-dark: #2c313a;
  --text: #4a5160;
  --heading: #111318;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --line: #e5e7eb;
  --white: #ffffff;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 2px 8px rgba(17, 19, 24, .06);
  --shadow: 0 12px 32px rgba(17, 19, 24, .10);
  --shadow-lg: 0 24px 60px rgba(17, 19, 24, .18);
  --container: 1240px;
  --header-h: 92px;
  --topbar-h: 40px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar-h) + var(--header-h) - 8px);
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

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

h1,
h2,
h3,
h4 {
  color: var(--heading);
  margin: 0;
  line-height: 1.1;
  letter-spacing: -.02em;
}

p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--red);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
}

.skip-link:focus {
  top: 16px;
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font: 600 16px/1.2 inherit;
  font-family: inherit;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn .chev {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s var(--ease);
}

.btn:hover .chev {
  transform: translateX(3px);
}

.btn-lg {
  padding: 16px 30px;
  font-size: 17px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 8px 20px rgba(227, 27, 35, .28);
}

.btn-primary:hover {
  background: var(--red-600);
  box-shadow: 0 12px 26px rgba(227, 27, 35, .36);
}

.btn-outline {
  border-color: rgba(255, 255, 255, .9);
  color: #fff;
  background: rgba(255, 255, 255, .02);
}

.btn-outline:hover {
  background: #fff;
  color: var(--ink);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: var(--ink-3);
}

.btn-outline-dark {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline-dark:hover {
  background: var(--ink);
  color: #fff;
}

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 101;
  height: var(--topbar-h);
  background: #0a0b0e;
  color: #c5c9d2;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 100%;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar-contact a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  transition: color .2s;
}

.topbar-contact a:hover {
  color: #fff;
}

.topbar-contact svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--red);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Social icons (top bar + footer) */
.social {
  display: flex;
  align-items: center;
  gap: 6px;
}

.social a {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #c5c9d2;
  transition: color .2s, background-color .2s;
}

.social a:hover {
  color: #fff;
  background: var(--red);
}

.social svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.social svg .fill {
  fill: currentColor;
  stroke: none;
}

.site-footer .social-footer {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.social-footer a {
  width: 38px;
  height: 38px;
  background: var(--ink-3);
}

.social-footer svg {
  width: 18px;
  height: 18px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: var(--topbar-h);
  z-index: 100;
  background: rgba(17, 19, 24, 1);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: box-shadow .3s, height .3s;
}

.site-header.scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: var(--header-h);
}

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

.brand img {
  display: block;
  height: 72px;
  width: auto;
}

.main-nav {
  margin-left: auto;
}

.main-nav ul {
  display: flex;
  gap: 34px;
}

.main-nav a:not(.btn) {
  position: relative;
  display: inline-block;
  padding: 8px 0;
  color: #e7e9ee;
  font-size: 16px;
  font-weight: 500;
  transition: color .2s;
}

.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: var(--red);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform .25s var(--ease);
}

.main-nav a:not(.btn):hover {
  color: #fff;
}

.main-nav a:not(.btn):hover::after,
.main-nav a.active::after {
  transform: scaleX(1);
}

.main-nav a.active {
  color: #fff;
  font-weight: 600;
}

/* CDL Training dropdown */
.has-sub {
  position: relative;
}

.main-nav .caret {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  vertical-align: -1px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s var(--ease);
}

.has-sub:hover .caret,
.has-sub:focus-within .caret {
  transform: rotate(180deg);
}

.main-nav .sub-nav {
  position: absolute;
  top: 100%;
  left: -16px;
  z-index: 10;
  display: grid;
  gap: 2px;
  min-width: 260px;
  margin-top: 14px;
  padding: 8px;
  background: var(--ink-2);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .2s, transform .2s var(--ease), visibility .2s;
}

/* keeps the menu open while the pointer crosses the gap */
.main-nav .sub-nav::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 16px;
}

.has-sub:hover .sub-nav,
.has-sub:focus-within .sub-nav {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.main-nav .sub-nav a:not(.btn) {
  display: block;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 15px;
  white-space: nowrap;
}

.main-nav .sub-nav a:not(.btn)::after {
  display: none;
}

.main-nav .sub-nav a:not(.btn):hover,
.main-nav .sub-nav a[aria-current="page"] {
  background: var(--ink-3);
  color: #fff;
}

.nav-cta {
  display: none;
}

.header-cta {
  margin-left: 16px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  padding: 12px 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  min-height: clamp(520px, 72vh, 680px);
  display: flex;
  align-items: center;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0 0 0 auto;
  width: 64%;
  z-index: -1;
  background: url("../assets/truck-photo-3.jpg") center 60% / cover no-repeat;
  animation: heroFade 1.2s ease-out both;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(17, 19, 24, .85) 18%, rgba(17, 19, 24, .25) 50%, rgba(17, 19, 24, 0) 75%),
    linear-gradient(0deg, rgba(17, 19, 24, .55) 0%, rgba(17, 19, 24, 0) 30%);
}

@keyframes heroFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.hero-content {
  padding-top: 80px;
  padding-bottom: 88px;
}

.eyebrow {
  color: #e7e9ee;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .32em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero h1 {
  color: #fff;
  font-size: clamp(36px, 6.4vw, 84px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.02;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}

.hero-sub {
  color: #d6d9e0;
  font-size: clamp(18px, 1.6vw, 21px);
  margin-top: 24px;
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 36px;
}

.hero-content>* {
  animation: fadeUp .8s var(--ease) both;
}

.hero-content> :nth-child(2) {
  animation-delay: .1s;
}

.hero-content> :nth-child(3) {
  animation-delay: .2s;
}

.hero-content> :nth-child(4) {
  animation-delay: .3s;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Feature strip ---------- */
.features {
  background: var(--ink-2);
  border-top: 1px solid var(--line-dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 26px 16px;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  position: relative;
}

.feature+.feature::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  height: 40px;
  width: 1px;
  background: rgba(255, 255, 255, .22);
  transform: translateY(-50%);
}

.feature svg {
  width: 44px;
  height: 44px;
  flex: none;
  fill: none;
  stroke: var(--red);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Sections ---------- */
.section {
  padding: clamp(72px, 9vw, 112px) 0;
}

.rule {
  display: block;
  width: 62px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
  margin-bottom: 22px;
}

.section h2 {
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 900;
  letter-spacing: -.03em;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 56px;
  text-align: center;
}

.section-head .rule {
  margin-left: auto;
  margin-right: auto;
}

.section-head p {
  margin-top: 18px;
  font-size: 18px;
}

.section-head.left {
  text-align: left;
  margin: 0;
}

.section-head.left .rule {
  margin-left: 0;
}

.section-head.left .btn {
  margin-top: 30px;
}

/* About */
.split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
}

.about .split {
  grid-template-columns: 1.1fr 1fr;
}

.about h2,
.contact-info h2 {
  white-space: nowrap;
  font-size: clamp(26px, 2.9vw, 42px);
}

.about .lead {
  margin-bottom: 34px;
}

.lead {
  font-size: 19px;
  margin-top: 24px;
  line-height: 1.7;
}

.checklist {
  margin: 28px 0 34px;
  display: grid;
  gap: 14px;
}

.checklist li {
  position: relative;
  padding-left: 36px;
  color: #2b303a;
  font-weight: 500;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.checklist.small {
  gap: 10px;
  margin: 24px 0 30px;
}

.checklist.small li {
  font-size: 15.5px;
  padding-left: 32px;
}

.checklist.small li::before {
  width: 20px;
  height: 20px;
  top: 2px;
  background-size: 12px;
}

.split-media {
  position: relative;
}

.split-media img {
  width: 100%;
  aspect-ratio: 16 / 9.5;
  object-fit: cover;
  object-position: 40% center;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}


/* Training steps */
.training {
  background: var(--bg-soft);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: s;
}

.step {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s;
}

.step::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 4px;
  width: 100%;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .35s var(--ease);
}

.step:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.step:hover::after {
  transform: scaleX(1);
}

.step-num {
  display: block;
  font-size: 44px;
  font-weight: 900;
  color: var(--red);
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 18px;
}

.step h3 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.step p {
  font-size: 15.5px;
}

/* Programs */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  align-items: stretch;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.card .btn {
  margin-top: auto;
}

.card-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--red);
  background: rgba(227, 27, 35, .08);
  padding: 6px 12px;
  border-radius: 99px;
  margin-bottom: 20px;
}

.card h3 {
  font-size: 26px;
  font-weight: 900;
}

.card h3 span {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--red);
  margin-top: 4px;
  letter-spacing: -.01em;
}

.card-desc {
  margin-top: 14px;
  font-size: 16px;
}

.card-featured {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: var(--shadow-lg);
  transform: translateY(-12px);
}

.card-featured:hover {
  transform: translateY(-18px);
}

.card-featured h3 {
  color: #fff;
}

.card-featured .card-desc {
  color: #c5c9d2;
}

.card-featured .card-tag {
  background: var(--red);
  color: #fff;
}

.card-featured .checklist li {
  color: #e7e9ee;
}

.cards-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 980px;
  margin: 0 auto;
}

.cards-2 .card-featured,
.js .cards-2 .card-featured.reveal.visible {
  transform: none;
}

.cards-2 .card-featured:hover,
.js .cards-2 .card-featured.reveal.visible:hover {
  transform: translateY(-6px);
}

.sub-head {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  margin: 72px 0 32px;
}

.section-head+.sub-head {
  margin-top: 0;
}

.endorse {
  padding: 30px 28px;
}

.endorse-code {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  border-bottom: 3px solid var(--red);
  margin-bottom: 20px;
}

.endorse h4 {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.endorse p {
  font-size: 15.5px;
  margin-bottom: 22px;
}

.text-link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 700;
  font-size: 15px;
}

.text-link .chev {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s var(--ease);
}

.text-link:hover .chev {
  transform: translateX(3px);
}

.programs-note {
  text-align: center;
  margin-top: 44px;
  color: var(--muted);
  font-size: 16px;
}

/* CTA band */
.cta-band {
  position: relative;
  overflow: hidden;
  padding: 84px 0;
  background: var(--ink);
  isolation: isolate;
}

.cta-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(17, 19, 24, .95) 0%, rgba(17, 19, 24, .78) 55%, rgba(165, 15, 22, .7) 100%),
    url("../assets/truck-photo-3.jpg") center 70% / cover no-repeat;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
}

.cta-band p {
  color: #d6d9e0;
  margin-top: 12px;
  font-size: 18px;
  max-width: 52ch;
}

.cta-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Contact */
.contact {
  background: var(--bg-soft);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.contact-info>p {
  margin-top: 20px;
  font-size: 18px;
}

.contact-list {
  margin-top: 36px;
  display: grid;
  gap: 22px;
}

.contact-list li {
  display: flex;
  gap: 16px;
  align-items: center;
}

.contact-list svg {
  width: 50px;
  height: 50px;
  padding: 13px;
  flex: none;
  border-radius: 12px;
  background: var(--ink);
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-list small {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 600;
}

.contact-list a,
.contact-list span {
  color: var(--heading);
  font-weight: 600;
}

.contact-list a:hover {
  color: var(--red);
}

.contact-form {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 36px);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.contact-form h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  align-content: start;
  gap: 6px;
  margin-bottom: 14px;
}

.error:empty {
  display: none;
}

.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--heading);
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--heading);
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}

.field textarea {
  resize: vertical;
  min-height: 84px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(227, 27, 35, .12);
}

.field.invalid input {
  border-color: var(--red);
}

.error {
  color: var(--red-600);
  font-size: 13px;
  min-height: 0;
}

.form-success {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #ecfdf3;
  color: #146c43;
  border: 1px solid #b7ebcd;
  font-weight: 600;
  font-size: 15px;
}

.card-wide {
  grid-column: 1 / -1;
}

.card-wide .btn {
  align-self: flex-start;
}

.schedule-grid .cost-list small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
}

/* Same two columns as .form-row, so the button lines up with the right column */
.schedule-submit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: center;
  margin-top: 6px;
}

.schedule-total {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.schedule-total strong {
  display: block;
  color: var(--red);
  font-size: 24px;
  font-weight: 900;
}

.schedule-submit .btn {
  width: 100%;
  padding-inline: 18px;
  white-space: nowrap;
}

/* One-column form on phones: keep the total beside the button, which needs more room */
@media (max-width: 640px) {
  .schedule-submit {
    grid-template-columns: auto 1fr;
  }
}

/* Very narrow phones: no room for the total and button side by side */
@media (max-width: 380px) {
  .schedule-submit {
    grid-template-columns: 1fr;
  }
}

.schedule-grid .field textarea {
  height: 50px;
  min-height: 50px;
}

.schedule-grid .contact-info h3 {
  font-size: 24px;
  font-weight: 800;
}

/* Date boxes and dropdowns render at different heights by default */
.schedule-grid .field input,
.schedule-grid .field select {
  height: 50px;
}

/* ---------- Eligibility box ---------- */
.eligibility {
  max-width: 780px;
  margin: 48px auto 0;
  padding: 22px 26px;
  background: var(--bg-soft);
  border-left: 4px solid var(--red);
  border-radius: 8px;
}

.eligibility h3 {
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 800;
}

.eligibility ol {
  margin: 0;
  padding-left: 22px;
  list-style: decimal;
  font-size: 16px;
}

.eligibility li + li {
  margin-top: 4px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #aab0bc;
  padding-top: 72px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}

.footer-brand img {
  height: 84px;
  width: auto;
  margin-bottom: 18px;
}

.footer-brand p {
  max-width: 34ch;
  font-size: 15px;
}

.site-footer h4 {
  color: #fff;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 18px;
}

.site-footer ul {
  display: grid;
  gap: 10px;
  font-size: 15px;
}

.site-footer a {
  transition: color .2s;
}

.site-footer a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-dark);
  padding-top: 22px;
  padding-bottom: 22px;
  font-size: 14px;
}

.site-footer .footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 14px;
}

/* ---------- Legal pages ---------- */
.page-hero {
  background: var(--ink);
  padding: clamp(56px, 7vw, 88px) 0;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(34px, 4.6vw, 56px);
  font-weight: 900;
  letter-spacing: -.03em;
}

.page-hero p {
  color: #aab0bc;
  margin-top: 16px;
  font-size: 16px;
}

.legal {
  padding: clamp(56px, 7vw, 88px) 0;
}

.legal-body {
  max-width: 780px;
}

.legal-body h2 {
  font-size: 24px;
  font-weight: 800;
  margin: 44px 0 14px;
}

.legal-body h2:first-child {
  margin-top: 0;
}

.legal-body p + p {
  margin-top: 14px;
}

.legal-body ul {
  list-style: disc;
  padding-left: 22px;
  margin: 14px 0;
  display: grid;
  gap: 8px;
}

.legal-body a {
  color: var(--red);
  font-weight: 600;
}

.legal-body a:hover {
  text-decoration: underline;
}

.legal-contact {
  margin-top: 14px;
  padding: 22px 24px;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-style: normal;
}

/* ---------- Program pages ---------- */
.bg-soft {
  background: var(--bg-soft);
}

.page-hero p {
  max-width: 60ch;
}

.page-hero .btn {
  margin-top: 30px;
}

/* Photo variant: truck photo sized to the hero height and pinned right, blending into the dark background */
.page-hero-photo {
  --hero-photo: url("../assets/pricing-hero.jpg");
  position: relative;
  overflow: hidden;
  /* Same height on every page (with or without a button) so the photo fits consistently */
  display: flex;
  align-items: center;
  min-height: clamp(340px, 30vw, 420px);
}

.page-hero-photo.hero-company {
  --hero-photo: url("../assets/company-contract-hero.jpg");
}

.page-hero-photo.hero-contact {
  --hero-photo: url("../assets/contact-hero.jpg");
}

.page-hero-photo.hero-about {
  --hero-photo: url("../assets/about-hero.jpg");
}

.page-hero-photo.hero-testing {
  --hero-photo: url("../assets/cdl-testing-hero.jpg");
}

.page-hero-photo.hero-training {
  --hero-photo: url("../assets/cdl-training-hero.jpg");
}

.page-hero-photo::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  /* Start left of center so the truck sits beside the text, then run to the screen edge */
  left: calc(50% - 400px);
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(17, 19, 24, .6) 22%, rgba(17, 19, 24, 0) 45%),
    linear-gradient(0deg, rgba(17, 19, 24, .35) 0%, rgba(17, 19, 24, 0) 30%),
    var(--hero-photo) left center / cover no-repeat;
}

.page-hero-photo .container {
  position: relative;
}

.page-hero-photo p {
  color: #c9ced8;
}

.card-price {
  margin-top: 18px;
  color: var(--heading);
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.card-price small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.card-featured .card-price {
  color: #fff;
}

.card-featured .card-price small {
  color: #aab0bc;
}

.cost-list {
  margin: 24px 0 8px;
}

.cost-list div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}

.cost-list dd {
  margin: 0;
  color: var(--heading);
  font-weight: 700;
}

.cost-list .cost-total {
  border-bottom: 0;
  color: var(--heading);
  font-size: 18px;
  font-weight: 800;
}

.cost-list .cost-total dd {
  color: var(--red);
  font-weight: 900;
}

.section-intro .section-head {
  margin-bottom: 0;
}

.card .cost-list {
  margin: 0 0 30px;
}

.card-featured .cost-list div {
  border-color: var(--line-dark);
  color: #c5c9d2;
}

.card-featured .cost-list dd {
  color: #fff;
}

.card .text-link {
  margin-top: auto;
  padding-top: 20px;
}

.table-wrap {
  max-width: 980px;
  margin: 0 auto;
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.price-table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 16px;
}

.price-table th,
.price-table td {
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.price-table thead th {
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.price-table tbody th {
  color: var(--heading);
  font-weight: 800;
}

.price-table td:nth-child(n+3) {
  color: var(--heading);
  font-weight: 700;
}

.price-table tbody tr:last-child > * {
  border-bottom: 0;
}

.programs-note a:not(.btn) {
  color: var(--red);
  font-weight: 600;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
}

.programs-note + .section-actions {
  margin-top: 24px;
}

.steps-5 {
  grid-template-columns: repeat(5, 1fr);
}

.faq {
  max-width: 820px;
  margin: 0 auto;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 0;
  color: var(--heading);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

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

.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--red);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  transition: transform .2s var(--ease);
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq summary:hover {
  color: var(--red);
}

.faq details p {
  padding: 0 52px 22px 0;
  font-size: 16px;
}

.area-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.area-list li {
  padding: 10px 22px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--bg-soft);
  color: var(--heading);
  font-size: 16px;
  font-weight: 700;
}

.not-found {
  min-height: 50vh;
}

.not-found-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.not-found-actions .btn {
  margin-top: 30px;
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: clamp(320px, 40vw, 460px);
  border: 0;
}

/* ---------- Compare (Venn) ---------- */
.compare {
  padding-top: 0;
}

.compare .section-head {
  max-width: 860px;
}

.venn {
  position: relative;
  max-width: 1000px;
  aspect-ratio: 1000 / 600;
  margin: 84px auto 0;
  color: #d6d9e0;
  font-size: 15px;
  line-height: 1.5;
}

.venn-shapes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 24px 40px rgba(17, 19, 24, .22));
}

.venn-shapes-v {
  display: none;
}

.venn-part {
  position: absolute;
}

.venn-part h3 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.venn-part h4 {
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 18px 0 6px;
}

.venn-part h4:first-of-type {
  margin-top: 0;
}

.venn-part li {
  position: relative;
  padding-left: 16px;
}

.venn-part li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .65em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.venn-part h5 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin: 8px 0 2px;
}

.venn-part h4+h5 {
  margin-top: 0;
}

.venn-part strong {
  color: #fff;
  font-weight: 800;
}

.venn-note {
  font-size: 13px;
  font-style: italic;
  color: #9aa1ad;
}

/* Circle titles, outside the circles (the h3s inside stay for screen readers) */
.venn-labels span {
  position: absolute;
  bottom: calc(100% + 20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
  color: var(--heading);
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.venn-labels span::after {
  content: "";
  width: 48px;
  height: 4px;
  margin-top: 12px;
  border-radius: 2px;
  background: var(--red);
}

.venn-labels span:first-child {
  left: 33%;
}

.venn-labels span:last-child {
  left: 67%;
}

.venn-left {
  left: 13%;
  top: 26%;
  width: 25%;
}

.venn-right {
  left: 62%;
  top: 26%;
  width: 26%;
}

.venn-center {
  left: 40.5%;
  top: 31%;
  width: 19%;
  text-align: center;
  color: #fff;
}

.venn-center h3 {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.15;
  margin-bottom: 16px;
}

.venn-center ul {
  display: grid;
  gap: 6px;
}

.venn-center li {
  padding-left: 0;
}

.venn-center li::before {
  display: none;
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

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

.js .card-featured.reveal.visible {
  transform: translateY(-12px);
}

.js .card-featured.reveal.visible:hover {
  transform: translateY(-18px);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .header-inner {
    gap: 20px;
  }

  .main-nav ul {
    gap: 18px;
  }

  .main-nav a:not(.btn) {
    font-size: 15px;
    white-space: nowrap;
  }

  .header-cta {
    margin-left: 4px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 1024px) {

  .page-hero-photo::before {
    left: 0;
    background:
      linear-gradient(180deg, rgba(17, 19, 24, .55) 0%, rgba(17, 19, 24, .85) 100%),
      var(--hero-photo) 70% center / cover no-repeat;
  }
  /* vertical Venn: fixed circles, text scales with the diagram's width */
  .venn {
    container-type: inline-size;
    aspect-ratio: 600 / 960;
    max-width: 520px;
    margin: 18cqw auto;
    text-align: center;
  }

  .venn-shapes {
    display: none;
  }

  .venn-shapes-v {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter: drop-shadow(0 20px 32px rgba(17, 19, 24, .22));
  }

  .venn-labels span {
    bottom: calc(100% + 4cqw);
    font-size: 6.4cqw;
  }

  .venn-labels span:first-child,
  .venn-labels span:last-child {
    left: 50%;
  }

  .venn-labels span::after {
    width: 9cqw;
    height: .8cqw;
    margin-top: 2cqw;
  }

  .venn-labels span:last-child {
    top: calc(100% + 4cqw);
    bottom: auto;
    flex-direction: column-reverse;
  }

  .venn-labels span:last-child::after {
    margin: 0 0 2cqw;
  }

  .venn-part {
    font-size: 3.1cqw;
    line-height: 1.4;
  }

  .venn-part h4 {
    font-size: 3.3cqw;
    margin: 1.6cqw 0 .4cqw;
  }

  .venn-part h5 {
    font-size: 3cqw;
    margin: .6cqw 0 0;
  }

  .venn-note {
    font-size: 2.7cqw;
  }

  .venn-part ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 2.6cqw;
  }

  .venn-part li {
    padding-left: 0;
  }

  .venn-part li::before {
    position: static;
    display: inline-block;
    vertical-align: middle;
    width: 1cqw;
    height: 1cqw;
    margin: -.4cqw 1.2cqw 0 0;
  }

  .venn-left {
    left: 14%;
    top: 12%;
    width: 72%;
  }

  .venn-center {
    left: 16%;
    top: 40.6%;
    width: 68%;
    height: 20.8%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .venn-center h3 {
    font-size: 3.3cqw;
    margin-bottom: 1.4cqw;
  }

  .venn-center ul {
    gap: 0 2.4cqw;
  }

  .venn-center li {
    font-size: 3cqw;
  }

  .venn-center li::before {
    display: inline-block;
    background: #fff;
  }

  .venn-right {
    left: 19%;
    top: 62.3%;
    width: 62%;
  }

  :root {
    --header-h: 76px;
  }

  .brand img {
    height: 56px;
  }

  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--ink);
    border-top: 1px solid var(--line-dark);
    padding: 12px 24px 28px;
    max-height: calc(100vh - var(--topbar-h) - var(--header-h));
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .3s var(--ease), opacity .25s, visibility .3s;
    box-shadow: 0 24px 40px rgba(0, 0, 0, .4);
  }

  .main-nav.open {
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav li {
    border-bottom: 1px solid var(--line-dark);
  }

  .main-nav a:not(.btn) {
    display: block;
    padding: 16px 0;
    font-size: 17px;
  }

  .main-nav a:not(.btn)::after {
    bottom: 10px;
    right: auto;
    width: 28px;
  }

  .main-nav .caret {
    display: none;
  }

  .main-nav .sub-nav {
    position: static;
    min-width: 0;
    margin: -6px 0 10px;
    padding: 0 0 0 16px;
    background: none;
    border: 0;
    border-left: 2px solid var(--line-dark);
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    transform: none;
  }

  /* Follow the menu's visibility (not "visible"), so the closed menu's links can't catch
     taps on the page. Also overrides the desktop hover/focus rule, which sticks on touch. */
  .main-nav .sub-nav,
  .has-sub:hover .sub-nav,
  .has-sub:focus-within .sub-nav {
    visibility: inherit;
  }

  .main-nav .sub-nav::before {
    display: none;
  }

  .main-nav .sub-nav li {
    border-bottom: 0;
  }

  .main-nav .sub-nav a:not(.btn) {
    padding: 9px 0;
    font-size: 16px;
    color: #aab0bc;
  }

  .main-nav .sub-nav a:not(.btn):hover,
  .main-nav .sub-nav a[aria-current="page"] {
    background: none;
    color: #fff;
  }

  .nav-cta {
    display: flex;
    width: 100%;
    margin-top: 22px;
  }

  .hero-bg {
    width: 100%;
  }

  .hero-bg::after {
    background: linear-gradient(90deg, rgba(17, 19, 24, .92) 0%, rgba(17, 19, 24, .7) 55%, rgba(17, 19, 24, .35) 100%);
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature {
    justify-content: flex-start;
    padding: 22px 12px;
  }

  .feature+.feature::before {
    display: none;
  }

  .split,
  .contact-grid,
  .about .split {
    grid-template-columns: 1fr;
  }

  .about h2,
  .contact-info h2 {
    font-size: clamp(24px, 6.4vw, 44px);
  }

  .split-media {
    order: -1;
  }

  /* About: heading and text, then the photo, then the button */
  .about .split {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .about .split-text {
    display: contents;
  }

  .about .split-media {
    order: 1;
    width: 100%;
    margin-bottom: 34px;
  }

  .about .split-text .btn {
    order: 2;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin: 0 auto;
  }

  .card-featured,
  .js .card-featured.reveal.visible {
    transform: none;
  }

  .card-featured:hover,
  .js .card-featured.reveal.visible:hover {
    transform: translateY(-6px);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {

  .topbar-email {
    display: none !important;
  }

  body {
    font-size: 16px;
  }

  .container {
    padding: 0 16px;
  }

  .eyebrow {
    font-size: 12px;
    letter-spacing: .22em;
  }

  .hero-content {
    padding-top: 64px;
    padding-bottom: 72px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero h1 {
    font-size: clamp(34px, 10.5vw, 44px);
  }

  .btn {
    white-space: normal;
    text-align: center;
  }

  .hero-bg {
    background-position: 62% center;
  }

  .features-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature {
    flex-direction: column;
    text-align: center;
    justify-content: center;
    gap: 10px;
    font-size: 15px;
  }

  .feature svg {
    width: 38px;
    height: 38px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cta-actions,
  .cta-actions .btn {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

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