/* Carefront — calm clinical public site. Not skeuomorphic. */

:root {
  --ink: #163042;
  --ink-soft: #3a5364;
  --muted: #5a7182;
  --line: #d5e2ea;
  --paper: #ffffff;
  --canvas: #f3f7f9;
  --mist: #e7f1f5;
  --sea: #1a6b8a;
  --sea-deep: #0f4a63;
  --tide: #2f8f86;
  --tide-soft: #e5f3f1;
  --sand: #f6f1e8;
  --danger: #8f2d2d;
  --danger-bg: #f8eaea;
  --ok: #1a6848;
  --ok-bg: #e7f4ee;
  --focus: #1a6b8a;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(15, 74, 99, 0.08);
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
  --header: 4.5rem;
  --cta-bar: 4.25rem;
}

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

html { scroll-behavior: smooth; }

body.hms-theme {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: calc(var(--cta-bar) + env(safe-area-inset-bottom));
}

@media (min-width: 960px) {
  body.hms-theme { padding-bottom: 0; }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea-deep); }
a:hover { color: var(--sea); }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.hms-skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--sea-deep);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 8px;
}
.hms-skip:focus { top: 0.6rem; color: #fff; }

.hms-wrap {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.hms-kicker {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tide);
}

h1, h2, h3, .hms-doc-card__name {
  font-family: var(--font-serif);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--sea-deep);
}

h1 { font-size: clamp(2rem, 4vw, 3.4rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.15rem); margin: 0 0 0.75rem; }
h3 { font-size: 1.2rem; margin: 0 0 0.4rem; }

.hms-lede {
  font-size: 1.2rem;
  color: var(--ink-soft);
  max-width: 40rem;
}

.hms-emergency-bar {
  background: var(--sea-deep);
  color: #e8f3f7;
  font-size: 0.92rem;
}
.hms-emergency-bar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  padding: 0.4rem 0;
}
.hms-emergency-bar a { color: #fff; font-weight: 700; }
.hms-emergency-bar__label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.hms-emergency-bar__note { color: #b9d3de; }

.hms-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.hms-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header);
}

.hms-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--sea-deep);
  flex: 0 0 auto;
}
.hms-logo img { width: 44px; height: 44px; border-radius: 10px; }
.hms-logo strong { display: block; font-size: 0.98rem; line-height: 1.2; }
.hms-logo em { display: block; font-style: normal; color: var(--muted); font-size: 0.82rem; }

.hms-nav-toggle {
  margin-left: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.hms-nav-toggle__bars,
.hms-nav-toggle__bars::before,
.hms-nav-toggle__bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--sea-deep);
  position: relative;
  border-radius: 1px;
}
.hms-nav-toggle__bars::before,
.hms-nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.hms-nav-toggle__bars::before { top: -6px; }
.hms-nav-toggle__bars::after { top: 6px; }

.hms-nav { display: none; }
.hms-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--paper); border-bottom: 1px solid var(--line); padding: 0.5rem 1rem 1rem; }
.hms-nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.hms-nav-list a {
  display: block;
  padding: 0.55rem 0.4rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
}
.hms-nav-list .is-current a,
.hms-nav-list .current-menu-item a { color: var(--sea); }

.hms-header-ctas { display: none; }

@media (min-width: 1100px) {
  .hms-nav-toggle { display: none; }
  .hms-nav { display: block; margin-left: auto; position: static; padding: 0; border: 0; background: transparent; }
  .hms-nav-list { flex-direction: row; gap: 0.15rem; }
  .hms-nav-list a { padding: 0.4rem 0.7rem; }
  .hms-header-ctas { display: flex; gap: 0.4rem; margin-left: 0.8rem; }
  .hms-header-ctas .hms-btn { padding: 0.45rem 0.8rem; font-size: 0.86rem; white-space: nowrap; }
  .hms-header-ctas lord-icon,
  .hms-header-ctas .hms-icon { display: none; }
}

