:root {
  --navy: #101c2c;
  --navy-2: #182a40;
  --ink: #182230;
  --muted: #667384;
  --paper: #f2f4f6;
  --white: #ffffff;
  --line: #dfe4e8;
  --orange: #f05d3d;
  --orange-dark: #d6492d;
  --green: #1a9d78;
  --yellow: #f3ba41;
  --shadow: 0 26px 70px rgba(16, 28, 44, 0.1);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 92% 4%, rgba(240, 93, 61, 0.1), transparent 27%),
    var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.site-header {
  width: min(1440px, 100%);
  min-height: 84px;
  margin: 0 auto;
  padding: 17px clamp(22px, 5vw, 72px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
}

.brand-mark {
  width: 43px;
  height: 43px;
  border-radius: 13px 13px 13px 4px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--yellow);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
  line-height: 1;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.header-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(26, 157, 120, 0.12);
}

.header-link {
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
}

.header-link span {
  margin-left: 5px;
  color: var(--orange);
}

main {
  width: min(1360px, calc(100% - clamp(28px, 5vw, 72px)));
  margin: 0 auto;
}

.hero-section {
  min-height: 430px;
  border-radius: 28px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy {
  padding: clamp(42px, 6vw, 84px);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy .eyebrow {
  color: var(--yellow);
}

.hero-copy h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(2.45rem, 5vw, 5.1rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.97;
}

.hero-copy h1 em {
  color: #97b9d6;
  font-style: normal;
}

.hero-description {
  max-width: 590px;
  margin: 25px 0 30px;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(0.86rem, 1.4vw, 1.02rem);
  line-height: 1.72;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 11px 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.66rem;
  font-weight: 650;
}

.hero-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-points strong {
  color: var(--orange);
  font-size: 0.58rem;
}

.hero-image {
  position: relative;
  isolation: isolate;
  background: url("../img/truck.jpg") center / cover no-repeat;
}

.hero-image::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, var(--navy), transparent 35%),
    linear-gradient(180deg, transparent 40%, rgba(16, 28, 44, 0.75));
}

.hero-image__card {
  width: min(290px, calc(100% - 48px));
  position: absolute;
  right: 28px;
  bottom: 28px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  display: grid;
  gap: 6px;
  background: rgba(13, 25, 39, 0.74);
  backdrop-filter: blur(14px);
}

.hero-image__card span {
  color: var(--yellow);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-image__card strong {
  font-size: 1.05rem;
}

.hero-image__card small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.68rem;
  line-height: 1.5;
}

.quote-workspace {
  margin: 24px 0 50px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.quote-card,
.map-card,
.quote-result,
.quote-contact {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 18px 55px rgba(16, 28, 44, 0.07);
}

.quote-card {
  padding: clamp(26px, 4vw, 48px);
}

.section-heading,
.map-card__heading,
.quote-result__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-heading {
  margin-bottom: 34px;
}

.section-heading h2,
.map-card__heading h2,
.quote-result h1,
.quote-contact h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  letter-spacing: -0.05em;
  line-height: 1.05;
}

.section-heading > span {
  max-width: 125px;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1.45;
  text-align: right;
}

