/* =========================================================
   Medicex — Dr Kajal Babamiri
   Warm neutral luxury design system
   ========================================================= */

:root {
  /* Palette */
  --cream:      #FBF8F4;
  --sand:       #F2EBE1;
  --sand-deep:  #E7DDCF;
  --taupe:      #C9B9A6;
  --gold:       #B08D57;
  --gold-soft:  #CBAE7E;
  --charcoal:   #22201E;
  --ink:        #302C29;
  --muted:      #6E655C;
  --line:       rgba(34, 32, 30, 0.12);
  --white:      #FFFFFF;

  /* Type */
  --serif: "Cormorant Garamond", "Didot", "Georgia", "Times New Roman", serif;
  --sans:  "Jost", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Metrics */
  --max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --radius: 2px;
  --nav-h: 84px;
  --nav-h-m: 64px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Type scale ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 300;
  color: var(--charcoal);
  margin: 0 0 0.6em;
  line-height: 1.12;
  letter-spacing: -0.005em;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 4.9rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
h3 { font-size: clamp(1.3rem, 2.1vw, 1.7rem); }
h4 { font-size: 1.12rem; }
p  { margin: 0 0 1.25em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.685rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.4rem;
  display: block;
}
.lede {
  font-size: clamp(1.08rem, 1.6vw, 1.32rem);
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
}
.rule {
  width: 54px; height: 1px;
  background: var(--gold);
  border: 0; margin: 0 0 1.9rem;
}
.center { text-align: center; }
.center .rule { margin-left: auto; margin-right: auto; }

/* ---------- Layout ---------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
}
.wrap--narrow { max-width: 820px; }
section { position: relative; }
.section { padding: clamp(4.5rem, 9vw, 8.5rem) 0; }
.section--tight { padding: clamp(3rem, 6vw, 5rem) 0; }
.section--sand { background: var(--sand); }
.section--dark { background: var(--charcoal); color: var(--sand); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--cream); }
.section--dark .lede { color: rgba(242, 235, 225, 0.72); }
.section--dark .eyebrow { color: var(--gold-soft); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
}
.split--wide-text { grid-template-columns: 1.15fr 0.85fr; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.05rem 2.3rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: var(--cream);
  border-radius: var(--radius);
  transition: background .45s var(--ease), color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: #fff; transform: translateY(-2px); }
.btn--ghost { background: transparent; color: var(--charcoal); }
.btn--ghost:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.btn--light { background: transparent; border-color: rgba(242,235,225,.45); color: var(--cream); }
.btn--light:hover { background: var(--cream); border-color: var(--cream); color: var(--charcoal); }
.btn--sm { padding: .85rem 1.7rem; font-size: .68rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .72rem; letter-spacing: .19em; text-transform: uppercase;
  color: var(--gold); border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color .35s var(--ease), gap .35s var(--ease);
}
.link-arrow:hover { border-color: var(--gold); gap: .95rem; }

/* ---------- Header / Nav ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(251, 248, 244, 0);
  transition: background .5s var(--ease), height .5s var(--ease), box-shadow .5s var(--ease);
}
.header.is-solid {
  background: rgba(251, 248, 244, 0.94);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 var(--line);
  height: 70px;
}
.header__inner {
  width: 100%; max-width: var(--max); margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between;
}
.logo {
  font-family: var(--serif);
  font-size: 1.62rem;
  letter-spacing: 0.13em;
  color: var(--charcoal);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: .62em;
}
.logo__mark {
  width: 1.12em;
  height: auto;
  flex: 0 0 auto;
  display: block;
  color: var(--charcoal);
  transition: color .4s var(--ease);
}
.logo:hover .logo__mark { color: var(--gold); }
.logo__word { display: block; }
.logo b { color: var(--gold); font-weight: inherit; }
.logo small {
  display: block;
  font-family: var(--sans);
  font-size: .5rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .38rem;
}
/* Footer and 404 use the mark on the sand ground */
.footer .logo__mark { color: var(--charcoal); }
.nav { display: flex; align-items: center; gap: clamp(1.3rem, 2.6vw, 2.4rem); }
.nav a {
  font-size: .715rem;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--ink);
  position: relative;
  padding: .4rem 0;
  transition: color .35s var(--ease);
}
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--gold);
  transition: width .4s var(--ease);
}
.nav a:hover { color: var(--gold); }
.nav a:hover::after, .nav a.is-active::after { width: 100%; }
.nav a.is-active { color: var(--gold); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  background: none; border: 0; padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute; left: 9px; width: 24px; height: 1px;
  background: var(--charcoal);
  transition: transform .4s var(--ease), opacity .3s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
body.menu-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: stretch;
  background: var(--sand);
}
.hero__content {
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + clamp(2.5rem, 6vw, 5rem)) clamp(1.5rem, 5vw, 5.5rem) clamp(3rem, 6vw, 5rem) var(--gutter);
  max-width: 720px;
  margin-left: auto;
}
.hero__media { position: relative; overflow: hidden; background: var(--sand-deep); }
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 22%;
  transform: scale(1.02);
}
.hero h1 { margin-bottom: 1.5rem; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 1.6rem;
  margin-top: 2.6rem; padding-top: 1.9rem;
  border-top: 1px solid var(--line);
  font-size: .68rem; letter-spacing: .17em; text-transform: uppercase;
  color: var(--muted);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.4rem; }

