/* =========================================================
   Dumalo Optometry — "The North Shore, in focus"
   Travel-poster editorial. Focus (blur → sharp) is the motion metaphor.
   ========================================================= */

:root {
  --paper: #f2e9d8;
  --paper-2: #e9dcc4;
  --ink: #141e26;
  --navy: #22313d;
  --slate: #394956;          /* logo colour */
  --sunset: #2f5c88;         /* accent on light backgrounds: "Inlet" blue (name kept from the original orange) */
  --gold: #a8cbe9;           /* highlight on dark backgrounds: pale sky */
  --sea: #2f5d78;
  --cream-text: #f6efe2;
  --muted-dark: rgba(20, 30, 38, .72);
  --muted-light: rgba(246, 239, 226, .66);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif-wght: 500; /* Newsreader Medium, matching the Galago portal */

  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1440px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 76px;
  --notice-h: 0px;           /* height of the site notice banner, kept current by its inline script */

  color-scheme: light;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html:not(.js) { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(16px, 1.05vw + 8px, 19px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
em { font-style: italic; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 300; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; transition: top .2s; }
.skip:focus { top: 16px; }

:focus-visible { outline: 2px solid var(--sunset); outline-offset: 3px; border-radius: 4px; }
/* On dark sections the pale sky reads; on cream the Inlet blue does. */
[data-header="light"] :focus-visible, .site-header[data-tone="light"] :focus-visible,
.mobile-menu :focus-visible, .footer :focus-visible { outline-color: var(--gold); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- type ---------- */
.display {
  font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none;
  font-size: clamp(48px, 7.4vw, 128px);
  line-height: 1.02; /* descenders (p, g, y) must clear the next line's ascenders (h, l, f) */
  letter-spacing: -.02em;
}
.display em, .display-s em { color: var(--sunset); }
[data-bg="ink"] .display em, [data-bg="navy"] .display em { color: var(--gold); }
.display-s { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(34px, 3.6vw, 60px); line-height: 1; letter-spacing: -.01em; }

.label {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  margin-bottom: clamp(20px, 3vw, 40px);
}
.label span {
  display: inline-grid; place-items: center;
  min-width: 34px; height: 22px; padding: 0 8px;
  border: 1px solid currentColor; border-radius: 999px;
  font-size: 11px; letter-spacing: .06em;
}
.label--light { color: var(--cream-text); }

.mini { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 10px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mini--light { color: var(--muted-light); }
.muted { color: var(--muted-dark); }
.small { font-size: .88em; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- buttons & links ---------- */
.btn {
  --bg: var(--sunset); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1px solid transparent;
  background: var(--bg); color: var(--fg);
  font: 600 15px/1 var(--sans); letter-spacing: .01em; text-decoration: none;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .4s var(--ease), color .4s var(--ease), border-color .4s;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); border-radius: inherit;
  transform: translateY(101%); transition: transform .5s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--small { min-height: 42px; padding: 0 20px; font-size: 14px; }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: rgba(20,30,38,.35); }
.btn--ghost:hover { color: var(--paper); }
.btn--ghost-light { --bg: rgba(246,239,226,.08); --fg: var(--cream-text); border-color: rgba(246,239,226,.45); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn--ghost-light::before { background: var(--cream-text); }
.btn--ghost-light:hover { color: var(--ink); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.arrow-link { display: inline-flex; gap: .5em; align-items: center; font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; margin-top: 12px; }
.arrow-link span { transition: transform .4s var(--ease); }
.arrow-link:hover span { transform: translateX(6px); }
.arrow-link--light { color: var(--cream-text); }
/* Phone numbers never break across lines */
a[href^="tel:"], .nowrap { white-space: nowrap; }
.link-quiet { text-decoration: none; font-size: 14px; font-weight: 600; opacity: .9; }
.link-quiet:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- logo (vector mask so it can take any colour) ---------- */
.logo-mark {
  display: block; aspect-ratio: 3672 / 1216;
  background: currentColor;
  -webkit-mask: url("../assets/brand/dumalo-logo.svg") center / contain no-repeat;
          mask: url("../assets/brand/dumalo-logo.svg") center / contain no-repeat;
}

/* ---------- stacked focus layers (blur placeholder under sharp image) ---------- */
.layer { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.layer--blur { transform: scale(1.04); }

/* ---------- grain overlay ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 200; pointer-events: none; opacity: .09; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* =========================================================
   INTRO: the curtain. The alternative to the default focus intro (see "Focus intro" below);
   it plays when INTRO in index.html's head script is 'curtain', or with ?intro=curtain.
   ========================================================= */
.intro { display: none; }
html.js:not(.reduced):not(.no-intro):not(.intro-focus) .intro {
  position: fixed; inset: 0; z-index: 250;
  display: grid; place-items: center; align-content: center; gap: 22px;
  background: var(--paper); color: var(--slate);
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.intro__logo { width: min(64vw, 420px); }
.intro__meta { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted-dark); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 120;
  top: var(--notice-h);
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0 var(--gutter);
  color: var(--cream-text);
  transition: color .5s var(--ease), transform .6s var(--ease), background-color .5s var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to bottom, rgba(20,30,38,.45), transparent);
  transition: opacity .5s;
}
.site-header[data-tone="dark"] { color: var(--ink); }
.site-header[data-tone="dark"]::before { opacity: 0; }
.site-header.is-scrolled[data-tone="dark"] { background: rgba(242,233,216,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.site-header.is-scrolled[data-tone="light"] { background: rgba(20,30,38,.55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
/* "is-hidden" (set on scroll down by main.js / page.js) no longer hides the nav: only the notice
   banners tuck away, and the header rises into their place. With no notices it doesn't move. */
.site-header.is-hidden { transform: translateY(calc(-1 * var(--notice-h, 0px))); }
.site-header__logo { width: 136px; flex: none; transform-origin: 0 0; transition: opacity .35s var(--ease), visibility .35s; }
/* Homepage: the header logo waits until the big hero logo has flown up into its place (js/main.js) */
.site-header.logo-away .site-header__logo { opacity: 0; visibility: hidden; transition: none; }
.site-header__logo.is-flying { filter: drop-shadow(0 6px 30px rgba(14,22,28,.35)); }
.site-nav { display: flex; gap: clamp(16px, 2.2vw, 34px); }
.site-nav a { text-decoration: none; font-size: 14px; font-weight: 600; position: relative; padding: 6px 0; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.site-header__actions { display: flex; align-items: center; gap: 18px; }

.menu-toggle { display: none; width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: inherit; cursor: pointer; position: relative; }
.menu-toggle i { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
.menu-toggle i:first-of-type { top: 18px; }
.menu-toggle i:last-of-type { top: 24px; }
.menu-toggle[aria-expanded="true"] i:first-of-type { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:last-of-type { transform: translateY(-3px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 110; overflow-y: auto; overscroll-behavior: contain;
  background: var(--ink); color: var(--cream-text);
  padding: calc(var(--header-h) + var(--notice-h) + 24px) var(--gutter) 32px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: 46px; line-height: 1.12; text-decoration: none; }
.mobile-menu__actions { display: grid; gap: 10px; }
.mobile-menu__phone { text-align: center; padding: 12px; font-weight: 600; }
body.menu-open .site-header { color: var(--cream-text); background: transparent !important; backdrop-filter: none; }
body.menu-open .site-header::before { opacity: 0; }

@media (max-width: 960px) {
  .site-nav, .link-quiet { display: none; }
  .menu-toggle { display: inline-block; }
  .site-header__logo { width: 112px; }
}

/* =========================================================
   SITE NOTICES: thin banners above the header, scheduled in Galago
   (scripts/lib/notice.mjs). At most two show at once, urgent first.
   The stack tucks away on scroll down; the header stays, moving up into its place.
   ========================================================= */
.site-notices {
  position: fixed; inset: 0 0 auto 0; z-index: 121;
  transition: transform .6s var(--ease);
}
.site-notices:has(~ .site-header.is-hidden) { transform: translateY(-100%); }
.site-notice {
  background: var(--navy); color: var(--cream-text);
  box-shadow: inset 0 -1px rgba(246,239,226,.14); /* a hairline, so each reads as its own bar over dark heroes */
  font-size: 14px; line-height: 1.45;
}
.site-notice[hidden] { display: none; }
.site-notice__inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 9px var(--gutter);
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.site-notice__text { text-wrap: pretty; }
.site-notice__label {
  font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); margin-right: .7em;
}
.site-notice__text a { color: var(--gold); font-weight: 600; text-underline-offset: 3px; white-space: nowrap; margin-left: .25em; }
.site-notice__close {
  flex: none; width: 36px; height: 36px; margin: -6px -10px -6px 0;
  display: grid; place-items: center;
  border: 0; border-radius: 999px; background: transparent; color: inherit;
  font-size: 22px; line-height: 1; cursor: pointer; opacity: .7;
  transition: opacity .2s, background-color .2s;
}
.site-notice__close:hover { opacity: 1; background: rgba(246,239,226,.1); }
.site-notice--urgent { background: var(--sunset); color: #fff; }
.site-notice--urgent .site-notice__label,
.site-notice--urgent .site-notice__text a { color: #fff; }
.site-notice--urgent .site-notice__text a { text-decoration-thickness: 1.5px; }
/* Without JS there's no height to offset by, so the stack sits in the page flow
   and the header follows straight under it. */
html:not(.js) .site-notices { position: relative; }
html:not(.js) .site-notices ~ .site-header { position: absolute; top: auto; }
@media (max-width: 960px) {
  .site-notice { font-size: 13.5px; }
  .site-notice__inner { justify-content: space-between; align-items: flex-start; padding-block: 8px; }
  .site-notice__close { margin-top: -7px; }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--cream-text); background: var(--ink);
  overflow: hidden; isolation: isolate;
  padding-top: calc(var(--header-h) + var(--notice-h) + 48px);
}
.hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__media .layer { will-change: transform, opacity; }
.hero__veil {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(14,22,28,.82) 0%, rgba(14,22,28,.35) 38%, rgba(14,22,28,0) 62%),
    linear-gradient(to bottom, rgba(14,22,28,.35), rgba(14,22,28,0) 22%);
}
.hero__content {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter) clamp(84px, 11vh, 132px);
}
.hero__content .eyebrow { margin-bottom: 18px; opacity: .9; }
.hero__title {
  font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none;
  line-height: .86; letter-spacing: -.022em;
  margin-bottom: clamp(20px, 3vw, 36px);
}
.hero__title em { color: var(--gold); }
/* The logo is the headline; the slogan sits under it as a supporting line */
.hero__logo { width: min(100%, clamp(300px, 52vw, 820px)); color: var(--cream-text); filter: drop-shadow(0 6px 30px rgba(14,22,28,.35)); }
.hero__title .hero__tagline { font-size: clamp(28px, 3.4vw, 54px); line-height: 1.05; letter-spacing: -.01em; margin-top: clamp(6px, 1.2vw, 18px); }
.hero__kicker { display: block; font-family: var(--sans); line-height: 1.4; letter-spacing: .2em; }
.line { display: block; overflow: hidden; padding: .14em 0 .26em; margin: -.14em 0 -.26em; } /* room for tall capitals and descenders (g, y) */
.line > span { display: inline-block; }

.poster-frame { position: absolute; inset: clamp(10px, 1.6vw, 22px); top: calc(var(--header-h) + var(--notice-h) + 4px); border: 1px solid rgba(246,239,226,.28); border-radius: 14px; pointer-events: none; z-index: 0; }
.pf { position: absolute; font-size: 10.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: rgba(246,239,226,.72); background: transparent; padding: 0 10px; }
.pf--tl { top: -7px; left: 18px; }
.pf--tr { top: -7px; right: 18px; }
.pf--bl { bottom: -7px; left: 18px; }
.pf--br { bottom: -7px; right: 18px; }
.pf--tl, .pf--tr { top: 12px; }
.pf--bl, .pf--br { bottom: 12px; }

.scroll-cue { position: absolute; right: calc(var(--gutter) + 8px); bottom: clamp(84px, 11vh, 132px); display: grid; justify-items: center; gap: 10px; text-decoration: none; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: rgba(246,239,226,.8); }
.scroll-cue span { writing-mode: vertical-rl; }
.scroll-cue i { width: 1px; height: 56px; background: linear-gradient(currentColor 50%, transparent 50%) 0 0 / 1px 200%; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { to { background-position: 0 -112px; } }

@media (max-width: 720px) {
  .pf--tl, .pf--tr, .pf--br { display: none; }
  .hero__kicker { font-size: 11px; letter-spacing: .16em; }
  .hero__logo { width: 92%; }
  .scroll-cue { display: none; }
  .hero__content { padding-bottom: 56px; }
  .hero .actions .btn { flex: 1 1 100%; }
}
@media (max-width: 520px) { .actions .btn { flex: 1 1 100%; } }

/* =========================================================
   STORY
   ========================================================= */
.story { padding: clamp(110px, 16vw, 220px) 0 clamp(64px, 8vw, 110px); background: var(--paper); }
.manifesto {
  font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none;
  font-size: clamp(34px, 5vw, 84px);
  line-height: 1.04; letter-spacing: -.015em;
  max-width: 19ch;
  max-width: none;
}
.manifesto em { color: var(--sunset); }
.manifesto .w { display: inline; }
/* Same 2-column grid and gap as .glance below, so the photo sits over "Direct" and the text starts over "On-site". */
.story__more { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); align-items: start; margin-top: clamp(40px, 5vw, 76px); }
.story__more .then { grid-column: 1; width: min(100%, 440px); }
.story__body { grid-column: 2; max-width: 50ch; padding-top: 6px; font-size: clamp(18px, 1.45vw, 24px); line-height: 1.5; color: rgba(20,30,38,.78); }
@media (max-width: 760px) {
  .story__more { grid-template-columns: 1fr; gap: 36px; }
  .story__more .then { grid-column: auto; order: 2; max-width: 360px; }
  .story__body { grid-column: auto; padding-top: 0; }
}

/* =========================================================
   AT A GLANCE + RECORD (status, counter) + Central Lonsdale illustration
   ========================================================= */
.details { background: var(--paper); padding: 0 0 clamp(100px, 12vw, 180px); }
.glance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 48px); border-top: 1px solid rgba(20,30,38,.25); padding-top: clamp(36px, 4vw, 56px); }
.glance__item { display: grid; gap: 14px; align-content: start; }
.glance__text { max-width: 38ch; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.5; color: rgba(20,30,38,.78); }
.glance__big { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(56px, 6.4vw, 108px); line-height: .9; letter-spacing: -.02em; color: var(--sunset); }
.glance__label { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-dark); }
@media (max-width: 760px) {
  .glance { grid-template-columns: 1fr; gap: 0; padding-top: 0; }
  .glance__item { grid-template-columns: 9.5rem 1fr; align-items: baseline; gap: 10px 12px; padding: 18px 0; border-bottom: 1px solid rgba(20,30,38,.14); }
  .glance__text { grid-column: 1 / -1; }
  .glance__big { font-size: clamp(36px, 10.5vw, 50px); white-space: nowrap; }
  .glance__label { font-size: 11px; letter-spacing: .14em; line-height: 1.5; }
}

.record { margin-top: clamp(48px, 6vw, 80px); background: #f8f4ec; border: 1px solid rgba(20,30,38,.12); border-radius: 6px; padding: clamp(20px, 2.4vw, 32px) clamp(20px, 3.2vw, 52px); box-shadow: 0 30px 60px -48px rgba(20,30,38,.5); }
.record__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.record__status { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.record__dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(20,30,38,.3); flex: none; }
.record__status.is-open .record__dot { background: #2d9a63; animation: live-pulse 2.4s infinite; }
.record__link { font-size: 14px; font-weight: 600; text-decoration: none; }
.record__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.record .stats { margin-top: clamp(20px, 2.4vw, 30px); padding-top: clamp(24px, 3vw, 36px); border-top: 1px solid rgba(20,30,38,.14); }

.then { justify-self: start; width: min(100%, 440px); background: #f8f4ec; padding: 10px 10px 0; border-radius: 3px; box-shadow: 0 30px 60px -38px rgba(20,30,38,.55); rotate: -1.5deg; }
.then__img { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 2px; }
.then figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 12px 4px 14px; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-dark); }

/* =========================================================
   CARE
   ========================================================= */
.care { background: var(--ink); color: var(--cream-text); padding: clamp(110px, 14vw, 200px) 0 clamp(80px, 10vw, 140px); position: relative; }
.care__head { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; align-items: end; margin-bottom: clamp(48px, 7vw, 100px); }
.care__head .label { grid-column: 1 / -1; margin-bottom: 0; }
.care__intro { color: var(--muted-light); max-width: 42ch; }
@media (max-width: 860px) { .care__head { grid-template-columns: 1fr; } }

.care__list { border-top: 1px solid rgba(246,239,226,.18); counter-reset: none; }
.care-row {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 8px 32px; align-items: baseline;
  padding: clamp(22px, 2.6vw, 38px) 0;
  border-bottom: 1px solid rgba(246,239,226,.18);
  position: relative;
  transition: padding .6s var(--ease), color .4s;
}
.care-row::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 10%, transparent), transparent 70%); opacity: 0; transition: opacity .5s; pointer-events: none; }
.care-row:hover::before { opacity: 1; }
.care-row__title { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(30px, 3.6vw, 58px); line-height: 1; letter-spacing: -.01em; transition: color .4s; }
.care-row__title span { display: inline-block; transition: transform .6s var(--ease); }
/* A quiet arrow so the rows read as links at rest and on touch screens. */
.care-row__title span::after { content: "→" / ""; display: inline-block; margin-left: .32em; font-family: var(--sans); font-size: .42em; vertical-align: .32em; color: var(--gold); opacity: .7; transition: opacity .4s, transform .6s var(--ease); }
.care-row:hover .care-row__title span::after { opacity: 1; transform: translateX(4px); }
.care-row:hover .care-row__title { color: var(--gold); }
.care-row:hover .care-row__title span { transform: translateX(14px); }
.care-row__text { color: var(--muted-light); max-width: 46ch; }
.care-row__text a { color: var(--gold); font-weight: 600; white-space: nowrap; }
/* Each row links to its page; the whole row is clickable, phone links stay on top. */
.care-row { position: relative; }
.care-row__title a { text-decoration: none; }
.care-row__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.care-row__title a:focus-visible { outline: none; }
.care-row:has(.care-row__title a:focus-visible) { outline: 2px solid var(--gold); outline-offset: -2px; }
.care-row__text a { position: relative; z-index: 2; }
.care__more { display: flex; flex-wrap: wrap; gap: 12px 36px; margin-top: clamp(36px, 5vw, 60px); }
@media (max-width: 760px) { .care-row { grid-template-columns: 1fr; } }

/* =========================================================
   VIEWS — North Shore illustrations near the end of the page
   ========================================================= */
.views { background: var(--paper); padding: clamp(110px, 14vw, 200px) 0 clamp(90px, 11vw, 160px); }
.views__head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px clamp(32px, 6vw, 100px); align-items: end; margin-bottom: clamp(48px, 6vw, 84px); }
.views__head .display { font-size: clamp(48px, 6.4vw, 112px); }
.views__intro { color: var(--muted-dark); max-width: 46ch; }
.views__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(16px, 2vw, 32px); }
.view { grid-column: span 2; background: #f8f4ec; padding: 12px 12px 0; border-radius: 4px; box-shadow: 0 30px 60px -44px rgba(20,30,38,.55); }
.view--wide { grid-column: span 4; }
.view__img { position: relative; overflow: hidden; border-radius: 2px; aspect-ratio: 4 / 3; }
.view--wide .view__img { aspect-ratio: 2 / 1; }
.view--square .view__img { aspect-ratio: 1; }
.view__img .layer--sharp { transition: transform 1.2s var(--ease); }
.view:hover .view__img .layer--sharp { transform: scale(1.04); }
.view figcaption { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 14px 4px 16px; }
.view strong { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(22px, 1.8vw, 28px); line-height: 1; }
.view figcaption span { font-size: 14px; color: var(--muted-dark); }
@media (max-width: 900px) {
  .views__head { grid-template-columns: 1fr; }
  .views__grid {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 24px; scroll-padding: 0 var(--gutter);
    scrollbar-width: none;
  }
  .views__grid::-webkit-scrollbar { display: none; }
  .view, .view--wide, .view--square { flex: 0 0 min(80vw, 420px); scroll-snap-align: start; }
  .view .view__img, .view--wide .view__img, .view--square .view__img { aspect-ratio: 4 / 3; }
  .views .views__hint { display: block; }
}
.views__hint { display: none; margin-top: 4px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-dark); }

/* =========================================================
   APERTURE
   ========================================================= */
.aperture { background: var(--ink); color: var(--cream-text); position: relative; }
.aperture__stage { position: relative; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.aperture__lens { position: absolute; inset: 0; overflow: hidden; }
.aperture__text { position: relative; z-index: 2; text-align: center; padding: 0 var(--gutter); text-shadow: 0 2px 30px rgba(0,0,0,.45); }
.aperture__kicker { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; margin-bottom: 18px; font-weight: 600; }
.aperture__big { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(46px, 8vw, 140px); line-height: 1.04; letter-spacing: -.016em; }
.aperture__big em { color: var(--gold); }
.aperture__lens::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at center, rgba(14,22,28,.62), rgba(14,22,28,.38) 70%, rgba(14,22,28,.6)); }

/* =========================================================
   WORD OF MOUTH
   ========================================================= */
.word { background: var(--navy); color: var(--cream-text); padding: clamp(110px, 14vw, 200px) 0 0; overflow: hidden; }
.word__title { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(48px, 7.4vw, 128px); line-height: 1.04; letter-spacing: -.02em; margin-bottom: clamp(40px, 6vw, 90px); }
.word__title .line { display: inline-block; }
.word__title em { color: var(--gold); }
.word__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.word__text { font-size: clamp(19px, 1.6vw, 26px); line-height: 1.45; max-width: 34ch; color: rgba(246,239,226,.88); }
.awards { display: flex; gap: clamp(16px, 3vw, 40px); justify-content: flex-end; flex-wrap: wrap; }
.award { position: relative; width: clamp(200px, 19vw, 280px); aspect-ratio: 1; display: grid; place-items: center; container-type: inline-size; }
.award__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 28s linear infinite; }
.award + .award .award__ring { animation-direction: reverse; animation-duration: 34s; }
.award__ring text { fill: var(--gold); font: 600 10.5px var(--sans); text-transform: uppercase; }
/* Everything inside the badge scales with the badge (cqi = 1% of its width), and the core is
   locked to a circle, so text can never stretch it into an oval that runs into the ring. */
.award__core { width: 70%; height: 70%; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-content: center; text-align: center; padding: 0 9cqi; gap: 2.2cqi; overflow: hidden; box-shadow: inset 0 0 0 6px var(--paper), inset 0 0 0 7px rgba(20,30,38,.25); }
.award__kicker { font-size: max(8px, 3.6cqi); font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--sunset); }
.award__core strong { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: 9.4cqi; line-height: 1; }
.award__years { font-size: max(11px, 3.9cqi); font-weight: 700; letter-spacing: .12em; color: var(--muted-dark); }
@container (max-width: 250px) {
  .award__kicker { display: none; } /* the ring already says Readers' Choice */
  .award__core strong { font-size: 10cqi; }
  .award__years { letter-spacing: .06em; }
}
.award__years:empty { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.stats[hidden] { display: none; }
@keyframes live-pulse { 0% { box-shadow: 0 0 0 0 rgba(45,154,99,.5); } 70%, 100% { box-shadow: 0 0 0 10px rgba(45,154,99,0); } }
.stats__grid { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.stat { display: grid; gap: 16px; align-content: start; padding: 4px clamp(20px, 3.2vw, 52px); }
.stat[hidden], .stats__note[hidden] { display: none; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid rgba(20,30,38,.2); }
.stat__label { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted-dark); }
.stat__icon { width: 20px; height: 20px; fill: none; stroke: var(--sunset); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.stat__num { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(52px, 5.6vw, 104px); line-height: .9; letter-spacing: -.02em; color: var(--sunset); font-variant-numeric: tabular-nums; }
.stats__note { margin-top: clamp(18px, 2vw, 26px); font-size: 13px; color: var(--muted-dark); }
/* Tablets: years across the top, patients and exams side by side under it. */
@media (min-width: 621px) and (max-width: 960px) {
  .stats__grid { grid-auto-flow: row; grid-template-columns: 1fr 1fr; row-gap: 26px; }
  .stat--years { grid-column: 1 / -1; padding: 0; }
  .stat--years + .stat { padding-left: 0; border-left: 0; }
  .stats__grid:has(.stat[data-galago]:not([hidden])) .stat--years { padding-bottom: 24px; border-bottom: 1px solid rgba(20,30,38,.2); }
}
@media (max-width: 620px) { .stats__grid { grid-auto-flow: row; grid-template-columns: 1fr; gap: 26px; } .stat { padding: 0; } .stat + .stat { border-left: 0; border-top: 1px solid rgba(20,30,38,.2); padding-top: 24px; } }
.word__cta { margin-top: clamp(40px, 5vw, 70px); display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; }
.word__sources { color: var(--cream-text); opacity: .75; font-size: 14px; }
.word__sources a { white-space: nowrap; color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.word__sources a:hover, .word__sources a:focus-visible { opacity: 1; color: var(--gold); }
.word__rating { color: var(--cream-text); opacity: .85; font-size: 15px; font-variant-numeric: tabular-nums; }
.word__rating strong { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: 26px; opacity: 1; margin-right: 4px; }
@media (max-width: 860px) { .word__grid { grid-template-columns: 1fr; } .awards { justify-content: flex-start; } }
@media (max-width: 600px) {
  .awards { justify-content: center; gap: 14px; }
  .award { width: min(calc(50% - 7px), 210px); }
}

.marquee { margin-top: clamp(80px, 10vw, 140px); border-top: 1px solid rgba(246,239,226,.18); padding: 26px 0; overflow: hidden; }
.marquee__track { display: flex; gap: 36px; width: max-content; align-items: center; animation: marquee 38s linear infinite; font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(30px, 3.4vw, 54px); white-space: nowrap; }
.marquee__track i { font-style: normal; color: var(--gold); font-size: .5em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* =========================================================
   TEAM
   ========================================================= */
.team { background: var(--paper); padding: clamp(110px, 14vw, 200px) 0 clamp(80px, 10vw, 160px); }
.team__head { margin-bottom: clamp(48px, 7vw, 100px); }
.team__head .arrow-link { margin-top: 24px; }
.team__group { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; margin: 0 0 20px; padding-top: 18px; border-top: 1px solid rgba(20,30,38,.25); }
.team__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 32px); margin-bottom: clamp(56px, 7vw, 96px); }
.team__grid:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .team__grid { grid-template-columns: repeat(2, 1fr); } }

.person__photo {
  position: relative; aspect-ratio: 3 / 4; border-radius: 999px 999px 10px 10px; overflow: hidden; margin-bottom: 16px;
  background:
    radial-gradient(120% 80% at 50% 0%, color-mix(in srgb, var(--gold) 55%, transparent), transparent 60%),
    linear-gradient(170deg, #c9b79a 0%, #8c9aa3 55%, var(--slate) 100%);
  display: grid; place-items: center;
}
.person__photo[style*="background-image"] { background-size: cover; background-position: center; }
.person__photo[style*="background-image"]::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(20,30,38,.45), rgba(20,30,38,.05) 60%); }
.person__initials, .person__soon { z-index: 1; }
.person__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .8s; }
.person:hover .person__photo img { transform: scale(1.05); }
/* Warm the grey studio backdrops toward the poster palette; clears on hover. */
.person__photo:has(img)::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(to top, rgba(216,101,42,.12), rgba(231,172,69,.05) 55%, transparent); mix-blend-mode: multiply; transition: opacity .6s var(--ease); }
.person:hover .person__photo::after { opacity: 0; }
.person__initials { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(54px, 6vw, 96px); color: rgba(246,239,226,.9); letter-spacing: .02em; }
.person__soon { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--cream-text); background: rgba(20,30,38,.35); padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.person__name { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(22px, 2vw, 30px); line-height: 1.05; }
.person__role { color: var(--muted-dark); font-size: 14px; letter-spacing: .04em; }

/* =========================================================
   FOCUS LENS
   ========================================================= */
.focus { position: relative; min-height: 100svh; display: flex; align-items: center; color: var(--cream-text); background: var(--ink); overflow: hidden; isolation: isolate; }
.focus__media { position: absolute; inset: 0; z-index: -1; --x: 70%; --y: 50%; --r: 0px; }
.focus__media .layer--sharp { clip-path: circle(var(--r) at var(--x) var(--y)); }
.focus__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(14,22,28,.72), rgba(14,22,28,.15) 60%); pointer-events: none; }
.focus__ring { position: absolute; left: var(--x); top: var(--y); width: calc(var(--r) * 2); height: calc(var(--r) * 2); transform: translate(-50%, -50%); border-radius: 50%; border: 1px solid rgba(246,239,226,.6); box-shadow: 0 0 0 10px rgba(246,239,226,.06), 0 0 60px rgba(0,0,0,.25); z-index: 1; pointer-events: none; }
.focus__content { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 120px var(--gutter); position: relative; z-index: 2; pointer-events: none; }
.focus__content .actions, .focus__content a { pointer-events: auto; }
.focus__content .display { margin-bottom: 18px; text-shadow: 0 2px 40px rgba(0,0,0,.35); }
.focus__hint { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted-light); margin-bottom: 32px; display: flex; gap: 10px; align-items: center; }
.focus__hint::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 1px solid currentColor; }
html:not(.js) .focus__media .layer--sharp, html.reduced .focus__media .layer--sharp { clip-path: none; }
/* Phones: the copy spans the full width, so the lens drifts under it. Shade the whole frame evenly. */
@media (max-width: 760px) {
  .focus__media::after { background: linear-gradient(180deg, rgba(14,22,28,.4) 0%, rgba(14,22,28,.72) 28%, rgba(14,22,28,.72) 78%, rgba(14,22,28,.4) 100%); }
  .focus__hint { color: rgba(246,239,226,.82); }
}
html:not(.js) .focus__ring, html.reduced .focus__ring, html:not(.js) .focus__hint, html.reduced .focus__hint { display: none; }