.server-message {
  margin: -12px 0 28px;
  padding: 12px 14px;
  border: 1px solid rgba(240, 93, 61, 0.25);
  border-radius: 10px;
  background: rgba(240, 93, 61, 0.08);
  color: #a13825;
  font-size: 0.76rem;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 28px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

fieldset:first-of-type {
  padding-top: 0;
  border-top: 0;
}

legend {
  width: 100%;
  margin: 0 0 17px;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 800;
}

legend span {
  color: var(--orange);
  font-size: 0.57rem;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.field-grid--contact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-grid--schedule {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  min-width: 0;
  display: grid;
  gap: 8px;
}

label > span {
  color: var(--ink);
  font-size: 0.67rem;
  font-weight: 750;
}

label > small {
  color: #8a95a1;
  font-size: 0.59rem;
  line-height: 1.35;
}

input,
select {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 14px;
  background: #f9fafb;
  color: var(--ink);
  font-size: 0.77rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
  padding-right: 38px;
  cursor: pointer;
}

input:focus,
select:focus {
  outline: 0;
  border-color: #7890ab;
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(24, 42, 64, 0.08);
}

input::placeholder {
  color: #9aa4ae;
}

.route-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.location-field {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.terminal-slot:empty {
  display: none;
}

.terminal-picker {
  display: grid;
}

.location-field > label {
  color: var(--ink);
  font-size: 0.67rem;
  font-weight: 750;
}

.location-field > small {
  color: #8a95a1;
  font-size: 0.59rem;
  line-height: 1.35;
}

.location-field select {
  height: 45px;
  background-color: #eef2f5;
  color: var(--navy);
  font-weight: 700;
}

.swap-button {
  width: 42px;
  height: 42px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--orange);
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.swap-button:hover {
  border-color: rgba(240, 93, 61, 0.5);
  box-shadow: 0 8px 20px rgba(16, 28, 44, 0.09);
  transform: rotate(180deg);
}

.route-tools {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.route-tools p {
  max-width: 310px;
  margin: 0;
  color: #8a95a1;
  font-size: 0.58rem;
  line-height: 1.45;
  text-align: right;
}

.text-action {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--orange-dark);
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.text-action span {
  margin-right: 5px;
}

.form-footer {
  padding-top: 26px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.form-footer p {
  max-width: 350px;
  margin: 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.5;
}

.button {
  min-height: 50px;
  border: 0;
  border-radius: 11px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  font-size: 0.71rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button--primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(240, 93, 61, 0.22);
}

.button--primary:hover {
  background: var(--orange-dark);
  transform: translateY(-2px);
}

.button--secondary {
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--navy);
}

button:disabled {
  opacity: 0.58;
  cursor: wait;
  transform: none !important;
}

.map-card {
  position: sticky;
  top: 18px;
  overflow: hidden;
}

.map-card__heading {
  padding: 26px 28px 21px;
}

.map-card__heading h2 {
  font-size: 1.6rem;
}

.map-provider {
  padding: 7px 9px;
  border-radius: 999px;
  background: rgba(26, 157, 120, 0.1);
  color: #12775b;
  font-size: 0.57rem;
  font-weight: 800;
}

.route-map,
.quote-map {
  width: 100%;
  min-height: 500px;
  background: #dce4e3;
  z-index: 0;
}

.map-state {
  min-height: 83px;
  padding: 17px 23px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--navy);
  color: var(--white);
}

.map-state__icon {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--yellow);
}

.map-state strong,
.map-state p {
  display: block;
  margin: 0;
}

.map-state strong {
  font-size: 0.72rem;
}

.map-state p {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.62rem;
}

.map-state[data-mode="loading"] .map-state__icon {
  animation: pulse 1s ease-in-out infinite alternate;
}

.map-state[data-mode="error"] .map-state__icon {
  background: rgba(240, 93, 61, 0.18);
  color: #ff9d88;
}

@keyframes pulse {
  to { transform: scale(1.08); }
}

.route-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--navy);
  color: var(--white);
}

.route-summary > div {
  padding: 18px 23px;
  display: grid;
  gap: 3px;
}