.hms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.7rem 1.15rem;
  font-weight: 650;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
}
.hms-btn--primary { background: var(--sea-deep); color: #fff; }
.hms-btn--primary:hover { background: var(--sea); color: #fff; }
.hms-btn--secondary { background: var(--tide-soft); color: var(--sea-deep); }
.hms-btn--ghost { background: transparent; color: var(--sea-deep); border-color: var(--line); }
.hms-btn--lg { padding: 0.9rem 1.35rem; }
.hms-text-link { font-weight: 700; text-decoration: none; color: var(--sea); }

.hms-hero {
  position: relative;
  min-height: 72vh;
  display: grid;
  align-items: end;
  color: #fff;
}
.hms-hero__media {
  position: absolute;
  inset: 0;
}
.hms-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hms-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,74,99,0.15) 0%, rgba(15,74,99,0.78) 70%);
}
.hms-hero__copy {
  position: relative;
  padding: 4.5rem 0 3rem;
}
.hms-hero__copy h1,
.hms-hero__copy .hms-lede,
.hms-hero__copy .hms-kicker { color: #fff; }
.hms-hero__copy .hms-kicker { color: #b7e0d8; }
.hms-hero__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.4rem 0 0.8rem; }
.hms-hero__fine { color: #d5e7ee; margin: 0; }

.hms-band--stats { background: var(--paper); border-block: 1px solid var(--line); }
.hms-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  padding: 1.5rem 0;
}
.hms-stats > div { display: grid; gap: 0.15rem; }
.hms-stats strong { font-family: var(--font-serif); font-size: 1.8rem; color: var(--sea-deep); }
.hms-stats span { color: var(--muted); font-size: 0.92rem; }
@media (min-width: 800px) {
  .hms-stats { grid-template-columns: repeat(4, 1fr); padding: 2rem 0; }
}

.hms-section { padding: 3.5rem 0; }
.hms-section--mist { background: var(--mist); }
.hms-section--tide { background: var(--tide-soft); }
.hms-section__head { max-width: 40rem; margin-bottom: 1.8rem; }
.hms-section__foot { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.8rem; }

.hms-page-hero {
  background: linear-gradient(180deg, var(--mist), var(--canvas));
  padding: 3rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.hms-card-grid,
.hms-doc-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .hms-card-grid { grid-template-columns: repeat(2, 1fr); }
  .hms-doc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .hms-card-grid { grid-template-columns: repeat(3, 1fr); }
  .hms-card-grid--four { grid-template-columns: repeat(4, 1fr); }
  .hms-card-grid--three { grid-template-columns: repeat(3, 1fr); }
  .hms-doc-grid { grid-template-columns: repeat(3, 1fr); }
}

.hms-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.hms-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.hms-card--link:hover { transform: translateY(-3px); border-color: #b7d0dc; }
.hms-card__title { margin-top: 0.6rem; }
.hms-card__text { color: var(--ink-soft); margin: 0 0 0.8rem; }
.hms-card__more { font-weight: 700; color: var(--sea); }

.hms-doc-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.hms-doc-card__photo img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
}
.hms-doc-card__body { padding: 1rem 1.1rem 1.2rem; }
.hms-doc-card__name a { text-decoration: none; color: inherit; }
.hms-doc-card__meta,
.hms-doc-card__hours { color: var(--muted); margin: 0.2rem 0; font-size: 0.95rem; }

.hms-split {
  display: grid;
  gap: 2rem;
}
@media (min-width: 880px) {
  .hms-split { grid-template-columns: 1.1fr 0.9fr; align-items: center; }
}
.hms-split__figure img { border-radius: 20px; width: 100%; }

.hms-steps { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 1.1rem; }
.hms-steps li { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; }
.hms-steps strong { display: block; }
.hms-steps p { margin: 0.2rem 0 0; color: var(--ink-soft); }

.hms-quote-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 800px) {
  .hms-quote-grid { grid-template-columns: 1fr 1fr; }
  .hms-quote-grid > div:first-child { grid-column: 1 / -1; }
}
.hms-quote {
  margin: 0;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 1.3rem;
  border: 1px solid var(--line);
}
.hms-quote p { font-family: var(--font-serif); font-size: 1.2rem; margin-top: 0; }
.hms-quote footer { color: var(--muted); }
.hms-quote cite { font-style: normal; font-weight: 700; color: var(--ink); }

.hms-cta-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.hms-cta-panel h2 { margin-bottom: 0.4rem; }

.hms-service-layout,
.hms-form-layout,
.hms-facts,
.hms-contact-grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 900px) {
  .hms-service-layout,
  .hms-form-layout { grid-template-columns: 1.4fr 0.8fr; align-items: start; }
  .hms-facts { grid-template-columns: 1fr 1fr; }
}

.hms-aside {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  display: grid;
  gap: 0.8rem;
}
.hms-aside__icon { justify-self: start; }

.hms-prose p { color: var(--ink-soft); }
.hms-prose ul { padding-left: 1.1rem; color: var(--ink-soft); }
.hms-facts ul { padding-left: 1.1rem; color: var(--ink-soft); }

.hms-doc-hero { padding: 2.5rem 0 0; }
.hms-doc-hero__grid {
  display: grid;
  gap: 1.5rem;
}
.hms-doc-hero figure img {
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: top;
}
@media (min-width: 800px) {
  .hms-doc-hero__grid { grid-template-columns: 0.7fr 1.3fr; align-items: start; }
}
.hms-dl { display: grid; gap: 0.6rem; margin: 1.2rem 0; }
.hms-dl div { border-top: 1px solid var(--line); padding-top: 0.5rem; }
.hms-dl dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.hms-dl dd { margin: 0; font-weight: 650; }

