/* ==========================================================================
   Dr Malonda Makanda — Homepage
   Palette and type follow the drobgyn.co.za feel: soft teal, pale aqua
   panels, charcoal text, Jost throughout.
   ========================================================================== */

:root {
  --dark-950: #1c2a2b;
  --dark-900: #233637;
  --heading: #333333;
  --primary-700: #2f6b6c;
  --primary-600: #3a8182;
  --primary: #63aaab;
  --primary-300: #9fcfcf;
  --tint-200: #cfe6e6;
  --tint-100: #e2f0f0;
  --tint-50: #eff6f6;
  --surface: #ffffff;
  --ink: #333333;
  --ink-soft: #666666;
  --line: #e2ecec;
  --charcoal: #2d3333;

  --grad: linear-gradient(100deg, var(--primary-600) 0%, var(--primary) 100%);

  --font-display: "Jost", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;
  --p-size: 1.0625rem;
  --p-lh: 1.75;
  --h2-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem);
  --h3-size: clamp(1.2rem, 1.1rem + .35vw, 1.35rem);

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 2px 8px rgba(28, 52, 53, .06);
  --shadow: 0 18px 50px -18px rgba(28, 52, 53, .25);
  --shadow-lg: 0 30px 80px -30px rgba(28, 52, 53, .45);

  --container: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(72px, 9vw, 128px);
  --header-h: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* Base ------------------------------------------------------------------- */
*, *::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.75;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { overflow-wrap: break-word; margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: 0; color: var(--heading); }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.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: 16px; top: -60px; z-index: 200; background: var(--primary-600); color: #fff; padding: 10px 16px; border-radius: 8px; transition: top .2s; }
.skip-link:focus { top: 12px; }

/* Shared type -------------------------------------------------------------- */
.h2 { font-size: var(--h2-size); text-transform: uppercase; letter-spacing: .12em; color: var(--heading); margin-bottom: 1.1rem; }
.h2 + .rule { margin-bottom: 1.8rem; }
/* Type scale: one heading style per level, one paragraph style everywhere */
p { font-size: var(--p-size); line-height: var(--p-lh); color: var(--ink-soft); }
.h3 { font-size: var(--h3-size); color: var(--heading); line-height: 1.25; }


.rule { display: block; width: 56px; height: 3px; border-radius: 3px; background: var(--grad); margin-bottom: 1.4rem; }
.rule--light { background: linear-gradient(90deg, var(--primary-300), #fff); }

/* Buttons & links ------------------------------------------------------- */
.btn {
  white-space: nowrap;
  --pad-y: .85rem; --pad-x: 1.5rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--font-body); font-weight: 600; font-size: .875rem;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.2;
  border-radius: 6px; border: 0; cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .3s, color .2s;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn--primary {
  color: #fff; background-color: var(--primary-600);
  box-shadow: 0 10px 24px -12px rgba(58, 129, 130, .55);
}
.btn--primary:hover { background-color: var(--primary-700); transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(58, 129, 130, .65); }


/* Topbar ------------------------------------------------------------------ */
.topbar { background: var(--grad); color: #fff; font-size: .8125rem; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 40px; }
.topbar__group { display: flex; gap: 1.6rem; }
.topbar__item { display: inline-flex; align-items: center; gap: .5rem; margin: 0; opacity: .95; transition: opacity .2s; white-space: nowrap; }
a.topbar__item:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
.topbar__item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Header ---------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s, border-color .3s;
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 8px 30px -18px rgba(28, 52, 53, .35); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: var(--header-h); transition: min-height .3s; }
.header.is-scrolled .header__inner { min-height: 70px; }

.logo { display: inline-flex; align-items: center; gap: .85rem; }
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__name { white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: 1.3rem; color: var(--heading); letter-spacing: .01em; }
.logo__role { white-space: nowrap; font-size: .7rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--primary-600); margin-top: 4px; }
.logo--light .logo__name { color: #fff; white-space: normal; }
.logo--light .logo__role { color: var(--primary-300); }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav__list { display: flex; align-items: center; gap: .25rem; }
.nav__list > li { position: relative; display: flex; align-items: center; }
.nav__link {
  position: relative; display: block; padding: .6rem .85rem;
  font-size: .85rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft);
  transition: color .2s;
}
.nav__link::after {
  content: ""; position: absolute; left: .85rem; right: .85rem; bottom: .3rem; height: 2px; border-radius: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--primary-600); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.nav__item--drop .nav__link { padding-right: .2rem; }
.nav__item--drop .nav__link::after { right: .2rem; }
.nav__sub-toggle {
  display: grid; place-items: center; width: 26px; height: 26px; padding: 0; margin-right: .4rem;
  background: none; border: 0; cursor: pointer; color: var(--ink-soft); border-radius: 50%;
}
.nav__sub-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s; }
.nav__sub {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 300px;
  background: #fff; border-radius: var(--radius); padding: .6rem;
  box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .25s, transform .25s var(--ease), visibility .25s;
}
.nav__sub::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.nav__sub a {
  display: block; padding: .65rem .9rem; border-radius: 10px;
  font-size: .9375rem; line-height: 1.35; color: var(--ink); transition: background .2s, color .2s, padding .25s var(--ease);
}
.nav__sub a:hover { background: var(--tint-50); color: var(--primary-600); padding-left: 1.15rem; }
/* Dropdown icons */
.nav__sub a { display: flex; align-items: center; gap: .8rem; }
.nav__sub-icon {
  display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px;
  background: var(--tint-100); transition: background .25s;
}
.nav__sub-icon img { width: 24px; height: 24px; transition: filter .25s; }
.nav__sub a:hover .nav__sub-icon, .nav__sub a[aria-current="page"] .nav__sub-icon { background: var(--grad); }
.nav__sub a:hover .nav__sub-icon img, .nav__sub a[aria-current="page"] .nav__sub-icon img { filter: brightness(0) invert(1); }
.nav__sub a[aria-current="page"] { color: var(--primary-600); font-weight: 500; }
.nav__item--drop:hover .nav__sub,
.nav__item--drop:focus-within .nav__sub,
.nav__item--drop.is-open .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__item--drop:hover .nav__sub-toggle svg, .nav__item--drop.is-open .nav__sub-toggle svg { transform: rotate(180deg); }

