/* ==========================================================================
   Ishara Medical, LLC — core stylesheet
   Palette: the practice's own brand blue (#0066CB) carried through a deep-navy
   scale, on warm ivory. Hairline borders, restrained shadows, editorial
   spacing. Display face: Libre Baskerville. UI: Source Sans 3.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand blue scale — built from the exact hex values in the original
     stylesheet (--primary: #0066CB, --primary-dark: #0052A3,
     --primary-light: #3385D5), not an invented navy. */
  --navy-900: #043568;
  --navy-800: #0052A3;
  --navy-700: #0066CB;
  --navy-600: #0066CB;
  --teal-700: #0052A3;
  --teal-600: #0066CB;
  --teal-500: #3385D5;
  --slate-600: #47606F;
  --slate-500: #5F7686;
  --ink: #1C2630;
  --ink-soft: #3A4854;

  --paper: #FFFFFF;
  --paper-warm: #FBF9F5;
  --paper-ivory: #F6F4EF;
  --paper-grey: #EFEEEA;

  --line: #E0DCD3;
  --line-strong: #C7C2B7;
  --line-navy: rgba(0, 82, 163, 0.14);

  --danger: #98252A;
  --danger-bg: #FBEFEF;
  --success: #24654B;
  --success-bg: #EDF5F1;
  --warning-bg: #FBF4E6;
  --warning-line: #E0CB9A;

  --surface: var(--paper);
  --surface-alt: var(--paper-ivory);
  --text: var(--ink);
  --text-muted: var(--slate-500);
  --heading: var(--navy-800);
  --accent: var(--teal-600);
  --accent-text: var(--teal-700);
  --link: var(--navy-600);

  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --font-ui: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;

  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;

  --shadow-1: 0 1px 2px rgba(4, 53, 104, 0.08);
  --shadow-2: 0 2px 10px rgba(4, 53, 104, 0.12);
  --shadow-modal: 0 24px 70px rgba(4, 53, 104, 0.32);

  --wrap: 1180px;
  --wrap-narrow: 760px;
  --gutter: 24px;
  --nav-h: 76px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-theme="dark"] {
  --surface: #0D1A24;
  --surface-alt: #111F2B;
  --paper: #0D1A24;
  --paper-warm: #111F2B;
  --paper-ivory: #101D28;
  --paper-grey: #16252F;

  --text: #E6ECF1;
  --text-muted: #A2B4C1;
  --heading: #F1F5F8;
  --accent: #3D8FE0;
  --accent-text: #6FB0EC;
  --link: #7FB4EA;

  --line: #22394A;
  --line-strong: #2E4A5E;
  --line-navy: rgba(255, 255, 255, 0.12);

  --danger: #E08A8D;
  --danger-bg: #2A1618;
  --success: #86C7A6;
  --success-bg: #12271E;
  --warning-bg: #2A2314;
  --warning-line: #5C4C26;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 2px 12px rgba(0, 0, 0, 0.45);
  --shadow-modal: 0 24px 70px rgba(0, 0, 0, 0.65);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--surface);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; }

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 2000;
  background: var(--navy-800); color: #fff; padding: 10px 18px;
  border-radius: 0 0 var(--r-sm) var(--r-sm); transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--heading);
  font-weight: 400;
  line-height: 1.22;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.1rem, 1.3rem + 3.2vw, 3.6rem); line-height: 1.12; }
h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1.1em; max-width: 68ch; }
strong { font-weight: 600; }

.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  display: inline-block;
  margin-bottom: 10px;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 34px;
  height: 1px;
  background: var(--accent);
  margin-top: 6px;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(56px, 7vw, 104px) 0; }
