/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Design tokens (palette derived from the ABEST logo) ---- */
:root {
  --navy: #1b2f5e;
  --navy-dark: #142449;
  --steel: #2f6fb0;
  --steel-light: #4a8fd4;
  --ink: #1a2230;
  --muted: #5b6675;
  --bg: #ffffff;
  --bg-alt: #f3f5f8;
  --line: #e2e7ee;
  --radius: 10px;
  --maxw: 1100px;
  --shadow-sm: 0 1px 3px rgba(20, 36, 73, .06);
  --shadow-md: 0 14px 30px rgba(20, 36, 73, .13);
  --font-head: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---- Base ---- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.05; letter-spacing: .01em; }
.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(3.25rem, 7vw, 6rem) 0; }
.section--alt { background: var(--bg-alt); }

/* ---- Buttons ---- */
.btn {
  display: inline-block; font-weight: 600; font-family: var(--font-body);
  padding: .75rem 1.4rem; border-radius: var(--radius); border: 2px solid transparent;
  cursor: pointer; transition: transform .05s ease, background .15s ease; white-space: nowrap;
}
.btn--primary { background: var(--steel); color: #fff; }
.btn--primary:hover { background: var(--steel-light); }
.btn--ghost { border-color: #fff; color: #fff; }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn:active { transform: translateY(1px); }

/* ---- Header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.site-header__top { background: var(--navy); color: #fff; font-size: .82rem; }
.site-header__top-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.site-header__tag { color: rgba(255,255,255,.72); letter-spacing: .01em; }
.site-header__lead { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.site-header__lead .header-drive::before { content: "·"; color: rgba(255,255,255,.38); margin-right: .55rem; }
.site-header__util { display: flex; align-items: center; gap: 1.25rem; }
.site-header__inner { display: flex; align-items: center; gap: 1rem; padding: .6rem 0; }
.brand__logo { height: 52px; width: auto; }
.nav { margin-left: auto; }
.nav__menu { display: flex; align-items: center; gap: 1.4rem; font-weight: 500; }
.nav__menu a:not(.btn):hover { color: var(--steel); }
.nav__cta { margin-left: .4rem; }
.nav__toggle { display: none; background: var(--navy); color: #fff; border: 0; padding: .6rem 1rem; border-radius: var(--radius); font-weight: 600; }
.header-phone { font-weight: 600; color: #fff; white-space: nowrap; }
.header-phone:hover { color: rgba(255,255,255,.8); }
.header-drive { color: rgba(255,255,255,.78); font-weight: 500; white-space: nowrap; }
.header-drive:hover { color: #fff; }
.header-drive.is-current { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.site-header__top .lang__opt { color: rgba(255,255,255,.7); }
.site-header__top .lang__opt.is-active { color: #fff; }
.site-header__top .lang__opt:hover { color: #fff; }
.site-header__top .lang__sep { color: rgba(255,255,255,.4); }

/* Mobile */
@media (max-width: 960px) {
  .nav__toggle { display: block; }
  .nav__menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line);
    padding: .5rem 1.25rem 1rem;
  }
  .nav__menu.is-open { display: flex; }
  .nav__menu a { display: block; padding: .6rem 0; }
  .nav__cta { margin: .4rem 0 0; }
  .nav__cta a { text-align: center; padding: .7rem 1rem; }
  .site-header__inner { position: relative; flex-wrap: wrap; }
  .site-header__tag { display: none; }
  .site-header__top-inner { justify-content: space-between; }
  .site-header__lead .header-drive::before { content: none; }
}

