/* ============================================================
   North Shore Paediatrics — marketing site
   Palette derived from the clinic logo & rooms:
   deep teal, pohutukawa coral, sky blue, warm cream.
   ============================================================ */

:root {
  --teal-900: #123f3c;
  --teal-700: #1f6f6b;
  --teal-500: #2a8a85;
  --teal-100: #e3f1ef;
  --coral-600: #d9482f;
  --coral-500: #e0533d;
  --coral-100: #fbe6e0;
  --sky-200: #cfe6f2;
  --sky-500: #5b9bb8;
  --sand-500: #c98a4b;
  --cream: #fbf8f3;
  --cream-200: #f3ece1;
  --ink: #243433;
  --ink-soft: #5a6b6a;
  --white: #ffffff;

  --maxw: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(18, 63, 60, 0.06);
  --shadow-md: 0 18px 40px rgba(18, 63, 60, 0.12);
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
  --transition: 0.25s ease;
  --header-height: 212px;
  --header-logo-size: 188px;
  --header-side-padding: clamp(0.35rem, 1.4vw, 1rem);
  --anchor-offset: calc(var(--header-height) + 16px);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Offset in-page anchor jumps so the sticky header doesn't cover the target heading */
  scroll-padding-top: var(--anchor-offset);
  /* Match the page background so no white shows in overscroll / uncovered areas */
  background: var(--cream);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Prevent a white side strip if anything overflows at narrow widths */
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-head); line-height: 1.18; letter-spacing: -0.015em; color: var(--teal-900); margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.45rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }

a { color: var(--teal-700); text-decoration: none; transition: color var(--transition); overflow-wrap: break-word; }
a:hover { color: var(--coral-600); }

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

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }

.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }

.eyebrow {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--coral-600);
  margin: 0 0 0.6rem;
}

.section__head { max-width: 660px; margin: 0 auto clamp(2.25rem, 4vw, 3.25rem); text-align: center; }
.section__head h2 { margin-bottom: 0.6rem; }
.section__sub { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--teal-900); color: #fff; padding: 0.6rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

:focus-visible { outline: 3px solid var(--coral-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
  padding: 0.85rem 1.6rem; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--coral-500); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--coral-600); color: #fff; box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--teal-900); border-color: var(--teal-700); }
.btn--ghost:hover { background: var(--teal-700); color: #fff; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-200);
  overflow: visible;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  max-width: none;
  min-height: var(--header-height);
  padding: 0.75rem var(--header-side-padding);
}

.brand { display: flex; align-items: center; gap: 0.75rem; min-width: 0; margin-left: -0.2rem; }
.brand__logo {
  flex: 0 0 auto; width: var(--header-logo-size); height: var(--header-logo-size); border-radius: 50%;
  object-fit: contain;
}
.brand__logo.is-missing {
  background: radial-gradient(circle at 50% 35%, var(--teal-500), var(--teal-900));
}

.nav { margin-left: auto; }
.nav__menu { display: flex; align-items: center; gap: 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav__menu a { font-family: var(--font-head); font-weight: 500; color: var(--teal-900); font-size: 0.98rem; white-space: nowrap; }
.nav__menu a:hover { color: var(--coral-600); }
.nav__cta { background: var(--teal-700); color: #fff !important; padding: 0.55rem 1.1rem; border-radius: 999px; }
.nav__cta:hover { background: var(--teal-900); }

.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 26px; height: 2.5px; margin: 5px 0; background: var(--teal-900); border-radius: 2px; transition: transform var(--transition), opacity var(--transition); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--teal-100) 0%, var(--cream) 78%); }
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__hills { position: absolute; bottom: -1px; left: 0; width: 100%; height: 220px; }
.hero__hills path { fill: var(--sky-200); opacity: 0.55; }
.hero__hills path.hero__hills--front { fill: var(--teal-500); opacity: 0.18; }

