/* =========================================================
   Rosewood Hospice Care — design tokens & components
   Palette: bone / sand / warm off-white + rosewood clay + dusty sage
   Type: Boska (display serif) + Work Sans (body)
   ========================================================= */

:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.9375rem, 0.85rem + 0.35vw, 1.0625rem);
  --text-base: clamp(1.0625rem, 1rem + 0.3vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.25rem);
  --text-3xl: clamp(2.5rem, 1.2rem + 3.6vw, 4.5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --radius-sm: 0.25rem; --radius-md: 0.4rem; --radius-lg: 0.75rem;
  --radius-xl: 1.25rem; --radius-full: 9999px;

  --transition-interactive: 220ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-narrow: 660px;
  --content-default: 980px;
  --content-wide: 1200px;

  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Source Sans 3', 'Source Sans Pro', 'Helvetica Neue', system-ui, sans-serif;
}

:root, [data-theme='light'] {
  --color-bg: #fbf8f3;            /* warm off-white */
  --color-surface: #fffdfa;        /* bone */
  --color-surface-2: #f6efe4;      /* light sand */
  --color-surface-offset: #f0e7d9; /* sand */
  --color-surface-deep: #2c2521;   /* warm near-black for dark bands */
  --color-divider: #e4d9c7;
  --color-border: #d6c9b5;

  --color-text: #2b2420;
  --color-text-muted: #665a50;
  --color-text-faint: #726757;
  --color-text-inverse: #faf6ef;

  --color-primary: #782e3b;        /* rosewood wine — brand logo colour */
  --color-primary-hover: #5f2330;
  --color-primary-soft: #f4e3e5;
  --color-secondary: #4b5c42;      /* dusty sage, contrast-safe */
  --color-secondary-soft: #e7ebe2;

  --shadow-sm: 0 1px 2px oklch(0.25 0.03 50 / 0.07);
  --shadow-md: 0 6px 18px oklch(0.25 0.03 50 / 0.09);
  --shadow-lg: 0 18px 44px oklch(0.25 0.03 50 / 0.13);
}

[data-theme='dark'] {
  --color-bg: #1a1614;
  --color-surface: #201b18;
  --color-surface-2: #262019;
  --color-surface-offset: #2b241d;
  --color-surface-deep: #14100e;
  --color-divider: #342c25;
  --color-border: #453b32;

  --color-text: #ece5da;
  --color-text-muted: #b3a79a;
  --color-text-faint: #a2968a;
  --color-text-inverse: #1a1614;

  --color-primary: #d59079;
  --color-primary-hover: #e6a992;
  --color-primary-soft: #37251f;
  --color-secondary: #a3b795;
  --color-secondary-soft: #232a20;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 6px 18px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 18px 44px oklch(0 0 0 / 0.55);
}

/* ---------- layout primitives ---------- */
.wrap { width: 100%; max-width: var(--content-wide); margin-inline: auto; padding-inline: var(--space-6); }
.wrap--default { max-width: var(--content-default); }
.wrap--narrow { max-width: var(--content-narrow); }
@media (min-width: 800px) { .wrap { padding-inline: var(--space-10); } }

section { padding-block: clamp(var(--space-12), 7vw, var(--space-24)); }
.section--tight { padding-block: clamp(var(--space-10), 5vw, var(--space-16)); }

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  display: block;
}
[data-theme='dark'] .eyebrow { color: var(--color-primary); }

.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.008em; font-variation-settings: 'opsz' 60; }
h1, h2, h3 { font-family: var(--font-display); }
h1, h2 { font-variation-settings: 'opsz' 60; }
.display em, .display i { font-style: italic; font-variation-settings: 'opsz' 60; }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-family: var(--font-body); font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.005em; }

.lede { font-size: var(--text-lg); color: var(--color-text-muted); line-height: 1.55; max-width: 46ch; }
.muted { color: var(--color-text-muted); }
.prose > * + * { margin-top: var(--space-5); }
.prose h3 { margin-top: var(--space-10); }
.prose a { color: var(--color-primary); text-underline-offset: 3px; }

