/* ==========================================================================
   TransAmerican Medical Logistics — Core Stylesheet
   Design language: clinical manifest / chain-of-custody label system.
   ========================================================================== */

/* Fonts are loaded via <link rel="preconnect"> + <link rel="stylesheet">
   in each page's <head> (faster than @import, which blocks CSS parsing). */

:root {
  --ink: #14213D;
  --ink-soft: #2A3A5C;
  --paper: #FFFFFF;
  --paper-dim: #EEF1F4;
  --paper-dim-2: #E3E8EC;
  --blue: #2E6DA4;
  --blue-deep: #1F4E7A;
  --stat: #C1432B;
  --stat-deep: #9E3520;
  --seal: #2F7A5C;
  --line: #D7DCE2;
  --line-strong: #B9C1CA;
  --muted: #5B6472;

  --font-display: 'Archivo', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --container: 1180px;
  --radius: 4px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 .5em;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  font-weight: 800;
}

p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility (accessibility) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- Eyebrow / mono labels ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stat);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--stat);
  transform: rotate(45deg);
  flex-shrink: 0;
}
.eyebrow.blue { color: var(--blue-deep); }
.eyebrow.blue::before { border-color: var(--blue-deep); }
.eyebrow.seal { color: var(--seal); }
.eyebrow.seal::before { border-color: var(--seal); }

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--stat); color: #fff; }
.btn-primary:hover { background: var(--stat-deep); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-soft); }
.btn-outline { background: transparent; color: var(--paper); border-color: rgba(255,255,255,.5); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn-outline-ink { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-outline-ink:hover { border-color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Nav ---------- */
.topbar {
  background: var(--ink);
  color: #C9D2E0;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .04em;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; gap: 6px; }
.topbar a.phone { color: #fff; font-weight: 600; }
.topbar .stat-line { color: #E8A08F; }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 20px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-img { flex-shrink: 0; object-fit: contain; }
.logo-text { font-family: var(--font-display); line-height: 1; }
.logo-text .l1 { font-size: 16px; font-weight: 900; letter-spacing: 0.01em; }
.logo-text .l2 { font-size: 10.5px; font-weight: 600; color: var(--stat); letter-spacing: 0.1em; margin-top: 3px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14px; font-weight: 600; }
.nav-links a { padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a.active { border-color: var(--stat); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; }

@media (max-width: 980px) {
  .nav-links { position: absolute; top: 78px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--line); flex-direction: column; align-items: flex-start; padding: 10px 24px 20px; gap: 4px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 10px 0; }
  .nav-toggle { display: inline-flex; background: none; border: 1.5px solid var(--line-strong); border-radius: 4px; padding: 8px 10px; cursor: pointer; }
  .nav-cta .btn span.long { display: none; }
}

/* ---------- Perforation divider (signature motif) ---------- */
.perforation {
  position: relative;
  height: 1px;
  background: repeating-linear-gradient(to right, var(--line-strong) 0 8px, transparent 8px 16px);
  margin: 0;
}
.perforation::before, .perforation::after {
  content: "";
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--line-strong);
}
.perforation::before { left: -7px; }
.perforation::after { right: -7px; }
.perforation.dim::before, .perforation.dim::after { background: var(--paper-dim); }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-dim { background: var(--paper-dim); }
.section-ink { background: var(--ink); color: #fff; }
.section-ink .eyebrow { color: #E8A08F; }
.section-ink .eyebrow::before { border-color: #E8A08F; }

.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 42px); }
.section-head p { color: var(--muted); font-size: 17px; }
.section-ink .section-head p { color: #C9D2E0; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 64px 0 0;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(20,33,61,.92), rgba(20,33,61,.96)),
    repeating-linear-gradient(45deg, rgba(255,255,255,.025) 0 2px, transparent 2px 34px);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding-bottom: 70px;
}
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); margin-bottom: 22px; }
.hero .lede { font-size: 18px; color: #C9D2E0; max-width: 520px; margin-bottom: 32px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; font-family: var(--font-mono); font-size: 12.5px; color: #C9D2E0; }
.hero-badges span { display: flex; align-items: center; gap: 8px; }
.hero-badges span::before { content: "✓"; color: var(--seal); font-weight: 700; }

/* Manifest card — signature element */
.manifest-card {
  background: #fff;
  color: var(--ink);
  border-radius: 6px;
  padding: 28px 26px 24px;
  position: relative;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.5);
  font-family: var(--font-mono);
}
.manifest-card::before {
  content: "";
  position: absolute; inset: 8px;
  border: 1px dashed var(--line-strong);
  pointer-events: none;
  border-radius: 3px;
}
.manifest-card .tick { position: absolute; width: 10px; height: 10px; }
.manifest-card .tick::before, .manifest-card .tick::after { content: ""; position: absolute; background: var(--line-strong); }
.manifest-card .tick::before { width: 10px; height: 1px; top: 4.5px; }
.manifest-card .tick::after { width: 1px; height: 10px; left: 4.5px; }
.manifest-card .tick.tl { top: 0; left: 0; }
.manifest-card .tick.tr { top: 0; right: 0; }
.manifest-card .tick.bl { bottom: 0; left: 0; }
.manifest-card .tick.br { bottom: 0; right: 0; }

.manifest-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.manifest-head .title { font-family: var(--font-display); text-transform: uppercase; font-weight: 800; font-size: 13px; letter-spacing: .06em; }
.manifest-head .id { font-size: 12px; color: var(--muted); }
.manifest-seal {
  width: 54px; height: 54px;
  border: 2px solid var(--seal);
  border-radius: 50%;
  color: var(--seal);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.03em;
  transform: rotate(-8deg);
  flex-shrink: 0;
  line-height: 1.15;
  padding: 4px;
}
.manifest-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; gap: 12px; }
.manifest-row:last-of-type { border-bottom: none; }
.manifest-row .k { color: var(--muted); }
.manifest-row .v { font-weight: 600; text-align: right; }
.manifest-status {
  margin-top: 16px;
  background: var(--paper-dim);
  border-radius: 4px;
  padding: 12px 14px;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--seal); position: relative; flex-shrink: 0; }
.pulse-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--seal); animation: pulse 2s ease-out infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .manifest-card { max-width: 420px; }
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 26px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--blue); transform: translateY(-2px); }
.card .num { font-family: var(--font-mono); font-size: 12px; color: var(--stat); margin-bottom: 12px; display: block; }
.card h3 { font-size: 17px; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 14.5px; margin-bottom: 0; }