/* ---------- Page banner (inner pages) ---------- */
.banner {
  padding: calc(var(--nav-h) + clamp(4rem, 8vw, 7rem)) 0 clamp(3.5rem, 6vw, 5.5rem);
  background: var(--sand);
  border-bottom: 1px solid var(--line);
}
.banner .lede { max-width: 640px; }
.crumb {
  font-size: .66rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.6rem;
}
.crumb a:hover { color: var(--gold); }

/* ---------- Marquee credential strip ---------- */
.strip {
  background: var(--charcoal);
  color: rgba(242,235,225,.82);
  padding: 1.5rem 0;
  overflow: hidden;
}
.strip__track {
  display: flex; gap: 3.5rem;
  white-space: nowrap;
  font-size: .68rem; letter-spacing: .26em; text-transform: uppercase;
  animation: slide 44s linear infinite;
  width: max-content;
}
.strip__track span { display: inline-flex; align-items: center; gap: 3.5rem; }
.strip__track span::after { content: "◆"; color: var(--gold); font-size: .55rem; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .strip__track { animation: none; } }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .5s var(--ease);
  display: flex; flex-direction: column;
  height: 100%;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 50px -28px rgba(34,32,30,.28);
  border-color: var(--taupe);
}
.card__num {
  font-family: var(--serif);
  font-size: 1rem; color: var(--gold);
  letter-spacing: .1em;
  margin-bottom: 1.4rem;
}
.card h3 { margin-bottom: .7rem; }
.card p { font-size: .95rem; color: var(--muted); }
.card .link-arrow { margin-top: 1.6rem; }
.card--flat { background: transparent; border: 0; border-top: 1px solid var(--line); padding: 2.2rem 0 0; }
.card--flat:hover { transform: none; box-shadow: none; }

/* Icon block */
.icon {
  width: 46px; height: 46px; margin-bottom: 1.5rem;
  display: grid; place-items: center;
  border: 1px solid var(--taupe);
  border-radius: 50%;
  color: var(--gold);
}
.icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.2; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.stat { background: var(--cream); padding: clamp(1.8rem, 3vw, 2.8rem) clamp(1rem, 2vw, 2rem); text-align: center; }
.stat b {
  display: block; font-family: var(--serif); font-weight: 300;
  font-size: clamp(2.1rem, 3.6vw, 3rem); color: var(--charcoal); line-height: 1;
  margin-bottom: .6rem;
}
.stat span { font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }

/* ---------- Media / press ---------- */
.press { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); }
.press__item {
  border: 1px solid rgba(242,235,225,.2);
  padding: clamp(1.8rem, 3vw, 2.4rem);
  border-radius: var(--radius);
  transition: border-color .5s var(--ease), background .5s var(--ease);
}
.press__item:hover { border-color: var(--gold-soft); background: rgba(255,255,255,.04); }
.press__item .chan {
  font-size: .64rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold-soft); margin-bottom: 1rem; display: block;
}
.press__item h3 { font-size: 1.35rem; margin-bottom: .55rem; }
.press__item p { font-size: .92rem; color: rgba(242,235,225,.68); margin: 0; }