.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(2rem, 5vw, 4rem);
  align-items: center; padding: clamp(3rem, 6vw, 5.5rem) 1.25rem clamp(4rem, 8vw, 6rem);
}
.hero__lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 34ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin: 1.6rem 0 1.8rem; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 0.55rem; list-style: none; padding: 0; margin: 0; }
.hero__chips li {
  background: var(--white); border: 1px solid var(--teal-100); color: var(--teal-700);
  font-size: 0.85rem; font-weight: 600; padding: 0.4rem 0.85rem; border-radius: 999px; box-shadow: var(--shadow-sm);
}

.hero__media { display: flex; justify-content: center; }
.hero__card {
  position: relative; width: min(360px, 80vw); aspect-ratio: 4 / 5;
  border-radius: 26px; overflow: hidden; box-shadow: var(--shadow-md);
  background: var(--teal-100);
}
.hero__card img { width: 100%; height: 100%; object-fit: cover; }
.hero__card.is-missing img { display: none; }
.hero__card.is-missing::after {
  content: "Photo of Dr Zahra"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--teal-700); font-family: var(--font-head); font-weight: 600;
  background: linear-gradient(160deg, var(--teal-100), var(--sky-200));
}
.hero__card-badge {
  position: absolute; left: 14px; bottom: 14px; right: 14px;
  background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(4px);
  border-radius: 14px; padding: 0.7rem 1rem; display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: var(--shadow-sm);
}
.hero__card-badge strong { font-family: var(--font-head); color: var(--teal-900); }
.hero__card-badge span { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about__media { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--teal-100); aspect-ratio: 4 / 5; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.about__media.is-missing { display: grid; place-items: center; }
.about__media.is-missing img { display: none; }
.about__media.is-missing::after {
  content: "Photo of Dr Zahra"; color: var(--teal-700);
  font-family: var(--font-head); font-weight: 600;
}
.about__points { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
.about__points li span {
  display: inline-block; background: var(--teal-100); color: var(--teal-900);
  font-weight: 600; padding: 0.45rem 0.95rem; border-radius: 999px; font-size: 0.9rem;
}
.about__quals { margin-top: 1.25rem; }
.about__quals-label { font-weight: 700; color: var(--teal-900); font-size: 0.95rem; margin: 0 0 0.2rem; }
.about__quals-text { color: var(--ink-soft); font-size: 0.9rem; line-height: 1.6; margin: 0; padding-left: 1.2rem; }
.about__quals-text li { margin-bottom: 0.25rem; }

/* ---------- Services ---------- */
.services { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-200) 100%); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
  background: var(--white); border-radius: var(--radius); padding: 1.6rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--cream-200);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: 0.97rem; }
.services__note {
  text-align: center; margin: 2rem auto 0; max-width: 620px; color: var(--ink-soft);
  font-size: 0.95rem; background: var(--coral-100); border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
}

/* ---------- Our space ---------- */
.space__grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.space__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: var(--sky-200); aspect-ratio: 4 / 3; }
.space__media img { width: 100%; height: 100%; object-fit: cover; }
.space__media.is-missing { display: grid; place-items: center; aspect-ratio: 4 / 3; }
.space__media.is-missing img { display: none; }
.space__media.is-missing::after { content: "Clinic photo"; color: var(--sky-500); font-family: var(--font-head); font-weight: 600; }

/* ---------- Locations ---------- */
.loc-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; max-width: 680px; margin-inline: auto; }
.loc-card {
  background: var(--white); border-radius: var(--radius); padding: 2rem;
  box-shadow: var(--shadow-sm); border: 1px solid var(--cream-200);
}
.loc-card h3 { margin-bottom: 0.2rem; }
.loc-card__area { color: var(--coral-600); font-weight: 700; font-family: var(--font-head); margin: 0 0 1.2rem; }
.loc-card__details { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.loc-card__details li { display: grid; gap: 0.15rem; }
.loc-card__label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); font-weight: 700; }