.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  background: #fff;
}
.pill.on-dark { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }

/* ---------- Service anchor blocks ---------- */
.service-block { padding: 60px 0; border-bottom: 1px solid var(--line); }
.service-block:last-child { border-bottom: none; }
.service-block .grid-2 { align-items: start; gap: 48px; }
.service-block .index { font-family: var(--font-mono); color: var(--stat); font-size: 13px; margin-bottom: 10px; display: block; }
.service-block h2 { font-size: 26px; }
.check-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; font-size: 14.5px; align-items: flex-start; }
.check-list li::before { content: "✓"; color: var(--seal); font-weight: 700; flex-shrink: 0; }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 8px; }
.step .step-num { font-family: var(--font-mono); font-size: 34px; font-weight: 700; color: var(--paper-dim-2); display: block; margin-bottom: 8px; }
.step h4 { font-size: 15px; margin-bottom: 6px; text-transform: none; }
.step p { color: var(--muted); font-size: 14px; }

/* ---------- Forms ---------- */
.form-panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 36px; }
.form-panel.on-dim { background: #fff; }
.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.field .req { color: var(--stat); }
.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); }
.field textarea { resize: vertical; min-height: 100px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.form-msg { display: none; margin-top: 18px; padding: 14px 16px; border-radius: 4px; font-size: 14px; }
.form-msg.show { display: block; }
.form-msg.ok { background: #EAF4EF; color: var(--seal); border: 1px solid var(--seal); }
.form-msg.err { background: #FBEAE6; color: var(--stat-deep); border: 1px solid var(--stat); }

/* ---------- Tracking result ---------- */
.track-box { display: flex; gap: 12px; max-width: 560px; }
.track-box input { flex: 1; }
@media (max-width: 560px) { .track-box { flex-direction: column; } }
.track-result { margin-top: 40px; }
.track-timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line-strong); }
.track-timeline li { position: relative; padding: 0 0 26px 26px; }
.track-timeline li::before { content: ""; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper-dim-2); border: 2px solid var(--line-strong); }
.track-timeline li.done::before { background: var(--seal); border-color: var(--seal); }
.track-timeline li.current::before { background: var(--stat); border-color: var(--stat); }
.track-timeline .t-label { font-weight: 700; font-size: 14.5px; }
.track-timeline .t-time { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- Testimonials ---------- */
.testimonial { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 26px; }
.stars { color: var(--stat); letter-spacing: 2px; margin-bottom: 12px; font-size: 14px; }
.testimonial p { font-size: 15px; color: var(--ink-soft); }
.testimonial .who { font-family: var(--font-mono); font-size: 12px; color: var(--muted); margin-top: 14px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--stat);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.cta-band h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 10px; }
.cta-band p { color: rgba(255,255,255,.85); margin-bottom: 26px; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-ink { background: var(--ink); }
.cta-band .btn-outline { border-color: rgba(255,255,255,.6); }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #C9D2E0; padding: 64px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h5 { font-family: var(--font-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { font-size: 14px; color: #C9D2E0; }
.footer a:hover { color: #fff; }
.footer .logo-text .l1 { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: #8593AB; font-family: var(--font-mono); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { background: var(--ink); color: #fff; padding: 56px 0 46px; }
.page-hero h1 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 12px; }
.page-hero p { color: #C9D2E0; max-width: 640px; font-size: 16.5px; margin-bottom: 0; }
.breadcrumb { font-family: var(--font-mono); font-size: 12px; color: #94A2BC; margin-bottom: 16px; letter-spacing: .04em; text-transform: uppercase; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Map placeholder ---------- */
.map-embed { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.map-embed iframe { width: 100%; height: 440px; border: 0; display: block; }

/* ---------- Skip link (accessibility) ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 1000;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Trust badge strip (mirrors brand graphic) ---------- */
.trust-strip {
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.1);
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}
.trust-strip .item {
  flex: 1 1 180px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-right: 1px solid rgba(255,255,255,.1);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .03em;
  justify-content: center;
  text-align: left;
}
.trust-strip .item:last-child { border-right: none; }
.trust-strip .item .ic { color: var(--stat); font-size: 16px; flex-shrink: 0; }

.segment-strip {
  background: var(--paper-dim);
  padding: 16px 0;
  text-align: center;
}
.segment-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.segment-strip span.sep { color: var(--line-strong); margin: 0 16px; }

.tagline {
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: .04em;
  color: var(--stat);
  font-weight: 600;
}
.section-ink .tagline, .hero .tagline { color: #E8A08F; }

/* ---------- Mobile sticky quick-action bar ---------- */
.quick-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--ink);
  border-top: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 -6px 20px rgba(0,0,0,.25);
}
.quick-bar .row { display: grid; grid-template-columns: repeat(3, 1fr); }
.quick-bar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 12px;
  color: #C9D2E0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-right: 1px solid rgba(255,255,255,.1);
}
.quick-bar a:last-child { border-right: none; }
.quick-bar a .ic { font-size: 17px; }
.quick-bar a.primary { color: #fff; background: var(--stat); }
@media (max-width: 720px) {
  .quick-bar { display: block; }
  body { padding-bottom: 62px; }
}

/* ---------- Google Form embed wrapper ---------- */
.gform-embed {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}
.gform-embed iframe { width: 100%; height: 1050px; border: 0; display: block; }
.gform-fallback { font-size: 13px; color: var(--muted); margin-top: 10px; }
.driver-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ---------- Status badges (Live vs Roadmap — honesty labeling) ---------- */
.status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 3px;
  margin-bottom: 10px;
}
.status-live { background: #EAF4EF; color: var(--seal); border: 1px solid var(--seal); }
.status-roadmap { background: var(--paper-dim); color: var(--muted); border: 1px solid var(--line-strong); }
.agent-card { padding: 18px 20px; }
.agent-card h4 { font-size: 14.5px; margin-bottom: 6px; text-transform: none; font-family: var(--font-display); font-weight: 800; }
.agent-card p { font-size: 13px; color: var(--muted); margin-bottom: 0; }

/* ---------- Utility ---------- */
.mt-0 { margin-top: 0; }
.text-muted { color: var(--muted); }
.center { text-align: center; }