/* ---------- Quote ---------- */
.quote {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3.1vw, 2.35rem);
  line-height: 1.42;
  font-style: italic;
  color: var(--charcoal);
  max-width: 900px; margin: 0 auto;
}
.quote + .cite {
  margin-top: 2.2rem;
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Accordion (services detail) ---------- */
.acc { border-top: 1px solid var(--line); }
.acc__item { border-bottom: 1px solid var(--line); }
.acc__head {
  width: 100%; background: none; border: 0; padding: 1.9rem 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  text-align: left; color: var(--charcoal);
}
.acc__head h3 { margin: 0; transition: color .35s var(--ease); }
.acc__head:hover h3 { color: var(--gold); }
.acc__sign { position: relative; width: 16px; height: 16px; flex: 0 0 16px; }
.acc__sign::before, .acc__sign::after {
  content: ""; position: absolute; background: var(--gold);
  transition: transform .45s var(--ease), opacity .3s var(--ease);
}
.acc__sign::before { top: 7.5px; left: 0; width: 16px; height: 1px; }
.acc__sign::after  { left: 7.5px; top: 0; width: 1px; height: 16px; }
.acc__item.is-open .acc__sign::after { transform: rotate(90deg); opacity: 0; }
.acc__body { max-height: 0; overflow: hidden; transition: max-height .6s var(--ease); }
.acc__body > div { padding: 0 0 2.2rem; max-width: 760px; }
.acc__body p { color: var(--muted); }
.acc__body ul { margin: 0 0 0; padding-left: 1.1rem; color: var(--muted); font-size: .95rem; }
.acc__body li { margin-bottom: .5rem; }

/* Partner treatment links inside accordion bodies */
.acc__partner {
  margin: 1.8rem 0 0;
  padding: 1.1rem 1.3rem;
  background: var(--sand);
  border-left: 2px solid var(--gold);
  border-radius: 0;
  font-size: .86rem;
  line-height: 1.8;
  color: var(--muted);
}
.acc__partner a {
  color: var(--charcoal);
  border-bottom: 1px solid var(--taupe);
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.acc__partner a:hover { color: var(--gold); border-color: var(--gold); }

/* Location line under a page banner */
.banner__loc {
  margin: 1.6rem 0 0;
  font-size: .92rem;
  color: var(--muted);
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
  max-width: 640px;
}
.banner__loc strong { color: var(--charcoal); font-weight: 400; }

/* Clinic locations list */
.locs {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.locs li {
  background: var(--white);
  padding: 1.4rem 1.5rem;
  margin: 0;
}
.section--sand .locs li { background: var(--cream); }
.locs strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: .35rem;
}
.locs span {
  display: block;
  font-size: .9rem;
  color: var(--ink);
  margin-bottom: .3rem;
}
.locs em {
  display: block;
  font-style: normal;
  font-size: .84rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Risks list on treatment pages */
.risks {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.risks li {
  position: relative;
  padding: .95rem 0 .95rem 1.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}
.risks li::before {
  content: "";
  position: absolute;
  left: .35rem; top: 1.5rem;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- Tag list ---------- */
.tags { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.6rem; list-style: none; padding: 0; }
.tags li {
  font-size: .64rem; letter-spacing: .16em; text-transform: uppercase;
  padding: .5rem .95rem; border: 1px solid var(--line); border-radius: 40px; color: var(--muted);
}

/* ---------- Timeline ---------- */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li {
  position: relative; padding: 0 0 2.4rem 2.4rem;
  border-left: 1px solid var(--line);
}
.tl li:last-child { padding-bottom: 0; border-left-color: transparent; }
.tl li::before {
  content: ""; position: absolute; left: -4.5px; top: 8px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--gold);
}
.tl h4 { margin-bottom: .3rem; }
.tl p { font-size: .95rem; color: var(--muted); margin: 0; }

/* ---------- Image treatments ---------- */
.figure { position: relative; }
.figure img { border-radius: var(--radius); }
.figure--framed::after {
  content: ""; position: absolute; inset: 18px -18px -18px 18px;
  border: 1px solid var(--taupe); border-radius: var(--radius); z-index: -1;
}
.figure figcaption {
  margin-top: 1rem; font-size: .66rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted);
}
.ratio-4-5 { aspect-ratio: 4/5; overflow: hidden; }
.ratio-4-5 img { width: 100%; height: 100%; object-fit: cover; }
.ratio-1-1 { aspect-ratio: 1/1; overflow: hidden; }
.ratio-1-1 img { width: 100%; height: 100%; object-fit: cover; }
.ratio-16-9 { aspect-ratio: 16/9; overflow: hidden; }
.ratio-16-9 img { width: 100%; height: 100%; object-fit: cover; }

/* Full-width photo band, used to break up long treatment copy */
.photo-band {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
}
.photo-band .ratio-16-9 { border-radius: var(--radius); }
.photo-band figcaption {
  margin-top: .9rem;
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Form ---------- */
.form { display: grid; gap: 1.5rem; }
.field { display: grid; gap: .55rem; }
.field label {
  font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.field input, .field select, .field textarea {
  font-family: var(--sans); font-size: 1rem; font-weight: 300; color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  width: 100%;
  transition: border-color .35s var(--ease), box-shadow .35s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236E655C' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1.1rem center; background-size: 12px;
  padding-right: 2.6rem;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176,141,87,.12);
}
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: #B4483C; }
.field .err { font-size: .78rem; color: #B4483C; letter-spacing: 0; text-transform: none; display: none; }
.field.has-error .err { display: block; }
.consent {
  display: flex; gap: .9rem; align-items: flex-start;
  font-size: .88rem; color: var(--muted); line-height: 1.6;
  letter-spacing: 0; text-transform: none;
  cursor: pointer;
  padding: .35rem 0;
  -webkit-tap-highlight-color: transparent;
}
/* Reset everything inherited from `.field input` — that rule sets
   appearance:none, padding and a border, which on a checkbox renders it
   invisible or enormous. */
.consent input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: checkbox;
  width: 24px; height: 24px;
  min-width: 24px;
  flex: 0 0 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  accent-color: var(--gold);
  cursor: pointer;
}
.consent:hover span { color: var(--ink); }
.consent input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.alert {
  padding: 1.1rem 1.4rem; border-radius: var(--radius);
  font-size: .95rem; border: 1px solid;
  margin-bottom: 1.8rem;
}
.alert--ok  { background: #F1F5EE; border-color: #C3D3B7; color: #3D5232; }
.alert--err { background: #FBF0EE; border-color: #E2BDB7; color: #8A382E; }
.alert[hidden] { display: none; }

/* ---------- Contact details ---------- */
.dl { margin: 0; }
.dl div { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.dl div:first-child { padding-top: 0; }
.dl dt {
  font-size: .64rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: .45rem;
}
.dl dd { margin: 0; font-size: 1rem; color: var(--ink); }
.dl dd a:hover { color: var(--gold); }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--charcoal);
  color: var(--sand);
  padding: clamp(4rem, 8vw, 7rem) 0;
  text-align: center;
}
.cta-band h2 { color: var(--cream); }
.cta-band p { color: rgba(242,235,225,.72); max-width: 620px; margin: 0 auto 2.6rem; }

/* ---------- Footer ---------- */
.footer {
  background: var(--sand);
  border-top: 1px solid var(--line);
  padding: clamp(3.5rem, 6vw, 5rem) 0 2rem;
  font-size: .92rem;
  color: var(--muted);
}
.footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: 3rem;
}
.footer h4 {
  font-family: var(--sans); font-size: .66rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--charcoal); margin-bottom: 1.3rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: .7rem; }
.footer a:hover { color: var(--gold); }
.footer__base {
  border-top: 1px solid var(--line);
  padding-top: 1.8rem;
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  align-items: center;
  font-size: .78rem;
}
.footer__note { font-size: .82rem; line-height: 1.7; max-width: 340px; }
.footer__note a { color: var(--gold); }

/* Associated practices band */
.footer__network {
  border-top: 1px solid var(--line);
  padding: 2.6rem 0 2.8rem;
}
.footer__network ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.footer__network li { margin: 0; }
.footer__network li a {
  display: block;
  height: 100%;
  background: var(--cream);
  padding: 1.5rem 1.6rem;
  transition: background .45s var(--ease);
}
.footer__network li a:hover { background: var(--white); }
.footer__network strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: .02em;
  margin-bottom: .4rem;
  transition: color .35s var(--ease);
}
.footer__network li a:hover strong { color: var(--gold); }
.footer__network span {
  display: block;
  font-size: .8rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Build credit */
.footer__credit {
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.footer__credit a {
  color: var(--charcoal);
  border-bottom: 1px solid var(--taupe);
  padding-bottom: 1px;
  transition: color .35s var(--ease), border-color .35s var(--ease);
}
.footer__credit a:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Cookie consent banner ---------- */
.cc {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--charcoal);
  color: rgba(242, 235, 225, .88);
  border-top: 1px solid var(--gold);
  padding: clamp(1.25rem, 3vw, 1.9rem) 0 calc(clamp(1.25rem, 3vw, 1.9rem) + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .5s var(--ease);
  box-shadow: 0 -18px 50px -30px rgba(0, 0, 0, .6);
}
.cc.is-in { transform: none; }
.cc__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 max(var(--gutter), env(safe-area-inset-right)) 0 max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 3rem);
}
.cc__text { flex: 1; min-width: 0; }
.cc__title {
  font-family: var(--serif);
  font-size: 1.32rem;
  font-weight: 400;
  color: var(--cream);
  margin: 0 0 .4rem;
  line-height: 1.2;
}
.cc__text p {
  margin: 0;
  font-size: .88rem;
  line-height: 1.65;
  max-width: 62ch;
}
.cc__text a {
  color: var(--gold-soft);
  border-bottom: 1px solid rgba(203, 174, 126, .45);
  padding-bottom: 1px;
}
.cc__text a:hover { border-color: var(--gold-soft); }
.cc__actions {
  display: flex;
  gap: .7rem;
  flex-shrink: 0;
}
/* Reject must be exactly as easy to use as accept (ICO guidance) */
.cc__actions .btn { min-width: 168px; justify-content: center; }
.cc__actions .btn--ghost {
  color: var(--cream);
  border-color: rgba(242, 235, 225, .5);
  background: transparent;
}
.cc__actions .btn--ghost:hover {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--charcoal);
}
.cc__actions .btn:not(.btn--ghost) {
  background: var(--cream);
  border-color: var(--cream);
  color: var(--charcoal);
}
.cc__actions .btn:not(.btn--ghost):hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.cc :focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 3px; }