.rule { border: 0; border-top: 1px solid var(--color-divider); margin-block: var(--space-16); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 500; letter-spacing: 0.01em;
  padding: var(--space-3) var(--space-6); min-height: 46px;
  border-radius: var(--radius-full); text-decoration: none; border: 1px solid transparent;
}
.btn--primary { background: var(--color-primary); color: #fffdfa; }
[data-theme='dark'] .btn--primary { color: #1a1614; }
.btn--primary:hover { background: var(--color-primary-hover); }
.btn--ghost { border-color: var(--color-border); color: var(--color-text); background: transparent; }
.btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn--light { background: var(--color-surface); color: #2b2420; }
.btn--light:hover { background: var(--color-surface-offset); }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 1px solid color-mix(in oklab, var(--color-divider) 70%, transparent);
}
.header__inner {
  display: flex; align-items: center; gap: var(--space-6);
  min-height: var(--header-h); padding-block: var(--space-3);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; color: var(--color-text); flex: none; }
.brand__logo { display: block; height: 52px; width: auto; }
.brand__logo--dark { display: none; }
[data-theme='dark'] .brand__logo--light { display: none; }
[data-theme='dark'] .brand__logo--dark { display: block; }
.footer .brand__logo { height: 46px; }
.footer .brand__logo--dark { display: block; }
@media (max-width: 900px) { .brand__logo { height: 38px; } }
@media (max-width: 400px) { .brand__logo { height: 32px; } }

.nav { margin-inline: auto; }
.nav__list { display: flex; align-items: center; gap: var(--space-6); list-style: none; }
.nav__link {
  font-size: var(--text-base); text-decoration: none; color: var(--color-text-muted);
  padding-block: var(--space-2); position: relative;
}
.nav__link:hover { color: var(--color-text); }
.nav__link[aria-current='page'] { color: var(--color-text); }
.nav__link[aria-current='page']::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--color-primary);
}
.header__actions { display: flex; align-items: center; gap: var(--space-3); }
.header__phone {
  display: inline-flex; align-items: center; gap: var(--space-2);
  font-size: var(--text-sm); font-weight: 500; text-decoration: none;
  color: var(--color-text); border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-full); min-height: 42px;
}
.header__phone:hover { border-color: var(--color-primary); color: var(--color-primary); }
.header__phone svg { color: var(--color-primary); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-full); color: var(--color-text-muted);
}
.icon-btn:hover { color: var(--color-text); background: var(--color-surface-2); }
.nav-toggle { display: none; }

.skip-link {
  position: absolute; left: var(--space-4); top: var(--space-2); z-index: 100;
  transform: translateY(-160%); background: var(--color-primary); color: #fff;
  padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm); font-size: var(--text-sm);
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

@media (max-width: 1080px) {
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; margin: 0;
    background: var(--color-bg); border-bottom: 1px solid var(--color-divider);
    padding: var(--space-4) var(--space-6) var(--space-8);
    display: none;
  }
  .nav[data-open='true'] { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__link { display: block; padding: var(--space-4) 0; font-size: var(--text-base); border-bottom: 1px solid var(--color-divider); }
  .nav__link[aria-current='page']::after { display: none; }
  .nav-toggle { display: inline-flex; }
  .header__inner { gap: var(--space-3); }
  .header__phone span { display: none; }
  .header__phone { padding: var(--space-2); width: 44px; justify-content: center; }
}

/* ---------- hero ---------- */
.hero { padding-block: 0; }
.hero__grid {
  display: grid; gap: var(--space-8); align-items: center;
  width: 100%; padding-inline: var(--space-6);
}
@media (min-width: 800px) { .hero__grid { padding-inline: var(--space-10); } }
@media (min-width: 900px) {
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(var(--space-10), 5vw, var(--space-16));
    padding-left: max(var(--space-10), calc((100vw - var(--content-wide)) / 2 + var(--space-10)));
    padding-right: 0;
  }
}
.hero__copy { padding-block: clamp(var(--space-12), 6vw, var(--space-24)); }
.hero__title { font-size: var(--text-3xl); line-height: 1.04; letter-spacing: -0.02em; max-width: 18ch; }
.hero__title em { font-style: italic; color: var(--color-primary); }
.hero__lede { margin-top: var(--space-6); font-size: var(--text-lg); color: var(--color-text-muted); max-width: 42ch; }
.hero__actions { margin-top: var(--space-8); display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.hero__note { margin-top: var(--space-5); font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.04em; }
.hero__media { position: relative; }
.hero__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
@media (min-width: 900px) {
  .hero__media img { border-radius: var(--radius-lg) 0 0 var(--radius-lg); min-height: 620px; box-shadow: none; }
}

/* page hero (interior pages) */
.pagehead { padding-block: clamp(var(--space-12), 6vw, var(--space-20)) var(--space-10); }
.pagehead h1 { font-size: var(--text-2xl); max-width: 22ch; }
.pagehead .lede { margin-top: var(--space-5); }
.pagehead--band { background: var(--color-surface-2); border-bottom: 1px solid var(--color-divider); }

/* ---------- editorial figure ---------- */
figure.editorial { margin: 0; }
figure.editorial img { border-radius: var(--radius-lg); width: 100%; object-fit: cover; }
figcaption { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.02em; }
.bleed { position: relative; }
.bleed img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 0; }

