/* =========================================================
   Unity Transport Service L.L.C. — Main Stylesheet
   Vanilla CSS, responsive, accessible (WCAG AA contrast)
   Sections: variables, base, layout, header, hero, buttons,
   cards, forms, footer, cookie banner, responsive, utilities
   ========================================================= */

/* ---------- Variables ---------- */
:root {
  --navy-900: #071a30;
  --navy-800: #0a2540;
  --navy-700: #123a63;
  --navy-600: #1c5188;

  --accent: #f59e0b;          /* amber */
  --accent-dark: #b45309;
  --accent-contrast: #1a1a1a; /* dark text on amber */

  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --border: #cbd5e1;
  --border-strong: #94a3b8;

  --text: #0f172a;            /* dark text on light */
  --text-muted: #475569;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: #cbd5e1;

  --success: #15803d;
  --error: #b91c1c;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(10, 37, 64, 0.08);
  --shadow: 0 4px 14px rgba(10, 37, 64, 0.12);
  --shadow-lg: 0 12px 32px rgba(10, 37, 64, 0.18);

  --maxw: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);

  --ff-base: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --ff-head: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;

  --transition: 180ms ease;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--ff-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--ff-head);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--text);
}

h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1rem; }

a {
  color: var(--navy-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover { color: var(--accent-dark); }

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

ul, ol { padding-left: 1.25rem; }

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.6rem 1rem;
  z-index: 2000;
  font-weight: 600;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
.section--alt { background: var(--surface-alt); }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 2.5rem;
}
.section-head h2 { margin-bottom: 0.5rem; }
.section-head p { color: var(--text-muted); margin: 0; }

.grid {
  display: grid;
  gap: 1.5rem;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy-800);
  color: var(--text-on-dark);
  box-shadow: var(--shadow);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text-on-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.2px;
}
.brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  background: var(--accent);
  color: var(--accent-contrast);
  border-radius: var(--radius-sm);
  font-weight: 800;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-on-dark-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; }
.nav__list {
  list-style: none;
  display: flex;
  gap: 0.25rem;
  margin: 0; padding: 0;
}
.nav__link {
  display: inline-block;
  padding: 0.55rem 0.85rem;
  color: var(--text-on-dark);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}
.nav__link:hover,
.nav__link:focus-visible {
  background: var(--navy-600);
  color: var(--text-on-dark);
}
.nav__link--active { color: var(--accent); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 2px solid var(--text-on-dark-muted);
  color: var(--text-on-dark);
  border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-on-dark);
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--navy-900);
  background-image: linear-gradient(rgba(7, 26, 48, 0.78), rgba(7, 26, 48, 0.86)),
    url("pexels-jonathanborba-33824599.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-on-dark);
  min-height: 340px;
  max-height: 70vh;
  display: flex;
  align-items: center;
}
.hero__inner {
  max-width: 640px;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.hero h1 {
  color: var(--text-on-dark);
  margin-bottom: 1rem;
}
.hero p {
  color: var(--text-on-dark-muted);
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}
.hero .accent { color: var(--accent); }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Page hero (smaller, for interior pages) */
.page-hero {
  background-color: var(--navy-800);
  background-image: linear-gradient(rgba(10, 37, 64, 0.85), rgba(10, 37, 64, 0.9)),
    url("pexels-tima-miroshnichenko-6169191.jpg");
  background-size: cover;
  background-position: center;
  color: var(--text-on-dark);
  padding-block: clamp(2rem, 5vw, 3.5rem);
}
.page-hero h1 { color: var(--text-on-dark); margin: 0; }
.page-hero p { color: var(--text-on-dark-muted); margin: 0.5rem 0 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--accent);
  color: var(--accent-contrast);
  border-color: var(--accent);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn--secondary {
  background: var(--navy-800);
  color: var(--text-on-dark);
  border-color: var(--navy-800);
}
.btn--secondary:hover,
.btn--secondary:focus-visible {
  background: var(--navy-700);
  border-color: var(--navy-700);
}

.btn--ghost {
  background: transparent;
  color: var(--text-on-dark);
  border-color: var(--text-on-dark-muted);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-on-dark);
}

.btn--outline {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--navy-800);
}
.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--navy-800);
  color: var(--text-on-dark);
}

