/* ===========================================================
   Advanced Rheumatology Care — shared stylesheet
   Theme: primary blue + red accent. Clean, modern, accessible.
   =========================================================== */

:root {
  --blue: #223460;       /* primary brand navy (from logo) */
  --blue-dark: #18233f;
  --blue-light: #eaeef5;
  --red: #711e1b;        /* brand maroon (from logo) */
  --red-dark: #571513;
  --green: #2f5831;      /* leaf green accent (from logo) */
  --green-light: #6fa672;
  --ink: #1c2430;        /* main text */
  --muted: #5b6675;      /* secondary text */
  --line: #e3e8ef;       /* borders / dividers */
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(20, 40, 80, 0.05), 0 10px 30px rgba(20, 40, 80, 0.07);
  --shadow-lg: 0 2px 6px rgba(20, 40, 80, 0.06), 0 22px 50px rgba(20, 40, 80, 0.13);
  --maxw: 1140px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%; /* keep type from auto-inflating on iOS rotate */
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* clip (not hidden) guards against stray horizontal scroll on phones without
     turning body into a scroll container, so the sticky header keeps working */
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent; /* no grey flash on tap; we use :active */
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.18;
  color: var(--ink);
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

::selection { background: var(--blue-light); color: var(--blue-dark); }

/* Ampersand: Bitter's single-story form, the simple loopless shape; slab serifs blend with Fraunces */
.amp {
  font-family: "Bitter", Georgia, serif;
  font-style: normal;
  font-weight: 600;
  line-height: 1;
}

p { margin: 0 0 1em; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  /* honour the notch / rounded corners in landscape; 24px everywhere else */
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top); /* clears the status bar in standalone mode */
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}

/* Brand (top-left) */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
  position: relative;
}
/* small red accent dot on the logo mark */
.brand-mark::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
}

/* Logo image in header */
.brand-logo { height: 52px; width: auto; display: block; flex: none; }

.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.2px;
}
.brand-name .accent { color: var(--red); }
.brand-tag {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

/* Nav links (top-right) */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--blue-light); color: var(--blue); text-decoration: none; }
.nav-links a.active { color: var(--blue); }
.nav-links a.active::after {
  content: "";
  display: block;
  height: 3px;
  border-radius: 3px;
  background: var(--red);
  margin-top: 4px;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 44px;
  height: 40px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s;
}
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after { position: absolute; top: 7px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(0.97); } /* tactile press feedback on touch */
.btn:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.btn-primary { background: var(--red); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); color: var(--blue); }
.btn-light { background: #fff; color: var(--blue); }
.btn-light:hover { background: var(--blue-light); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(113,30,27,0.45) 0%, rgba(113,30,27,0) 70%);
  border-radius: 50%;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -180px; left: -140px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(47,88,49,0.28) 0%, rgba(47,88,49,0) 70%);
  border-radius: 50%;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 84px 0;
}
.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin-bottom: 0.4em;
}
.hero .lead {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.9);
  max-width: 540px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-pill {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  letter-spacing: 0.3px;
}

/* hero side card */
.hero-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(4px);
}
.hero-card h3 { color: #fff; }
.hero-card ul { list-style: none; margin: 0; padding: 0; }
.hero-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.92);
}
.hero-card li:last-child { border-bottom: none; }
.hero-card .ic { color: var(--green-light); font-weight: 800; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.eyebrow,
.section-head .eyebrow,
.page-header .eyebrow {
  color: var(--red);
  font-family: var(--font);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  margin: 0 0 10px;
}
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* page header (interior pages) */
.page-header {
  background:
    radial-gradient(640px 320px at 88% -10%, rgba(113, 30, 27, 0.07), transparent 70%),
    radial-gradient(520px 300px at 4% 110%, rgba(47, 88, 49, 0.06), transparent 70%),
    linear-gradient(180deg, var(--blue-light), #f5f8fc);
  border-bottom: 1px solid var(--line);
  padding: 68px 0 56px;
}
.page-header h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); color: var(--blue-dark); margin: 0; }
.page-header p { color: var(--muted); font-size: 1.08rem; max-width: 680px; margin: 14px 0 0; }