.split { display: grid; gap: var(--space-8); align-items: center; }
.split--top { align-items: start; }
@media (min-width: 860px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(var(--space-10), 5vw, var(--space-20)); }
  .split--reverse > :first-child { order: 2; }
}

/* ---------- cards ---------- */
.cards { display: grid; gap: var(--space-6); }
@media (min-width: 700px) { .cards--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 700px) { .cards--3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--color-surface); border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg); padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-3);
}
.card h3 { font-size: var(--text-lg); }
.card p { font-size: var(--text-base); color: var(--color-text-muted); margin: 0; }
.card__num {
  font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-primary);
  border-bottom: 1px solid var(--color-divider); padding-bottom: var(--space-3); margin-bottom: var(--space-1);
}
.card__icon { color: var(--color-secondary); }

/* service list — editorial rows */
.srv { border-top: 1px solid var(--color-divider); }
.srv__row { display: grid; gap: var(--space-4); padding-block: clamp(var(--space-8), 4vw, var(--space-12)); border-bottom: 1px solid var(--color-divider); }
@media (min-width: 860px) { .srv__row { grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--space-8); } }
.srv__idx { font-family: var(--font-display); font-size: var(--text-lg); color: var(--color-primary); }
.srv__title { font-size: var(--text-xl); font-family: var(--font-display); font-weight: 400; }
.srv__body p { color: var(--color-text-muted); }
.srv__body ul { margin-top: var(--space-4); padding-left: 0; list-style: none; display: grid; gap: var(--space-2); }
.srv__body li { position: relative; padding-left: var(--space-5); font-size: var(--text-sm); color: var(--color-text-muted); }
.srv__body li::before {
  content: ''; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px;
  border-radius: 50%; background: var(--color-secondary);
}

/* ---------- pull quote ---------- */
.quote { background: var(--color-surface-deep); color: var(--color-text-inverse); }
[data-theme='dark'] .quote { border-block: 1px solid var(--color-border); }
.quote blockquote { max-width: 24ch; }
.quote__text {
  font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.3;
  font-style: italic; max-width: 34ch; color: #f7f1e8;
}
.quote__cite { margin-top: var(--space-6); font-size: var(--text-sm); font-style: normal; color: #c9b8a6; display: block; }
.quote__grid { display: grid; gap: var(--space-10); align-items: center; }
@media (min-width: 860px) { .quote__grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-16); } }
.quote__grid img { border-radius: var(--radius-lg); }

/* ---------- stats / values ---------- */
.stats { display: grid; gap var(--space-8); gap: var(--space-8); }
@media (min-width: 700px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat__value { font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-primary); }
.stat__label { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: var(--space-2); }

/* ---------- team ---------- */
.team-group + .team-group { margin-top: var(--space-16); }
.team-group__head { display: flex; align-items: baseline; gap: var(--space-4); border-bottom: 1px solid var(--color-divider); padding-bottom: var(--space-4); margin-bottom: var(--space-8); }
.team-group__head h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); }
.team-group__count { font-size: var(--text-xs); color: var(--color-text-faint); letter-spacing: 0.14em; text-transform: uppercase; margin-left: auto; }
.team { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .team { grid-template-columns: repeat(3, 1fr); } }
.person {
  display: flex; align-items: center; gap: var(--space-4);
  background: var(--color-surface); border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg); padding: var(--space-5);
}
.person__mono {
  flex: none; width: 54px; height: 54px; border-radius: var(--radius-full);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.05rem;
  letter-spacing: 0.02em; background: var(--color-primary-soft); color: var(--color-primary);
  border: 1px solid color-mix(in oklab, var(--color-primary) 22%, transparent);
}
.person--sage .person__mono { background: var(--color-secondary-soft); color: var(--color-secondary); border-color: color-mix(in oklab, var(--color-secondary) 25%, transparent); }
.person__name { display: block; font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; }
.person__role { display: block; font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-text-faint); margin-top: var(--space-1); }