.btn--lg { padding: 0.9rem 1.8rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  background: var(--surface-alt);
  color: var(--navy-800);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); margin-bottom: 1rem; }
.card .btn { margin-top: auto; align-self: flex-start; }

.card--feature {
  border-top: 4px solid var(--accent);
}

.media {
  overflow: hidden;
  border-radius: var(--radius);
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  max-height: 280px;
}

/* Feature/About split layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}
.split__media img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

/* Stats strip */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
}
.stat__num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy-800);
  line-height: 1;
}
.stat__label {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.4rem;
}

/* ---------- Forms ---------- */
.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow-sm);
}
.form h2, .form h3 { margin-top: 0; }

.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.field label .req { color: var(--error); }

.input,
textarea.input,
select.input {
  display: block;
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
textarea.input { min-height: 140px; resize: vertical; }
select.input { appearance: none; }

.input::placeholder { color: #64748b; }
.input:focus {
  outline: none;
  border-color: var(--navy-600);
  box-shadow: 0 0 0 3px rgba(28, 81, 136, 0.2);
}
.input--error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}

.field__error {
  display: block;
  color: var(--error);
  font-size: 0.85rem;
  margin-top: 0.35rem;
  font-weight: 500;
}

.field-help {
  display: block;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.35rem;
}

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

/* Checkbox / consent */
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}
.check input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px; height: 20px;
  margin-top: 0.2rem;
  accent-color: var(--navy-700);
}
.check label {
  font-size: 0.95rem;
  color: var(--text);
  margin: 0;
  font-weight: 400;
}

.consent-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}

.form-status {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.form-status--ok { background: #dcfce7; color: #14532d; border: 1px solid #86efac; }
.form-status--err { background: #fee2e2; color: #7f1d1d; border: 1px solid #fca5a5; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: var(--text-on-dark-muted);
  padding-top: 3rem;
  margin-top: 2rem;
}
.site-footer a { color: var(--text-on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-col h4 {
  color: var(--text-on-dark);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-about p { margin-bottom: 1rem; line-height: 1.6; }
.footer-about .brand { margin-bottom: 1rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  font-size: 0.85rem;
}
.footer-bottom nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0; margin: 0;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1500;
  background: var(--navy-800);
  color: var(--text-on-dark);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform 300ms ease;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1.25rem var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}
.cookie-banner p {
  margin: 0;
  color: var(--text-on-dark-muted);
  flex: 1 1 320px;
  font-size: 0.95rem;
}
.cookie-banner p a { color: var(--accent); }
.cookie-banner__actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.stack > * + * { margin-top: 1rem; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 0.5rem;
}
.lead { font-size: 1.15rem; color: var(--text-muted); }
.divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: 2.5rem;
}

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

/* Tablet and below */
@media (max-width: 900px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
  }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 720px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-900);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease;
    box-shadow: var(--shadow-lg);
  }
  .nav.is-open { max-height: 70vh; overflow-y: auto; }

  .nav__list {
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }
  .nav__link {
    display: block;
    padding: 0.85rem 1.25rem;
    border-radius: 0;
  }
  .nav__link:hover,
  .nav__link:focus-visible { background: var(--navy-600); }

  .grid--2,
  .grid--3,
  .grid--4 { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .footer-bottom { flex-direction: column; }

  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn { width: 100%; }

  .cookie-banner__inner { flex-direction: column; align-items: stretch; }
  .cookie-banner__actions { justify-content: flex-end; }
}

/* Small phones */
@media (max-width: 400px) {
  .brand { font-size: 1rem; }
  .brand small { font-size: 0.65rem; }
}

/* ---------- Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .cookie-banner,
  .nav-toggle,
  .hero .btn,
  .skip-link { display: none !important; }

  body { background: #fff; color: #000; }
  .hero, .page-hero {
    background: #fff !important;
    color: #000;
    min-height: 0;
    max-height: none;
  }
  .hero h1, .hero p, .page-hero h1, .page-hero p { color: #000; }

  .card,
  .form {
    box-shadow: none;
    border: 1px solid #999;
    break-inside: avoid;
  }
  a { color: #000; text-decoration: underline; }
  a::after { content: " (" attr(href) ")"; font-size: 0.85em; }

  .section { padding-block: 1rem; }
}
