/* ============================================================
   QMS | Quality Mail Services
   Brand palette (from official logo SVG):
   navy #101935 · green #7EA93F · off-white #F3F5F7 · ink #0D1426
   Type: Barlow Condensed (display) · Barlow (body) · IBM Plex Mono (labels)
   ============================================================ */

:root {
  --navy: #101935;
  --navy-deep: #0A1124;
  --green: #7EA93F;
  --green-dark: #63862F;
  --paper: #F3F5F7;
  --ink: #0D1426;
  --slate: #5A6778;
  --line: #D8DEE6;
  --white: #FFFFFF;
  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "Consolas", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}

img, svg { max-width: 100%; }

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* ---------- Type ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.1rem); margin-bottom: 0.5em; }
h3 { font-size: 1.45rem; margin-bottom: 0.35em; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
  margin-bottom: 0.9rem;
}

.eyebrow-light { color: var(--green); }

.accent { color: var(--green); }

.section-lead {
  max-width: 40rem;
  color: var(--slate);
  margin-bottom: 2.5rem;
}

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

.btn {
  display: inline-block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 0.65em 1.6em;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-green {
  background: var(--green);
  color: var(--navy-deep);
}
.btn-green:hover { background: var(--green-dark); color: var(--white); }

.btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: var(--white);
  background: transparent;
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }

.btn-lg { font-size: 1.25rem; padding: 0.7em 1.9em; }
.btn-block { width: 100%; }

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-block: 0.8rem;
}

.brand { display: inline-flex; }

.brand-logo {
  height: 52px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}

.site-nav a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  text-decoration: none;
}
.site-nav a:hover { color: var(--green-dark); }

.header-cta { white-space: nowrap; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 24px;
  height: 3px;
  background: var(--navy);
  border-radius: 2px;
}

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

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

.hero-inner {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: center;
  gap: 3.5rem;
  padding-block: 5.5rem 4.5rem;
}

.hero-lead {
  max-width: 34rem;
  margin-top: 1.2rem;
  color: rgba(255, 255, 255, 0.85);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-badges {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin-top: 2.2rem;
}

.hero-badges li {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-badges li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
}

/* ---------- Waybill card ---------- */

.waybill {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 1.6rem 1.7rem 1.4rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
  position: relative;
  font-family: var(--mono);
  transform: rotate(-1.5deg);
}

.waybill-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 2px solid var(--navy);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
}

.waybill-brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--navy);
}

.waybill-service {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: var(--slate);
}

.waybill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
  border-bottom: 1px dashed var(--line);
}

.waybill-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--slate);
  margin-bottom: 0.2rem;
}

.waybill-value {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--navy);
}

.waybill-arrow {
  color: var(--green-dark);
  font-size: 1.4rem;
}

.status-ok { color: var(--green-dark); }

.waybill-barcode {
  margin-top: 1.1rem;
  height: 38px;
  background: repeating-linear-gradient(
    90deg,
    var(--navy) 0 2px, transparent 2px 5px,
    var(--navy) 5px 9px, transparent 9px 11px,
    var(--navy) 11px 12px, transparent 12px 17px
  );
}

.waybill-stamp {
  position: absolute;
  top: -14px;
  right: -12px;
  background: var(--green);
  color: var(--navy-deep);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  padding: 0.45em 0.9em;
  border-radius: 3px;
  transform: rotate(4deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

/* ---------- Route strip ---------- */

.route-strip {
  background: var(--navy-deep);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-block: 1rem;
  overflow: hidden;
}

.route-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.route-stop {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.route-stop i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  flex: none;
}

.route-line {
  flex: 1;
  height: 0;
  border-top: 2px dashed rgba(126, 169, 63, 0.6);
  animation: route-dash 1.2s linear infinite;
}

@keyframes route-dash {
  to { transform: translateX(10px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .route-line { animation: none; }
  * { transition: none !important; }
}

/* ---------- Sections ---------- */

.section { padding-block: 5rem; }

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

.section-navy .section-lead { color: rgba(255, 255, 255, 0.8); }

/* ---------- Services manifest ---------- */

.manifest {
  border-top: 2px solid var(--navy);
}

.manifest-row {
  display: grid;
  grid-template-columns: 100px 250px 1fr auto;
  gap: 2rem;
  align-items: center;
  padding: 1.7rem 0.6rem;
  border-bottom: 1px dashed var(--line);
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.manifest-row:hover { background: var(--paper); }

.manifest-code {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--green-dark);
}

.manifest-row h3 { margin-bottom: 0; }

.manifest-desc {
  color: var(--slate);
  font-size: 0.97rem;
}

.manifest-arrow {
  font-size: 1.4rem;
  color: var(--navy);
  transition: transform 0.15s ease, color 0.15s ease;
}

.manifest-row:hover .manifest-arrow {
  transform: translateX(5px);
  color: var(--green-dark);
}

/* ---------- Steps timeline ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.2rem;
  list-style: none;
  margin-top: 3.2rem;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 8px;
  right: 8px;
  border-top: 2px dashed rgba(126, 169, 63, 0.5);
}

.step {
  position: relative;
  padding-top: 2rem;
}

.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px var(--navy);
}

.step-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 0.7rem;
}

.step p { color: rgba(255, 255, 255, 0.78); font-size: 0.96rem; }

/* ---------- Values ---------- */

.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
  margin-top: 2.5rem;
}

.value-icon {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  background: var(--green);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}

.value-icon svg {
  width: 28px;
  height: 28px;
  fill: var(--navy-deep);
}

.value p { color: var(--slate); font-size: 0.97rem; }

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

.cta-band {
  background: var(--navy);
  color: var(--white);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-block: 3.8rem;
}

.cta-band h2 { margin-bottom: 0.3em; }

.cta-lead {
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.82);
}

/* ---------- Quote modal ---------- */

.quote-modal {
  /* the global margin reset removes the UA's auto-centering; restore it */
  margin: auto;
  border: 0;
  border-radius: 10px;
  padding: 0;
  width: min(620px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.quote-modal::backdrop {
  background: rgba(10, 17, 36, 0.65);
}

.modal-body {
  padding: 2.4rem 2.4rem 2rem;
  position: relative;
}

.modal-lead {
  color: var(--slate);
  margin-bottom: 1.6rem;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--navy);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
  z-index: 1;
}
.modal-close:hover { background: var(--line); }

/* ---------- Form ---------- */

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

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

.form-field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 0.4rem;
}

.form-field input,
.form-field textarea {
  width: 100%;
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  padding: 0.7em 0.9em;
  border: 1.5px solid var(--line);
  border-radius: 5px;
  background: var(--white);
  transition: border-color 0.15s ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--green);
  outline: none;
}

.form-field input[aria-invalid="true"] { border-color: #C0392B; }

.form-error {
  margin-top: 0.9rem;
  padding: 0.7em 1em;
  border: 1px solid #C0392B;
  border-radius: 5px;
  background: #FBEEEC;
  color: #8E2A1E;
  font-size: 0.92rem;
  text-align: center;
}

.form-error a { color: inherit; font-weight: 600; }

.form-error[hidden] { display: none; }

.form-note {
  font-size: 0.85rem;
  color: var(--slate);
  text-align: center;
  margin-top: 0.9rem;
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2.5rem 1rem;
  gap: 0.6rem;
}

.form-success[hidden] { display: none; }

.form-success p { color: var(--slate); max-width: 26rem; margin-bottom: 1rem; }

.form-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--green);
  display: grid;
  place-items: center;
  margin-bottom: 0.5rem;
}