.cc__reopen {
  background: none;
  border: 0;
  padding: 0;
  font-size: .78rem;
  color: var(--muted);
  border-bottom: 1px solid var(--taupe);
  cursor: pointer;
  transition: color .3s var(--ease), border-color .3s var(--ease);
}
.cc__reopen:hover { color: var(--gold); border-color: var(--gold); }

@media (max-width: 880px) {
  .cc__inner { flex-direction: column; align-items: stretch; gap: 1.2rem; }
  .cc__actions { flex-direction: column-reverse; }
  .cc__actions .btn { width: 100%; min-width: 0; }
  .cc__title { font-size: 1.18rem; }
  .cc__text p { font-size: .84rem; }
  .cc { max-height: 85vh; overflow-y: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cc { transition: none; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .09s; }
.reveal-d2 { transition-delay: .18s; }
.reveal-d3 { transition-delay: .27s; }
.reveal-d4 { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .press { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__network ul { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  body { font-size: 16px; }

  /* --- Header: fixed height, solid. NO backdrop-filter here: it would make
         .header a containing block for the position:fixed nav panel and clip
         the menu to the header bar. --- */
  .header,
  .header.is-solid {
    height: var(--nav-h-m);
    background: var(--cream);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 1px 0 var(--line);
    transition: none;
  }
  .logo { position: relative; z-index: 95; font-size: 1.45rem; }
  .logo small { font-size: .46rem; letter-spacing: .3em; margin-top: .3rem; }

  /* --- Mobile nav panel --- */
  .nav-toggle {
    display: block;
    position: relative; z-index: 95;
    width: 48px; height: 48px;
    margin-right: -12px;
  }
  .nav-toggle span { left: 12px; }
  .nav-toggle span:nth-child(1) { top: 19px; }
  .nav-toggle span:nth-child(2) { top: 25px; }
  .nav-toggle span:nth-child(3) { top: 31px; }

  .nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 0;
    background: var(--cream);
    padding: calc(var(--nav-h-m) + 1.5rem) var(--gutter) calc(2rem + env(safe-area-inset-bottom));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateY(-100%);
    transition: transform .5s var(--ease), visibility .5s var(--ease);
    visibility: hidden;
  }
  body.menu-open .nav { transform: none; visibility: visible; }
  body.menu-open { overflow: hidden; }

  .nav a {
    font-family: var(--serif);
    font-size: 1.75rem;
    letter-spacing: .02em;
    text-transform: none;
    color: var(--charcoal);
    padding: 1rem 0;
    border-bottom: 1px solid var(--line);
    min-height: 48px;
    display: flex;
    align-items: center;
  }
  .nav a::after { display: none; }
  .nav a.is-active { color: var(--gold); }

  /* --- Hero: content below a full, uncropped portrait --- */
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: var(--nav-h-m);
  }
  .hero__content {
    order: 2;
    max-width: none; margin: 0;
    padding: clamp(2.5rem, 8vw, 3.5rem) var(--gutter) clamp(3rem, 9vw, 4rem);
  }
  /* Source portraits are 1:1 — matching the ratio means zero cropping. */
  .hero__media { order: 1; aspect-ratio: 1/1; }
  .hero__media img { object-position: 50% 50%; transform: none; }
  .hero__meta { gap: .5rem 1.4rem; margin-top: 2.2rem; padding-top: 1.5rem; }

  .banner { padding-top: calc(var(--nav-h-m) + clamp(2.5rem, 8vw, 4rem)); }

  .split, .split--wide-text, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .figure--framed::after { display: none; }
  .field--row { grid-template-columns: 1fr; }

  /* Portrait figures: cap height so they don't dominate the scroll */
  .ratio-4-5 { aspect-ratio: 4/5; max-height: 78vh; }
  .ratio-4-5 img, .ratio-1-1 img { object-position: 50% 30%; }

  .acc__head { padding: 1.5rem 0; gap: 1rem; }
  .acc__partner { font-size: .84rem; padding: 1rem 1.1rem; }
  .quote { font-size: clamp(1.3rem, 5.2vw, 1.8rem); }
}

@media (max-width: 520px) {
  .stats { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__base { flex-direction: column; align-items: flex-start; gap: .8rem; }

  /* Two columns of cards are unreadable at this width */
  .grid-4 { grid-template-columns: 1fr; }
  .card { padding: 1.6rem 1.4rem; }
  .card__num { margin-bottom: 1rem; }
  .icon { margin-bottom: 1.1rem; }

  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn,
  .cta-band .btn,
  .center > .btn { width: 100%; justify-content: center; }
  .btn { padding: 1rem 1.6rem; }

  .nav a { font-size: 1.55rem; }
  .hero__meta { flex-direction: column; gap: .55rem; }
  .strip__track { gap: 2rem; font-size: .62rem; letter-spacing: .2em; }
  .strip__track span { gap: 2rem; }
  .footer__network li a { padding: 1.2rem 1.2rem; }
}

@media (max-width: 380px) {
  .logo { font-size: 1.28rem; }
  .nav a { font-size: 1.4rem; }
  h1 { font-size: 2.25rem; }
}

/* ---------- Print ---------- */
@media print {
  .header, .nav, .cta-band, .strip { display: none; }
  body { background: #fff; }
}