.route-summary > div + div {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.route-summary span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.route-summary strong {
  font-size: 1.1rem;
}

.map-disclaimer {
  margin: 0;
  padding: 14px 22px;
  color: #87929d;
  font-size: 0.55rem;
  line-height: 1.45;
}

.leaflet-container {
  font-family: inherit;
}

.leaflet-control-attribution {
  font-size: 9px;
}

.site-footer {
  width: min(1360px, calc(100% - clamp(28px, 5vw, 72px)));
  margin: 0 auto;
  padding: 22px 4px 30px;
  display: flex;
  justify-content: space-between;
  gap: 22px;
  color: #7f8a95;
  font-size: 0.58rem;
}

/* Quote result */

.quote-page {
  background:
    radial-gradient(circle at 90% 6%, rgba(243, 186, 65, 0.16), transparent 26%),
    var(--paper);
}

.site-header--quote {
  width: min(1240px, 100%);
}

.quote-result-shell {
  width: min(1160px, calc(100% - clamp(28px, 5vw, 72px)));
  margin: 20px auto 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 22px;
  align-items: start;
}

.quote-result {
  padding: clamp(26px, 4vw, 48px);
}

.quote-result__heading {
  margin-bottom: 30px;
}

.quote-result h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.reference-block {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 3px;
  text-align: right;
}

.reference-block span,
.route-stop small,
.quote-metrics span,
.pricing-table span,
.schedule-card span {
  color: var(--muted);
  font-size: 0.56rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reference-block strong {
  color: var(--navy);
  font-size: 0.7rem;
}

.result-route {
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: grid;
  gap: 20px;
  background: #fafbfc;
}

.route-stop {
  position: relative;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 13px;
  align-items: start;
}

.route-stop:first-child::after {
  content: "";
  width: 1px;
  height: 27px;
  position: absolute;
  top: 17px;
  left: 7px;
  border-left: 1px dashed #9aa8b3;
}

.route-stop__mark {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 3px solid var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.route-stop__mark--origin { background: var(--green); }
.route-stop__mark--destination { background: var(--orange); }

.route-stop div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.route-stop strong {
  color: var(--navy);
  font-size: 0.72rem;
  line-height: 1.45;
}

.quote-metrics {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--line);
  overflow: hidden;
}

.quote-metrics > div {
  padding: 17px;
  display: grid;
  gap: 5px;
  background: var(--white);
}

.quote-metrics strong {
  color: var(--navy);
  font-size: 0.93rem;
}

.quote-map {
  min-height: 340px;
  margin-bottom: 24px;
  border-radius: 15px;
  overflow: hidden;
}

.pricing-table {
  border-top: 1px solid var(--line);
}

.pricing-table > div {
  min-height: 58px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pricing-table strong {
  color: var(--navy);
  font-size: 0.84rem;
}

.pricing-total span,
.pricing-total strong {
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  text-transform: none;
}

.quote-note {
  margin: 17px 0 24px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.55;
}

.quote-alert {
  margin: 0 0 22px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 11px;
  font-size: 0.66rem;
  line-height: 1.5;
}

.quote-alert--success {
  border-color: rgba(26, 157, 120, 0.25);
  background: rgba(26, 157, 120, 0.08);
  color: #12775b;
}

.quote-alert--warning {
  border-color: rgba(216, 141, 32, 0.28);
  background: rgba(216, 141, 32, 0.09);
  color: #8b5a13;
}

.quote-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.accept-form {
  margin: 0;
}

.quote-status {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 800;
}

.quote-status--accepted {
  background: rgba(26, 157, 120, 0.11);
  color: #12775b;
}

.quote-status--expired {
  background: rgba(127, 139, 151, 0.12);
  color: #596775;
}

.accept-status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border: 1px solid rgba(26, 157, 120, 0.24);
  border-radius: 10px;
  background: rgba(26, 157, 120, 0.08);
  color: #12775b;
  font-size: 0.68rem;
}

.quote-contact {
  padding: 26px;
  position: sticky;
  top: 20px;
}

.quote-contact h2 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.contact-company {
  margin: -8px 0 14px;
  color: var(--navy);
  font-size: 0.72rem;
  font-weight: 750;
}

.quote-contact > a {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.68rem;
  overflow-wrap: anywhere;
}

.schedule-card,
.contact-help {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.schedule-card {
  display: grid;
  gap: 5px;
}

.schedule-card strong {
  color: var(--navy);
  font-size: 0.72rem;
}

.contact-help strong {
  color: var(--navy);
  font-size: 0.76rem;
}

.contact-help p {
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.55;
}

.contact-help a {
  color: var(--orange-dark);
  font-size: 0.66rem;
  font-weight: 750;
}

@media (max-width: 1040px) {
  .hero-section,
  .quote-workspace {
    grid-template-columns: 1fr;
  }

  .hero-image {
    min-height: 360px;
  }

  .map-card {
    position: static;
  }

  .route-map {
    min-height: 430px;
  }

  .quote-result-shell {
    grid-template-columns: 1fr;
  }

  .quote-contact {
    position: static;
  }
}

@media (max-width: 700px) {
  .site-header {
    min-height: 76px;
    padding: 14px 18px;
  }

  .header-status {
    display: none;
  }

  .header-link {
    max-width: 115px;
    text-align: right;
  }

  main,
  .site-footer,
  .quote-result-shell {
    width: calc(100% - 20px);
  }

  .hero-section {
    border-radius: 20px;
  }

  .hero-copy {
    padding: 34px 24px 40px;
  }

  .hero-copy h1 {
    font-size: clamp(2.4rem, 12vw, 4rem);
  }

  .hero-points {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-image {
    min-height: 300px;
  }

  .quote-workspace {
    gap: 14px;
    margin-top: 14px;
  }

  .quote-card {
    padding: 25px 19px;
  }

  .section-heading,
  .quote-result__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading > span {
    max-width: none;
    text-align: left;
  }

  .field-grid--contact,
  .field-grid--schedule,
  .route-fields {
    grid-template-columns: 1fr;
  }

  .swap-button {
    margin: -2px auto;
    transform: rotate(90deg);
  }

  .swap-button:hover {
    transform: rotate(270deg);
  }

  .route-tools,
  .form-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-tools p {
    text-align: left;
  }

  .form-footer .button {
    width: 100%;
  }

  .route-map {
    min-height: 360px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .quote-result {
    padding: 25px 19px;
  }

  .reference-block {
    text-align: left;
  }

  .quote-metrics {
    grid-template-columns: 1fr;
  }

  .quote-actions {
    flex-direction: column-reverse;
  }

  .quote-actions .button {
    width: 100%;
  }

  .accept-form,
  .quote-status {
    width: 100%;
  }

  .quote-status {
    justify-content: center;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
