/* =========================================================
   Dr Richard Piles Clinic: site styles
   Colours: deep clinical navy + calm blue, warm off-white ground.
   ========================================================= */

:root {
  --ink: #0d2433;
  --ink-soft: #2a4252;
  --muted: #586a76;
  --line: #dbe5eb;
  --ground: #ffffff;
  --surface: #f3f7f9;
  --surface-warm: #f7f4ef;
  --tint: #e5f0f6;
  --primary: #0a5a8a;
  --primary-dark: #08476d;
  --navy: #0b3550;
  --navy-deep: #072538;
  --on-navy: #e3eef4;
  --on-navy-muted: #a9c3d2;
  --alert: #a3341f;
  --ok: #1d6b47;

  --teal: #0e8a8f;
  --teal-soft: #dff3f1;
  --gold: #e9a93b;
  --grad-navy: linear-gradient(125deg, #072538 0%, #0b4466 48%, #0e7c8c 100%);
  --grad-soft: linear-gradient(125deg, #e4f1fa 0%, #e0f4f2 52%, #fdf1dc 100%);
  --grad-btn: linear-gradient(120deg, #0a5a8a 0%, #0e8a8f 100%);

  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --wrap: 1200px;
  --gutter: 24px;
  --section: clamp(72px, 9vw, 128px);
  --header-h: 76px;
  --shadow: 0 1px 2px rgba(13, 36, 51, .05), 0 10px 30px rgba(13, 36, 51, .07);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1rem; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }
strong { font-weight: 700; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.bg-soft { background: var(--surface); }
.bg-warm { background: var(--surface-warm); }
.bg-navy { background: var(--navy); color: var(--on-navy); }
.bg-navy h2, .bg-navy h3 { color: #fff; }

.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 14px;
}
.bg-navy .eyebrow { color: #8fcbea; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.25rem); color: var(--muted); max-width: 62ch; }
.bg-navy .lead { color: var(--on-navy-muted); }
.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 10px; border: 1.5px solid transparent;
  font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .12s var(--ease), box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 6px 18px rgba(10, 90, 138, .25); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); border-color: currentColor; }
.btn-ghost:hover { background: var(--tint); color: var(--primary-dark); transform: translateY(-1px); }
.bg-navy .btn-primary { background: #fff; color: var(--navy); }
.bg-navy .btn-primary:hover { background: var(--tint); color: var(--navy); }
.bg-navy .btn-ghost { color: #fff; }
.bg-navy .btn-ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.text-link {
  font-weight: 700; color: var(--primary); text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  transition: background-size .3s var(--ease);
  padding-bottom: 2px;
}
.text-link:hover { background-size: 100% 1.5px; }
.text-link::after { content: " \2192"; }

/* ---------- Accessibility ---------- */
.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; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-sm); font-weight: 700; }
.skip-link:focus { top: 12px; color: #fff; }
:focus-visible { outline: 3px solid #3b9ad6; outline-offset: 2px; border-radius: 4px; }

/* ---------- Top bar + header ---------- */
.topbar { background: var(--navy-deep); color: var(--on-navy); font-size: .88rem; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 38px; gap: 16px; }
.topbar a { color: #fff; font-weight: 600; text-decoration: none; }
.topbar a:hover { text-decoration: underline; color: #fff; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: var(--navy); color: #fff; font: 600 1.45rem/1 var(--font-head);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font: 600 1.25rem/1.1 var(--font-head); }
.logo-text small { font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-link {
  color: var(--ink-soft); font-weight: 600; font-size: .98rem; text-decoration: none;
  padding-block: 6px;
  background: linear-gradient(var(--primary), var(--primary)) 0 100% / 0 2px no-repeat;
  transition: background-size .3s var(--ease), color .2s;
}
.nav-link:hover, .nav-link.is-active { color: var(--primary); background-size: 100% 2px; }
.nav-cta { min-height: 44px; padding: 10px 18px; font-size: .95rem; }

.nav-toggle { display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; border-radius: 10px; }
.nav-toggle:hover { background: var(--surface); }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  display: block; width: 22px; height: 2px; background: var(--ink); margin-inline: auto; position: relative;
  transition: transform .25s var(--ease), background-color .2s;
}
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-open .nav-toggle-bar { background: transparent; }
.nav-open .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(40px, 6vw, 80px) clamp(56px, 7vw, 96px); background: linear-gradient(180deg, var(--surface) 0%, #fff 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; min-height: min(680px, calc(100svh - 114px - 120px)); }
.hero h1 { margin-bottom: 22px; }
.hero h1 em { font-style: italic; color: var(--primary); }
.hero .lead { margin-bottom: 30px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 28px 0 0; }
.facts li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: .9rem; font-weight: 600; color: var(--ink-soft);
}
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

.frame { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--tint); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.frame:hover img { transform: scale(1.03); }
.hero-frame { aspect-ratio: 4 / 4.4; box-shadow: var(--shadow); }
.hero-card {
  position: absolute; left: 20px; bottom: 20px; right: 20px; max-width: 330px;
  background: rgba(255, 255, 255, .95); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow);
}
.hero-card strong { display: block; font: 600 1.15rem/1.25 var(--font-head); margin-bottom: 4px; }
.hero-card span { font-size: .92rem; color: var(--muted); }

/* hero entrance (once, on load) */
[data-enter] > * { animation: rise .8s var(--ease) both; }
[data-enter] > *:nth-child(2) { animation-delay: .12s; }
[data-enter] > *:nth-child(3) { animation-delay: .22s; }
[data-enter] > *:nth-child(4) { animation-delay: .32s; }
[data-enter] > *:nth-child(5) { animation-delay: .42s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

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

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: 28px; display: flex; flex-direction: column;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c6d7e1; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); }
.card > :last-child { margin-bottom: 0; }
.card .text-link { margin-top: auto; padding-top: 8px; align-self: flex-start; }

.condition-card { padding: 32px; scroll-margin-top: calc(var(--header-h) + 24px); }
.condition-card .tag {
  align-self: flex-start; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary); background: var(--tint); padding: 5px 10px; border-radius: 6px; margin-bottom: 18px;
}
.condition-card h3 { font-size: 1.75rem; }
.condition-card h4 { margin-top: 6px; color: var(--ink-soft); }
.ticks { list-style: none; padding: 0; margin: 0 0 22px; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 8px; color: var(--ink-soft); }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: .55em; width: 12px; height: 7px;
  border-left: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(-45deg);
}

.also { margin-top: clamp(40px, 5vw, 64px); scroll-margin-top: calc(var(--header-h) + 24px); }
.also h3 { font-size: 1.5rem; margin-bottom: 20px; }
.mini-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.mini {
  border: 1px solid var(--line); border-radius: var(--r); padding: 20px; background: var(--surface);
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s;
}
.mini:hover { transform: translateY(-2px); background: #fff; box-shadow: var(--shadow); }
.mini strong { display: block; font-size: 1.02rem; margin-bottom: 6px; }
.mini span { font-size: .92rem; color: var(--muted); display: block; line-height: 1.5; }

/* ---------- Split layout ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 6vw, 88px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-frame { aspect-ratio: 5 / 4.6; }

.signs { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.signs li {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm);
}
.signs li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: .55em; border-radius: 50%; background: var(--primary); }
.notice {
  border-left: 4px solid var(--alert); background: #fbefec; color: #5c1e12;
  padding: 16px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .97rem;
}
.notice strong { color: var(--alert); }

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; margin-bottom: clamp(36px, 5vw, 56px); }
.step { padding: 28px 24px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); transition: transform .25s var(--ease), box-shadow .25s; }
.step:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  display: block; font: 600 2.6rem/1 var(--font-head); color: var(--primary); margin-bottom: 16px;
}
.step h3 { font-size: 1.3rem; margin-bottom: 8px; }
.step p { color: var(--muted); margin: 0; font-size: .98rem; }
.pull {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px);
}
.pull-mark { font: 600 3.6rem/0.8 var(--font-head); color: var(--primary); }
.pull p { margin: 0; font-size: 1.12rem; color: var(--ink-soft); }
.pull p + p { margin-top: 10px; }

/* ---------- Treatment option cards with photos ---------- */
.option { padding: 0; overflow: hidden; }
.option .frame { border-radius: 0; aspect-ratio: 16 / 10; }
.option-body { padding: 26px 28px 30px; display: flex; flex-direction: column; flex: 1; }
.option-body p { color: var(--muted); }
.option-body > :last-child { margin-bottom: 0; }

/* ---------- Doctor ---------- */
.doctor-card {
  background: var(--navy); color: var(--on-navy); border-radius: var(--r-lg);
  padding: clamp(28px, 4vw, 48px); position: relative; overflow: hidden;
}
.doctor-card::after {
  content: "R"; position: absolute; right: -10px; bottom: -70px;
  font: 600 18rem/1 var(--font-head); color: rgba(255, 255, 255, .05); pointer-events: none;
}
.monogram {
  width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
  font: 600 1.9rem/1 var(--font-head); color: #fff; margin-bottom: 22px;
}
.doctor-card h3 { color: #fff; font-size: 1.8rem; margin-bottom: 6px; }
.doctor-card .role { color: var(--on-navy-muted); margin-bottom: 26px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; }
.stat { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r-sm); padding: 16px; }
.stat strong { display: block; font: 600 1.6rem/1.1 var(--font-head); color: #fff; }
.stat span { font-size: .85rem; color: var(--on-navy-muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 860px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative;
  font-weight: 700; font-size: 1.1rem; color: var(--ink);
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--primary); }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 12px; height: 12px; margin-top: -8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
  transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--muted); padding-right: 48px; margin-bottom: 22px; }

/* ---------- Closing statement ---------- */
.closing { text-align: center; }
.closing h2 { font-size: clamp(2.3rem, 5.5vw, 4.4rem); max-width: 16ch; margin-inline: auto; margin-bottom: 20px; }
.closing h2 em { font-style: italic; color: #8fcbea; }
.closing .lead { margin-inline: auto; margin-bottom: 34px; }
.closing .btn-row { justify-content: center; }

/* ---------- Page header (inner pages) ---------- */
.page-head { padding-block: clamp(56px, 7vw, 96px) clamp(40px, 5vw, 64px); background: var(--surface); border-bottom: 1px solid var(--line); }
.page-head h1 { max-width: 20ch; }
.page-head .lead { margin-bottom: 0; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---------- About ---------- */
.profile-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 6vw, 80px); align-items: start; }
.profile-grid .doctor-card { position: sticky; top: calc(var(--header-h) + 24px); }
.prose h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-soft); }
.timeline { list-style: none; padding: 0; margin: 0 0 1em; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 26px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .45em; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); }
.timeline strong { display: block; color: var(--ink); }
.timeline span { color: var(--muted); font-size: .97rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 4vw, 40px); box-shadow: var(--shadow); scroll-margin-top: calc(var(--header-h) + 24px); }
.form-card h2 { font-size: clamp(1.7rem, 3vw, 2.2rem); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .95rem; }
.field label .opt { font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  border: 1.5px solid #c9d6de; border-radius: 10px; background: #fff;
  padding: 12px 14px; min-height: 50px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9fb6c4; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(10, 90, 138, .15); }