/* ---------- accordion ---------- */
.acc { border-top: 1px solid var(--color-divider); }
.acc__item { border-bottom: 1px solid var(--color-divider); }
.acc__btn {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5);
  text-align: left; padding: var(--space-5) 0; font-family: var(--font-display);
  font-size: var(--text-lg); color: var(--color-text); line-height: 1.3;
}
.acc__btn:hover { color: var(--color-primary); }
.acc__icon { flex: none; margin-top: 0.35em; color: var(--color-primary); transition: transform var(--transition-interactive); }
.acc__btn[aria-expanded='true'] .acc__icon { transform: rotate(45deg); }
.acc__panel { overflow: hidden; height: 0; transition: height 320ms cubic-bezier(0.16, 1, 0.3, 1); }
.acc__panel-inner { padding-bottom: var(--space-6); }
.acc__panel-inner p { color: var(--color-text-muted); }
.acc__panel-inner p + p { margin-top: var(--space-4); }

/* ---------- checklist ---------- */
.checklist { list-style: none; display: grid; gap: var(--space-4); }
.checklist li { position: relative; padding-left: var(--space-8); color: var(--color-text-muted); }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px;
  border-radius: 50%; border: 1px solid var(--color-secondary);
  background: var(--color-secondary-soft);
}
.compare { display: grid; gap: var(--space-6); }
@media (min-width: 760px) { .compare { grid-template-columns: 1fr 1fr; gap: var(--space-8); } }
.compare__col { background: var(--color-surface); border: 1px solid var(--color-divider); border-radius: var(--radius-lg); padding: var(--space-8); }
.compare__col h3 { font-family: var(--font-display); font-weight: 400; font-size: var(--text-lg); margin-bottom: var(--space-5); }
.compare__col ul { list-style: none; display: grid; gap: var(--space-3); }
.compare__col li { font-size: var(--text-sm); color: var(--color-text-muted); padding-left: var(--space-5); position: relative; }
.compare__col li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 10px; height: 1px; background: var(--color-primary); }
.compare__col--is li::before { background: var(--color-secondary); }

/* ---------- form ---------- */
.form { display: grid; gap: var(--space-5); }
.field { display: grid; gap: var(--space-2); }
.field > label { font-size: var(--text-sm); font-weight: 500; }
.field .hint { font-size: var(--text-xs); color: var(--color-text-faint); }
.field input, .field select, .field textarea {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: var(--space-3) var(--space-4);
  font-size: var(--text-base); min-height: 48px; width: 100%; color: var(--color-text);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-primary); outline-offset: 1px; }
.field--row { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .field--row { grid-template-columns: 1fr 1fr; } }
.form__status { font-size: var(--text-sm); color: var(--color-secondary); min-height: 1.4em; }
.form__status[data-error='true'] { color: var(--color-primary); }
.req { color: var(--color-primary); }

.contact-grid { display: grid; gap: clamp(var(--space-10), 5vw, var(--space-16)); }
@media (min-width: 1040px) { .contact-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); } }
.info-block + .info-block { margin-top: var(--space-8); padding-top: var(--space-8); border-top: 1px solid var(--color-divider); }
.info-block h3 { font-size: var(--text-base); letter-spacing: 0.08em; text-transform: uppercase; font-size: var(--text-xs); color: var(--color-text-faint); font-weight: 500; margin-bottom: var(--space-3); }
.info-block p, .info-block address { font-style: normal; color: var(--color-text-muted); }
.info-block a { color: var(--color-text); text-decoration-color: var(--color-primary); text-underline-offset: 3px; }
.phone-big {
  font-family: var(--font-display); font-size: var(--text-xl); color: var(--color-text);
  text-decoration: none; display: inline-block; letter-spacing: -0.01em;
}
.phone-big:hover { color: var(--color-primary); }
.badge {
  display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-secondary);
  background: var(--color-secondary-soft); line-height: 1.5; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--color-secondary); flex: none; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-surface-2); border-block: 1px solid var(--color-divider); }