.nav-toggle { display: none; }

/* Hero ------------------------------------------------------------------ */
.hero { position: relative; isolation: isolate; padding-top: clamp(80px, 9vw, 140px); }
.hero__bg { position: absolute; inset: 0 0 90px; z-index: -1; overflow: hidden; background: var(--tint-50); }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 40%; filter: contrast(1.06) saturate(1.08); }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .9) 0%, rgba(255, 255, 255, .82) 38%, rgba(255, 255, 255, .3) 52%, rgba(255, 255, 255, 0) 62%);
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); padding-bottom: clamp(72px, 8vw, 120px); }
.hero__copy { max-width: 640px; }
.hero__title {
  font-size: clamp(2.2rem, 1.2rem + 3.2vw, 3.6rem); font-weight: 700;
  line-height: 1.12; letter-spacing: -.01em; color: var(--heading); margin-bottom: 1.6rem;
}
.hero__blurb { max-width: 36em; margin-bottom: 2.2rem; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem 2rem; }


/* Pathways */
.pathways {
  position: relative; display: grid; grid-template-columns: 1fr 1fr;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.pathway { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.25rem; padding: 1.6rem 1.9rem; transition: background .3s; }
.pathway:first-child { border-right: 1px solid var(--line); border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.pathway:last-child { border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.pathway:hover { background: var(--tint-50); }
.pathway__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--tint-100); color: var(--primary-600); transition: background .3s, color .3s; }
.pathway__icon img { width: 36px; height: 36px; transition: filter .3s; }
.pathway:hover .pathway__icon img { filter: brightness(0) invert(1); }
.pathway:hover .pathway__icon { background: var(--grad); color: #fff; }
.pathway__title { display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--h3-size); color: var(--heading); margin-bottom: .2rem; }
.pathway__list { display: block; font-size: .875rem; line-height: 1.55; color: var(--ink-soft); }
.pathway__arrow { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); color: var(--primary-600); transition: transform .3s var(--ease), border-color .3s, background .3s, color .3s; }
.pathway__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pathway:hover .pathway__arrow { transform: translateX(4px); background: var(--primary-600); border-color: var(--primary-600); color: #fff; }

/* Intro ----------------------------------------------------------------- */
.intro__grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.intro__media { position: relative; padding: 0 0 36px 36px; }
.intro__img { position: relative; z-index: 1; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 5 / 6; box-shadow: var(--shadow); }
.intro__img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% center; }
.intro__accent {
  position: absolute; left: 0; bottom: 0; width: 62%; height: 58%;
  border-radius: var(--radius-lg); background: var(--grad); opacity: .95;
}
.intro__accent::after {
  content: ""; position: absolute; right: -28px; top: -28px; width: 120px; height: 120px;
  background-image: radial-gradient(var(--primary-300) 1.6px, transparent 1.8px); background-size: 14px 14px; opacity: .6;
  z-index: -1;
}
.intro__copy .btn { margin-top: .6rem; }

