/* Palette sampled from images/logo.png */
:root {
  --navy-900: #012a52;
  --navy-800: #02386d;  /* "HOSP" wordmark */
  --blue-700: #035099;  /* cross, right arm */
  --blue-600: #0072c6;  /* logo blue #0081d7, deepened for AA contrast on buttons */
  --blue-500: #0081d7;  /* cross, top/bottom arms and "my" */
  --blue-50: #e8f3fc;
  --ink: #16202b;
  --ink-2: #2b3744;
  --ink-3: #3d4956;
  --ink-4: #4a5664;
  --muted: #6f7c8a;
  --line: #e1e6ec;
  --line-2: #c5cfda;
  --utility-text: #dce8f5;
  --gutter: 56px;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  /* Let .layout stretch so the navy sidebar reaches the bottom of short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--blue-700); }
a:hover { color: var(--navy-800); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 16px; top: -48px;
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }

/* Utility bar */
.utility-bar {
  background: var(--navy-900);
  color: var(--utility-text);
  font-size: 13px;
  padding: 9px 32px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.utility-bar a { color: #fff; }
.utility-contact a { color: inherit; text-decoration: none; }
.utility-contact a:hover { text-decoration: underline; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; }
.brand-logo { display: block; height: 40px; width: auto; }

.header-actions { display: flex; gap: 12px; align-items: center; }

.search input {
  width: 320px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fff;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(0,129,215,.2); }

/* Buttons */
.btn {
  display: inline-block;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  padding: 15px 28px;
  line-height: 1.2;
  transition: background-color .15s ease, color .15s ease;
}
.btn-sm { padding: 11px 20px; font-size: 14px; }
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); color: #fff; }
.btn-outline { border: 2px solid var(--blue-600); color: var(--blue-600); padding: 13px 26px; }
.btn-outline:hover { background: var(--blue-50); color: var(--blue-700); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  place-items: center;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px; height: 2px;
  background: var(--ink);
  border-radius: 2px;
  position: relative;
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* Layout */
/* The navy column is painted on .layout so it runs full height while the nav itself stays pinned */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  flex: 1 0 auto;
  background: linear-gradient(to right, var(--navy-800) 240px, #fff 240px);
}

.side-nav {
  background: var(--navy-800);
  color: #fff;
  padding: 28px 0;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
}
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 11px 24px;
}
.side-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.side-nav a[aria-current="page"] { background: rgba(255,255,255,.14); box-shadow: inset 4px 0 0 #21adf1; }
.nav-primary a { font-weight: 700; padding: 13px 24px; }
.nav-divider { border: 0; height: 1px; background: rgba(255,255,255,.2); margin: 12px 24px; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px var(--gutter);
  align-items: center;
}
.hero h1 {
  font: 800 52px/1.05 'Public Sans', sans-serif;
  letter-spacing: -.03em;
  margin: 0 0 20px;
  text-wrap: pretty;
}
.hero p {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-3);
  margin: 0 0 28px;
  text-wrap: pretty;
}
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.hero-media {
  aspect-ratio: 4 / 3;
  max-height: 50vh;  /* keeps the photo from pushing the cards below the fold on wide screens */
  justify-self: end;
  border-radius: 24px;
  background: repeating-linear-gradient(135deg, #e4ecec 0 10px, #eef3f3 10px 20px);
  display: grid;
  place-items: center;
  font: 12px 'IBM Plex Mono', ui-monospace, monospace;
  color: #6b7a7e;
  overflow: hidden;
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Pathways */
.pathways {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 8px var(--gutter) 64px;
}
.pathways .card { padding: 20px 22px; }
.pathways .card h3 { font-size: 21px; }

/* Inner pages */
.page-head { padding: 32px var(--gutter) 4px; }
.breadcrumb { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.page-head h1 {
  font: 800 40px/1.08 'Public Sans', sans-serif;
  letter-spacing: -.03em;
  margin: 0 0 10px;
}
.lede { font-size: 18px; line-height: 1.5; color: var(--ink-3); margin: 0; max-width: 72ch; }

/* Sections flow into as many ~480px columns as the screen allows, to keep scrolling down */
.page-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
  gap: 8px 48px;
  align-items: start;
  padding: 16px var(--gutter) 24px;
}
.page-body > .callout, .page-body > .muted, .page-body > .cta-row { grid-column: 1 / -1; margin: 0; }
.page-body > .page-section:only-of-type { grid-column: 1 / -1; }
.page-section { padding: 8px 0; min-width: 0; }
.page-section h2 { font: 700 22px 'Public Sans', sans-serif; margin: 0 0 12px; }
.page-section p { line-height: 1.55; color: var(--ink-3); margin-top: 0; }
.muted { color: var(--muted); font-size: 15px; }

.callout {
  padding: 12px 18px;
  background: var(--blue-50);
  border-left: 4px solid var(--blue-600);
  border-radius: 6px;
  line-height: 1.5;
}

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
/* Information-only cards: flat grey, no border, so they don't read as buttons */
.card {
  border: 1.5px solid transparent;
  border-radius: 12px;
  padding: 16px 18px;
  background: #f3f6f9;
}
.card h3 { font: 700 18px 'Public Sans', sans-serif; margin: 0 0 6px; color: var(--ink); }
.card p { margin: 0 0 10px; color: var(--ink-4); line-height: 1.5; font-size: 15px; }
.card p:last-child { margin-bottom: 0; }
.card a { font-weight: 700; }

/* Cards with a destination: white, blue outline, shadow and an arrow button; the whole card is the link */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  font-weight: inherit;
  background: #fff;
  border-color: #bcd7ef;
  box-shadow: 0 1px 2px rgba(2,56,109,.06), 0 4px 12px rgba(2,56,109,.07);
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.card-link:hover {
  border-color: var(--blue-600);
  background: #f7fbff;
  box-shadow: 0 2px 4px rgba(2,56,109,.08), 0 8px 20px rgba(2,56,109,.12);
  color: inherit;
}
.card-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.card-arrow {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--blue-600);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
.card-link:hover .card-arrow { transform: translateX(3px); background: var(--blue-600); color: #fff; }
@media (prefers-reduced-motion: reduce) {
  .card-link, .card-arrow { transition: none; }
}

.doctor .avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--blue-50);
  color: var(--navy-800);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 12px;
}
.tag { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px; background: #fff; color: var(--ink-4); line-height: 1.35; }
.tag-yes { background: #e3f4ea; color: #1d6b3a; }

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.list li { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list span { color: var(--ink-4); }

.steps { margin: 0; padding-left: 22px; line-height: 1.7; color: var(--ink-3); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.stats div { background: var(--blue-50); border-radius: 8px; padding: 20px; }
.stats strong { display: block; font-size: 36px; color: var(--navy-800); letter-spacing: -.02em; }
.stats span { color: var(--ink-4); }

.cta-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; color: var(--ink-4); }

.form { display: grid; gap: 12px; max-width: 760px; }
.form-narrow { max-width: 400px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: 15px; }
.form input, .form select, .form textarea {
  font: inherit;
  font-weight: 400;
  padding: 9px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(0,129,215,.2); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-actions .form-note { flex: 1 1 260px; }
.form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; font-weight: 700; }
.form .btn:disabled { opacity: .55; cursor: not-allowed; }
.form-note { margin: 0; padding: 12px 16px; background: #fff7e0; border-radius: 6px; color: var(--ink-2); }

/* Tablet: side nav becomes a toggleable drawer */
@media (max-width: 1080px) {
  :root { --gutter: 40px; }
  .search input { width: 240px; }
  .hero h1 { font-size: 44px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: grid; }
  .layout { grid-template-columns: 1fr; background: #fff; }
  .side-nav { display: none; padding: 12px 0; position: static; max-height: none; }
  .side-nav.is-open { display: block; }
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; padding-bottom: 48px; }
  .pathways { grid-template-columns: 1fr; gap: 28px; }
}

/* Phone */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .utility-bar { padding: 8px 16px; flex-direction: column; gap: 2px; }
  .site-header { flex-wrap: wrap; padding: 16px; gap: 12px 8px; }
  .header-actions { display: contents; }
  .brand { order: 1; margin-right: auto; }
  .brand-logo { height: 30px; }
  .btn-sm { order: 2; padding: 10px 14px; }
  .nav-toggle { order: 3; }
  .search { order: 4; flex-basis: 100%; }
  .search input { width: 100%; }
  .hero h1 { font-size: 36px; }
  .hero p { font-size: 17px; }
  .hero-ctas .btn { flex: 1 1 auto; text-align: center; }
  .page-head { padding-top: 24px; }
  .page-head h1 { font-size: 32px; }
  .lede { font-size: 17px; }
  .form-row, .stats { grid-template-columns: 1fr; }
}
