/* ============================================================
   Vasoflo EECP — Stylesheet
   Clinician-facing medical referral site
   ============================================================ */

:root {
  --navy: #0a2540;
  --navy-dark: #051a30;
  --navy-soft: #14385f;
  --blue: #1e5599;
  --blue-soft: #e8eef7;
  --teal: #2d7a7a;
  --teal-soft: #e6f1f1;
  --charcoal: #1f2937;
  --text: #1f2937;
  --text-muted: #4b5563;
  --gray-700: #374151;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.04);
  --shadow-md: 0 4px 12px rgba(10, 37, 64, 0.06);
  --shadow-lg: 0 12px 32px rgba(10, 37, 64, 0.08);
  --radius: 4px;
  --radius-lg: 8px;
  --container: 1180px;
  --container-narrow: 880px;
  --font-serif: "Source Serif 4", "Source Serif Pro", "Georgia", "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

/* ------------------ Reset ------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--navy);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1.05rem; font-family: var(--font-sans); font-weight: 600; }

p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }
li { margin-bottom: 0.35em; }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }

small, .small { font-size: 0.875rem; color: var(--text-muted); }
.muted { color: var(--text-muted); }

/* ------------------ Layout ------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}
.container-narrow { max-width: var(--container-narrow); }
section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--border); }
.section-tight { padding: 2.5rem 0; }
.section-tint { background: var(--gray-50); }
.section-navy { background: var(--navy); color: #d8e1ec; }
.section-navy h1, .section-navy h2, .section-navy h3 { color: var(--white); }

.grid { display: grid; gap: 2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
/* 2-column layout with a wider right column on desktop, stacks on mobile */
.grid-2-wide-right { grid-template-columns: 1fr 1.67fr; }
@media (max-width: 900px) {
  .grid-2-wide-right { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.75rem;
}
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 60ch; }

/* ------------------ Header / Nav ------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--navy);
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  line-height: 1;
}
.brand:hover { text-decoration: none; color: var(--navy-dark); }
.brand img {
  height: 72px;
  width: auto;
  max-width: none;
  display: block;
  flex-shrink: 0;
}
@media (max-width: 600px) {
  .brand img { height: 56px; }
}
.site-footer .brand {
  display: block;
  line-height: 0;
  margin-bottom: 0.5rem;
}
.site-footer .brand img { height: 64px; }
@media (max-width: 600px) {
  .site-footer .brand img { height: 52px; }
}
.brand-mark {
  width: 32px; height: 32px; flex: 0 0 32px;
}
.brand-sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-top: 2px;
}
.brand-text { line-height: 1.05; }

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 1.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--gray-700);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--navy);
  border-bottom-color: var(--teal);
  text-decoration: none;
}
.nav-links a.nav-cta,
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  background: var(--navy);
  color: var(--white) !important;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none !important;
  white-space: nowrap;
}
.nav-links a.nav-cta:hover { border-bottom-color: transparent; }
.nav-cta:hover { background: var(--navy-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; color: var(--navy); }

@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.25rem 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem 0; border-bottom: 1px solid var(--border); }
  .nav-links a:last-child { border-bottom: none; }
  .nav-cta { justify-content: center; margin-top: 0.5rem; }
}

/* ------------------ Buttons ------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  text-decoration: none !important;
  line-height: 1;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--navy); background: var(--gray-50); color: var(--navy); }
/* Solid teal CTA button (brand teal) */
.btn-teal { background: #1F8B96; color: var(--white); border-color: #1F8B96; }
.btn-teal:hover { background: #176d75; color: var(--white); border-color: #176d75; }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-large { padding: 0.95rem 1.6rem; font-size: 1rem; }
/* Modifier for outline buttons placed on a dark/navy background.
   Overrides .btn-secondary's light styling so the button reads as an
   outline-only CTA against a dark surface. */
.btn-on-dark {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
}
.btn-on-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  border-color: var(--white);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* ------------------ Hero ------------------ */
.hero {
  background: linear-gradient(180deg, #f7fafc 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  padding: 4.5rem 0 4rem;
  position: relative;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 { margin-bottom: 1rem; }
.hero .lede { font-size: 1.2rem; }
.hero-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
@media (max-width: 900px) {
  .hero { padding: 3rem 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
}

/* ------------------ Cards ------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--navy);
}
.card p:last-child { margin-bottom: 0; }
.card-icon {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--blue-soft);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  color: var(--blue);
}
.card-icon svg { width: 20px; height: 20px; }
.card-link {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-weight: 600; font-size: 0.9rem; margin-top: 0.75rem;
  color: var(--blue);
}
.card-link svg { width: 14px; height: 14px; transition: transform 0.15s; }
.card-link:hover svg { transform: translateX(3px); }

/* ------------------ Callouts ------------------ */
.callout {
  background: var(--gray-50);
  border-left: 3px solid var(--teal);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.callout strong { color: var(--navy); }
.callout-warning {
  background: #fff8ed;
  border-left-color: #c2772f;
}

/* ------------------ Tables / Definition lists ------------------ */
.table-clean {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin: 1rem 0 2rem;
}
.table-clean th, .table-clean td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.table-clean th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--navy);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.table-clean tr:last-child td { border-bottom: none; }

dl.spec { display: grid; grid-template-columns: 200px 1fr; gap: 0.5rem 1.5rem; }
dl.spec dt { font-weight: 600; color: var(--navy); }
dl.spec dd { margin: 0; color: var(--text-muted); }
@media (max-width: 600px) { dl.spec { grid-template-columns: 1fr; } dl.spec dt { margin-top: 0.5rem; } }

/* ------------------ Footer ------------------ */
.site-footer {
  background: var(--navy);
  color: #b9c3d1;
  padding: 3rem 0 1.5rem;
  font-size: 0.92rem;
}
.site-footer a { color: #d8e1ec; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
  margin-bottom: 0.85rem;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-bottom {
  border-top: 1px solid #1c3a5e;
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: #8c99ad;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ------------------ Page header (sub-page) ------------------ */
.page-header {
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.5rem;
}
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--navy); }

/* ------------------ Prose ------------------ */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 2.5rem; }
.prose h3 { margin-top: 2rem; color: var(--navy); }
.prose ul li, .prose ol li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--teal);
  background: var(--gray-50);
  font-style: italic;
  color: var(--gray-700);
}

/* ------------------ Diagram styles ------------------ */
.diagram {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.diagram svg { width: 100%; height: auto; max-width: 720px; margin: 0 auto; }
.diagram-caption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

/* ------------------ Steps / Pathway ------------------ */
.steps { counter-reset: step; list-style: none; padding-left: 0; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 0.85rem;
  background: var(--white);
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  width: 2rem; height: 2rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: var(--font-sans);
}
.steps > li h3 { margin: 0 0 0.35rem; font-family: var(--font-sans); }
.steps > li p { margin: 0 0 0.6em; color: var(--text-muted); }
.steps > li p:last-child { margin-bottom: 0; }

/* ------------------ FAQ ------------------ */
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  margin-bottom: 0.6rem;
  background: var(--white);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.25rem;
  font-weight: 600;
  color: var(--navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--teal);
  font-weight: 400;
  transition: transform 0.15s;
}
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 1.25rem 1.25rem; color: var(--text-muted); }
.faq details > div > :last-child { margin-bottom: 0; }

/* ------------------ Forms ------------------ */
.form-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}
.form-section legend, .form-section h2 {
  font-family: var(--font-sans);
  color: var(--navy);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  padding: 0;
}
.form-section .section-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.25rem;
}
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; }
.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}
.field .hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field input[type="number"],
.field input[type="url"],
.field select,
.field textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}
.field textarea { resize: vertical; min-height: 90px; }
.field input[type="file"] {
  font-size: 0.9rem;
  padding: 0.4rem 0;
}
.required { color: #c0392b; margin-left: 2px; }

.checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem 1rem;
}
.checkbox-row, .radio-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--gray-700);
  padding: 0.35rem 0;
  cursor: pointer;
}
.checkbox-row input, .radio-row input {
  margin-top: 0.25rem;
  width: 16px; height: 16px;
  accent-color: var(--navy);
}
.consent-row {
  background: var(--blue-soft);
  border: 1px solid #c5d3e6;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1.5rem;
}
.form-status {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.form-status.error { color: #b91c1c; }
.form-status.success { color: #15803d; }

.captcha-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  background: var(--gray-50);
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.captcha-row label { font-weight: 600; color: var(--navy); }
.captcha-row input { width: 80px; padding: 0.4rem 0.6rem; font-family: inherit; }

/* Hidden honeypot */
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* Upload zone — clean file picker for the 60-second referral */
.upload-zone {
  display: block;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--white);
  padding: 1rem 1.25rem;
  transition: border-color 0.15s;
}
.upload-zone:hover, .upload-zone:focus-within {
  border-color: var(--blue);
}
.upload-zone .upload-label {
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.upload-zone input[type="file"] {
  display: block;
  font-size: 0.92rem;
}

/* Reassurance banner shown above the form */
.reassure {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--teal-soft);
  border-left: 3px solid var(--teal);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--gray-700);
}
.reassure svg {
  width: 20px; height: 20px;
  color: var(--teal);
  flex-shrink: 0;
  margin-top: 2px;
}
.reassure strong { color: var(--navy); }

/* "Other ways to refer" tile */
.refer-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.refer-tile-icon {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  background: var(--blue-soft);
  color: var(--blue);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.refer-tile-icon svg { width: 18px; height: 18px; }
.refer-tile h4 {
  margin: 0 0 0.25rem;
  color: var(--navy);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.refer-tile p { margin: 0; font-size: 0.95rem; color: var(--gray-700); }
.refer-tile a { font-weight: 500; }

/* ------------------ Utility ------------------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
  border: 0;
}
.tag {
  display: inline-block;
  background: var(--teal-soft);
  color: var(--teal);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ------------------ Print ------------------ */
@media print {
  .site-header, .site-footer, .nav-cta, .cta-row, .form-actions { display: none !important; }
  body { font-size: 11pt; color: #000; }
  a { color: #000; text-decoration: none; }
  section { padding: 0.5rem 0; border: none; }
}

/* ------------------ Accessibility ------------------ */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}
.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  background: var(--navy);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius) 0;
  transform: translateY(-100%);
  transition: transform 0.1s;
}
.skip-link:focus { transform: translateY(0); }