/* Meet ------------------------------------------------------------------ */
.meet {
  position: relative; overflow: hidden; isolation: isolate;
  padding-block: var(--section-y);
  background: linear-gradient(135deg, var(--dark-950) 0%, var(--dark-900) 45%, #2f5051 100%);
  color: rgba(255, 255, 255, .82);
}
.meet__glow {
  position: absolute; z-index: -1; right: -10%; top: -30%; width: 60vw; height: 60vw; max-width: 820px; max-height: 820px;
  background: radial-gradient(circle, rgba(99, 170, 171, .3), transparent 65%);
}
.meet::before {
  content: ""; position: absolute; z-index: -1; left: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 0 0 60px rgba(255, 255, 255, .02), 0 0 0 120px rgba(255, 255, 255, .015);
}
.meet__grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 6vw, 100px); align-items: center; }
.meet__media { position: relative; max-width: 470px; }
.meet__portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 999px 999px var(--radius-lg) var(--radius-lg); overflow: hidden; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.meet__portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.meet__frame {
  position: absolute; inset: 22px -22px -22px 22px; border-radius: 999px 999px var(--radius-lg) var(--radius-lg);
  border: 1.5px solid rgba(159, 207, 207, .45);
}
.meet .h2 { color: #fff; }
.meet p { color: rgba(255, 255, 255, .82); }
.meet__copy .btn { margin-top: .8rem; }

/* Obstetrics ------------------------------------------------------------ */
.obs { background: #fff; }
.section-head { display: flex; flex-direction: column; margin-bottom: clamp(32px, 4vw, 48px); }
.section-head .rule { margin-bottom: 0; }

.obs__cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; padding-bottom: 40px; }
.obs__cards .card:nth-child(even) { transform: translateY(40px); }
.obs__cards .card:nth-child(even).reveal:not(.is-visible) { transform: translateY(70px); }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--tint-50); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 0 1.6rem 1.7rem; overflow: hidden;
  transition: box-shadow .4s var(--ease), border-color .4s, background .4s, translate .4s var(--ease);
}
.card::before { content: ""; position: absolute; z-index: 2; inset: 0 0 auto; height: 4px; background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.card:hover { background: #fff; border-color: transparent; box-shadow: var(--shadow); translate: 0 -6px; }
.card:hover::before { transform: scaleX(1); }
.card__media { position: relative; margin: 0 -1.6rem; aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__media img { transform: scale(1.06); }
.card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(28, 52, 53, .35)); }
.card__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: #fff; color: var(--primary); margin: -32px 0 1.2rem; position: relative; z-index: 1; box-shadow: var(--shadow); transition: background .3s, color .3s; }
.card__icon img { width: 44px; height: 44px; transition: filter .3s; }
.card:hover .card__icon img { filter: brightness(0) invert(1); }
.card:hover .card__icon { background: var(--grad); color: #fff; }
.card__title { font-size: var(--h3-size); color: var(--heading); margin-bottom: .8rem; }
.card p { flex: 1; }
.card .btn { align-self: flex-start; margin-top: .4rem; }

/* Gynaecology ----------------------------------------------------------- */
.gyn { position: relative; isolation: isolate; overflow: hidden; }
.gyn__bg { position: absolute; inset: 0; z-index: -1; background: var(--tint-50); }

/* Same card component as Obstetrics: 3 + 2 layout, centred second row */
/* Mosaic: same card component as Obstetrics. 3 across, then 2 wider cards with a wider photo. */
.gyn__mosaic { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1.25rem; }
.gyn__mosaic .card { grid-column: span 2; background: rgba(255, 255, 255, .7); border-color: rgba(255, 255, 255, .9); }
.gyn__mosaic .card:hover { background: #fff; }
.gyn__mosaic .card:nth-child(n+4) { grid-column: span 3; }
.gyn__mosaic .card:nth-child(n+4) .card__media { aspect-ratio: 2 / 1; }

/* Closing call to action */
.cta-band { background: var(--tint-50); padding-block: clamp(56px, 7vw, 96px); }
.cta-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: 1.4fr auto; gap: 2rem; align-items: center;
  padding: clamp(32px, 5vw, 56px) clamp(24px, 5vw, 64px);
  border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(135deg, var(--dark-950) 0%, var(--dark-900) 50%, #2f5051 100%);
  box-shadow: 0 30px 60px -30px rgba(28, 52, 53, .55);
}
.cta-card::before {
  content: ""; position: absolute; z-index: -1; right: -60px; top: -120px; width: 380px; height: 380px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25); box-shadow: 0 0 0 50px rgba(255, 255, 255, .05), 0 0 0 100px rgba(255, 255, 255, .04);
}
.cta-card-logo { font-family: var(--font-display); font-weight: 600; font-size: var(--h2-size); text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: .5rem; line-height: 1.15; }
.cta-card-text { margin: 0; max-width: 40em; color: rgba(255, 255, 255, .9); }


/* Footer ---------------------------------------------------------------- */
.footer { background: var(--charcoal); color: rgba(255, 255, 255, .8); font-size: .95rem; padding-top: clamp(48px, 6vw, 72px); }
.footer a { transition: color .2s, opacity .2s; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: start; padding-bottom: clamp(40px, 5vw, 56px); }
.footer__grid--no-map { grid-template-columns: 1fr 1fr; }

/* Hospital column */
.footer__hospital { display: grid; gap: 1.6rem; justify-items: start; }
.footer__melomed { display: block; }
.footer__melomed img { width: min(100%, 320px); height: auto; }
.footer__melomed-text { display: grid; gap: .35rem; color: #fff; font-weight: 500; text-transform: uppercase; line-height: 1; }
.footer__melomed-text[hidden] { display: none; }
.footer__melomed-text span:first-child { font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem); letter-spacing: .4em; }
.footer__melomed-text span:last-child { font-size: clamp(.95rem, .85rem + .4vw, 1.2rem); letter-spacing: .18em; }
.footer__place { display: inline-flex; align-items: center; gap: .55rem; font-weight: 600; color: #fff; }
.footer__place svg, .footer__details svg { width: 18px; height: 18px; fill: none; stroke: var(--primary-300); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Map column */
.footer__map { border-radius: 4px; overflow: hidden; aspect-ratio: 16 / 9; background: rgba(255, 255, 255, .06); }
.footer__map iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(.2) contrast(1.05); }

/* Doctor column */
.footer__logo { display: inline-grid; justify-items: center; gap: .55rem; margin-bottom: 1.4rem; color: #fff; text-transform: uppercase; text-align: center; }
.footer__logo-name { font-size: clamp(1.2rem, 1rem + .6vw, 1.5rem); font-weight: 400; letter-spacing: .14em; line-height: 1.2; padding-bottom: .55rem; border-bottom: 1px solid rgba(255, 255, 255, .6); }
.footer__logo-role { font-size: .78rem; letter-spacing: .2em; color: var(--primary-300); }
.footer__details { display: grid; gap: .65rem; }
.footer__details li { display: grid; grid-template-columns: 18px 1fr; gap: .7rem; align-items: start; line-height: 1.5; }
.footer__details svg { margin-top: 3px; }

.footer__contact { display: grid; gap: 1.1rem; }
.footer__contact li { display: grid; grid-template-columns: 36px 1fr; gap: .8rem; align-items: start; line-height: 1.5; }
.footer__contact svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .06); fill: none; stroke: var(--primary-300); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.footer__contact small { display: block; font-size: .7rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--primary-300); margin-bottom: 2px; }

.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 2rem;
  padding-block: 1.4rem 1.8rem; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .875rem; color: rgba(255, 255, 255, .5);
}
.footer__bottom p { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: .3rem 0; }
.footer__legal li + li::before { content: "|"; margin: 0 .6rem; opacity: .6; }
.footer__legal a { border-bottom: 1px dotted rgba(255, 255, 255, .35); }

/* WhatsApp FAB */
.whatsapp-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; box-shadow: 0 14px 30px -10px rgba(18, 140, 126, .6);
  transform: translateY(120px); transition: transform .4s var(--ease);
}
.whatsapp-fab.is-visible { transform: none; }
.whatsapp-fab:hover { transform: translateY(-3px) scale(1.04); }
.whatsapp-fab svg { width: 28px; height: 28px; }