.field [aria-invalid="true"] { border-color: var(--alert); }
.field-error { color: var(--alert); font-size: .88rem; font-weight: 600; min-height: 0; }
.field-error:empty { display: none; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; color: var(--ink-soft); }
.check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--primary); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-top: 8px; }
.form-status { margin: 18px 0 0; padding: 14px 18px; border-radius: 10px; font-weight: 600; }
.form-status:empty { display: none; }
.form-status.is-ok { background: #e8f5ee; color: var(--ok); }
.form-status.is-error { background: #fbefec; color: var(--alert); }
.btn[disabled] { opacity: .7; cursor: progress; }

.info-list { display: grid; gap: 16px; }
.info {
  display: block; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); text-decoration: none; color: var(--ink);
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s;
}
a.info:hover { transform: translateY(-2px); background: #fff; box-shadow: var(--shadow); color: var(--ink); }
.info small { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; }
.info strong { display: block; font-size: 1.12rem; word-break: break-word; }
.info span { display: block; color: var(--muted); font-size: .95rem; margin-top: 4px; }

.map-frame { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 21 / 9; background: var(--tint); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.map-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.map-head h2 { margin: 0; }

/* ---------- Policy pages ---------- */
.policy { display: grid; grid-template-columns: 260px 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.policy-nav { position: sticky; top: calc(var(--header-h) + 24px); }
.policy-nav h2 { font: 700 .8rem/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.policy-nav ul { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.policy-nav a {
  display: block; padding: 9px 16px; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .95rem;
  transition: color .2s, border-color .2s;
}
.policy-nav a:hover { color: var(--primary); border-color: #9fc4db; }
.policy-nav a[aria-current="page"] { color: var(--primary); border-color: var(--primary); }
.policy-body { max-width: 760px; }
.policy-body h2 { font-size: 1.6rem; margin-top: 1.8em; }
.policy-body h2:first-child { margin-top: 0; }
.policy-body p, .policy-body li { color: var(--ink-soft); }
.policy-body li { margin-bottom: 6px; }
.policy-meta { font-size: .95rem; color: var(--muted); margin-top: 14px; }

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.notfound .btn-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-navy-muted); padding-top: 72px; font-size: .96rem; }
.site-footer a { color: var(--on-navy); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand .logo { color: #fff; margin-bottom: 18px; }
.footer-brand .logo:hover { text-decoration: none; }
.footer-brand .logo-mark { background: #fff; color: var(--navy); }
.footer-brand .logo-text small { color: #8fcbea; }
.footer-title { font: 700 .8rem/1.3 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 10px; word-break: break-word; }
.footer-base { border-top: 1px solid rgba(255, 255, 255, .12); padding-block: 24px 32px; font-size: .86rem; }
.footer-base p { margin: 0 0 6px; }
.footer-credits { color: #7f9dad; font-size: .8rem; }
.footer-credits a { color: #a9c3d2; }

/* ---------- Medical banner strip ---------- */
.med-strip { background: var(--navy); color: var(--on-navy); border-bottom: 1px solid rgba(255, 255, 255, .08); }
.med-strip-inner { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.med-strip-inner > * {
  display: flex; align-items: center; gap: 14px; padding: 20px 18px; color: inherit; text-decoration: none;
  border-left: 1px solid rgba(255, 255, 255, .1);
}
.med-strip-inner > *:first-child { border-left: 0; padding-left: 0; }
.med-strip-inner > a { transition: background-color .25s; }
.med-strip-inner > a:hover { background: rgba(255, 255, 255, .06); }
.ms-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(143, 203, 234, .16); display: grid; place-items: center; }
.ms-icon svg { width: 24px; height: 24px; fill: none; stroke: #8fcbea; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.med-strip strong { display: block; color: #fff; font-size: 1rem; line-height: 1.25; }
.med-strip small { display: block; color: var(--on-navy-muted); font-size: .86rem; line-height: 1.4; margin-top: 2px; }

/* ---------- Piles grades banner ---------- */
.condition-art {
  margin: -8px -8px 22px; border-radius: var(--r); overflow: hidden; background: #fff; border: 1px solid var(--line);
  aspect-ratio: 16 / 10; display: grid; place-items: center;
}
.condition-art img { width: 100%; height: 100%; object-fit: contain; }
.grade-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grade { margin: 0; background: #fff; color: var(--ink); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.grade img { width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: contain; border-bottom: 1px solid var(--line); background: #fff; }
.grade figcaption { padding: 18px 20px 22px; }
.grade strong { display: block; font: 600 1.35rem/1.2 var(--font-head); color: var(--navy); margin-bottom: 6px; }
.grade span { display: block; color: var(--muted); font-size: .96rem; line-height: 1.5; }
.grade-note { margin: 22px 0 0; font-size: .86rem; color: var(--on-navy-muted); text-align: center; }

/* ---------- Colour + banner refresh (gradients) ---------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -.015em; font-variation-settings: "SOFT" 60; }
.topbar { background: linear-gradient(90deg, #061c2b, #0b3550 60%, #0c5a6d); }
.logo-mark { background: var(--grad-btn); box-shadow: 0 6px 14px rgba(10, 90, 138, .28); }
.btn-primary { background: var(--grad-btn); border-color: transparent; }
.btn-primary:hover { background: linear-gradient(120deg, #08476d 0%, #0b7479 100%); }
.eyebrow { color: var(--teal); }
.hero h1 em, .closing h2 em { font-style: italic; background: linear-gradient(100deg, #0a5a8a, #0e8a8f 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.closing h2 em { background: linear-gradient(100deg, #8fd6f2, #7ee0cf); -webkit-background-clip: text; background-clip: text; }
.condition-card .tag { background: var(--teal-soft); color: #0a6c70; }
.ticks li::before { border-color: var(--teal); }
.facts li::before, .signs li::before { background: var(--teal); }
.step::before { background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* banners with gradient + soft glow shapes */
.hero { position: relative; overflow: hidden; background: var(--grad-soft); }
.hero::before, .page-head::before {
  content: ""; position: absolute; width: 520px; height: 520px; right: -140px; top: -180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 138, 143, .20), rgba(14, 138, 143, 0) 68%); pointer-events: none;
}
.hero::after, .page-head::after {
  content: ""; position: absolute; width: 420px; height: 420px; left: -120px; bottom: -200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(233, 169, 59, .22), rgba(233, 169, 59, 0) 68%); pointer-events: none;
}
.hero > .wrap, .page-head > .wrap { position: relative; z-index: 1; }
.page-head { position: relative; overflow: hidden; background: var(--grad-soft); border-bottom: 0; }
.bg-navy { background: var(--grad-navy); }
.med-strip { background: linear-gradient(100deg, #072538 0%, #0b4466 55%, #0e7c8c 100%); }
.ms-icon { background: rgba(255, 255, 255, .14); }
.ms-icon svg { stroke: #bfeee6; }
.bg-soft { background: linear-gradient(180deg, #f1f7fa 0%, #eaf5f4 100%); }
.hero-card { border-left: 4px solid var(--teal); }
.doctor-card { background: var(--grad-navy); }
.card:hover, .step:hover, .mini:hover { border-color: #b9dcdc; }
.grade strong { background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 150;
  display: inline-flex; align-items: center; gap: 10px; height: 58px; padding: 0 20px 0 14px;
  border-radius: 999px; background: #25d366; color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 24px rgba(37, 211, 102, .45), 0 2px 6px rgba(0, 0, 0, .18);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.wa-float:hover { color: #fff; transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 28px rgba(37, 211, 102, .55); }
.wa-float svg { width: 32px; height: 32px; }
@media (max-width: 767px) {
  .wa-float { right: 14px; bottom: 90px; width: 58px; padding: 0; justify-content: center; }
  .wa-float span { display: none; }
}

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .site-nav ul { gap: 18px; }
  .mini-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .med-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .med-strip-inner > *:nth-child(3) { border-left: 0; padding-left: 0; }
  .med-strip-inner > *:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
  .grade-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: calc(var(--header-h) + 38px) 0 0 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 24px;
    background: #fff; padding: 24px var(--gutter) 40px; overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s .25s;
  }
  .nav-open .site-nav { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .nav-link { display: block; padding: 16px 0; font-size: 1.25rem; border-bottom: 1px solid var(--line); background: none; }
  .nav-cta { min-height: 52px; }
  body.nav-open { overflow: hidden; }

  .hero-grid, .split, .profile-grid, .contact-grid, .policy { grid-template-columns: 1fr; }
  .hero-grid { min-height: 0; }
  .hero-frame { aspect-ratio: 16 / 11; }
  .split.reverse > :first-child { order: 0; }
  .split-frame { aspect-ratio: 16 / 10; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .profile-grid .doctor-card, .policy-nav { position: static; }
  .policy-nav ul { display: flex; flex-wrap: wrap; gap: 8px; border: 0; }
  .policy-nav a { border: 1px solid var(--line); border-radius: 999px; margin: 0; padding: 8px 14px; min-height: 44px; display: flex; align-items: center; }
  .policy-nav a[aria-current="page"] { background: var(--tint); }
  .map-frame { aspect-ratio: 4 / 3; }
}

@media (max-width: 767px) {
  :root { --gutter: 16px; }
  body { font-size: 1rem; padding-bottom: 76px; }
  .topbar { display: none; }
  .site-nav { inset: var(--header-h) 0 0 0; }
  .logo-mark { width: 38px; height: 38px; font-size: 1.3rem; }
  .logo-text strong { font-size: 1.12rem; }
  .btn-row .btn { flex: 1 1 100%; }
  .grid-2, .grid-4, .steps, .mini-grid, .form-grid { grid-template-columns: 1fr; }
  .med-strip-inner { grid-template-columns: 1fr; }
  .med-strip-inner > * { border-left: 0; padding: 14px 0; }
  .med-strip-inner > *:nth-child(n+2) { border-top: 1px solid rgba(255, 255, 255, .1); }
  .grade-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .hero-card { position: static; max-width: none; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); }
  .hero-frame { aspect-ratio: auto; display: flex; flex-direction: column; }
  .hero-frame img { aspect-ratio: 4 / 3; height: auto; }
  .pull { grid-template-columns: 1fr; gap: 8px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-list a { display: inline-flex; align-items: center; min-height: 44px; }
  .footer-list li { margin-bottom: 0; }
  .faq summary { padding-block: 20px; min-height: 44px; }
  .action-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px rgba(13, 36, 51, .08);
  }
  .action-bar .btn { min-height: 50px; padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