.section--alt { background: var(--surface-alt); }
.section--line { border-top: 1px solid var(--line); }
.section-header { max-width: 640px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-header p { color: var(--text-muted); margin-bottom: 0; }
.section-header--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header--center .eyebrow::after { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font-ui); font-size: 0.98rem; font-weight: 600;
  padding: 13px 26px; border-radius: var(--r-sm); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  min-height: 46px;
}
.btn-primary { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn-accent { background: var(--teal-600); color: #fff; border-color: var(--teal-600); }
.btn-accent:hover { background: var(--teal-700); border-color: var(--teal-700); }
.btn-outline { background: transparent; color: var(--heading); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--navy-700); color: var(--navy-700); }
.btn-ghost { background: transparent; color: var(--link); border-color: transparent; padding-left: 0; padding-right: 0; }
.btn-on-dark { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-on-dark:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 18px; min-height: 40px; font-size: 0.92rem; }
[data-theme="dark"] .btn-primary { background: var(--teal-600); border-color: var(--teal-600); }
[data-theme="dark"] .btn-primary:hover { background: var(--teal-500); border-color: var(--teal-500); }

/* ---------- Reveal (motion) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .75s var(--ease), transform .75s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Directional variants — combine with .reveal, e.g. class="reveal reveal--left".
   Mirrors the original site's fade-right / fade-left / zoom-in AOS directions. */
.reveal--left  { transform: translateX(-34px); }
.reveal--right { transform: translateX(34px); }
.reveal--zoom  { transform: scale(.92); }
.reveal--up-lg { transform: translateY(34px); }

/* Staggered entrance for grids: add .stagger to the grid, .reveal to each
   direct child. Children reveal in sequence rather than all at once. */
.stagger > .reveal:nth-child(1) { transition-delay: 0ms; }
.stagger > .reveal:nth-child(2) { transition-delay: 90ms; }
.stagger > .reveal:nth-child(3) { transition-delay: 180ms; }
.stagger > .reveal:nth-child(4) { transition-delay: 270ms; }
.stagger > .reveal:nth-child(5) { transition-delay: 360ms; }
.stagger > .reveal:nth-child(6) { transition-delay: 450ms; }
.stagger > .reveal:nth-child(7) { transition-delay: 540ms; }
.stagger > .reveal:nth-child(8) { transition-delay: 630ms; }
.stagger > .reveal:nth-child(9) { transition-delay: 720ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal--left, .reveal--right, .reveal--zoom, .reveal--up-lg {
    opacity: 1; transform: none; transition: none;
  }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ---------- Top utility bar ---------- */
.utility-bar {
  background: var(--navy-900);
  color: #D5DEE6;
  font-size: 0.87rem;
}
.utility-bar .container {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  align-items: center; justify-content: space-between;
  min-height: 42px; padding-top: 6px; padding-bottom: 6px;
}
.utility-contact { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.utility-contact a, .utility-contact span { color: #D5DEE6; text-decoration: none; display: inline-flex; align-items: center; gap: 7px; }
.utility-contact a:hover { color: #fff; text-decoration: underline; }
.utility-actions { display: flex; align-items: center; gap: 14px; }
.theme-toggle {
  background: transparent; border: 1px solid rgba(255,255,255,.28); color: #E4EBF1;
  border-radius: var(--r-sm); padding: 5px 12px; cursor: pointer; font-size: 0.84rem;
  display: inline-flex; align-items: center; gap: 7px; min-height: 32px;
}
.theme-toggle:hover { border-color: #fff; }
.utility-link { color: #D5DEE6; font-size: 0.84rem; }

/* ---------- Navbar ---------- */
.navbar {
  position: sticky; top: 0; z-index: 900;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s var(--ease);
}
.navbar.is-stuck { box-shadow: var(--shadow-2); }
.nav-wrapper {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: var(--nav-h);
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { height: 44px; width: auto; }
.logo-title {
  display: block; font-family: var(--font-display); font-size: 1.16rem;
  color: var(--heading); line-height: 1.1;
}
.logo-tagline { display: block; font-size: 0.76rem; color: var(--text-muted); letter-spacing: 0.04em; }

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link {
  display: block; padding: 10px 13px; font-size: 0.96rem; font-weight: 500;
  color: var(--text); text-decoration: none; border-bottom: 2px solid transparent;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.nav-link:hover { color: var(--accent-text); }
.nav-link.active { color: var(--navy-700); border-bottom-color: var(--accent); }
[data-theme="dark"] .nav-link.active { color: var(--accent-text); }
.nav-cta { margin-left: 10px; }

.nav-toggle {
  display: none; background: transparent; border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); width: 44px; height: 44px; cursor: pointer;
  align-items: center; justify-content: center; color: var(--heading);
}
.nav-overlay {
  position: fixed; inset: 0; background: rgba(7, 24, 41, .5);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease); z-index: 899;
}
.nav-overlay.active { opacity: 1; visibility: visible; }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(330px, 86vw);
    background: var(--surface); border-left: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 84px 22px 32px; transform: translateX(102%);
    transition: transform .3s var(--ease); z-index: 901; overflow-y: auto;
  }
  .nav-menu.active { transform: none; }
  .nav-link { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-link.active { border-bottom-color: var(--accent); }
  .nav-cta { margin: 20px 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ---------- Announcement strip ---------- */
.announce {
  background: var(--teal-700); color: #EAF4F2; text-align: center;
  font-size: 0.9rem; padding: 9px 20px;
}
.announce strong { color: #fff; font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: #E8EEF3;
  padding: clamp(64px, 8vw, 112px) 0 clamp(56px, 7vw, 96px);
  overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -10%; top: -20%;
  width: 60vw; height: 120%;
  background: radial-gradient(closest-side, rgba(42, 111, 107, .28), transparent 70%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero-wordmark {
  font-family: var(--font-ui); font-size: 0.9rem; font-weight: 600;
  letter-spacing: 0.22em; color: var(--teal-500); margin-bottom: 18px;
}
.hero-lede { font-size: 1.1rem; color: #C6D3DD; max-width: 56ch; }
.hero-rule { width: 64px; height: 2px; background: var(--teal-500); margin: 26px 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 0.94rem; color: #B9C8D4; }
.hero-facts li { list-style: none; display: flex; align-items: center; gap: 9px; }
.hero-facts i { color: var(--teal-500); }

.hero-figure { position: relative; }
.hero-figure img {
  width: 100%; border-radius: var(--r-md);
  border: 1px solid rgba(255,255,255,.14);
  filter: saturate(.95);
}
.hero-quote {
  margin-top: 18px; padding-left: 18px; border-left: 2px solid var(--teal-500);
  font-family: var(--font-display); font-size: 1.02rem; color: #D3DFE8; font-style: italic;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { order: -1; }
}

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--paper-warm); border-bottom: 1px solid var(--line); }
.trust-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
  border-left: 1px solid var(--line); border-right: 1px solid var(--line);
}
.trust-cell { background: var(--paper-warm); padding: 26px 22px; }
.trust-cell h3 { font-size: 1.02rem; margin-bottom: 4px; font-family: var(--font-ui); font-weight: 600; }
.trust-cell p { font-size: 0.92rem; color: var(--text-muted); margin: 0; }
.trust-cell i { color: var(--accent); font-size: 1.1rem; margin-bottom: 10px; display: block; }
@media (max-width: 880px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .trust-grid { grid-template-columns: 1fr; } }

/* ---------- Services ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
}
.service-card {
  background: var(--surface); padding: 30px 26px 26px; text-align: left;
  border: none; width: 100%; cursor: pointer; font: inherit; color: inherit;
  transition: background-color .25s var(--ease);
  display: flex; flex-direction: column;
}
.service-card:hover, .service-card:focus-visible { background: var(--surface-alt); }
.service-card .service-icon { color: var(--accent); font-size: 1.5rem; margin-bottom: 16px; }
.service-card h3 { margin-bottom: 8px; }
.service-card > p { font-size: 0.96rem; color: var(--text-muted); }
.service-features { list-style: none; margin: 0 0 18px; font-size: 0.92rem; color: var(--text-muted); }
.service-features li { padding: 3px 0 3px 18px; position: relative; }
.service-features li::before {
  content: ""; position: absolute; left: 0; top: 13px;
  width: 6px; height: 1px; background: var(--accent);
}
.service-link { margin-top: auto; font-weight: 600; font-size: 0.93rem; color: var(--link); }
.service-media { margin: -30px -26px 20px; border-bottom: 1px solid var(--line); }
.service-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Focus panel (wound care) ---------- */
.focus-panel { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.focus-panel img { border-radius: var(--r-md); border: 1px solid var(--line); }
.focus-list { list-style: none; margin: 22px 0 28px; display: grid; gap: 10px; }
.focus-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.97rem; }
.focus-list i { color: var(--accent); margin-top: 5px; font-size: 0.85rem; }
.focus-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 30px; }
@media (max-width: 880px) {
  .focus-panel { grid-template-columns: 1fr; }
  .focus-columns { grid-template-columns: 1fr; }
}

/* ---------- Detail columns (diagnostics / post-surgical) ---------- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(26px, 4vw, 48px); }
.detail-block { border-top: 2px solid var(--navy-800); padding-top: 22px; }
[data-theme="dark"] .detail-block { border-top-color: var(--accent); }
.detail-block ul { list-style: none; display: grid; gap: 8px; font-size: 0.96rem; color: var(--text-muted); }
.detail-block li { padding-left: 18px; position: relative; }
.detail-block li::before { content: ""; position: absolute; left: 0; top: 12px; width: 7px; height: 1px; background: var(--line-strong); }

/* ---------- Appointment ---------- */
.appointment-section { background: linear-gradient(135deg, var(--navy-800) 0%, var(--teal-600) 100%); color: #E6EDF3; }
.appointment-section h2, .appointment-section h3 { color: #fff; }
.appointment-section .eyebrow { color: var(--teal-500); }
.appointment-section .eyebrow::after { background: var(--teal-500); }
.appointment-wrapper { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(30px, 4vw, 60px); align-items: start; }
.appointment-info p { color: #C3D0DB; }
.info-boxes { display: grid; gap: 14px; margin-top: 26px; }
.info-box {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid rgba(255,255,255,.16); border-radius: var(--r-sm); padding: 14px 16px;
}
.info-box i { color: var(--teal-500); margin-top: 5px; }
.info-box strong { display: block; color: #fff; font-size: 0.98rem; }
.info-box span { font-size: 0.9rem; color: #B7C6D2; }
.calendar-card { background: var(--paper); border-radius: var(--r-md); padding: 18px; box-shadow: var(--shadow-2); }
[data-theme="dark"] .calendar-card { background: var(--surface-alt); border: 1px solid var(--line); }
@media (max-width: 900px) { .appointment-wrapper { grid-template-columns: 1fr; } }

/* FullCalendar tuning */
.fc { --fc-border-color: var(--line); --fc-today-bg-color: rgba(42,111,107,.10); font-family: var(--font-ui); }
.fc .fc-toolbar-title { font-family: var(--font-display); font-size: 1.15rem !important; color: var(--heading); }
.fc .fc-button-primary {
  background: var(--navy-800); border-color: var(--navy-800); text-transform: none;
  font-size: 0.86rem; padding: 6px 12px; box-shadow: none;
}
.fc .fc-button-primary:hover { background: var(--navy-700); border-color: var(--navy-700); }
.fc .fc-button-primary:disabled { background: var(--slate-500); border-color: var(--slate-500); }
.fc .fc-daygrid-day-number { color: var(--text); font-size: 0.9rem; }
.fc .fc-col-header-cell-cushion { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; }
.fc .fc-day-past .fc-daygrid-day-number { color: var(--text-muted); opacity: .55; }
.fc .fc-daygrid-day:not(.fc-day-past):hover { background: rgba(42,111,107,.08); cursor: pointer; }
[data-theme="dark"] .fc { --fc-page-bg-color: transparent; --fc-neutral-bg-color: var(--surface); }

/* ---------- Events ---------- */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.filter-btn {
  background: transparent; border: 1px solid var(--line-strong); color: var(--text);
  padding: 8px 18px; border-radius: 100px; cursor: pointer; font-size: 0.92rem; min-height: 38px;
}
.filter-btn.active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
[data-theme="dark"] .filter-btn.active { background: var(--teal-600); border-color: var(--teal-600); }
.events-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }
.event-item {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  padding: 24px; background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.event-item.hide { display: none; }
.event-badge { font-size: 0.8rem; font-weight: 600; color: var(--accent-text); margin-bottom: 8px; display: block; }
.event-details { display: grid; gap: 6px; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 18px; }
.event-details i { width: 16px; color: var(--accent); }
.event-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Q&A ---------- */
.qa-list { border-top: 1px solid var(--line); max-width: 820px; }
.qa-item { border-bottom: 1px solid var(--line); }
.qa-trigger {
  width: 100%; background: transparent; border: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 2px; text-align: left; font-size: 1.04rem; font-weight: 600; color: var(--heading);
}
.qa-trigger i { color: var(--accent); transition: transform .25s var(--ease); flex-shrink: 0; }
.qa-trigger[aria-expanded="true"] i { transform: rotate(45deg); }
.qa-panel { display: none; padding: 0 2px 22px; color: var(--text-muted); }
.qa-panel.open { display: block; }

/* ---------- Approach ---------- */
.approach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.approach-cell { background: var(--surface); padding: 26px 20px; }
.approach-letter { font-family: var(--font-display); font-size: 2.4rem; color: var(--accent); line-height: 1; }
.approach-word { font-weight: 600; margin: 10px 0 4px; color: var(--heading); }
.approach-meaning { font-size: 0.9rem; color: var(--text-muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(30px, 5vw, 64px); align-items: start; }
.practitioner-figure { border: 1px solid var(--line); padding: 14px; background: var(--surface); border-radius: var(--r-md); }
.practitioner-figure img { width: 100%; border-radius: var(--r-sm); }
.practitioner-meta { padding: 18px 4px 4px; border-top: 1px solid var(--line); margin-top: 14px; }
.practitioner-name { font-family: var(--font-display); font-size: 1.4rem; color: var(--heading); }
.practitioner-credentials { font-size: 0.92rem; font-weight: 600; color: var(--accent-text); letter-spacing: 0.02em; margin: 4px 0 6px; }
.practitioner-title { font-size: 0.93rem; color: var(--text-muted); }
.about-features { display: grid; gap: 16px; margin-top: 26px; }
.about-feature { display: flex; gap: 14px; align-items: flex-start; border-top: 1px solid var(--line); padding-top: 14px; }
.about-feature i { color: var(--accent); margin-top: 5px; }
.about-feature strong { display: block; color: var(--heading); }
.about-feature span { font-size: 0.93rem; color: var(--text-muted); }
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(30px, 5vw, 60px); align-items: start; }
.contact-details { display: grid; gap: 18px; margin: 26px 0; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-icon {
  width: 42px; height: 42px; flex-shrink: 0; border: 1px solid var(--line);
  border-radius: 50%; display: grid; place-items: center; color: var(--accent);
}
.contact-item strong { display: block; font-size: 0.88rem; color: var(--text-muted); font-weight: 600; }
.contact-item a, .contact-item span:not(.contact-icon) { color: var(--heading); font-size: 1.02rem; }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%;
  display: grid; place-items: center; color: var(--heading); text-decoration: none;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.social-links a:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.contact-form-card { background: var(--surface-alt); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(22px, 3vw, 34px); }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Forms ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label,
.field-label {
  display: block; font-size: 0.88rem; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.required-mark { color: var(--danger); }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"],
input[type="password"], select, textarea {
  width: 100%; padding: 11px 13px; font-family: var(--font-ui); font-size: 1rem;
  color: var(--text); background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--r-sm); transition: border-color .2s var(--ease);
  min-height: 46px;
}
textarea { min-height: 90px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--slate-500); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid transparent; box-shadow: 0 0 0 3px rgba(42,111,107,.18); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); background: var(--danger-bg); }
.field-error { display: none; color: var(--danger); font-size: 0.86rem; margin-top: 5px; }
.field-error::before { content: "\f06a"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 6px; }
.field-error.show { display: block; }
.form-hint { font-size: 0.86rem; color: var(--text-muted); margin-top: 6px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.form-section { border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: 20px; }
.form-section-title {
  background: var(--surface-alt); border-bottom: 1px solid var(--line);
  padding: 11px 16px; font-weight: 600; font-size: 0.92rem; color: var(--heading);
  display: flex; align-items: center; gap: 9px;
}
.form-section-body { padding: 18px 16px 4px; }
@media (max-width: 640px) {
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

/* Time slots */
.time-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); gap: 9px; }
.time-slot {
  border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--r-sm);
  padding: 11px 6px; text-align: center; cursor: pointer; font-size: 0.92rem; min-height: 44px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.time-slot:hover { border-color: var(--accent); }
.time-slot.selected, .time-slot[aria-pressed="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
[data-theme="dark"] .time-slot.selected { background: var(--teal-600); border-color: var(--teal-600); }

/* ---------- Modals (shared) ---------- */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(7, 24, 41, .58);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease);
  overflow-y: auto;
}
.modal.active { opacity: 1; visibility: visible; }
.modal-dialog {
  background: var(--surface); border-radius: var(--r-lg); width: 100%; max-width: 680px;
  max-height: 92vh; display: flex; flex-direction: column; box-shadow: var(--shadow-modal);
  transform: translateY(12px); transition: transform .25s var(--ease);
}
.modal.active .modal-dialog { transform: none; }
.modal-dialog--wide { max-width: 860px; }
.modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.modal-header h2, .modal-header h3 { margin: 0; font-size: 1.25rem; }
.modal-close {
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-sm);
  width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center;
  color: var(--text); flex-shrink: 0;
}
.modal-close:hover { background: var(--surface-alt); border-color: var(--line-strong); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-body h4 { margin-top: 20px; }
.modal-body h4:first-child { margin-top: 0; }
.modal-body ul { padding-left: 20px; list-style: disc; color: var(--text-muted); }
.modal-body li { margin-bottom: 5px; }
@media (max-width: 600px) {
  .modal { padding: 0; align-items: flex-end; }
  .modal-dialog { max-width: 100%; max-height: 94vh; border-radius: var(--r-lg) var(--r-lg) 0 0; }
}

/* ---------- Welcome popup (on load) ---------- */
.welcome-modal .modal-dialog {
  /* Its own entrance, independent of the generic modal transform, so it
     arrives with a touch more presence than a settings dialog. */
  transform: translateY(28px) scale(.96);
  transition: transform .4s cubic-bezier(0.16, 1, 0.3, 1), opacity .3s var(--ease);
}
.welcome-modal.active .modal-dialog { transform: none; }

.welcome-dialog {
  max-width: 560px;
  text-align: left;
  border-top: 4px solid var(--accent);
  overflow: hidden;
}
.welcome-dialog .modal-header { border-bottom: none; padding-bottom: 0; }
.welcome-dialog .modal-body { padding: 6px 32px 32px; }

.welcome-icon {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-500) 0%, var(--navy-700) 100%);
  color: #fff; display: grid; place-items: center; font-size: 1.4rem;
  margin: 4px 0 18px;
  box-shadow: 0 8px 20px rgba(0, 102, 203, 0.28);
  animation: welcomePulse 2.4s ease-in-out .5s 2;
}
[data-theme="dark"] .welcome-icon { box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
@keyframes welcomePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .welcome-icon { animation: none; }
}

.welcome-dialog h2 { margin-bottom: 8px; font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.6rem); }
.welcome-subtitle { color: var(--text-muted); font-size: 1rem; margin-bottom: 0; }
.welcome-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, var(--line-strong) 50%, var(--line) 100%);
  margin: 22px 0;
}
.welcome-section { margin-bottom: 18px; }
.welcome-section h3 {
  font-family: var(--font-ui); font-size: 0.98rem; font-weight: 600;
  color: var(--heading); display: flex; align-items: center; gap: 9px; margin-bottom: 8px;
}
.welcome-section h3 i { color: var(--accent); }
.welcome-section p { font-size: 0.94rem; color: var(--text-muted); margin: 0; }
.welcome-list { list-style: none; display: grid; gap: 9px; }
.welcome-list li {
  font-size: 0.94rem; padding: 4px 0 4px 26px; position: relative;
}
.welcome-list li::before {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: 6px; font-size: 0.68rem; color: #fff;
  background: var(--accent); width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center;
}
.welcome-quote {
  margin: 20px 0; padding: 14px 18px; border-left: 3px solid var(--accent);
  background: var(--surface-alt); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-family: var(--font-display); font-style: italic; color: var(--heading);
  font-size: 1rem;
}
.welcome-quote i { color: var(--accent); margin-right: 6px; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.welcome-timer {
  display: flex; align-items: center; gap: 10px; margin-top: 20px;
  font-size: 0.82rem; color: var(--text-muted);
}
.timer-bar { flex: 1; height: 4px; background: var(--line); border-radius: 100px; overflow: hidden; }
.timer-progress { height: 100%; width: 100%; background: linear-gradient(90deg, var(--accent), var(--teal-500)); border-radius: 100px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #C2CFDA; padding: clamp(46px, 6vw, 72px) 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 36px; }
.site-footer h4 { color: #fff; font-family: var(--font-ui); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 14px; }
.site-footer p { font-size: 0.93rem; color: #A9BAC7; }
.site-footer ul { list-style: none; display: grid; gap: 9px; }
.site-footer a { color: #C2CFDA; text-decoration: none; font-size: 0.93rem; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-brand img { height: 46px; margin-bottom: 16px; }
.footer-badges { display: grid; gap: 7px; font-size: 0.88rem; color: #A9BAC7; margin-top: 12px; }
.footer-badges i { color: var(--teal-500); margin-right: 7px; }
.newsletter-form { display: flex; gap: 8px; margin-top: 10px; }
.newsletter-form input {
  background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); color: #fff; min-height: 44px;
}
.newsletter-form input::placeholder { color: #93A6B4; }
.newsletter-form button {
  background: var(--teal-600); border: none; color: #fff; border-radius: var(--r-sm);
  padding: 0 16px; cursor: pointer; min-height: 44px; min-width: 48px;
}
.newsletter-form button:hover { background: var(--teal-500); }
.footer-consent { font-size: 0.84rem; color: #93A6B4; margin-top: 10px; }
.footer-bottom {
  margin-top: 46px; border-top: 1px solid rgba(255,255,255,.12);
  padding: 20px 0 26px; display: flex; flex-wrap: wrap; gap: 10px 24px;
  align-items: center; justify-content: space-between; font-size: 0.87rem;
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Floating actions ---------- */
.floating-actions {
  position: fixed; right: 18px; bottom: 18px; z-index: 880;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.float-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--navy-800); color: #fff; border: 1px solid var(--navy-800);
  border-radius: 100px; padding: 12px 18px; cursor: pointer; font-size: 0.93rem;
  font-weight: 600; box-shadow: var(--shadow-2); text-decoration: none; min-height: 48px;
}
.float-btn:hover { background: var(--navy-700); }
.float-btn--secondary { background: var(--surface); color: var(--heading); border-color: var(--line-strong); }
.float-btn--secondary:hover { background: var(--surface-alt); }
@media (max-width: 600px) {
  .floating-actions { right: 12px; bottom: 12px; }
  .float-btn .float-label { display: none; }
  .float-btn { border-radius: 50%; width: 52px; height: 52px; padding: 0; justify-content: center; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px);
  background: var(--navy-800); color: #fff; padding: 13px 22px; border-radius: var(--r-sm);
  box-shadow: var(--shadow-modal); z-index: 1200; max-width: min(520px, 92vw);
  opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), transform .25s var(--ease);
  font-size: 0.95rem;
}
.toast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ---------- Notices ---------- */
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  background: var(--surface-alt); padding: 16px 18px; border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 0.94rem;
}
.notice p:last-child { margin-bottom: 0; }
.notice--warning { border-left-color: var(--warning-line); background: var(--warning-bg); }
.notice--danger { border-left-color: var(--danger); background: var(--danger-bg); }

/* ---------- Tables (admin) ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.data-table th { background: var(--surface-alt); font-weight: 600; color: var(--heading); white-space: nowrap; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-sm); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 100px; font-size: 0.82rem; border: 1px solid var(--line-strong); }
.pill--yes { background: var(--success-bg); color: var(--success); border-color: var(--success); }
.pill--no { background: var(--paper-grey); color: var(--text-muted); }

/* ---------- Print ---------- */
@media print {
  .navbar, .utility-bar, .floating-actions, .chatbot-panel, .announce, .site-footer { display: none !important; }
  body { color: #000; background: #fff; }
}


/* ==========================================================================
   PART 2 — VISUAL ENHANCEMENT LAYER (presentation only)
   Appended after the site's own styles. Uses only existing tokens/colors.
   Roll back by deleting everything from this banner down.
   ========================================================================== */

section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }
::selection { background: rgba(0, 102, 203, 0.18); }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }

/* Sticky header: a quiet blur once the page has scrolled.
   The blur lives on a pseudo-element, NOT on .navbar itself: a filter on the header
   would make it the containing block for the fixed mobile menu and break it. */
@supports (backdrop-filter: blur(1px)) {
  .navbar.is-stuck { background: transparent; }
  .navbar.is-stuck::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: color-mix(in srgb, var(--surface) 93%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
  }
}

/* Entrance transforms (slide in from the side) must never widen the page. */
@supports (overflow: clip) { main { overflow-x: clip; } }

/* Buttons: one set of hover, pressed and focus states */
.btn {
  max-width: 100%;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease),
              transform .2s var(--ease), box-shadow .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: none; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(0, 102, 203, .28); }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

/* The services grid gave .service-card its own transition list, which silently
   cancelled the scroll-reveal fade/slide. Restore it for the reveal... */
.service-card.reveal { transition: opacity .75s var(--ease), transform .75s var(--ease); }
/* ...then, once a card has finished revealing (.is-settled is added by main.js),
   hand it snappy hover transitions. */
.reveal.is-settled, .stagger > .reveal.is-settled:nth-child(n) {
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease),
              background-color .3s var(--ease), opacity .3s var(--ease);
  transition-delay: 0ms;
}
.service-card.is-settled:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); position: relative; z-index: 2; }
.event-item.is-settled:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.detail-block.is-settled:hover, .about-feature.is-settled:hover { transform: translateY(-2px); }

/* Images: restrained zoom inside a clipped frame */
.service-media { overflow: hidden; }
.service-media img, .focus-panel img, .practitioner-figure img { transition: transform .6s var(--ease); }
.service-card:hover .service-media img { transform: scale(1.04); }
.focus-panel > div:first-child { overflow: hidden; border-radius: var(--r-md); }
.focus-panel > div:first-child:hover img { transform: scale(1.03); }
.practitioner-figure { overflow: hidden; }
.practitioner-figure:hover img { transform: scale(1.02); }
/* If the wound-care photo is missing, don't leave an empty half-width column. */
.focus-panel.no-media { grid-template-columns: 1fr; }
.focus-panel.no-media > :first-child { display: none; }

/* Q&A: smooth open and close (was an instant show/hide) */
.qa-item .qa-panel {
  display: block; max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; padding-bottom: 0;
  transition: max-height .4s var(--ease), opacity .3s var(--ease), padding-bottom .3s var(--ease), visibility 0s linear .4s;
}
.qa-item .qa-panel.open {
  max-height: 480px; opacity: 1; visibility: visible; padding-bottom: 22px;
  transition-delay: 0s, 0s, 0s, 0s;
}

/* Small screens */
.fc .fc-toolbar { flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (max-width: 576px) {
  .fc .fc-toolbar-title { font-size: 1.05rem !important; }
  .utility-contact a, .utility-contact span { overflow-wrap: anywhere; }
}

/* Contrast: values below were measured in a browser against the real pixels behind the text */
.hero-wordmark { color: color-mix(in srgb, var(--teal-500) 40%, #fff); }
.hero-quote {
  padding: 10px 14px;
  background: color-mix(in srgb, var(--navy-900) 62%, transparent);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.appointment-section .eyebrow { color: #fff; }
.appointment-section .eyebrow::after { background: #fff; }
.appointment-info p { color: #fff; }
.info-box span { color: #F2F7FC; }
/* Muted grey (#5F7686) is 4.32:1 on the ivory panels, just under AA's 4.5:1. On ivory
   surfaces only, use the darker slate token that already exists in the palette. */
.section--alt, .contact-form-card, .notice, .event-item { --text-muted: var(--slate-600); }
[data-theme="dark"] .section--alt, [data-theme="dark"] .contact-form-card,
[data-theme="dark"] .notice, [data-theme="dark"] .event-item { --text-muted: #A2B4C1; }
.consent-block--inverse .consent-tag--required { color: #FFC2C5; border-color: #FFC2C5; }

/* Welcome popup list: a generic `.modal-body ul` rule outranked the popup's own list style,
   so every item showed a plain bullet next to its tick. */
.modal-body .welcome-list { list-style: none; padding-left: 0; }
.modal-body .welcome-list li { margin-bottom: 0; }

/* Tap targets: at least 40px in each direction */
.theme-toggle { min-height: 40px; }
.consent-block__links .btn { min-height: 40px; padding: 8px 0; }

@media (prefers-reduced-motion: reduce) {
  .qa-item .qa-panel, .qa-item .qa-panel.open { transition-delay: 0s; }
  .btn:hover, .service-card.is-settled:hover, .event-item.is-settled:hover { transform: none; }
  .service-card:hover .service-media img, .focus-panel > div:first-child:hover img,
  .practitioner-figure:hover img { transform: none; }
}