/* ---------- Contact ---------- */
.contact { background: var(--teal-900); color: #eaf4f2; }
.contact h2 { color: #fff; }
.contact .eyebrow { color: #ffd9cf; }
.contact a { color: #ffd9cf; }
.contact a:hover { color: #fff; }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact__text p { color: #cfe2df; }
.contact__quick { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.7rem; }
.contact__quick li { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.contact__quick strong { font-family: var(--font-head); color: #fff; min-width: 90px; }
.contact__disclaimer {
  color: #cfe2df;
  font-size: 0.95rem;
  margin: 1.35rem 0 0;
}
.contact__disclaimer p { margin-bottom: 0.75rem; }
.contact__disclaimer ul { margin: 0 0 0.9rem; padding-left: 1.2rem; }
.contact__disclaimer li { margin-bottom: 0.35rem; }

.contact__form { background: var(--white); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-md); }
.field { display: grid; gap: 0.35rem; margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-family: var(--font-head); font-weight: 500; font-size: 0.9rem; color: var(--teal-900); }
.field input, .field textarea {
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  padding: 0.7rem 0.85rem; border: 1.5px solid var(--cream-200); border-radius: 10px;
  background: var(--cream); transition: border-color var(--transition), background var(--transition);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal-500); background: #fff; }
.field textarea { resize: vertical; }
.form__status { margin: 0.75rem 0 0; font-weight: 600; min-height: 1.2em; }
.form__status.is-ok { color: var(--teal-700); }
.form__status.is-error { color: var(--coral-600); }
.form__fineprint { margin: 0.75rem 0 0; font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: #cfe2df; padding: 2.5rem 0; border-top: 1px solid rgba(255,255,255,0.08); }
.footer-inner {
  display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: center; justify-content: space-between;
  max-width: none;
  padding-inline: var(--header-side-padding);
}
.footer__brand { display: flex; align-items: center; gap: 0.85rem; margin-left: -0.2rem; }
.footer__logo { width: 156px; height: 156px; border-radius: 50%; }
.footer__nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.footer__nav a { color: #cfe2df; font-family: var(--font-head); font-size: 0.92rem; }
.footer__nav a:hover { color: #fff; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__lead { max-width: none; }
  .hero__actions, .hero__chips { justify-content: center; }
  .hero__media { order: -1; }
  .about__grid { grid-template-columns: 1fr; }
  .about__media { max-width: 360px; margin-inline: auto; }
  .space__grid { grid-template-columns: 1fr; }
  .space__media { order: -1; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .loc-grid { grid-template-columns: 1fr; }
  .contact__inner { grid-template-columns: 1fr; }
}

/* Nav collapses to a hamburger before the "Make an enquiry" CTA runs out of room */
@media (max-width: 820px) {
  :root {
    --header-height: 200px;
    --header-logo-size: 176px;
    --header-side-padding: clamp(0.25rem, 2.5vw, 0.85rem);
  }
  .header-inner { padding-block: 0.75rem; }
  .nav__toggle { display: block; z-index: 110; }
  .nav__menu {
    position: absolute; top: 100%; right: 0; left: 0; z-index: 90;
    flex-direction: column; gap: 0.25rem;
    background: var(--cream); padding: 1rem var(--header-side-padding) 1.5rem; border-bottom: 1px solid var(--cream-200);
    box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translateY(-0.75rem);
    visibility: hidden; transition: opacity var(--transition), transform var(--transition), visibility 0s linear var(--transition);
  }
  .nav__menu.is-open {
    opacity: 1; pointer-events: auto; transform: translateY(0); visibility: visible;
    transition-delay: 0s;
  }
  .nav__menu li { width: 100%; }
  .nav__menu a { display: block; padding: 0.75rem 0; width: 100%; }
  .nav__cta { text-align: center; margin-top: 0.5rem; }
}

@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* Very small phones — keep the brand from crowding the menu button */
@media (max-width: 380px) {
  :root {
    --header-height: 170px;
    --header-logo-size: 149px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}