.hms-form,
.hms-filters {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.2rem;
}
.hms-form__grid,
.hms-filters {
  display: grid;
  gap: 0.9rem;
}
@media (min-width: 700px) {
  .hms-form__grid { grid-template-columns: 1fr 1fr; }
  .hms-filters { grid-template-columns: 1.2fr 1fr 1fr auto; align-items: end; }
}
.hms-field { margin: 0; display: grid; gap: 0.35rem; }
.hms-field--full { grid-column: 1 / -1; }
.hms-field label { font-weight: 650; }
.hms-field input,
.hms-field select,
.hms-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: #fff;
  color: var(--ink);
}
.hms-field input:user-invalid,
.hms-field select:user-invalid,
.hms-field.is-invalid input,
.hms-field.is-invalid select {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.hms-field__error { color: var(--danger); font-size: 0.9rem; }
.hms-field--check label { font-weight: 500; display: flex; gap: 0.6rem; align-items: flex-start; }
.hms-field--check input { width: auto; margin-top: 0.3rem; }
.hms-form__actions { margin-top: 1rem; }
.hms-form__hint { color: var(--muted); }

.hms-status {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  display: grid;
  justify-items: start;
  gap: 0.3rem;
}
.hms-status[hidden] { display: none !important; }
.hms-form__grid[hidden],
.hms-form__actions[hidden] { display: none !important; }
.hms-status__title { font-weight: 700; margin: 0; }
.hms-status__text { margin: 0; color: var(--ink-soft); }
.hms-status--loading { background: var(--mist); }
.hms-status--error { background: var(--danger-bg); }
.hms-status--success { background: var(--ok-bg); }
.hms-status--empty { background: var(--sand); }

.hms-report-list { display: grid; gap: 0.7rem; margin-top: 1rem; }
.hms-report-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  background: #fff;
  display: grid;
  gap: 0.3rem;
}
.hms-report-card strong { display: block; }
.hms-report-card__meta,
.hms-report-card__status,
.hms-report-card span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}
.hms-report-card__status {
  color: var(--ok);
  font-weight: 650;
}
.hms-demo-keys { padding-left: 1.1rem; }
.hms-demo-keys code { font-weight: 700; }

.hms-map iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 16px;
}
.hms-map figcaption { color: var(--muted); margin-top: 0.5rem; }

.hms-footer {
  background: var(--sea-deep);
  color: #d5e7ee;
  padding: 3rem 0 calc(2rem + var(--cta-bar));
  margin-top: 1rem;
}
@media (min-width: 960px) {
  .hms-footer { padding-bottom: 2rem; }
}
.hms-footer h2 { color: #fff; font-size: 1.1rem; }
.hms-footer a { color: #fff; }
.hms-footer__grid {
  display: grid;
  gap: 1.5rem;
}
@media (min-width: 800px) {
  .hms-footer__grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
}
.hms-footer .hms-logo { color: #fff; margin-bottom: 0.8rem; }
.hms-footer .hms-logo em { color: #b9d3de; }
.hms-footer-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.hms-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.9rem;
}
.hms-footer p { margin: 0.35rem 0; }

.hms-mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: #fff;
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.hms-mobile-cta a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.45rem 0.2rem 0.55rem;
  text-decoration: none;
  color: var(--sea-deep);
  font-size: 0.72rem;
  font-weight: 700;
}
@media (min-width: 960px) {
  .hms-mobile-cta { display: none; }
}

.hms-icon-svg {
  display: inline-flex;
  color: var(--sea-deep);
}
.hms-icon-svg svg { width: 100%; height: 100%; }
.hms-ecg {
  stroke-dasharray: none;
}
.hms-cross { animation: hms-pulse 2s ease-in-out infinite; }
.hms-van { animation: hms-nudge 2.4s ease-in-out infinite; }
.hms-scope { animation: hms-pulse 2.2s ease-in-out infinite; }

@keyframes hms-draw {
  0% { stroke-dashoffset: 120; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -120; }
}
@keyframes hms-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}
@keyframes hms-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}

.hms-404-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hms-card--link { transition: none; }
  .hms-ecg, .hms-cross, .hms-van, .hms-scope { animation: none; }
}

@media print {
  .hms-emergency-bar,
  .hms-header-ctas,
  .hms-mobile-cta,
  .hms-nav-toggle { display: none !important; }
  body.hms-theme { padding: 0; background: #fff; }
}