.cta-band__inner { display: grid; gap: var(--space-8); align-items: center; }
@media (min-width: 860px) { .cta-band__inner { grid-template-columns: 1.2fr auto; } }
.cta-band h2 { font-size: var(--text-xl); max-width: 26ch; }
.cta-band p { margin-top: var(--space-4); color: var(--color-text-muted); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

/* ---------- footer ---------- */
.footer { background: var(--color-surface-deep); color: #d8ccbe; padding-block: var(--space-16) var(--space-8); }
.footer a { color: #efe6da; text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__grid { display: grid; gap: var(--space-10); }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1040px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.footer .brand { color: #f7f1e8; }
.footer .brand__sub { color: #b3a292; }
.footer__about { font-size: var(--text-sm); color: #c6b8a8; margin-top: var(--space-5); max-width: 34ch; }
.footer h2 { font-family: var(--font-body); font-size: var(--text-xs); letter-spacing: 0.14em; text-transform: uppercase; color: #b3a292; margin-bottom: var(--space-4); font-weight: 500; }
.footer ul { list-style: none; display: grid; gap: var(--space-3); font-size: var(--text-sm); }
/* footer bottom */
.footer__bottom {
  margin-top: var(--space-16); padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-8);
  font-size: var(--text-xs); color: #b3a292;
}
.footer__bottom p { max-width: 62ch; }

/* ---------- reveal motion ---------- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 720ms ease, transform 720ms cubic-bezier(0.16, 1, 0.3, 1); }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { [data-reveal] { opacity: 1; transform: none; } }

/* ---------- small-screen refinements ---------- */
@media (max-width: 640px) {
  .team-group__head { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
  .team-group__count { margin-left: 0; }
  .person { align-items: flex-start; }
  .btn { width: 100%; justify-content: center; }
  .hero__actions .btn, .cta-band__actions .btn { width: 100%; }
  .stats { gap: var(--space-6); }
}
@media (max-width: 420px) {
  .quote__text { font-size: var(--text-lg); }
}

/* ---------- sticky mobile call bar ---------- */
.callbar { display: none; }

@media (max-width: 1080px) {
  .callbar {
    display: block;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 90;
    background: color-mix(in oklab, var(--color-bg) 92%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--color-divider);
    padding: var(--space-3) var(--space-5);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }
  .callbar__btn {
    display: flex; align-items: center; justify-content: center; gap: var(--space-3);
    width: 100%; min-height: 54px;
    background: var(--color-primary); color: #fff;
    border-radius: var(--radius-full);
    font-size: 1.0625rem; font-weight: 600; letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: var(--shadow-md);
  }
  .callbar__btn:hover, .callbar__btn:active { background: var(--color-primary-hover); color: #fff; }
  .callbar__btn:focus-visible { outline: 3px solid var(--color-primary); outline-offset: 3px; }
  .callbar__btn svg { flex: none; }
  .callbar__note {
    margin-top: var(--space-2);
    font-size: 0.8125rem; color: var(--color-text-faint);
  }
  [data-theme='dark'] .callbar__btn { color: #1a1614; }
  /* keep footer content clear of the fixed bar */
  .footer { padding-bottom: calc(var(--space-8) + 96px); }
}

@media (max-width: 1080px) and (prefers-reduced-motion: no-preference) {
  .callbar { transition: transform 0.28s ease; }
  .callbar[data-hidden='true'] { transform: translateY(120%); }
}

/* ---------- more air ---------- */
section { padding-block: clamp(var(--space-16), 9vw, var(--space-24)); }
.section--tight { padding-block: clamp(var(--space-12), 6.5vw, var(--space-20)); }
.prose p + p { margin-top: var(--space-5); }
.prose p, .muted { line-height: 1.72; }

/* ================= FAQ page ================= */
.faq-tools {
  display: grid; gap: var(--space-5);
  padding-bottom: var(--space-4);
}
.faq-search {
  display: flex; align-items: center; gap: var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: 0 var(--space-5);
  max-width: 34rem; color: var(--color-text-muted);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.faq-search:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.faq-search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; color: var(--color-text);
  padding-block: 0.85rem;
}
.faq-search input::placeholder { color: var(--color-text-faint); }
.faq-search input::-webkit-search-cancel-button { cursor: pointer; }

.chiplinks { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chiplink {
  font-size: var(--text-sm); text-decoration: none; color: var(--color-text-muted);
  border: 1px solid var(--color-divider); border-radius: 999px;
  padding: 0.42rem 0.95rem; background: var(--color-surface);
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.chiplink:hover, .chiplink:focus-visible {
  color: var(--color-primary); border-color: var(--color-primary); background: var(--color-primary-soft);
}

.faq-group { scroll-margin-top: 6rem; padding-top: var(--space-10); }
.faq-group__head { margin-bottom: var(--space-6); }
.faq-group__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-xl); margin-bottom: var(--space-2);
}
.faq-group[hidden] { display: none; }
.faq-empty {
  margin-top: var(--space-6); color: var(--color-text-muted);
  border-left: 2px solid var(--color-primary); padding-left: var(--space-5);
}

/* ================= Blog ================= */
.feature {
  display: grid; gap: var(--space-8); text-decoration: none; color: inherit;
  align-items: center;
}
@media (min-width: 900px) { .feature { grid-template-columns: 1.05fr 1fr; gap: var(--space-12); } }
.feature__media { overflow: hidden; border-radius: var(--radius-lg); background: var(--color-surface-2); }
.feature__media img {
  width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 3 / 2;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.feature:hover .feature__media img { transform: scale(1.03); }
.feature__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.6rem); line-height: 1.14;
  margin-block: var(--space-3) var(--space-4); letter-spacing: -0.012em;
}
.feature:hover .feature__title { color: var(--color-primary); }
.feature__dek { color: var(--color-text-muted); max-width: 46ch; margin-bottom: var(--space-5); }
.feature__cue {
  display: inline-block; margin-top: var(--space-6); font-size: var(--text-sm);
  color: var(--color-primary); border-bottom: 1px solid currentColor; padding-bottom: 2px;
}

.posts { display: grid; gap: var(--space-8); }
@media (min-width: 720px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .posts { grid-template-columns: repeat(2, 1fr); gap: var(--space-10) var(--space-12); } }
.posts--sm { gap: var(--space-5); }
@media (min-width: 800px) { .posts--sm { grid-template-columns: repeat(3, 1fr); } }

.postcard {
  display: grid; gap: var(--space-4); text-decoration: none; color: inherit;
  align-content: start;
}
.postcard__media { overflow: hidden; border-radius: var(--radius-lg); background: var(--color-surface-2); }
.postcard__media img {
  width: 100%; display: block; aspect-ratio: 8 / 5; object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.postcard:hover .postcard__media img { transform: scale(1.035); }
.postcard__body { display: grid; gap: var(--space-3); }
.postcard__cat {
  font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-primary);
}
.postcard__title {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-lg); line-height: 1.24;
}
.postcard:hover .postcard__title { color: var(--color-primary); }
.postcard__dek { color: var(--color-text-muted); font-size: var(--text-base); }
.postcard__meta { font-size: var(--text-sm); color: var(--color-text-faint); }
.postcard--sm {
  border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
  padding: var(--space-6); background: var(--color-surface); gap: var(--space-3);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.postcard--sm:hover { border-color: var(--color-border); transform: translateY(-2px); }

/* ================= Article ================= */
.crumb { font-size: var(--text-sm); color: var(--color-text-faint); margin-bottom: var(--space-5); }
.crumb a { color: var(--color-text-muted); }
.crumb span[aria-hidden] { margin-inline: 0.35rem; }
.article__title { max-width: 24ch; }
.article__byline {
  margin-top: var(--space-6); font-size: var(--text-sm); color: var(--color-text-faint);
}
.article__body { padding-top: clamp(var(--space-10), 5vw, var(--space-16)); }
.article__body > p:first-of-type {
  font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
  color: var(--color-text); line-height: 1.62;
}
.article__body h2 {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-xl); line-height: 1.2;
  margin-top: clamp(var(--space-10), 5vw, var(--space-16)); margin-bottom: var(--space-4);
}
.article__body p { margin-bottom: var(--space-5); }
.article__body em { font-style: italic; color: var(--color-text); }
.article__note {
  margin-top: clamp(var(--space-12), 6vw, var(--space-16));
  background: var(--color-surface-2); border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg); padding: clamp(var(--space-6), 3vw, var(--space-8));
}
.article__note p { margin: 0; color: var(--color-text-muted); }
.article__note strong { color: var(--color-text); }

/* nav has more items now — give it room, and wrap the hamburger in sooner */
@media (max-width: 1120px) { .header__phone span { display: none; } }
@media (max-width: 1120px) { .header__phone { padding-inline: 0.7rem; } }

/* inline text links (prose, ledes, notes) — no global <a> restyle to keep components intact */
.prose a, .lede a, .article__note a, .faq-empty a, .acc__panel-inner a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--color-primary) 40%, transparent);
  padding-bottom: 1px;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.prose a:hover, .lede a:hover, .article__note a:hover,
.faq-empty a:hover, .acc__panel-inner a:hover { border-bottom-color: currentColor; }

/* ================= Credentials ================= */
.creds {
  margin-top: var(--space-14); padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-8);
  font-size: var(--text-xs); color: #c6b8a8;
}
.creds__item { display: inline-flex; align-items: center; gap: 0.55rem; }
.creds__item svg { flex: none; color: #d59079; opacity: 0.9; }
.footer__bottom { margin-top: var(--space-6); }

/* on-page credentials band (light surfaces) */
.creds-band {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: var(--space-4) var(--space-10);
  padding: var(--space-6) 0;
  border-block: 1px solid var(--color-divider);
  font-size: var(--text-sm); color: var(--color-text-muted);
}
.creds-band .creds__item svg { color: var(--color-primary); opacity: 1; }
.creds-band .creds__item { display: inline-flex; align-items: center; gap: 0.6rem; }

/* accreditation cards on About */
.creds-cards { display: grid; gap: var(--space-6); }
@media (min-width: 800px) { .creds-cards { grid-template-columns: repeat(3, 1fr); } }
.creds-card {
  border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
  padding: clamp(var(--space-6), 3vw, var(--space-8));
  background: var(--color-surface); display: grid; gap: var(--space-3); align-content: start;
}
.creds-card__icon { color: var(--color-primary); }
.creds-card h3 {
  font-family: var(--font-display); font-weight: 400;
  font-size: var(--text-lg); line-height: 1.22;
}
.creds-card p { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; }

/* ---------- header spans the full page width ---------- */
/* The hero image bleeds to the right edge, so a centred 1200px header left a
   dead band on the right. Keep the logo on the content column, let the nav and
   call button run out to the page gutter. */
.header .header__inner {
  max-width: none;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}
@media (min-width: 800px) {
  .header .header__inner {
    padding-left: max(var(--space-10), calc((100% - var(--content-wide)) / 2 + var(--space-10)));
    padding-right: var(--space-10);
  }
}
/* below the nav breakpoint the links are hidden, so push the icons to the edge */
@media (max-width: 1080px) { .header__actions { margin-left: auto; } }

/* ---------- consistency + polish pass ---------- */

/* Card headings were the only content headings still set in the body sans.
   Match the serif used by post cards, credential cards, and team groups. */
.card h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--text-lg);
  line-height: 1.24;
  letter-spacing: -0.008em;
}
.info-block h3 { font-family: var(--font-body); } /* small uppercase labels stay sans */

/* the resources → FAQ hand-off: heading was vertically centred against a
   taller text column, which read as a misalignment */
.split--top { align-items: start; }

/* Footer links were 21px tall on phones — below a comfortable thumb target. */
@media (max-width: 720px) {
  .footer li a,
  .footer address a,
  .footer p > a { display: inline-block; padding-block: 0.6rem; }
  .footer li + li { margin-top: 0; }
}

/* Printing: families and discharge planners print these pages. */
@media print {
  .header, .callbar, .cta-band, .nav-toggle, .header__actions,
  .faq-tools, .chiplinks, .feature__cue, .posts--sm { display: none !important; }
  html, body { background: #fff !important; color: #000 !important; }
  a { color: #000 !important; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.8em; word-break: break-all; }
  a[href^="tel"]::after, a[href^="#"]::after, a[href^="./"]::after { content: ""; }
  .acc__panel { height: auto !important; overflow: visible !important; }
  .acc__panel-inner { padding-bottom: 0.75rem; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  section { padding-block: 1.25rem !important; break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
  img { max-width: 100% !important; break-inside: avoid; }
  .footer { background: #fff !important; color: #000 !important; padding-bottom: 0 !important; }
  .footer a, .creds { color: #000 !important; }
}

/* cards that are themselves links */
a.card {
  text-decoration: none; color: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
a.card h3 { color: var(--color-text); text-decoration: none; }
a.card p { text-decoration: none; }
a.card:hover { border-color: var(--color-border); transform: translateY(-2px); }
a.card:hover h3 { color: var(--color-primary); }

/* Phone and email are the point of this site — make them easy to hit on a
   phone. Vertical padding on an inline element grows the hit area without
   changing the line box, so body copy does not reflow. */
@media (max-width: 720px) {
  a[href^="tel:"], a[href^="mailto:"], .crumb a { padding-block: 0.5rem; }
  .brand { padding-block: 0.35rem; }
  .callbar a, .btn { min-height: 44px; }
}

/* ---------- language switcher ---------- */


/* ---------- language toggle ----------------------------------------------
   Two languages only, so the header links straight to the other one and
   names it. A bare globe icon was not readable as a control.             */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 44px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  /* same ink as the nav tabs so the bar reads as one family */
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}
.lang-switch:hover { background: var(--color-surface-2); border-color: var(--color-text); color: var(--color-text); }
.lang-switch:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.lang-switch svg { flex: none; opacity: 0.8; }
.lang-switch__short { display: none; }

/* narrow header: drop to the two-letter code */
@media (max-width: 1120px) {
  .lang-switch__word { display: none; }
  .lang-switch__short { display: inline; font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.06em; }
}
/* phones: the pill is the only language control, so it keeps its label */
@media (max-width: 600px) {
  .lang-switch { padding: 0 0.6rem; gap: 0.3rem; }
}
@media (max-width: 380px) {
  .lang-switch { padding: 0 0.45rem; }
  .lang-switch svg { width: 17px; height: 17px; }
}

/* language row inside the mobile drawer */
@media (max-width: 1080px) {
}

/* ---------- bilingual header fit -----------------------------------------
   Spanish nav labels are longer than the English ones, which squeezed the
   phone pill until the number broke across two lines. Never wrap the
   number; give the Spanish nav a tighter rhythm to win the space back.  */
.header__phone, .header__phone span { white-space: nowrap; }
html[lang="es"] .nav__list { gap: var(--space-5); }
@media (max-width: 1320px) {
  html[lang="es"] .header__phone span { display: none; }
}

/* ---------- header sizing ------------------------------------------------
   One variable drives the bar height so the mobile drawer always hangs off
   the real bottom edge of the header.                                    */
:root { --header-h: 74px; }
@media (min-width: 941px) { :root { --header-h: 84px; } }

/* larger tabs need more room, so the phone label steps aside sooner */
@media (max-width: 1280px) { .header__phone span { display: none; } }
@media (max-width: 1420px) { html[lang="es"] .header__phone span { display: none; } }

/* tabs are single-line labels — never break a nav word across two rows */
.nav__link { white-space: nowrap; }

/* Spanish tabs are longer; tighten their rhythm and let the phone pill go
   icon-only while the inline nav is on screen. */
html[lang="es"] .nav__list { gap: var(--space-4); }
@media (max-width: 1360px) { html[lang="es"] .header__phone span { display: none; } }

/* the language pill now carries a label on phones too, so tighten the rest
   of the bar to keep everything on one row */
@media (max-width: 600px) {
  .header__actions { gap: var(--space-2); }
  .header__inner { gap: var(--space-3); }
  .brand__logo { height: 34px; }
}
@media (max-width: 400px) {
  .header__actions { gap: 0.3rem; }
  .icon-btn, .header__phone { width: 40px; min-height: 40px; height: 40px; }
  .brand__logo { height: 30px; }
}

/* very narrow phones (320-360px): pull the bar in a little further */
@media (max-width: 380px) {
  .header .wrap { padding-inline: var(--space-4); }
  .header__inner { gap: var(--space-2); }
  .brand__logo { height: 27px; }
  .header__actions { gap: 0.2rem; }
}