/* anchor pills inside page headers */
.subnav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.subnav a {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line);
  color: var(--blue-dark);
  font-weight: 600;
  font-size: 0.88rem;
  box-shadow: 0 1px 2px rgba(20, 40, 80, 0.04);
  transition: border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.subnav a:hover {
  border-color: var(--blue);
  color: var(--blue);
  text-decoration: none;
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.card.hoverable:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card .card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--blue-light);
  color: var(--blue);
  display: grid; place-items: center;
  margin-bottom: 16px;
}
.card .card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); margin-bottom: 0; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.team-grid.two { grid-template-columns: repeat(2, 1fr); max-width: 780px; margin: 0 auto; }
.team-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.team-photo {
  padding: 30px 0 6px;
  display: flex;
  justify-content: center;
}
.team-photo .initials,
.team-photo img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: block;
}
.team-photo img {
  object-fit: cover;
  object-position: center;
  border: 4px solid var(--blue-light);
}
.team-photo .initials {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.team-body { padding: 16px 22px 26px; text-align: center; }
.team-body p:last-of-type { text-align: left; }
.team-body .role {
  color: var(--red);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}
.team-body h3 { font-size: 1.2rem; margin-bottom: 2px; white-space: nowrap; }
.team-body .credentials { color: var(--blue); font-weight: 600; font-size: 0.9rem; margin-bottom: 12px; white-space: nowrap; }
.team-body p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

/* ---------- Lists / info ---------- */
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.info-list li:last-child { border-bottom: none; }
.info-list .bullet {
  flex: none;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.info-list strong { display: block; }

/* checklist */
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding: 8px 0 8px 32px;
  color: var(--ink);
}
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 8px;
  color: var(--red);
  font-weight: 800;
}

/* disease pills/columns */
.disease-cols { columns: 2; column-gap: 40px; }
.disease-cols li { break-inside: avoid; }
@media (max-width: 640px) { .disease-cols { columns: 1; } }

/* accordion */
.accordion {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(20, 40, 80, 0.04);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.accordion + .accordion { margin-top: 14px; }
.accordion:hover { border-color: #ccd5e2; }
.accordion[open] { box-shadow: var(--shadow); border-color: #ccd5e2; }
.accordion summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--blue-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  transition: transform 0.25s ease, background 0.2s, color 0.2s;
}
.accordion[open] summary::after { transform: rotate(45deg); background: var(--blue); color: #fff; }
.accordion .acc-body { padding: 0 24px 22px; color: var(--muted); max-width: 640px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info .contact-item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-info .contact-item:last-child { border-bottom: none; }
.contact-info .c-icon {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--blue-light);
  color: var(--blue);
  display: grid; place-items: center;
}
.contact-info .c-icon svg { width: 22px; height: 22px; }
.info-list .bullet svg { width: 15px; height: 15px; }
.contact-info .contact-item strong { display:block; color: var(--ink); }
.contact-info .contact-item span,
.contact-info .contact-item a { color: var(--muted); }

.form-field { margin-bottom: 18px; }
.form-field label { display:block; font-weight:600; margin-bottom:6px; font-size: 0.92rem; }
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
}
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-light); }
.form-note { font-size: 0.82rem; color: var(--muted); }

.map-embed {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- CTA band (soft, understated) ---------- */
.cta-band {
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-align: center;
  padding: 44px 0;
}
.cta-band h2 { color: var(--blue-dark); font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-bottom: 6px; }
.cta-band p { color: var(--muted); max-width: 560px; margin: 0 auto 20px; }

/* ---------- Interactive "behind the logo" ---------- */
.logo-interactive {
  position: relative;
  width: 100%;
  max-width: 230px;
  margin: 0 auto;
}
.logo-base, .logo-hi { display: block; width: 100%; height: auto; }
.logo-base { transition: filter 0.3s ease; }
/* full-colour copy stacked on top, revealed within a region */
.logo-hi {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
/* when a label is engaged, fade the base and pop the highlighted element */
.logo-interactive.dim .logo-base { filter: grayscale(100%) opacity(0.32); }
.logo-interactive.dim .logo-hi { opacity: 1; }

.logo-stage { margin: 0 auto 36px; }
.logo-hint {
  text-align: center;
  font-size: 0.84rem;
  color: var(--muted);
  margin: 16px 0 0;
}
.logo-legend {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.logo-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 24px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.logo-item .bullet {
  flex: none;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: grid; place-items: center;
}
.logo-item .bullet svg { width: 15px; height: 15px; }
.logo-item strong { display: block; margin-bottom: 4px; color: var(--ink); }
.logo-item div { color: var(--muted); font-size: 0.92rem; text-wrap: pretty; }
.logo-item:hover,
.logo-item:focus,
.logo-item.active {
  border-color: var(--blue);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
  outline: none;
}
@media (max-width: 900px) { .logo-legend { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .logo-legend { grid-template-columns: 1fr; } }

/* ---------- Testimonials ---------- */
.testimonial {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.testimonial .stars {
  color: #f5b50a;
  letter-spacing: 2px;
  font-size: 1rem;
  margin-bottom: 14px;
}
.testimonial blockquote {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.7;
  flex: 1;
}
.testimonial .who { font-weight: 700; color: var(--blue); }
.testimonial .src { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.8);
  padding: 56px 0 max(28px, env(safe-area-inset-bottom)); /* clear the home indicator */
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer a { color: rgba(255,255,255,0.8); }
.site-footer a:hover { color: #fff; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { color: rgba(255,255,255,0.7); max-width: 320px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}

/* ---------- Utilities ---------- */
.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;
}
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.lead { font-size: 1.12rem; color: var(--muted); }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }

/* ---------- Visit journey (numbered steps) ---------- */
.steps { list-style: none; margin: 0 auto; padding: 0; max-width: 880px; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 26px;
  padding-bottom: 48px;
}
.step:last-child { padding-bottom: 0; }
/* connector line between step numbers */
.step::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 72px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(180deg, var(--line), var(--blue-light));
}
.step:last-child::before { display: none; }
.step-num {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--blue);
}
.step-body { padding-top: 6px; }
.step-body h3 { font-size: 1.3rem; margin-bottom: 8px; }
.step-body > p { color: var(--muted); max-width: 640px; }
.step-body .check-list { margin-top: 10px; }
.step-body .check-list li { padding-top: 5px; padding-bottom: 5px; }

/* ---------- Form cards & badges ---------- */
.form-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.form-card .card-icon { margin-bottom: 0; flex: none; }
.form-card h3 { font-size: 1.08rem; margin-bottom: 4px; }
.form-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 10px; }
.badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue);
  background: var(--blue-light);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ---------- Framed photo (offset accent border) ---------- */