/* WhatsApp logo is a filled glyph; the other icons are outlines */
.icon-wa, .topbar__item .icon-wa, .whatsapp-fab .icon-wa { fill: currentColor; stroke: none; }
.footer__details .icon-wa, .footer__contact .icon-wa { fill: var(--primary-300); stroke: none; }

/* Reveal ---------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal--delay { transition-delay: .15s; }
.reveal.is-visible { opacity: 1; transform: none; }
.obs__cards .card.reveal.is-visible:nth-child(even) { transform: translateY(40px); }
.no-js .reveal { opacity: 1; transform: none; }
/* Above the fold the same entrance runs as a CSS animation from first paint. Gating the hero on
   main.js's observer kept the LCP image/heading at opacity 0 (which Chrome doesn't count as
   painted) until scripts ran, adding 1-2s to LCP. Starting at .01 makes the first frame count. */
.hero .reveal, .page-hero .reveal { opacity: 1; transform: none; animation: reveal-in .9s var(--ease) both; }
.hero .reveal--delay, .page-hero .reveal--delay { animation-delay: .15s; }
@keyframes reveal-in { from { opacity: .01; transform: translateY(30px); } }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1180px) {
  .nav__cta { display: none; }
  .nav { gap: 0; }
}

/* 1023, not 1024: landscape iPad (1024px) gets the desktop nav, which fits there */
@media (max-width: 1023px) {
  :root { --header-h: 72px; }
  .topbar__item--hide-sm { display: none; }
  .header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }

  .nav-toggle {
    display: grid; place-items: center; width: 46px; height: 46px; padding: 0;
    background: var(--tint-50); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; position: relative; z-index: 3;
  }
  .nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
    display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--heading); transition: transform .3s var(--ease), background .2s;
  }
  .nav-toggle__bars { position: relative; }
  .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
  .nav-toggle__bars::before { top: -6px; }
  .nav-toggle__bars::after { top: 6px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  /* Drawer opens below the header (--nav-top set in main.js) so the logo stays visible */
  .nav {
    position: fixed; inset: var(--nav-top, 0px) 0 0 auto; z-index: 1; width: min(400px, 100%);
    flex-direction: column; align-items: stretch; gap: 1.5rem;
    padding: 16px 24px 32px;
    background: linear-gradient(160deg, var(--dark-950) 0%, var(--dark-900) 60%, #2f5051 100%);
    box-shadow: var(--shadow-lg); overflow-y: auto;
    transform: translateX(100%); visibility: hidden; transition: transform .45s var(--ease), visibility .45s;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list > li { flex-wrap: wrap; border-bottom: 1px solid var(--line); }
  .nav__link { flex: 1; padding: 1rem .25rem; font-size: .85rem; }
  .nav__link::after { display: none; }
  .nav__sub-toggle { width: 40px; height: 40px; margin: 0; background: var(--tint-50); }
  .nav__sub {
    position: static; width: 100%; min-width: 0; padding: 0 0 .75rem; box-shadow: none; border: 0; border-radius: 0;
    opacity: 1; visibility: visible; transform: none; display: none;
  }
  .nav__sub::before { display: none; }
  .nav__item--drop:hover .nav__sub, .nav__item--drop:focus-within .nav__sub { display: none; }
  .nav__item--drop.is-open .nav__sub { display: block; }
  .nav__item--drop:hover .nav__sub-toggle svg { transform: none; }
  .nav__item--drop.is-open .nav__sub-toggle svg { transform: rotate(180deg); }
  .nav__cta { display: inline-flex; }
  body.nav-open { overflow: hidden; }
  .nav-backdrop { position: fixed; inset: 0; z-index: 99; background: rgba(28, 42, 43, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
  body.nav-open .nav-backdrop { opacity: 1; visibility: visible; }

  /* Dark mode menu */
  body.nav-open .header { background: var(--dark-950); border-color: rgba(255, 255, 255, .08); box-shadow: none; }
  body.nav-open .header .logo__name { color: #fff; }
  body.nav-open .header .logo__role { color: var(--primary-300); }
  body.nav-open .nav-toggle { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); }
  body.nav-open .nav-toggle__bars::before, body.nav-open .nav-toggle__bars::after { background: #fff; }
  .nav__list > li { border-bottom-color: rgba(255, 255, 255, .1); }
  .nav__link { color: rgba(255, 255, 255, .88); }
  .nav__link:hover, .nav__link.is-active { color: var(--primary-300); }
  .nav__sub-toggle { background: rgba(255, 255, 255, .08); color: #fff; }
  .nav__sub { background: transparent; }
  .nav__sub a { color: rgba(255, 255, 255, .78); }
  .nav__sub a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  .nav__sub a[aria-current="page"] { color: #fff; }
  .nav__sub-icon { background: rgba(255, 255, 255, .08); }
  .nav__sub-icon img { filter: brightness(0) invert(1); opacity: .85; }
  .nav__sub a:hover .nav__sub-icon img, .nav__sub a[aria-current="page"] .nav__sub-icon img { opacity: 1; }


  .pathways { grid-template-columns: 1fr; }
  .pathway:first-child { border-right: 0; border-bottom: 1px solid var(--line); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .pathway:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

  .obs__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .obs__cards .card:nth-child(even), .obs__cards .card.reveal.is-visible:nth-child(even) { transform: none; }
  .obs__cards .card:nth-child(even).reveal:not(.is-visible) { transform: translateY(30px); }

  .gyn__mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gyn__mosaic .card, .gyn__mosaic .card:nth-child(n+4) { grid-column: auto; }
  .gyn__mosaic .card:nth-child(4) .card__media { aspect-ratio: 4 / 3; }
  .gyn__mosaic .card:nth-child(5) { grid-column: 1 / -1; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__map { grid-column: 1 / -1; order: 3; aspect-ratio: 21 / 9; }
}

@media (max-width: 820px) {
  .hero__grid, .intro__grid, .meet__grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 300px; }
  .hero__bg { bottom: auto; height: 380px; }
  .hero__bg img { object-position: 62% 35%; }
  .hero__bg::after { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 45%, var(--tint-50) 100%); }
  .hero::before { content: ""; position: absolute; z-index: -2; inset: 380px 0 90px; background: var(--tint-50); }
  .hero__grid { padding-bottom: 56px; }
  .pathways { margin-top: 8px; }
  .intro__media { max-width: 560px; }
  .intro__img { aspect-ratio: 4 / 3.4; }
  .meet__media { margin-inline: auto; width: min(100%, 400px); }
    .cta-card { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root { --p-size: 1rem; }
  body { font-size: 1rem; }
  .hero__title { font-size: clamp(1.7rem, 7.4vw, 2.2rem); }
  :root { --h2-size: clamp(1.6rem, 6.8vw, 2rem); }
  .cta-card-actions, .cta-card .btn { min-width: 0; }
  .btn { white-space: normal; text-align: center; }
  .topbar__inner { justify-content: center; }
  .topbar__inner > .topbar__item { display: none; }
  .topbar__group { gap: 1.25rem; }
  .logo__name { font-size: 1.1rem; }
  .logo__role { font-size: .6rem; letter-spacing: .14em; }

  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
  .pathway { grid-template-columns: auto 1fr; padding: 1.3rem 1.25rem; gap: 1rem; }
  .pathway__arrow { display: none; }
  .pathway__icon { width: 48px; height: 48px; }

  .intro__media { padding: 0 0 22px 22px; }
  .intro__accent::after { display: none; }
  .meet__frame { inset: 14px -14px -14px 14px; }
  .meet__copy .btn { width: 100%; }

  .obs__cards { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .card { padding: 0 1.4rem 1.6rem; }
  .card__media { margin: 0 -1.4rem; aspect-ratio: 16 / 10; }

  .gyn__mosaic { grid-template-columns: minmax(0, 1fr); }
  .gyn__mosaic .card:nth-child(n) { grid-column: auto; }
  .gyn__mosaic .card:nth-child(n) .card__media { aspect-ratio: 16 / 10; }

  .footer__grid, .footer__grid--no-map { grid-template-columns: 1fr; }
  .footer__map { aspect-ratio: 16 / 10; }
  .cta-card .btn { width: 100%; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .footer__logo { justify-items: start; text-align: left; }
  .whatsapp-fab { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* 404 page (scripts/build-shell-pages.js) */
.page-header { padding: clamp(64px, 9vw, 120px) 0 1rem; text-align: center; }
.page-header__inner, .contact-info-sections__inner { width: min(100% - 2.5rem, 1200px); margin-inline: auto; }
.page-header__eyebrow { margin: 0 0 .5rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--primary-600); }
.page-header__heading { font-size: var(--h2-size); }
.contact-info-sections { padding: 0 0 clamp(64px, 9vw, 120px); }
.contact-info-sections__inner .btn { margin: .35rem; }

/* Utility text that uses <p> but is not body copy */
.topbar__item, .footer__bottom p { font-size: inherit; line-height: inherit; color: inherit; }

/* Avily "Designed by" credit (templates/designed-by-avily.html) */
.avily-credit .avily-link { text-decoration: none; }
.avily-credit .avily-link:hover { text-decoration: underline; }
.avily-credit img { height: 1em; width: auto; vertical-align: middle; margin: 0 4px; }