/* ---- Hero ---- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  display: flex; align-items: center;
  min-height: clamp(440px, 62vh, 640px);
  padding: clamp(3.75rem, 9vw, 7rem) 0;
  background:
    linear-gradient(100deg, rgba(20,36,73,.94) 0%, rgba(20,36,73,.82) 38%, rgba(20,36,73,.55) 66%, rgba(27,47,94,.32) 100%),
    url("assets/hero.jpg") center right / cover no-repeat;
}
.hero__inner { position: relative; z-index: 2; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 600; color: var(--steel-light); margin-bottom: 1rem; }
.hero__title { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 700; font-style: italic; text-transform: uppercase; text-shadow: 0 2px 18px rgba(10,18,40,.45); }
.hero__sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); max-width: 44ch; margin: 1.4rem 0 2rem; color: #e4eaf4; }
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
@media (max-width: 720px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(20,36,73,.9) 0%, rgba(20,36,73,.8) 100%),
      url("assets/hero.jpg") center / cover no-repeat;
  }
}

/* ---- Trust Bar ---- */
.trustbar { background: var(--navy-dark); color: #fff; padding: 1.4rem 0; }
.trustbar__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; text-align: center; }
.trustbar__item { display: flex; flex-direction: column; gap: .15rem; }
.trustbar__k { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.trustbar__v { font-size: .8rem; color: #aebbd2; text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 820px) { .trustbar__grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; } }
@media (max-width: 420px) { .trustbar__grid { grid-template-columns: 1fr; } }

/* ---- Section headings and cards ---- */
.section__eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 600; color: var(--steel); margin-bottom: .6rem; }
.section__title { font-size: clamp(1.9rem, 4.5vw, 2.9rem); font-weight: 700; font-style: italic; text-transform: uppercase; color: var(--navy); }
.section__lead { max-width: 58ch; color: var(--muted); margin: 1rem 0 2.4rem; font-size: 1.08rem; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.4rem;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem;
  border-radius: 12px; background: rgba(47, 111, 176, .1); color: var(--steel);
}
.card__icon svg { width: 23px; height: 23px; }
.card__title { font-size: 1.35rem; font-weight: 700; color: var(--navy); margin-bottom: .5rem; }
.card p { color: var(--muted); }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

/* ---- Terminals ---- */
.terminals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.terminal {
  background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--steel);
  border-radius: var(--radius); padding: 1.3rem 1.2rem; font-family: var(--font-head);
  font-weight: 700; font-size: 1.3rem; color: var(--navy); line-height: 1.15;
  display: flex; flex-direction: column; gap: .5rem;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.terminal:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.terminal__icon { color: var(--steel); }
.terminal__icon svg { width: 24px; height: 24px; }
.terminal__loc { font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 860px) { .terminals { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .terminals { grid-template-columns: 1fr; } }

/* ---- About ---- */
.about__body { max-width: 62ch; }
.about__body p { color: var(--muted); margin-top: 1rem; font-size: 1.08rem; }
.about__facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.about__facts li { border-left: 3px solid var(--steel); padding-left: .9rem; font-size: .95rem; color: var(--muted); }
.about__facts strong { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--navy); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .about__facts { grid-template-columns: repeat(2, 1fr); } }

/* ---- Contact ---- */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 2.5rem; align-items: start; }
.contact__details { margin-top: 1.6rem; display: grid; gap: 1rem; }
.contact__details li { display: flex; flex-direction: column; }
.contact__details span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact__details a { font-weight: 600; color: var(--navy); }

