/* ==========================================================================
   MediSwift Courier — Global Stylesheet
   A modern, accessible design system for a medical courier business.
   Palette: clinical blues + teal accent, high contrast, WCAG-friendly.
   ========================================================================== */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --brand-900: #0a2540;
  --brand-800: #0d3357;
  --brand-700: #114a7e;
  --brand-600: #1466b0;
  --brand-500: #1a7fd4;
  --accent-500: #12b4a6; /* teal */
  --accent-600: #0e988d;

  /* Neutrals */
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-100: #f1f5f9;
  --surface: #ffffff;
  --surface-alt: #f6f9fc;

  /* Feedback */
  --success: #16a34a;
  --danger: #dc2626;

  /* Effects */
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 3px rgba(10, 37, 64, .08), 0 1px 2px rgba(10, 37, 64, .04);
  --shadow-md: 0 10px 30px -12px rgba(10, 37, 64, .25);
  --shadow-lg: 0 24px 60px -20px rgba(10, 37, 64, .35);
  --container: 1160px;

  /* Type */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-700);
  background: var(--surface);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Prevent mobile horizontal overflow: let grid/flex children shrink and long
   tokens (like email addresses) wrap instead of forcing the page wider. */
.grid > *, .contact-grid > *, .feature-row > *, .hero__grid > *, .coverage > * { min-width: 0; }
.info-item p, .info-item a, .footer-grid a, .card p { overflow-wrap: anywhere; }
img { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { color: var(--ink-900); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--alt { background: var(--surface-alt); }
.section--brand { background: var(--brand-900); color: #dbeafe; }
.section--brand h2, .section--brand h3 { color: #fff; }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--ink-500); max-width: 62ch; }
.center .lead { margin-inline: auto; }
.eyebrow {
  display: inline-block; text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; font-weight: 700; color: var(--accent-600); margin-bottom: .75rem;
}
.section--brand .eyebrow { color: #5ee0d3; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600; font-size: 1rem;
  cursor: pointer; border: 2px solid transparent; transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent-500); color: #06282a; box-shadow: var(--shadow-md); }
.btn--primary:hover { background: var(--accent-600); color: #fff; }
.btn--light { background: #fff; color: var(--brand-800); }
.btn--light:hover { background: var(--ink-100); color: var(--brand-900); }
.btn--outline { background: transparent; border-color: currentColor; color: var(--brand-700); }
.btn--outline:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn--ghost-light { background: transparent; border-color: rgba(255,255,255,.5); color: #fff; }
.btn--ghost-light:hover { background: rgba(255,255,255,.12); }
.btn--block { width: 100%; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--ink-100);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 74px; }
.brand { display: flex; align-items: center; gap: .65rem; font-weight: 800; color: var(--brand-900); font-size: 1.2rem; letter-spacing: -.02em; }
.brand:hover { color: var(--brand-900); }
.brand svg { width: 38px; height: 38px; flex: none; }
.brand .brand-mark { height: 50px; width: auto; flex: none; object-fit: contain; }
.site-footer .brand .brand-mark { height: 46px; }
.brand span small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); }
.nav-links { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: .5rem .85rem; border-radius: 8px; color: var(--ink-700); font-weight: 500; font-size: .98rem; }
.nav-links a:hover { background: var(--ink-100); color: var(--brand-800); }
.nav-links a.active { color: var(--brand-700); background: #e7f0fb; }
.nav-cta { margin-left: .5rem; }
.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
  color: var(--brand-900); border-radius: 8px;
}
.nav-toggle:hover { background: var(--ink-100); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
    background: #fff; padding: 1rem 1.25rem 1.5rem; gap: .25rem; border-bottom: 1px solid var(--ink-100);
    box-shadow: var(--shadow-md); transform: translateY(-140%); transition: transform .28s ease; visibility: hidden;
  }
  .nav-links.open { transform: translateY(0); visibility: visible; }
  .nav-links a { padding: .8rem 1rem; font-size: 1.05rem; }
  .nav-cta { margin: .5rem 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #eaf3ff; overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, #1466b0 0%, transparent 55%), linear-gradient(160deg, var(--brand-900), var(--brand-800) 60%, #0b2f52);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 22px 22px;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; padding: clamp(3.5rem, 7vw, 6rem) 0; }
.hero h1 { color: #fff; }
.hero p { color: #c6ddf5; font-size: 1.2rem; max-width: 54ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.6rem; }
.hero__stats { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.hero__stats .stat strong { display: block; font-size: 1.9rem; color: #fff; line-height: 1; }
.hero__stats .stat span { font-size: .85rem; color: #9fc2e6; letter-spacing: .03em; }
.hero__card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius);
  padding: 1.6rem; backdrop-filter: blur(6px);
}
.hero__card h3 { color: #fff; margin-bottom: 1rem; font-size: 1.05rem; }
.hero__card ul { list-style: none; padding: 0; margin: 0; }
.hero__card li { display: flex; gap: .7rem; align-items: flex-start; padding: .55rem 0; border-bottom: 1px solid rgba(255,255,255,.08); color: #d6e6f7; font-size: .98rem; }
.hero__card li:last-child { border-bottom: 0; }
.hero__card li svg { flex: none; width: 20px; height: 20px; color: #5ee0d3; margin-top: 2px; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero__card { order: 2; }
}

/* ---------- Trust bar ---------- */
.trustbar { background: var(--brand-900); color: #b9d4f0; border-top: 1px solid rgba(255,255,255,.08); }
.trustbar .container { display: flex; flex-wrap: wrap; gap: 1rem 2.5rem; align-items: center; justify-content: center; padding-block: 1.1rem; }
.trustbar .item { display: flex; align-items: center; gap: .55rem; font-size: .92rem; font-weight: 600; letter-spacing: .02em; }
.trustbar svg { width: 20px; height: 20px; color: #5ee0d3; }

/* ---------- Cards / Grid ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .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: var(--surface); border: 1px solid var(--ink-100); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #dbe7f4; }
.card .icon {
  width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, #e6f7f5, #d3f0ec); color: var(--accent-600); margin-bottom: 1rem;
}
.card .icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--ink-500); font-size: .98rem; margin-bottom: 0; }
.card__link { display: inline-flex; align-items: center; gap: .35rem; margin-top: 1rem; font-weight: 600; font-size: .95rem; }
.card__link svg { width: 16px; height: 16px; transition: transform .15s ease; }
.card:hover .card__link svg { transform: translateX(3px); }

/* Feature list rows */
.feature-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3rem; align-items: center; }
.feature-row.reverse .feature-row__media { order: -1; }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; gap: 1.5rem; } .feature-row.reverse .feature-row__media { order: 0; } }
.checklist { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.checklist li { display: flex; gap: .7rem; align-items: flex-start; padding: .5rem 0; color: var(--ink-700); }
.checklist li svg { flex: none; width: 22px; height: 22px; color: var(--success); margin-top: 2px; }
.media-panel {
  background: linear-gradient(160deg, var(--brand-700), var(--brand-900)); border-radius: var(--radius);
  color: #eaf3ff; padding: 2rem; box-shadow: var(--shadow-md); min-height: 260px;
  display: flex; flex-direction: column; justify-content: center;
}
.media-panel h3 { color: #fff; }
.media-panel .big { font-size: 2.6rem; font-weight: 800; color: #fff; letter-spacing: -.03em; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4,1fr); gap: 1.5rem; }
@media (max-width: 900px){ .steps { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px){ .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: .5rem; }
.step .num {
  width: 44px; height: 44px; border-radius: 50%; background: var(--brand-600); color: #fff;
  display: grid; place-items: center; font-weight: 800; margin-bottom: .9rem; box-shadow: var(--shadow-sm);
}
.step h3 { font-size: 1.1rem; }
.step p { color: var(--ink-500); font-size: .96rem; margin: 0; }

/* ---------- Coverage ---------- */
.coverage { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 860px){ .coverage { grid-template-columns: 1fr; } }
.area-tags { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.area-tags span {
  background: #fff; border: 1px solid var(--ink-300); color: var(--ink-700);
  padding: .45rem .9rem; border-radius: 999px; font-size: .9rem; font-weight: 500;
}

/* ---------- Pricing / hours table ---------- */
.hours { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--ink-100); }
.hours th, .hours td { text-align: left; padding: .9rem 1.2rem; border-bottom: 1px solid var(--ink-100); }
.hours th { background: var(--surface-alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-500); }
.hours tr:last-child td { border-bottom: 0; }
.hours td:last-child { font-weight: 600; color: var(--ink-900); }
.badge-24 { display: inline-block; background: #e6f7f5; color: var(--accent-600); font-weight: 700; font-size: .78rem; padding: .25rem .6rem; border-radius: 999px; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--accent-600), var(--brand-600)); color: #fff; border-radius: var(--radius); padding: clamp(2rem,5vw,3.5rem); text-align: center; box-shadow: var(--shadow-lg); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #e4f6f3; max-width: 56ch; margin-inline: auto; }
.cta-band .btn { margin-top: 1.25rem; }

/* ---------- Contact / Forms ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 2.5rem; align-items: start; }
@media (max-width: 860px){ .contact-grid { grid-template-columns: 1fr; } }
.info-card { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 1.75rem; }
.info-item { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px solid var(--ink-100); }
.info-item:last-child { border-bottom: 0; }
.info-item .ic { width: 42px; height: 42px; border-radius: 11px; background: #e7f0fb; color: var(--brand-600); display: grid; place-items: center; flex: none; }
.info-item .ic svg { width: 20px; height: 20px; }
.info-item h4 { margin: 0 0 .15rem; font-size: 1rem; color: var(--ink-900); }
.info-item p, .info-item a { margin: 0; color: var(--ink-500); font-size: .96rem; }

form.quote { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 1.9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px){ .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; color: var(--ink-900); margin-bottom: .4rem; }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .95rem; border: 1.5px solid var(--ink-300); border-radius: var(--radius-sm);
  font: inherit; font-size: .98rem; color: var(--ink-900); background: #fff; transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(26,127,212,.15);
}
.field input.invalid, .field select.invalid, .field textarea.invalid { border-color: var(--danger); }
.field .error { display: none; color: var(--danger); font-size: .82rem; margin-top: .35rem; }
.field .error.show { display: block; }
.form-note { font-size: .82rem; color: var(--ink-500); margin-top: .25rem; }
.form-success {
  display: none; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46;
  padding: 1rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.2rem; font-weight: 500;
}
.form-success.show { display: block; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin-inline: auto; }
.faq details { background: #fff; border: 1px solid var(--ink-100); border-radius: var(--radius-sm); margin-bottom: .8rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { cursor: pointer; padding: 1.1rem 1.3rem; font-weight: 600; color: var(--ink-900); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--brand-500); font-weight: 400; line-height: 1; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 1.3rem 1.2rem; color: var(--ink-500); }

/* ---------- Page header (interior pages) ---------- */
.page-hero { background: linear-gradient(160deg, var(--brand-900), var(--brand-800)); color: #eaf3ff; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.page-hero h1 { color: #fff; }
.page-hero p { color: #c6ddf5; max-width: 60ch; font-size: 1.15rem; margin: 0; }
.breadcrumb { display: flex; gap: .5rem; align-items: center; font-size: .85rem; color: #8fb4dc; margin-bottom: 1rem; }
.breadcrumb a { color: #bcd6f2; }
.breadcrumb span { opacity: .6; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-900); color: #a9c6e6; padding: 3.5rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; }
@media (max-width: 800px){ .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; } }
@media (max-width: 480px){ .footer-grid { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 1rem; }
.site-footer .brand span small { color: #7fa6ce; }
.footer-grid h4 { color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: .55rem; }
.footer-grid a { color: #a9c6e6; font-size: .95rem; }
.footer-grid a:hover { color: #fff; }
.footer-about { font-size: .95rem; color: #93b3d6; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; font-size: .85rem; color: #7fa6ce; }
.footer-bottom a { color: #7fa6ce; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0; }
/* Progressive enhancement: reveals only hide once JS marks the document.
   Without JS (or if JS fails), all content stays fully visible. */
.js-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js-reveal .reveal { opacity: 1; transform: none; }
}
:focus-visible { outline: 3px solid var(--accent-500); outline-offset: 2px; border-radius: 4px; }
