/* Axis Care Coordination — static site styles
   Palette is taken from the logo: Axis Blue and Sky. */

:root {
  --blue: #0858a6;        /* logo dark blue */
  --sky: #29abe2;         /* logo light blue */
  --ink: #0b2540;         /* text, footer */
  --muted: #3b546b;       /* secondary text */
  --mist: #eef6fb;        /* pale section background */
  --line: #d3e2ee;
  --white: #ffffff;

  --font-head: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --max: 72rem;
  --section-y: clamp(3.5rem, 8vw, 6.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 5.4vw, 4.25rem); }
h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); }
h3 { font-size: 1.5rem; line-height: 1.15; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--mist { background: var(--mist); }
.measure { max-width: 38rem; }

.skip-link {
  position: absolute; left: 0.75rem; top: -4rem;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem; z-index: 100;
  border-radius: 0 0 6px 6px;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0.7rem 1.6rem;
  font: 700 1.05rem/1 var(--font-body);
  text-decoration: none; border-radius: 0.5rem;
  border: 2px solid var(--blue);
  background: var(--blue); color: #fff;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--outline { background: transparent; color: var(--blue); }
.btn--outline:hover { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn--light { background: #fff; border-color: #fff; color: var(--blue); }
.btn--light:hover { background: var(--mist); border-color: var(--mist); color: var(--ink); }
.btn--small { min-height: 2.75rem; padding: 0.55rem 1.2rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 4.5rem;
}
.brand { display: block; line-height: 0; }
.brand img { height: 2.75rem; width: auto; }
.site-nav ul { display: flex; align-items: center; gap: 1.75rem; list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) {
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: 1rem;
  padding-block: 0.4rem; border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--sky); }

/* ---------- Hero ---------- */
.hero { background: var(--mist); overflow: hidden; padding-block: clamp(3rem, 7vw, 6rem); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center; gap: clamp(2rem, 5vw, 4rem);
}
.hero h1 { max-width: 20ch; font-size: clamp(2.25rem, 4.6vw, 3.5rem); }
.hero .lede { font-size: 1.3rem; color: var(--muted); max-width: 34rem; margin-top: 1.5rem; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

.hero-x { width: min(100%, 26rem); margin-inline: auto; overflow: visible; }
.hero-x .x-dark { fill: var(--blue); }
.hero-x .x-light { fill: var(--sky); }
/* The one moment of motion: the two halves of the X come together. */
@keyframes meet-from-left  { from { translate: -90px 0; opacity: 0; } to { translate: 0 0; opacity: 1; } }
@keyframes meet-from-right { from { translate: 90px 0;  opacity: 0; } to { translate: 0 0; opacity: 1; } }
.hero-x .x-dark  { animation: meet-from-left  0.9s cubic-bezier(.2,.7,.2,1) 0.15s both; }
.hero-x .x-light { animation: meet-from-right 0.9s cubic-bezier(.2,.7,.2,1) 0.15s both; }

/* ---------- Programs: the two halves of the X ---------- */
.programs-head { margin-bottom: 2.5rem; }
.programs-head p { color: var(--muted); margin-top: 1rem; }
.split { --tip: 4.5rem; display: grid; grid-template-columns: 1fr 1fr; }
.panel { padding: clamp(2rem, 4vw, 3rem); }
.panel h3 { font-size: clamp(2.75rem, 5vw, 4rem); font-weight: 700; margin-bottom: 0.25rem; color: inherit; }
.panel .full-name { font: 600 1.35rem/1.25 var(--font-head); margin-bottom: 1.25rem; }
.panel p:last-child { margin-bottom: 0; }
.panel--nhtd {
  background: var(--blue); color: #fff;
  padding-right: calc(var(--tip) + 1.75rem);
  clip-path: polygon(0 0, calc(100% - var(--tip)) 0, 100% 50%, calc(100% - var(--tip)) 100%, 0 100%);
}
.panel--tbi {
  background: var(--sky); color: var(--ink);
  padding-left: calc(var(--tip) + 1.75rem);
  clip-path: polygon(var(--tip) 0, 100% 0, 100% 100%, var(--tip) 100%, 0 50%);
}
.fineprint { margin-top: 2rem; color: var(--muted); font-size: 1rem; max-width: 46rem; }

/* ---------- What a coordinator does ---------- */
.do-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.do-grid .intro { position: sticky; top: 7rem; }
.do-grid .intro p { color: var(--muted); margin-top: 1rem; }
.do-list { margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.do-list li { padding: 1.25rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 0.5rem 1.5rem; }
.do-list h3 { font-size: 1.4rem; }
.do-list p { margin: 0; color: var(--muted); }

/* ---------- How it starts (a real sequence) ---------- */
.steps { list-style: none; margin: 2.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 4.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 3.1rem; height: 3.1rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: #fff;
  font: 700 1.5rem/1 var(--font-head);
}
.steps li:not(:last-child)::after {
  content: ""; position: absolute; top: 1.55rem; left: 4rem; right: -1.6rem;
  border-top: 2px dashed var(--sky);
}
.steps h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.steps p { margin: 0; color: var(--muted); font-size: 1.05rem; }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 2px solid var(--ink); }
summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem 0; font: 600 1.35rem/1.25 var(--font-head); color: var(--ink);
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 0.7rem; height: 0.7rem;
  border-right: 3px solid var(--blue); border-bottom: 3px solid var(--blue);
  transform: rotate(45deg); transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(-135deg); }
details p { color: var(--muted); padding-bottom: 1.25rem; margin: 0; max-width: 40rem; }

/* ---------- Contact ---------- */
.contact { background: var(--blue); color: #fff; }
.contact h2 { color: #fff; }
.contact a { color: #fff; }
.contact a:hover { color: var(--mist); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.contact .lede { font-size: 1.25rem; margin-top: 1rem; max-width: 30rem; }
.contact-list { margin: 0; padding: 0; list-style: none; }
.contact-list li { padding: 1.1rem 0; border-top: 1px solid rgba(255,255,255,0.35); }
.contact-list li:last-child { border-bottom: 1px solid rgba(255,255,255,0.35); }
.contact-list .label { display: block; font-size: 1rem; color: #cfe6f6; margin-bottom: 0.1rem; }
.contact-list .value { font: 700 clamp(1.5rem, 3vw, 2rem)/1.2 var(--font-head); overflow-wrap: anywhere; }
.contact-list address { font-style: normal; }
.contact .note { margin-top: 1.5rem; font-size: 1rem; color: #e1effa; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9d8e6; padding-block: 2.25rem; font-size: 1rem; }
.site-footer .wrap { display: flex; align-items: center; gap: 1rem 1.5rem; flex-wrap: wrap; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 0.85rem; color: #fff; font: 700 1.3rem/1.1 var(--font-head); }
.footer-brand img { width: 2.6rem; height: 2.6rem; }
.site-footer p { margin: 0; }

/* ---------- Tablet / phone ---------- */
@media (max-width: 62rem) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-x { width: 14rem; margin-inline: 0; }
  .do-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .do-grid .intro { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 2.5rem; }
  .steps li:nth-child(2)::after { display: none; }
}
@media (max-width: 51rem) {
    .split { --tip: 2.5rem; grid-template-columns: 1fr; }
  .panel--nhtd {
    padding: 2rem 1.5rem calc(var(--tip) + 1.75rem);
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--tip)), 50% 100%, 0 calc(100% - var(--tip)));
  }
  .panel--tbi {
    padding: calc(var(--tip) + 1.75rem) 1.5rem 2rem;
    clip-path: polygon(0 var(--tip), 50% 0, 100% var(--tip), 100% 100%, 0 100%);
  }
  .do-list li { grid-template-columns: 1fr; }
}
@media (max-width: 36rem) {
  body { font-size: 1.0625rem; }
  .steps { grid-template-columns: 1fr; }
  .steps li::after { display: none; }
  .steps li { padding-top: 0; padding-left: 4.25rem; }
  .brand img { height: 2.4rem; }
  .hero .actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-x .x-dark, .hero-x .x-light { animation: none; }
  details summary::after, .btn { transition: none; }
}

/* ---------- Program pages and extras ---------- */
.panel a { color: inherit; font-weight: 700; text-underline-offset: 0.2em; }
.panel a:hover { color: inherit; text-decoration-thickness: 3px; }
.panel .more { margin-top: 1.25rem; }

.page-hero { background: var(--mist); padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.page-hero h1 { font-size: clamp(2.25rem, 4.8vw, 3.5rem); max-width: 20ch; }
.page-hero .lede { font-size: 1.25rem; color: var(--muted); max-width: 40rem; margin-top: 1.25rem; }
.page-hero .actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.75rem; }
.crumbs { font-size: 1rem; margin-bottom: 1.25rem; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 0.4rem; color: var(--sky); }
.crumbs a { color: var(--blue); }

.prose { max-width: 46rem; }
.prose > section + section { margin-top: clamp(2.5rem, 5vw, 3.75rem); }
.prose h2 { font-size: clamp(1.75rem, 3.2vw, 2.35rem); margin-bottom: 1rem; }
.prose h3 { font-size: 1.35rem; margin: 1.5rem 0 0.4rem; }
.prose ul { padding-left: 1.25rem; margin: 0 0 1em; }
.prose li { margin-bottom: 0.5em; padding-left: 0.2rem; }
.prose li::marker { color: var(--sky); }
.prose strong { color: var(--ink); }
.prose .services { columns: 2; column-gap: 2.5rem; }
.prose .services li { break-inside: avoid; }
.callout { background: var(--mist); border-left: 6px solid var(--sky); padding: 1.1rem 1.4rem; margin: 1.5rem 0; }
.callout p:last-child { margin-bottom: 0; }
.source-note { margin-top: clamp(2.5rem, 5vw, 3.75rem); padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 1rem; color: var(--muted); max-width: 46rem; }
.cta-band { background: var(--blue); color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem); }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 2.5rem; }
.cta-band h2 { color: #fff; font-size: clamp(1.75rem, 3.4vw, 2.4rem); max-width: 24ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.cta-band .btn--outline { color: #fff; border-color: #fff; }
.cta-band .btn--outline:hover { background: #fff; color: var(--blue); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }
.footer-links a { color: #fff; }
.site-footer .wrap > div:first-child { display: grid; gap: 0.9rem; }
.site-footer .meta { display: grid; gap: 0.5rem; justify-items: end; text-align: right; }
.faq-block details:first-of-type { border-top: 2px solid var(--ink); }
@media (max-width: 51rem) {
  .prose .services { columns: 1; }
  .site-footer .meta { justify-items: start; text-align: left; }
}

/* ---------- NHTD vs TBI comparison ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.compare-intro { color: var(--muted); margin-top: 1rem; }
.table-wrap { margin-top: 2rem; }
table.compare { width: 100%; border-collapse: collapse; background: #fff; }
.compare thead th { text-align: left; padding: 1rem 1.25rem; font: 700 1.6rem/1 var(--font-head); }
.compare thead th:nth-child(2) { background: var(--blue); color: #fff; }
.compare thead th:nth-child(3) { background: var(--sky); color: var(--ink); }
.compare tbody th, .compare tbody td { text-align: left; vertical-align: top; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; line-height: 1.5; }
.compare tbody th { width: 17%; font: 700 1.15rem/1.3 var(--font-head); color: var(--ink); }
.compare tbody td { width: 41.5%; color: var(--ink); }
@media (max-width: 51rem) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto !important; }
  .compare tbody tr { margin-bottom: 1.25rem; border: 1px solid var(--line); }
  .compare tbody th { background: var(--ink); color: #fff; border: 0; padding: 0.7rem 1rem; }
  .compare tbody td { padding: 0.9rem 1rem; }
  .compare td::before { content: attr(data-label); display: block; font: 700 1.05rem/1.2 var(--font-head); margin-bottom: 0.25rem; color: var(--blue); }
}

/* ---------- Mobile menu ---------- */
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.menu-toggle { display: none; }
@media (max-width: 51rem) {
  .site-nav { gap: 0.6rem; }
  /* Without script: the links wrap onto their own row under the logo. */
  .site-header .wrap { flex-wrap: wrap; min-height: 0; padding-block: 0.6rem; }
  .site-nav { width: 100%; flex-wrap: wrap; justify-content: space-between; }
  .site-nav .nav-links { flex-wrap: wrap; gap: 0.1rem 1.1rem; }

  /* With script: a Menu button and a dropdown. */
  html.js .site-header .wrap { flex-wrap: nowrap; min-height: 4.5rem; padding-block: 0; }
  html.js .site-nav { width: auto; flex-wrap: nowrap; justify-content: flex-start; }
  html.js .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    min-height: 2.75rem; padding: 0.5rem 0.9rem;
    font: 700 1rem/1 var(--font-body); color: var(--blue);
    background: transparent; border: 2px solid var(--blue); border-radius: 0.5rem; cursor: pointer;
  }
  html.js .menu-toggle::after {
    content: ""; width: 0.5rem; height: 0.5rem; margin-top: -0.2rem;
    border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); transition: transform 0.2s;
  }
  html.js .menu-toggle[aria-expanded="true"]::after { transform: rotate(-135deg); margin-top: 0.2rem; }
  html.js .site-nav .nav-links { display: none; }
  html.js .site-header.menu-open .site-nav .nav-links {
    display: block; position: absolute; left: 0; right: 0; top: 100%;
    margin: 0; padding: 0.25rem var(--gutter) 1rem;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(11, 37, 64, 0.12);
  }
  html.js .site-nav .nav-links li { border-bottom: 1px solid var(--line); }
  html.js .site-nav .nav-links li:last-child { border-bottom: 0; }
  html.js .site-nav .nav-links a { display: block; padding: 0.95rem 0; font: 700 1.3rem/1.2 var(--font-head); color: var(--ink); border-bottom: 0; }
  .site-nav .nav-links a[aria-current="page"] { color: var(--blue); }
}
@media (max-width: 24rem) {
  .site-nav .nav-call { padding-inline: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .menu-toggle::after { transition: none; }
}
