/* ==========================================================================
   Trucking Landing Page Template
   Palette: deep navy + steel gray, bright amber/orange safety accent.
   No external fonts/icons — system font stack keeps this fast on any network.
   ========================================================================== */

:root {
  --color-navy: #0a2540;
  --color-navy-light: #123a5e;
  --color-steel: #4a5568;
  --color-steel-light: #eef1f4;
  --color-accent: #f5a623;
  --color-accent-dark: #d68910;
  --color-white: #ffffff;
  --color-text: #1a202c;
  --color-text-muted: #5b6472;
  --color-success: #1e8e3e;
  --color-error: #c0392b;
  --color-border: #dfe4ea;

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

  --radius: 8px;
  --max-width: 1160px;
  --shadow: 0 2px 10px rgba(10, 37, 64, 0.08);
  --shadow-lg: 0 10px 30px rgba(10, 37, 64, 0.16);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.55;
  font-size: 100%;
}

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

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

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

h1,
h2,
h3,
p {
  margin: 0 0 1rem;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-accent);
  color: var(--color-navy);
  padding: 0.75rem 1rem;
  font-weight: 700;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

/* Formspree honeypot field — invisible to real visitors, but present in the
   DOM/tab order enough that simple bots fill it in and get silently
   discarded server-side. Not `display:none`, which some bots skip. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---- Layout helpers ------------------------------------------------------ */
.section {
  padding: clamp(2.5rem, 6vw, 5rem) 1.25rem;
}

.section__inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section--alt {
  background: var(--color-steel-light);
}

.section--dark {
  background: var(--color-navy);
  color: var(--color-white);
}

.section h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  color: var(--color-navy);
  text-align: center;
  margin-bottom: 2rem;
}

.section--dark h2 {
  color: var(--color-white);
}

/* ---- Authority bar: brokers check this first --------------------------- */
.authority-bar {
  background: var(--color-navy);
  color: var(--color-white);
  border-bottom: 3px solid var(--color-accent);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.authority-bar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: center;
  text-align: center;
}

.authority-bar__label {
  color: var(--color-accent);
  margin-right: 0.35rem;
}

.authority-bar__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(30, 142, 62, 0.25);
  display: inline-block;
}

/* ---- Header -------------------------------------------------------------- */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand__name {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 800;
  color: var(--color-navy);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  flex-wrap: wrap;
}

.site-nav a:not(.btn) {
  font-weight: 600;
  color: var(--color-steel);
}

.site-nav a:not(.btn):hover {
  color: var(--color-navy);
}

.header-phone {
  font-weight: 700;
  color: var(--color-navy);
  white-space: nowrap;
}

/* ---- Buttons --------------------------------------------------------------- */
.btn {
  display: inline-block;
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 0.7rem 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  text-align: center;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-navy);
}

.btn--primary:hover {
  background: var(--color-accent-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--ghost {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}

.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--large {
  font-size: 1.05rem;
  padding: 0.9rem 1.8rem;
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn--block {
  display: block;
  width: 100%;
}

/* ---- Hero ------------------------------------------------------------------ */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: var(--color-white);
  padding: clamp(3rem, 8vw, 6rem) 1.25rem;
}

/* Optional: used when config.hero.backgroundImage is set (see render.js).
   The scrim keeps white text legible over any photo without needing
   per-image tuning. */
.hero--photo {
  background-image: linear-gradient(180deg, rgba(10, 37, 64, 0.82) 0%, rgba(10, 37, 64, 0.92) 100%),
    var(--hero-photo-url);
  background-size: cover;
  background-position: center;
}

.hero__inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.hero__tagline {
  color: var(--color-accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
}

.hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.25rem);
  line-height: 1.15;
  font-weight: 800;
}

.hero__subheading {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.85);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ---- About / stats ----------------------------------------------------------- */
.about {
  text-align: center;
}

.about__body {
  max-width: 760px;
  margin: 0 auto 2.5rem;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 640px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat__value {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--color-navy);
}

.stat__label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ---- Card grids (equipment / services) --------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 260px));
  justify-content: center;
  gap: 1.25rem;
}

.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: left;
}

.section--alt .card {
  background: var(--color-white);
}

/* Equipment cards with a bundled/custom photo (see render.js renderCardList).
   Overrides the plain card's padding/border-top in favor of a full-width
   image with the accent bar moved beneath it. If the image 404s, render.js
   removes this modifier class and the card falls back to the plain look. */
.card--photo {
  padding: 0;
  border-top: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card--photo .card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-bottom: 4px solid var(--color-accent);
}

.card--photo .card__body {
  padding: 1.5rem;
}

.card__title {
  color: var(--color-navy);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card__desc {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---- Quote / contact section --------------------------------------------------- */
.quote-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 860px) {
  .quote-layout {
    grid-template-columns: 1fr 1.3fr;
    align-items: start;
  }
}

.quote-intro h2 {
  text-align: left;
  margin-bottom: 0.75rem;
}

.quote-intro p {
  color: rgba(255, 255, 255, 0.85);
}

.contact-details {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.contact-details__label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-accent);
  margin-bottom: 0.15rem;
}

.quote-form {
  background: var(--color-white);
  color: var(--color-text);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
  box-shadow: var(--shadow-lg);
}

.form-row {
  margin-bottom: 1.1rem;
}

.form-row--split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 480px) {
  .form-row--split {
    grid-template-columns: 1fr 1fr;
  }
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-white);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
  border-color: var(--color-accent);
}

textarea {
  resize: vertical;
}

.form-status {
  margin: 1rem 0 0;
  font-weight: 600;
  min-height: 1.2em;
}

.form-status--success {
  color: var(--color-success);
}

.form-status--error {
  color: var(--color-error);
}

/* ---- Footer -------------------------------------------------------------------- */
.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.7);
  border-top: 3px solid var(--color-accent);
  font-size: 0.85rem;
}

.site-footer__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}

.site-footer__update-link {
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

.site-footer__update-link:hover {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}

/* ---- Referral page --------------------------------------------------------------- */
.referral-price {
  margin: 0.5rem 0 1.5rem;
}

.referral-price__old {
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.15rem;
  margin-right: 0.6rem;
}

.referral-price__new {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--color-white);
}

.referral-price__unit {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
  margin-left: 0.15rem;
}

.referral-price__save {
  color: var(--color-accent);
  font-weight: 700;
  margin-top: 0.4rem;
}

/* ---- Small-screen legibility ---------------------------------------------------- */
@media (max-width: 420px) {
  .site-header__inner {
    justify-content: center;
    text-align: center;
  }

  .header-phone {
    order: 3;
    width: 100%;
    text-align: center;
    padding-top: 0.4rem;
    border-top: 1px solid var(--color-border);
  }
}