.quote-form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.field-row--3 { grid-template-columns: 2fr .7fr 1fr; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field span { font-size: .82rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 1rem; padding: .65rem .7rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
.field textarea { min-height: auto; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--steel-light); border-color: var(--steel); }
.quote-form > .field { margin-bottom: 1rem; }
.quote-form__submit { width: 100%; margin-top: .4rem; }
.form-status { margin-top: .9rem; font-weight: 600; }
.form-status.is-success { color: #1f7a44; }
.form-status.is-error { color: #b3261e; }
@media (max-width: 820px) {
  .contact { grid-template-columns: 1fr; }
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
}

/* ---- Footer ---- */
.site-footer { background: var(--navy-dark); color: #cdd6e6; padding: 3rem 0 1.5rem; }
.site-footer__inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer__logo { height: 46px; background: #fff; padding: 4px 8px; border-radius: 6px; margin-bottom: .8rem; }
.site-footer h4 { font-family: var(--font-head); color: #fff; font-size: 1.15rem; margin-bottom: .6rem; }
.site-footer a:hover { color: #fff; }
.site-footer__bar { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; }
@media (max-width: 950px) { .site-footer__inner { grid-template-columns: 1fr 1fr; gap: 1.8rem; } }
@media (max-width: 700px) { .site-footer__inner { grid-template-columns: 1fr; gap: 1.4rem; } }

/* ---- Focus-visible states ---- */
.btn:focus-visible,
.nav__menu a:focus-visible,
.header-phone:focus-visible,
.header-drive:focus-visible,
.site-footer a:focus-visible { outline: 2px solid var(--steel-light); outline-offset: 2px; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.cards .card.reveal:nth-child(2) { transition-delay: .08s; }
.cards .card.reveal:nth-child(3) { transition-delay: .16s; }
.cards .card.reveal:nth-child(4) { transition-delay: .24s; }
.terminals .terminal.reveal:nth-child(2) { transition-delay: .06s; }
.terminals .terminal.reveal:nth-child(3) { transition-delay: .12s; }
.terminals .terminal.reveal:nth-child(4) { transition-delay: .18s; }
.terminals .terminal.reveal:nth-child(5) { transition-delay: .24s; }
.terminals .terminal.reveal:nth-child(6) { transition-delay: .3s; }
.about__facts li.reveal:nth-child(2) { transition-delay: .08s; }
.about__facts li.reveal:nth-child(3) { transition-delay: .16s; }
.about__facts li.reveal:nth-child(4) { transition-delay: .24s; }

/* ---- Language toggle ---- */
.lang { display: flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .9rem; }
.lang__opt { color: var(--muted); padding: .15rem .25rem; border-radius: 4px; }
.lang__opt.is-active { color: var(--navy); }
.lang__opt:hover { color: var(--steel); }
.lang__sep { color: var(--line); }

/* ---- Driver form intro spacing ---- */
.driver-form { max-width: 760px; }

/* ---- Interior page header ---- */
.page-head { background: linear-gradient(135deg, var(--navy-dark), var(--navy)); color: #fff; padding: clamp(2.75rem, 6vw, 4.75rem) 0; }
.page-head__title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 700; font-style: italic; text-transform: uppercase; }
.page-head__sub { color: #dbe3f0; max-width: 58ch; margin-top: 1rem; font-size: 1.1rem; }

/* ---- Resources page ---- */
.res-note { background: #eef4fb; border: 1px solid #d5e3f2; border-left: 4px solid var(--steel); border-radius: var(--radius); padding: 1rem 1.2rem; margin-bottom: 2.4rem; font-size: .98rem; }
.res-note a { color: var(--steel); font-weight: 600; text-decoration: underline; }
.res-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.res-grid--links { margin-top: 1rem; }
.res-card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--steel); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.res-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.res-card__title { font-family: var(--font-head); font-size: 1.5rem; color: var(--navy); line-height: 1.05; }
.res-card__title span { display: block; font-family: var(--font-body); font-size: .8rem; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .25rem; }
.res-card__loc { color: var(--muted); font-size: .9rem; margin: .6rem 0 .8rem; }
.res-card__hours { color: var(--muted); font-size: .85rem; margin-top: .8rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.res-links { display: flex; flex-direction: column; gap: .4rem; }
.res-links a { color: var(--steel); font-weight: 600; }
.res-links a:hover { text-decoration: underline; }
.res-req { display: inline-block; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg-alt); border: 1px solid var(--line); border-radius: 999px; padding: .05rem .45rem; margin-left: .35rem; vertical-align: middle; white-space: nowrap; }
.res-linkcol { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow-sm); }
.res-linkcol h3 { font-family: var(--font-head); color: var(--navy); font-size: 1.25rem; margin-bottom: .8rem; }
.res-disclaimer { color: var(--muted); font-size: .85rem; margin-top: 1.6rem; max-width: 72ch; }
.res-cta { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.res-cta p { font-family: var(--font-head); font-size: 1.4rem; color: var(--navy); }
.res-contacts { margin-top: 2.4rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow-sm); }
.res-contacts h3 { font-family: var(--font-head); color: var(--navy); font-size: 1.25rem; }
.res-contacts__note { color: var(--muted); font-size: .9rem; margin: .4rem 0 1.2rem; max-width: 72ch; }
.res-contacts__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2rem; }
.res-contacts__list li { display: flex; flex-direction: column; }
.res-contacts__list span { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.res-contacts__list a { font-weight: 600; color: var(--steel); word-break: break-word; }
.res-contacts__list a:hover { text-decoration: underline; }
@media (max-width: 560px) { .res-contacts__list { grid-template-columns: 1fr; } }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.nav__menu a.is-current { color: var(--steel); }
@media (max-width: 900px) { .res-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .res-grid { grid-template-columns: 1fr; } }

/* ---- Custom select ---- */
.cselect { position: relative; }
.cselect__native {
  font-family: var(--font-body); font-size: 1rem; padding: .65rem .7rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%;
}
.cselect--ready .cselect__native { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; pointer-events: none; }
.cselect__button {
  display: none; align-items: center; justify-content: space-between; gap: .5rem;
  width: 100%; min-height: 44px; padding: .65rem .7rem; font-family: var(--font-body);
  font-size: 1rem; text-align: left; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
.cselect--ready .cselect__button { display: flex; }
.cselect__button:hover { border-color: var(--steel-light); }
.cselect.is-open .cselect__button,
.cselect__button:focus-visible { outline: 2px solid var(--steel-light); border-color: var(--steel); }
.cselect__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect__value.is-placeholder { color: var(--muted); }
.cselect__chevron { display: flex; color: var(--muted); transition: transform .18s ease; }
.cselect__chevron svg { width: 20px; height: 20px; }
.cselect.is-open .cselect__chevron { transform: rotate(180deg); }
.cselect__list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  max-height: 264px; overflow-y: auto; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow-md); padding: .3rem; margin: 0; display: none;
}
.cselect.is-open .cselect__list { display: block; }
.cselect__option { padding: .55rem .6rem; border-radius: 6px; cursor: pointer; font-size: .98rem; color: var(--ink); }
.cselect__option.is-active { background: var(--bg-alt); }
.cselect__option.is-selected { color: var(--navy); font-weight: 600; }
.cselect__option.is-selected::after { content: "\2713"; float: right; color: var(--steel); }
.cselect__option--placeholder { color: var(--muted); }
.cselect__group { padding: .55rem .6rem .25rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* ---- Load-option checkboxes ---- */
.checks { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; margin-top: .35rem; }
.check { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-size: .95rem; font-weight: 500; color: var(--ink); }
.check input { width: 20px; height: 20px; accent-color: var(--steel); cursor: pointer; }

/* ---- Footer legal links ---- */
.site-footer__bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem 1.5rem; }
.site-footer__legal a { color: #cdd6e6; }
.site-footer__legal a:hover { color: #fff; }

/* ---- Legal / long-form pages ---- */
.legal { max-width: 76ch; }
.legal h2 { font-family: var(--font-head); color: var(--navy); font-size: 1.4rem; margin: 2rem 0 .6rem; }
.legal p { color: var(--muted); margin-bottom: .9rem; }
.legal ul { list-style: disc; padding-left: 1.3rem; margin-bottom: .9rem; color: var(--muted); }
.legal li { margin-bottom: .4rem; }
.legal a { color: var(--steel); font-weight: 600; text-decoration: underline; }
.legal strong { color: var(--ink); }

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .terminal { transition: none; }
  .card:hover, .terminal:hover { transform: none; }
  .cselect__chevron { transition: none; }
}

/* Narrow screens: the top strip carries three items, so tighten it up */
@media (max-width: 560px) {
  .site-header__top { font-size: .78rem; }
  .site-header__top-inner { flex-wrap: wrap; gap: .5rem; }
  .site-header__util { gap: .85rem; flex-wrap: wrap; justify-content: flex-end; row-gap: .3rem; }
}