.form-success-icon svg {
  width: 34px;
  height: 34px;
  fill: var(--navy-deep);
}

/* ---------- Service subpages ---------- */

.subhero {
  background: var(--navy);
  color: var(--white);
  padding-block: 4.2rem 3.8rem;
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.breadcrumb a {
  color: var(--green);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb span { color: rgba(255, 255, 255, 0.6); }

.subhero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }

.subhero-lead {
  max-width: 42rem;
  margin-top: 1.1rem;
  color: rgba(255, 255, 255, 0.85);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3.5rem;
  align-items: start;
}

.split + .split { margin-top: 4rem; }

.split h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }

.split-body p { color: var(--slate); }
.split-body p + p { margin-top: 1rem; }

.check-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

.check-list li {
  position: relative;
  padding-left: 1.8rem;
  color: var(--slate);
}

.check-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--green-dark);
}

.check-list strong { color: var(--ink); }

.note-box {
  margin-top: 2.5rem;
  border: 1px dashed var(--green-dark);
  border-radius: 8px;
  background: var(--paper);
  padding: 1.4rem 1.6rem;
}

.note-box .eyebrow { margin-bottom: 0.4rem; }

.note-box p { color: var(--slate); font-size: 0.97rem; }

.ministeps {
  list-style: none;
  counter-reset: mini;
  display: grid;
  gap: 1.4rem;
  margin-top: 0.5rem;
}

.ministeps li {
  counter-increment: mini;
  position: relative;
  padding-left: 3.2rem;
  color: var(--slate);
}

.ministeps li::before {
  content: "0" counter(mini);
  position: absolute;
  left: 0;
  top: 0.15em;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--green-dark);
  border: 1px dashed var(--green-dark);
  border-radius: 3px;
  padding: 0.1em 0.5em;
}

.ministeps strong { color: var(--ink); }

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

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.85);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}

.brand-logo-footer {
  height: 58px;
  /* official logo is navy-on-transparent; render as white on the dark footer */
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.footer-tagline {
  margin-top: 1rem;
  font-family: var(--display);
  font-size: 1.15rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--green);
}

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 0.9rem;
}

.footer-col p { font-size: 0.95rem; line-height: 1.9; }

.footer-col a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}
.footer-col a:hover { color: var(--green); }

.footer-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 1.1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; padding-block: 4rem 3.5rem; }
  .waybill { max-width: 440px; }
  .manifest-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "code  title arrow"
      "desc  desc  desc";
    gap: 0.5rem 1.4rem;
  }
  .manifest-code { grid-area: code; }
  .manifest-row h3 { grid-area: title; }
  .manifest-desc { grid-area: desc; }
  .manifest-arrow { grid-area: arrow; }
  .split { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 4%;
    margin-left: 0;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--paper); }
  .nav-toggle { display: flex; margin-left: auto; }
  .header-cta { display: none; }
  .brand-logo { height: 42px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .route-inner { flex-wrap: wrap; row-gap: 0.4rem; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-badges { flex-wrap: wrap; gap: 0.9rem 1.5rem; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .steps::before { display: none; }
  .step { padding-top: 0; padding-left: 2rem; }
  .step::before { top: 6px; box-shadow: none; }
  .modal-body { padding: 2rem 1.4rem 1.6rem; }
  .cta-inner { padding-block: 3rem; }
}