.img-frame { position: relative; margin: 0; }
.img-frame::after {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: -14px;
  bottom: -14px;
  border: 2px solid var(--blue-light);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.img-frame img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* tighter section endings where two related sections meet */
.section.pb-tight { padding-bottom: 52px; }
.section.pt-tight { padding-top: 52px; }

/* ---------- Scroll reveal (added via JS; safe without it) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; padding: 64px 0; }
  .grid-3, .team-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 8px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 16px; border-radius: 8px; }
  .nav-links a.active::after { display: none; }
  .nav-links a.active { background: var(--blue-light); }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .team-grid, .team-grid.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand-tag { display: none; }
  .section { padding: 56px 0; }
  .step { grid-template-columns: 48px 1fr; gap: 18px; }
  .step-num { width: 48px; height: 48px; font-size: 1.1rem; }
  .step::before { left: 23px; top: 56px; }
  .img-frame::after { display: none; }
}

/* ---------- Touch devices: don't leave hover states "stuck" ----------
   On a phone/tablet there is no pointer to move away, so a tapped card would
   keep its lifted/hovered look until you tapped elsewhere — the dead giveaway
   of a desktop layout shrunk down. Drop the lift on touch; the resting design
   is unchanged. (The logo legend keeps its lift via .active, set on tap.) */
@media (hover: none) {
  .card.hoverable:hover,
  .team-card:hover,
  .logo-item:hover,
  .subnav a:hover,
  .accordion:hover,
  .btn:hover {
    transform: none;
  }
  .card.hoverable:hover { box-shadow: var(--shadow); }
  .team-card:hover { box-shadow: var(--shadow); }
}

/* ---------- Phone-native refinements (iPhone portrait) ----------
   iPhones in portrait are ≤430px wide, so this never touches the iPad. */
@media (max-width: 480px) {
  html { scroll-padding-top: 80px; } /* match the shorter app-style header */

  /* Comfortable side gutter so nothing crowds the edge of the screen */
  .container {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  /* Compact, app-bar-style header */
  .nav { height: 60px; }
  .brand-logo { height: 38px; }
  .brand-name { font-size: 1rem; }
  .brand { gap: 9px; }
  .nav-toggle { width: 42px; height: 38px; }
  .site-header .nav-links { top: calc(60px + env(safe-area-inset-top)); }
  .nav-links a { padding: 15px 16px; } /* bigger tap targets in the menu */

  /* Roomier vertical rhythm without feeling cramped */
  .section { padding: 46px 0; }
  .section-head { margin-bottom: 34px; }

  /* Hero: balanced for a tall, narrow screen. Explicit side padding here so the
     headline and the "Why patients choose us" card keep the gutter instead of
     sitting flush — the base .hero-inner uses `padding: 84px 0`, whose 0 would
     otherwise cancel the container's left/right padding. */
  .hero-inner { padding: 42px 20px 46px; gap: 28px; }
  .hero h1 { font-size: 1.95rem; }
  .hero .lead { font-size: 1.05rem; }
  .hero-card { padding: 22px; }

  /* Full-width, thumb-friendly buttons read as native on a phone */
  .btn { padding: 15px 24px; font-size: 1rem; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .cta-band .btn,
  .section .text-center .btn { width: 100%; max-width: 380px; }

  /* Interior page header */
  .page-header { padding: 40px 0 32px; }

  /* Logo explorer: comfy single-column legend with tap targets */
  .logo-legend { gap: 14px; }
  .logo-item { flex-direction: row; text-align: left; align-items: flex-start; padding: 18px; }
}