/* =========================================================
   VISIT
   ========================================================= */
.visit { background: var(--paper); padding: clamp(110px, 14vw, 200px) 0; }
.visit__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 110px); align-items: start; }
.visit__info .display { margin-bottom: clamp(36px, 5vw, 64px); }
.visit__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 40px; }
.visit address { font-style: normal; font-size: 1.15em; line-height: 1.45; }
.visit a[href^="tel"], .visit a[href^="mailto"] { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.hours { width: 100%; max-width: 520px; border-collapse: collapse; margin-bottom: 36px; }
.hours th, .hours td { text-align: left; padding: 11px 0; border-bottom: 1px solid rgba(20,30,38,.16); font-weight: 400; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; }
.hours tr.is-today th::after { content: "Today"; margin-left: 10px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: 3px 8px; border-radius: 999px; vertical-align: 2px; }
.open-status { font-size: 12px; padding: 4px 10px; border-radius: 999px; letter-spacing: .14em; }
.open-status:empty { display: none; }
.open-status.is-open { background: #2d6a4f; color: #fff; }
.open-status.is-closed { background: rgba(20,30,38,.12); color: var(--ink); }
.hours-special { margin: -20px 0 28px; max-width: 520px; padding: 12px 16px; border-radius: 10px; background: color-mix(in srgb, var(--gold) 18%, transparent); font-size: .95em; }
.notice { border-left: 3px solid var(--sunset); padding: 14px 18px; background: color-mix(in srgb, var(--sunset) 8%, transparent); border-radius: 0 10px 10px 0; margin-bottom: 18px; max-width: 60ch; }
.notice a { font-weight: 700; }
.good-to-know { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; margin-top: 28px; max-width: 640px; }
.good-to-know li { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid rgba(20,30,38,.2); font-size: .9em; }
.good-to-know strong { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.good-to-know span { color: var(--muted-dark); }
@media (max-width: 520px) { .good-to-know { grid-template-columns: 1fr; } }
.visit__poster { position: sticky; top: calc(var(--header-h) + var(--notice-h) + 24px); background: #f8f2e6; padding: 14px 14px 0; border-radius: 6px; box-shadow: 0 40px 80px -40px rgba(20,30,38,.5); }
/* Map colours (land, water, roads) are set in js/main.js to match these tokens. */
.visit__map { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 3px; background: #f5eee1; }
.visit__map .maplibregl-map { position: absolute; inset: 0; font-family: var(--sans); }
.visit__map-fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; text-align: center; text-decoration: none; font-size: 15px; line-height: 1.5; color: var(--slate); transition: opacity .6s; }
.visit__map.is-ready .visit__map-fallback { opacity: 0; pointer-events: none; }
.visit__map-open { font-weight: 600; color: var(--sunset); }
.visit__map-pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--sunset); box-shadow: 0 6px 14px -4px rgba(20,30,38,.45); display: grid; place-items: center; }
.visit__map-pin::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #f6efe2; }
/* Places on the map (js/map-places.js): travel badges, the clinic pin + logo, tap-to-open postcards. */
.map-badge, .map-clinic { padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.map-badge { width: 40px; height: 40px; filter: drop-shadow(0 4px 6px rgba(20,30,38,.28)); }
/* Hover grows the icon, not the button: MapLibre positions the button with a transform, and scaling it
   as well throws off where Chrome registers the press, so taps would miss. */
.map-badge svg, .map-clinic svg { display: block; width: 100%; height: 100%; transition: scale .25s var(--ease); }
.map-clinic svg { transform-origin: 50% 100%; }
.map-badge:hover svg, .map-badge:focus-visible svg, .map-clinic:hover svg, .map-clinic:focus-visible svg { scale: 1.08; }
.map-badge:focus-visible, .map-clinic:focus-visible { outline: 2px solid var(--sunset); outline-offset: 3px; border-radius: 50%; }
.map-badge__name { position: absolute; top: calc(100% + 4px); left: 50%; translate: -50% 0; white-space: nowrap; pointer-events: none;
  font-family: var(--serif); font-weight: var(--serif-wght); font-size: 13px; line-height: 1; color: var(--navy);
  text-shadow: 0 0 2px #f5eee1, 0 0 4px #f5eee1, 0 0 6px #f5eee1; }
.map-clinic { width: 40px; height: 50px; filter: drop-shadow(0 6px 8px rgba(20,30,38,.3)); }
.map-badge__name--left { top: 50%; left: auto; right: calc(100% + 6px); translate: 0 -50%; }
.map-badge__name--right { top: 50%; left: calc(100% + 6px); translate: 0 -50%; }
/* The logo sits above the pin like a signpost, clear of the landmarks either side. */
.map-clinic__logo { position: absolute; left: 50%; bottom: calc(100% + 2px); width: 104px; translate: -50% 0; color: var(--navy);
  filter: drop-shadow(0 0 1.5px #f5eee1) drop-shadow(0 0 2.5px #f5eee1) drop-shadow(0 0 4px #f5eee1); }
/* Harbour traffic (js/map-harbour.js). The marker element is moved by MapLibre; only the inner body is
   transformed (turn, bob, bank), and --vessel-scale follows the map's zoom. Never tappable. Ripples and
   wakes are drawn on .harbour-fx, between the map and the markers. Seaplanes fly above the badges. */
.harbour-fx { position: absolute; top: 0; left: 0; pointer-events: none; } /* sized in JS to the map */
.vessel { width: var(--w); height: var(--h); pointer-events: none; }
.vessel--seaplane { z-index: 3; }
.vessel__body { position: absolute; inset: 0; transform-origin: 50% 80%; will-change: transform; }
.vessel__body svg { display: block; width: 100%; height: 100%; scale: var(--vessel-scale, 1); transform-origin: 50% 80%; overflow: visible; }
.vessel__shadow { position: absolute; left: 18%; right: 18%; bottom: 0; height: 28%; border-radius: 50%; background: rgba(20,30,38,.9); filter: blur(2.5px); opacity: .16; scale: var(--vessel-scale, 1); }
.map-postcard .maplibregl-popup-content { padding: 0; overflow: hidden; border-radius: 6px; background: #f8f4ec; box-shadow: 0 24px 48px -24px rgba(20,30,38,.6); font-family: var(--sans); }
.map-postcard.maplibregl-popup-anchor-bottom .maplibregl-popup-tip, .map-postcard.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip, .map-postcard.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip { border-top-color: #f8f4ec; }
.map-postcard.maplibregl-popup-anchor-top .maplibregl-popup-tip, .map-postcard.maplibregl-popup-anchor-top-left .maplibregl-popup-tip, .map-postcard.maplibregl-popup-anchor-top-right .maplibregl-popup-tip { border-bottom-color: #f8f4ec; }
.map-postcard.maplibregl-popup-anchor-left .maplibregl-popup-tip { border-right-color: #f8f4ec; }
.map-postcard.maplibregl-popup-anchor-right .maplibregl-popup-tip { border-left-color: #f8f4ec; }
.map-postcard .maplibregl-popup-close-button { width: 28px; height: 28px; font-size: 18px; line-height: 1; color: #f8f4ec; background: rgba(20,30,38,.45); border-radius: 0 0 0 6px; }
.postcard { width: 230px; }
.postcard img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--paper-2); }
.postcard figcaption { display: grid; gap: 4px; padding: 12px 14px 14px; font-size: 13px; line-height: 1.45; color: rgba(20,30,38,.78); }
.postcard strong { font-family: var(--serif); font-weight: var(--serif-wght); font-size: 19px; line-height: 1.1; color: var(--ink); }
.postcard a { margin-top: 4px; font-weight: 600; color: var(--sunset); text-decoration: none; }
.postcard a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 520px) {
  .map-badge { width: 34px; height: 34px; }
  .map-badge__name { display: none; } /* names show on the postcard instead */
  .map-clinic { width: 34px; height: 42.5px; }
  .map-clinic__logo { width: 86px; }
}
.visit__map .maplibregl-ctrl-group { border-radius: 3px; box-shadow: 0 4px 14px -6px rgba(20,30,38,.35); }
.visit__map .maplibregl-ctrl-attrib { background: rgba(245,238,225,.85); color: var(--muted-dark); }
.visit__map .maplibregl-cooperative-gesture-screen { font-family: var(--sans); background: rgba(34,49,61,.72); }
.visit__poster > figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 16px 4px 18px; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; }
.visit__poster > figcaption a { letter-spacing: .12em; text-decoration: none; color: var(--sunset); white-space: nowrap; }
.visit__poster > figcaption a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 900px) {
  .visit__grid { grid-template-columns: 1fr; }
  .visit__poster { position: relative; top: 0; }
  .visit__map { aspect-ratio: 1 / 1; }
  .visit__poster > figcaption { flex-direction: column; gap: 6px; }
}
@media (max-width: 520px) { .visit__cols { grid-template-columns: 1fr; } .visit__map { aspect-ratio: 4 / 5; } /* room for a postcard above its place */ }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--ink); color: var(--cream-text); padding: clamp(110px, 14vw, 200px) 0 36px; }
.footer__cta { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(44px, 5.4vw, 92px); line-height: 1.04; letter-spacing: -.01em; margin-bottom: 36px; }
.footer__cta em { color: var(--gold); }
.brands { margin: clamp(70px, 9vw, 130px) 0 clamp(60px, 7vw, 100px); max-width: 1100px; }
.brands__list { font-family: var(--serif); font-weight: var(--serif-wght); font-synthesis: none; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.35; color: rgba(246,239,226,.82); }
.footer__bottom { display: grid; grid-template-columns: auto 1fr; gap: 24px 40px; align-items: end; padding-top: 32px; border-top: 1px solid rgba(246,239,226,.18); }
.footer__logo { width: clamp(180px, 18vw, 260px); color: var(--cream-text); }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: flex-end; }
.footer__links a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--muted-light); }
.footer__links a:hover { color: var(--cream-text); }
.footer__small { grid-column: 1 / -1; font-size: 13px; color: var(--muted-light); }
@media (max-width: 720px) { .footer__bottom { grid-template-columns: 1fr; } .footer__links { justify-content: flex-start; } }

/* =========================================================
   JS-ONLY INITIAL STATES (content is fully visible without JS)
   ========================================================= */
/* Hero entrance runs on CSS keyframes so it starts at first paint, without
   waiting for the animation scripts (keeps LCP fast). When the intro curtain
   plays, the entrance is delayed until the curtain lifts. */
html.js:not(.reduced) .hero { --hero-delay: .1s; }
html.js:not(.reduced):not(.no-intro) .hero { --hero-delay: 1.85s; }
html.js:not(.reduced) .hero .layer--sharp { animation: hero-focus 2.4s cubic-bezier(.45, 0, .2, 1) calc(var(--hero-delay) + .2s) both; }
html.js:not(.reduced) .hero .layer--blur { animation: hero-settle 2.6s cubic-bezier(.2, .7, .1, 1) var(--hero-delay) both; }
html.js:not(.reduced) .hero__title .line > span { animation: hero-line 1.4s cubic-bezier(.16, 1, .3, 1) calc(var(--hero-delay) + .25s) both; }
html.js:not(.reduced) .hero__title .line + .line > span { animation-delay: calc(var(--hero-delay) + .37s); }
html.js:not(.reduced) [data-hero-in] { animation: hero-in 1.1s cubic-bezier(.16, 1, .3, 1) calc(var(--hero-delay) + .1s) both; }
html.js:not(.reduced) .hero .actions[data-hero-in] { animation-delay: calc(var(--hero-delay) + .7s); }
html.js:not(.reduced) .poster-frame { animation: hero-frame 1.6s cubic-bezier(.16, 1, .3, 1) calc(var(--hero-delay) + .5s) both; }

/* ---------- Focus intro (the default; html.intro-focus): "The North Shore, … in focus." ----------
   No curtain. The hero starts out of focus with the logo and slogan together in the middle of
   the screen: the logo and "The North Shore," sharpen in, then "in focus." Then, as one move,
   the picture pulls into focus and the logo and slogan settle into place together; the rest of
   the hero follows. About 3.5 s in all; any tap, scroll or key skips to the end (js/main.js).
   The start offset and scale (--dx, --dy, --s, --ox) come from the inline script after the
   hero. Which intro plays is set by INTRO in index.html's head script; the curtain (.intro,
   above) is kept as the other option. */
.hero__lockup { display: block; --dx: 0px; --dy: 0px; --s: 1; --ox: 50%; }
.hero__tagline .tl { display: inline-block; }
html.js.intro-focus:not(.reduced) .hero { --hero-delay: 2.35s; }
html.js.intro-focus:not(.reduced) .hero__brand,
html.js.intro-focus:not(.reduced) .hero__tagline { overflow: visible; }
html.js.intro-focus:not(.reduced) .hero__lockup { transform-origin: var(--ox) 50%; animation: lockup-settle 1.05s cubic-bezier(.65, 0, .25, 1) 1.7s both; }
/* The logo and slogan sharpen in where they stand rather than rising out of their lines. */
html.js.intro-focus:not(.reduced) .hero__title .hero__brand.line > span { animation: logo-in 1s cubic-bezier(.2, .7, .1, 1) .2s both; }
html.js.intro-focus:not(.reduced) .hero__title .hero__tagline.line > span { animation: none; }
html.js.intro-focus:not(.reduced) .hero .tl-a { animation: tl-in .9s cubic-bezier(.2, .7, .1, 1) .35s both; }
html.js.intro-focus:not(.reduced) .hero .tl-b { animation: tl-in .9s cubic-bezier(.2, .7, .1, 1) 1s both; }
html.js.intro-focus:not(.reduced) .hero .layer--blur { animation: hero-settle 3.2s cubic-bezier(.2, .7, .1, 1) 0s both; }
html.js.intro-focus:not(.reduced) .hero .layer--sharp { animation: hero-focus 1.3s cubic-bezier(.45, 0, .2, 1) 1.7s both; }
html.js.intro-focus:not(.reduced) .site-header { animation: fade-in .8s ease 2.6s both; }
html.js.intro-focus:not(.reduced) .scroll-cue { animation: fade-in .8s ease 3s both; }
@keyframes lockup-settle { from { transform: translate(var(--dx), var(--dy)) scale(var(--s)); } to { transform: none; } }
@keyframes tl-in { from { opacity: 0; filter: blur(10px); } to { opacity: 1; filter: blur(0); } }
/* Keeps the logo's drop shadow (its resting filter) while it sharpens. */
@keyframes logo-in {
  from { opacity: 0; filter: blur(10px) drop-shadow(0 6px 30px rgba(14,22,28,.35)); }
  to { opacity: 1; filter: blur(0) drop-shadow(0 6px 30px rgba(14,22,28,.35)); }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@keyframes hero-focus { from { opacity: 0; transform: scale(1.12); } to { opacity: 1; transform: scale(1); } }
@keyframes hero-settle { from { transform: scale(1.18); } to { transform: scale(1.04); } }
@keyframes hero-line { from { transform: translateY(140%); } to { transform: translateY(0); } }
@keyframes hero-in { from { opacity: .01; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes hero-frame { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
html.js:not(.reduced) [data-rise] { opacity: 0; transform: translateY(48px); }
html.js:not(.reduced) .word__title .line > span { transform: translateY(140%); }
html.js:not(.reduced) .then .layer--sharp, html.js:not(.reduced) .view .layer--sharp { opacity: 0; }
html.js:not(.reduced) .care-row { opacity: 0; }

/* =========================================================
   PLATE CARD — the page-change card between pages
   Leaving: covers the screen from below with the destination's plate.
   Arriving: starts covering (html.plate-in, set before first paint) and lifts away.
   ========================================================= */
.plate-card { display: none; }
html.js:not(.reduced) .plate-card {
  position: fixed; inset: 0; z-index: 260; pointer-events: none;
  display: grid; place-content: center; justify-items: center; gap: clamp(14px, 1.8vw, 24px); text-align: center;
  background: var(--ink); color: var(--cream-text); padding: 0 var(--gutter);
  clip-path: inset(100% 0 0 0);
}
.plate-card__no { font-size: 12px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); }
.plate-card__title { font-size: clamp(12px, 1vw, 14px); font-weight: 600; letter-spacing: .28em; text-transform: uppercase; line-height: 1.4; color: var(--cream-text); }
/* The clinic's logo leads the card; the page name sits under it as a small label */
.plate-card__logo { width: clamp(240px, 44vw, 600px); color: var(--cream-text); }
.plate-card__meta { font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted-light); }
html.plate-leave .plate-card { animation: plate-cover .42s cubic-bezier(.7, 0, .2, 1) both; pointer-events: auto; }
html.plate-leave .plate-card > * { animation: plate-text .5s cubic-bezier(.16, 1, .3, 1) .1s both; }
/* Arrival lifts on its own (pure CSS), so a failed script can never leave the page covered. */
html.plate-in .plate-card { clip-path: inset(0 0 0 0); animation: plate-lift .75s cubic-bezier(.7, 0, .2, 1) .15s both; }
html.plate-in .plate-card > * { animation: plate-text-out .6s cubic-bezier(.7, 0, .2, 1) .15s both; }
@keyframes plate-cover { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes plate-lift { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 100% 0); } }
@keyframes plate-text { from { opacity: 0; transform: translateY(30px); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes plate-text-out { from { opacity: 1; filter: blur(0); } to { opacity: 0; transform: translateY(-24px); filter: blur(10px); } }

/* =========================================================
   REDUCED MOTION — complete, calm, and sharp
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee__track > :nth-child(n+9) { display: none; }
}

/* Hero on phones: calling matters more than reordering contacts (still in the menu and footer). */
.hero__call { display: none; }
@media (max-width: 760px) { .hero__call { display: inline-flex; } .hero__order { display: none; } }

/* "Call (604) …": the flex gap stands in for the word space, so keep it to one space's width. */
.btn:has(> .nowrap) { gap: .3em; }

/* Phones: give small text links a comfortable tap height. */
@media (max-width: 720px) {
  .footer__links { gap: 0 24px; }
  .footer__links a { display: inline-block; padding: 11px 0; }
  .record__link { display: inline-block; padding: 11px 0; }
}
