/* Jeffry Nirenstein Dental P.C. — site styles */
:root {
  --ink: #0B1B3A;
  --night: #071330;
  --sky: #5FA8F5;
  --sky-ink: #1D64B8;
  --ice: #E4ECF5;
  --ice-2: #F2F6FA;
  --paper: #FFFFFF;
  --line: #C8D5E4;
  --muted: #4A5872;
  --on-dark: #E9F0F9;
  --on-dark-muted: #A9B8CF;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;

  --wrap: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 84px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--display);
  font-variation-settings: "wdth" 100;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--sky-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:root { --focus: var(--sky-ink); }
.dark, .hero, .page-hero, .site-header, .site-footer, .mobile-book { --focus: var(--sky); }
.cta-band { --focus: var(--night); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.loc-tabs button:focus-visible { outline-color: #fff; outline-offset: 5px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--sky); color: var(--night); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

/* ---------- type ---------- */
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1.02; letter-spacing: -0.01em; font-variation-settings: "wdth" 72; text-wrap: balance; }
.display { font-size: clamp(3rem, 7.4vw, 6.25rem); text-transform: uppercase; } /* auteur-allow: type-led hero headline, deliberate */
.h2 { font-size: clamp(2.2rem, 4.6vw, 3.75rem); text-transform: uppercase; }
.h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); text-transform: uppercase; letter-spacing: 0; }
.kicker { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.2rem, 1.8vw, 1.45rem); color: var(--sky-ink); margin: 0 0 14px; display: block; }
.dark .kicker { color: var(--sky); }
.lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); line-height: 1.55; max-width: 38ch; }
.prose p { max-width: 68ch; }
.prose p + p { margin-top: 1.1em; }
p { margin: 0; }

/* line-mask reveal (only hidden when JS present) */
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line > span { display: block; }
.js .reveal-lines .line > span { transform: translateY(105%); transition: transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 70ms); }
.js .reveal-lines.in .line > span { transform: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font: 700 0.95rem/1 var(--display); font-variation-settings: "wdth" 88; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color 140ms var(--ease-out), color 140ms var(--ease-out), border-color 140ms var(--ease-out), transform 140ms var(--ease-out);
}
.btn:active { transform: translateY(1px); }
.btn-sky { background: var(--sky); color: var(--night); }
.btn-sky:hover { background: #8CC2FA; color: var(--night); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--sky-ink); color: #fff; }
.btn-ghost { border-color: currentColor; color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.dark .btn-ghost { color: #fff; }
.dark .btn-ghost:hover { background: #fff; color: var(--night); border-color: #fff; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--night); color: #fff;
  transition: box-shadow 200ms var(--ease-out);
}
.site-header .bar { display: flex; align-items: center; gap: 28px; height: var(--header-h); transition: height 220ms var(--ease-out); }
.site-header.condensed .bar { height: 66px; }
.site-header.condensed { box-shadow: 0 1px 0 rgba(255,255,255,0.08), 0 10px 30px rgba(3, 9, 25, 0.35); }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; margin-right: auto; }
.brand:hover { color: #fff; }
.brand-mark { width: 44px; height: 44px; flex: none; color: #fff; margin-top: -4px; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-weight: 800; font-size: 1.45rem; letter-spacing: 0.01em; text-transform: uppercase; font-variation-settings: "wdth" 72; }
.brand-name small { font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--sky); margin-top: 3px; }

.nav { display: flex; gap: 26px; }
.nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 0.86rem; letter-spacing: 0.07em; text-transform: uppercase; font-variation-settings: "wdth" 90; position: relative; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--sky); transform: scaleX(0); transform-origin: left; transition: transform 200ms var(--ease-out); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a:hover { color: #fff; }
.header-cta { display: flex; align-items: center; gap: 18px; }
.header-phone { color: var(--sky); font-weight: 700; text-decoration: none; font-size: 1rem; white-space: nowrap; }
.header-phone:hover { color: #fff; }
.header-cta .btn { min-height: 46px; padding: 0 20px; }

.menu-btn { display: none; background: none; border: 0; color: #fff; width: 48px; height: 48px; cursor: pointer; padding: 12px; }
.menu-btn span { display: block; height: 2px; background: currentColor; margin: 5px 0; transition: transform 220ms var(--ease-out), opacity 150ms; }
.menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn span:nth-child(2) { opacity: 0; }
.menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
  .header-phone { display: none; }
  .nav { gap: 18px; }
}
@media (max-width: 900px) {
  .menu-btn { display: block; }
  .header-cta .btn { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; gap: 0;
    background: var(--night); padding: 8px var(--gutter) 28px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out), visibility 0s 260ms;
  }
  .site-header.condensed .nav { top: 66px; }
  .menu-open .nav { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .nav a { font-size: 1.5rem; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-variation-settings: "wdth" 72; font-weight: 800; letter-spacing: 0.02em; }
  .nav a::after { display: none; }
  .nav .nav-mobile-cta { display: flex; margin-top: 20px; }
}
.nav-mobile-cta { display: none; flex-direction: column; gap: 10px; }
@media (max-width: 900px) {
  html:not(.js) .site-header .bar { height: auto; flex-wrap: wrap; padding: 14px 0; }
  html:not(.js) .menu-btn { display: none; }
  html:not(.js) .nav { position: static; opacity: 1; visibility: visible; transform: none; width: 100%; order: 3; padding: 8px 0 0; }
  html:not(.js) .nav a { font-size: 1.1rem; padding: 10px 0; }
}
.nav-mobile-cta .btn { justify-content: center; }
.nav-mobile-cta a::after { display: none; }
.nav .nav-mobile-cta .btn-sky, .nav .nav-mobile-cta .btn-sky:hover { color: var(--night); }

/* ---------- hero ---------- */
.hero { background: var(--night); color: #fff; position: relative; padding: clamp(48px, 7vw, 96px) 0 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 4vw, 64px); align-items: stretch; }
.hero-copy { padding-bottom: clamp(56px, 8vw, 120px); }
.hero .display { color: #fff; }
.hero .lede { color: var(--on-dark); margin-top: 28px; }
.hero .btn-row { margin-top: 36px; }
.hero-meta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 8px 26px; color: var(--on-dark-muted); font-size: 0.95rem; }
.hero-meta a { color: var(--on-dark); text-decoration: none; font-weight: 600; }
.hero-meta a:hover { color: var(--sky); }
.hero-meta span { display: block; font-family: var(--serif); font-style: italic; color: var(--on-dark-muted); }

/* diptych: Manhattan pinned top, Brooklyn pinned to the hero floor and pushed through it */
.diptych { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; position: relative; z-index: 2; }
.panel { position: relative; margin: 0; }
.panel:nth-child(1) { align-self: start; }
.panel:nth-child(2) { align-self: end; transform: translateY(150px); }
.panel .img { aspect-ratio: 3 / 4.4; overflow: hidden; background: #13254a; }
.panel img { width: 100%; height: 100%; object-fit: cover; }
.panel figcaption { margin-top: 12px; font-size: 0.85rem; line-height: 1.35; color: var(--on-dark-muted); }
.panel figcaption b { display: block; color: #fff; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; font-variation-settings: "wdth" 80; font-size: 0.95rem; }
.panel:nth-child(2) figcaption { color: var(--muted); }
.panel:nth-child(2) figcaption b { color: var(--ink); }
.hero + section { padding-top: calc(clamp(64px, 9vw, 120px) + 90px); }

/* hero load sequence */
.js .hero .panel .img { clip-path: inset(100% 0 0 0); transition: clip-path 1100ms var(--ease-out); transition-delay: calc(350ms + var(--i, 0) * 160ms); }
.js .hero .panel img { transform: scale(1.12); transition: transform 1600ms var(--ease-out); transition-delay: calc(350ms + var(--i, 0) * 160ms); }
.js .hero .panel figcaption, .js .hero .lede, .js .hero .btn-row, .js .hero-meta { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); }
.js .hero .lede { transition-delay: 420ms; }
.js .hero .btn-row { transition-delay: 520ms; }
.js .hero-meta { transition-delay: 620ms; }
.js .hero .panel figcaption { transition-delay: calc(900ms + var(--i, 0) * 160ms); }
.loaded .hero .panel .img { clip-path: inset(0 0 0 0); }
.loaded .hero .panel img { transform: scale(1); }
.loaded .hero .panel figcaption, .loaded .hero .lede, .loaded .hero .btn-row, .loaded .hero-meta { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 8px; }
  .diptych { margin-top: 12px; }
  .panel:nth-child(2) { align-self: start; margin-top: 70px; transform: translateY(70px); }
  .panel .img { aspect-ratio: 3 / 3.8; }
  .hero + section { padding-top: 150px; }
}

/* page hero (inner pages) */
.page-hero { background: var(--night); color: #fff; position: relative; overflow: hidden; padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 80px); }
.page-hero .display { font-size: clamp(2.8rem, 6.4vw, 5.25rem); }
.page-hero .lede { color: var(--on-dark); margin-top: 22px; max-width: 46ch; }
.page-hero .bg { position: absolute; inset: 0; opacity: 0.5; }
.page-hero .bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; filter: grayscale(0.55) contrast(1.05); }
.page-hero .bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night) 22%, rgba(7,19,48,0.55) 60%, rgba(7,19,48,0.25)), linear-gradient(0deg, rgba(7,19,48,0.6), transparent 45%); }
.page-hero .wrap { position: relative; }

/* ---------- sections ---------- */
section { padding: clamp(64px, 9vw, 120px) 0; }
.ice { background: var(--ice); }
.dark { background: var(--ink); color: #fff; }
.section-head { margin-bottom: clamp(36px, 5vw, 64px); }
.section-head p { margin-top: 18px; max-width: 56ch; color: var(--muted); }
.dark .section-head p { color: var(--on-dark-muted); }

/* intro split */
.intro { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.intro .prose { color: var(--muted); font-size: 1.08rem; }
.intro .prose strong { color: var(--ink); }
.facts { margin: 32px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.facts li { display: flex; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
.facts li span:first-child { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.08rem; }
.facts li span:last-child { font-weight: 700; text-align: right; }
@media (max-width: 860px) { .intro { grid-template-columns: 1fr; } }

/* services list (typographic rows) */
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.svc-list li { border-bottom: 1px solid var(--line); }
.svc-list a {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 40px; gap: 24px; align-items: center;
  padding: 26px 4px; text-decoration: none; color: var(--ink); position: relative;
}
.svc-list a::before { content: ""; position: absolute; inset: 0; background: var(--ice); transform: scaleY(0); transform-origin: bottom; transition: transform 260ms var(--ease-out); z-index: -1; }
.svc-list a:hover::before, .svc-list a:focus-visible::before { transform: scaleY(1); }
.svc-list li { position: relative; z-index: 0; }
.svc-list .name { font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.4rem); text-transform: uppercase; line-height: 1; font-variation-settings: "wdth" 72; transition: transform 260ms var(--ease-out); }
.svc-list a:hover .name { transform: translateX(10px); }
.svc-list .desc { color: var(--muted); font-size: 1rem; }
.svc-list .arrow { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out), transform 260ms var(--ease-out); }
.svc-list a:hover .arrow { background: var(--ink); color: #fff; transform: rotate(-45deg); }
.svc-list .arrow svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .svc-list a { grid-template-columns: 1fr 40px; gap: 8px 16px; }
  .svc-list .desc { grid-column: 1; grid-row: 2; }
  .svc-list .arrow { grid-row: 1 / span 2; grid-column: 2; }
}

/* doctor feature */
.doctor { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.portrait { position: relative; aspect-ratio: 4 / 5; background: linear-gradient(160deg, #1A2F5C, var(--night)); display: grid; place-items: center; overflow: hidden; }
.portrait .mono { font-weight: 800; font-size: clamp(6rem, 14vw, 11rem); color: rgba(95,168,245,0.16); font-variation-settings: "wdth" 62; letter-spacing: -0.02em; line-height: 1; }
.portrait .note { position: absolute; left: 20px; bottom: 18px; right: 20px; color: var(--on-dark-muted); font-family: var(--serif); font-style: italic; font-size: 1rem; }
.portrait-frame { position: relative; isolation: isolate; }
.portrait-frame::after { content: ""; position: absolute; inset: 22px -22px -22px 22px; border: 2px solid var(--sky); z-index: -1; }
.doctor blockquote { margin: 34px 0 0; padding: 0; font-family: var(--serif); font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.4; font-style: italic; }
.doctor blockquote footer { margin-top: 12px; font-family: var(--display); font-style: normal; font-size: 0.9rem; color: var(--muted); }
.doctor .btn-row { margin-top: 34px; }
.dark .doctor blockquote footer { color: var(--on-dark-muted); }
@media (max-width: 860px) { .doctor { grid-template-columns: 1fr; } .portrait-frame { max-width: 440px; margin-right: 14px; } .portrait-frame::after { inset: 14px -14px -14px 14px; } }

/* locations switcher */
.loc-tabs { display: inline-flex; border: 2px solid #fff; margin-bottom: 40px; position: relative; }
.loc-tabs button {
  position: relative; z-index: 1; background: none; border: 0; color: #fff; cursor: pointer;
  font: 800 1.05rem/1 var(--display); font-variation-settings: "wdth" 80; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 16px 26px; transition: color 200ms var(--ease-out);
}
.loc-tabs button[aria-selected="true"] { color: var(--night); }
.loc-tabs .slider { position: absolute; top: 0; bottom: 0; left: 0; background: var(--sky); transition: transform 320ms var(--ease-out), width 320ms var(--ease-out); }
.loc-panel { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.loc-panel[hidden] { display: none; }
.loc-panel.entering .loc-info > *, .loc-panel.entering .loc-photo { animation: locIn 460ms var(--ease-out) both; }
.loc-panel.entering .loc-info > *:nth-child(2) { animation-delay: 50ms; }
.loc-panel.entering .loc-info > *:nth-child(3) { animation-delay: 100ms; }
.loc-panel.entering .loc-info > *:nth-child(4) { animation-delay: 150ms; }
.loc-panel.entering .loc-photo { animation-name: locPhoto; animation-duration: 700ms; }
@keyframes locIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes locPhoto { from { opacity: 0; clip-path: inset(0 0 0 100%); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.loc-info address { font-style: normal; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.1; text-transform: uppercase; font-variation-settings: "wdth" 72; }
.loc-info .phone { display: inline-block; margin-top: 16px; font-size: 1.4rem; font-weight: 700; color: var(--sky); text-decoration: none; }
.loc-info .phone:hover { color: #fff; }
.hours { margin: 28px 0 0; padding: 0; list-style: none; max-width: 420px; }
.hours li { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.14); color: var(--on-dark); }
.hours li.closed { color: var(--on-dark-muted); }
.hours li.today { color: #fff; font-weight: 700; }
.hours li.today span:first-child::after { content: " · today"; font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--sky); }
.loc-info .btn-row { margin-top: 30px; }
.loc-photo { aspect-ratio: 4 / 3; overflow: hidden; }
.loc-photo img { width: 100%; height: 100%; object-fit: cover; }
.loc-photo + p { margin-top: 12px; color: var(--on-dark-muted); font-size: 0.95rem; }
@media (max-width: 860px) { .loc-panel { grid-template-columns: 1fr; } .loc-tabs button { padding: 14px 16px; font-size: 0.95rem; } }

/* reviews */
.reviews { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); }
.review { margin: 0; padding-top: 28px; border-top: 2px solid var(--ink); }
.review p { font-family: var(--serif); font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.45; }
.review footer { margin-top: 18px; color: var(--muted); font-size: 0.95rem; }
.rating-line { margin-top: clamp(36px, 5vw, 56px); font-size: 1.1rem; }
.rating-line strong { font-variation-settings: "wdth" 80; }
@media (max-width: 760px) { .reviews { grid-template-columns: 1fr; } }

/* CTA band */
.cta-band { background: var(--sky); color: var(--night); padding: clamp(56px, 7vw, 96px) 0; }
.cta-band .inner { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px; }
.cta-band .h2 { max-width: 14ch; }
.cta-band .btn-ink:hover { background: #fff; color: var(--night); }
.cta-band .btn-ghost { color: var(--night); }

/* image reveal on scroll */
.js .reveal-img { clip-path: inset(0 0 100% 0); transition: clip-path 1000ms var(--ease-out); }
.js .reveal-img.in { clip-path: inset(0 0 0 0); }
.js .reveal-img img { transform: scale(1.08); transition: transform 1400ms var(--ease-out); }
.js .reveal-img.in img { transform: scale(1); }

/* ---------- about page ---------- */
.bio { display: grid; grid-template-columns: 0.75fr 1.25fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.bio aside { position: sticky; top: calc(var(--header-h) + 24px); }
.bio aside .aside-title { margin-top: 44px; font-size: 1.15rem; letter-spacing: 0.04em; font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 72; line-height: 1.1; }
.check-list { list-style: none; margin: 14px 0 0; padding: 0; }
.check-list li { padding: 9px 0 9px 26px; position: relative; border-bottom: 1px solid var(--line); font-size: 0.98rem; }
.check-list li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 9px; height: 9px; border-right: 2px solid var(--sky-ink); border-top: 2px solid var(--sky-ink); transform: rotate(45deg); }
.bio .prose { font-size: 1.08rem; color: #22314F; }
.bio .prose h2 { margin-bottom: 26px; }
.todo { display: inline; background: #FFF4C2; color: #5A4500; padding: 1px 6px; font-size: 0.9em; }
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.team .member { background: var(--paper); }
.team .member .ph { aspect-ratio: 1; background: linear-gradient(160deg, #D3DEEB, #BFCEE0); display: grid; place-items: center; color: var(--muted); font-family: var(--serif); font-style: italic; }
.team .member div:last-child { padding: 18px 20px 22px; }
.team .member b { display: block; font-size: 1.15rem; text-transform: uppercase; font-variation-settings: "wdth" 76; }
.team .member span { color: var(--muted); font-size: 0.95rem; }
.team .member:nth-child(2) { transform: translateY(40px); }
@media (max-width: 860px) { .bio { grid-template-columns: 1fr; } .bio aside { position: static; } .team { grid-template-columns: 1fr 1fr; } .team .member:nth-child(2) { transform: none; } }
@media (max-width: 520px) { .team { grid-template-columns: 1fr; } }

/* ---------- services page ---------- */
.svc-detail { display: grid; grid-template-columns: 240px 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.svc-toc { position: sticky; top: calc(var(--header-h) + 24px); list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.svc-toc a { display: block; padding: 8px 0 8px 18px; margin-left: -2px; border-left: 2px solid transparent; text-decoration: none; color: var(--muted); font-weight: 600; transition: color 150ms, border-color 150ms; }
.svc-toc a:hover, .svc-toc a.active { color: var(--ink); border-left-color: var(--sky-ink); }
.svc-block { padding: 0 0 56px; margin-bottom: 56px; border-bottom: 1px solid var(--line); }
.svc-block:last-child { border-bottom: 0; margin-bottom: 0; }
.svc-block .h2 { font-size: clamp(2rem, 3.6vw, 3rem); margin-bottom: 20px; }
.svc-block .prose { color: #22314F; }
.svc-block ul { margin: 18px 0 0; padding-left: 20px; color: var(--muted); }
.svc-block ul li + li { margin-top: 6px; }
@media (max-width: 860px) { .svc-detail { grid-template-columns: 1fr; } .svc-toc { display: none; } }

/* ---------- new patients ---------- */
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps li { counter-increment: s; border-top: 2px solid var(--ink); padding-top: 20px; }
.steps li::before { content: counter(s); display: block; font-weight: 800; font-size: 3.4rem; line-height: 1; color: var(--sky-ink); font-variation-settings: "wdth" 62; margin-bottom: 14px; }
.steps b { display: block; text-transform: uppercase; font-variation-settings: "wdth" 80; font-size: 1.1rem; margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 960px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 2px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-weight: 700; font-size: 1.15rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 14px; margin-top: -10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform 220ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq .answer { padding: 0 0 24px; color: var(--muted); max-width: 64ch; }
.faq details[open] .answer { animation: locIn 300ms var(--ease-out); }

/* ---------- contact ---------- */
.offices { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.office { background: var(--paper); border: 1px solid var(--line); }
.office iframe { width: 100%; height: 260px; border: 0; display: block; filter: saturate(0.6); }
.office .body { padding: 26px 28px 30px; }
.office .body .h3 { margin-bottom: 10px; }
.office address { font-style: normal; color: var(--muted); }
.office .phone { display: block; margin-top: 10px; font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.office .phone:hover { color: var(--sky-ink); }
.office .hours li { color: var(--ink); border-bottom-color: var(--line); padding: 7px 0; font-size: 0.95rem; }
.office .hours li.closed { color: var(--muted); }
.office .hours li.today { color: var(--ink); }
.office .hours li.today span:first-child::after { color: var(--sky-ink); }
@media (max-width: 860px) { .offices { grid-template-columns: 1fr; } }

.form-wrap { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .form-wrap { grid-template-columns: 1fr; } }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
  border: 1.5px solid #6F84A3; border-radius: 0; padding: 13px 14px; min-height: 50px;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #5E6D85; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sky-ink); box-shadow: 0 0 0 3px rgba(29,100,184,0.2); }
.field .err { color: #B3261E; font-size: 0.88rem; min-height: 0; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #B3261E; }
.form .note { grid-column: 1 / -1; color: var(--muted); font-size: 0.9rem; }
.form .actions { grid-column: 1 / -1; }
.form-success { display: none; padding: 28px; background: var(--ice); border: 1.5px solid var(--sky-ink); }
.form-success.show { display: block; animation: locIn 400ms var(--ease-out); }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: var(--on-dark-muted); padding: clamp(56px, 7vw, 88px) 0 32px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.8fr; gap: 40px; }
.site-footer .footer-h { font-weight: 800; line-height: 1.2; font-family: var(--display); margin: 0 0 14px; color: #fff; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.85rem; font-variation-settings: "wdth" 85; }
.site-footer a { color: var(--on-dark); text-decoration: none; }
.site-footer a:hover { color: var(--sky); }
.site-footer .btn-sky, .site-footer .btn-sky:hover { color: var(--night); }
.site-footer address { font-style: normal; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 8px; }
.site-footer .brand { margin-bottom: 18px; }
.footer-bottom { margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,0.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.82rem; }
.footer-bottom a { color: var(--on-dark-muted); text-decoration: underline; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* mobile sticky book bar */
.mobile-book { display: none; }
@media (max-width: 900px) {
  .mobile-book { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; box-shadow: 0 -8px 24px rgba(7,19,48,0.25); }
  .mobile-book .btn { justify-content: center; min-height: 56px; }
  body { padding-bottom: 56px; }
}

/* ---------- reduced motion: gentler, not zero ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  .js .reveal-lines .line > span, .js .hero .panel img, .js .reveal-img img { transform: none !important; }
  .js .hero .panel .img, .js .reveal-img { clip-path: none !important; opacity: 0; transition: opacity 500ms ease-out; }
  .loaded .hero .panel .img, .js .reveal-img.in { opacity: 1; }
  .js .hero .lede, .js .hero .btn-row, .js .hero-meta, .js .hero .panel figcaption { transform: none !important; }
  .loc-panel.entering .loc-info > *, .loc-panel.entering .loc-photo { animation: fadeOnly 250ms ease-out both; }
  .svc-list a:hover .name { transform: none; }
}
@keyframes fadeOnly { from { opacity: 0; } }

/* two-doctor layout (home); second card dropped to break the grid */
.doctors { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.doc .portrait-frame { margin-bottom: 40px; max-width: 460px; }
.doc:nth-child(2) { margin-top: 120px; }
.doc .h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.doc-role { font-family: var(--serif); font-style: italic; color: var(--sky-ink); font-size: 1.15rem; margin: 6px 0 14px; }
.doc > p:not(.doc-role) { color: var(--muted); max-width: 46ch; }
.doc .btn-row { margin-top: 24px; }
@media (max-width: 860px) {
  .doctors { grid-template-columns: 1fr; }
  .doc:nth-child(2) { margin-top: 0; }
  .doc .portrait-frame { margin-right: 14px; }
}
/* about: second bio mirrored */
.bio-flip { grid-template-columns: 1.25fr 0.75fr; }
.bio-flip aside { order: 2; }
@media (max-width: 860px) { .bio-flip { grid-template-columns: 1fr; } .bio-flip aside { order: 0; } }
.team-sec .team .member { background: var(--ice-2); }

/* dentists-at-this-office block (location switcher + contact cards) */
.dentists { margin-top: 24px; max-width: 420px; }
.dentists p { font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: var(--sky); margin-bottom: 6px; }
.dentists ul { list-style: none; margin: 0; padding: 0; }
.dentists li { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-weight: 700; color: #fff; }
.dentists li span + span { font-weight: 400; color: var(--on-dark-muted); }
.office .dentists p { color: var(--sky-ink); }
.office .dentists li { color: var(--ink); }
.office .dentists li span + span { color: var(--muted); }

/* ---------- critique fixes ---------- */
/* touch targets >= 44px for stand-alone links */
.site-footer li a, .site-footer address + ul a { display: inline-block; padding: 11px 0; }
.site-footer li + li { margin-top: 0; }
.footer-bottom { line-height: 2.4; }
.hero-meta a { display: inline-block; padding: 10px 0; }
.loc-info .phone, .office .phone { display: inline-flex; align-items: center; min-height: 44px; }
.brand { min-height: 44px; }
.loc-tabs button { min-height: 48px; }

/* urgent-care line in hero */
.hero-urgent { display: flex; gap: 12px; align-items: flex-start; margin-top: 30px; max-width: 46ch; padding: 14px 16px; border: 1px solid rgba(95,168,245,0.45); color: var(--on-dark); font-size: 0.98rem; line-height: 1.45; }
.hero-urgent svg { width: 20px; height: 20px; flex: none; color: var(--sky); margin-top: 1px; }
.js .hero-urgent { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: 580ms; }
.loaded .hero-urgent { opacity: 1; transform: none; }

/* smaller portrait placeholders until real photos */
.doc .portrait-frame { max-width: 320px; }
.bio aside .portrait-frame { max-width: 320px; }
.portrait .mono { font-size: clamp(5rem, 9vw, 7.5rem); }

/* booking / call sheets */
.sheet { border: 0; padding: 36px 32px 30px; width: min(520px, calc(100% - 32px)); background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(3, 9, 25, 0.45); }
.sheet::backdrop { background: rgba(7, 19, 48, 0.62); }
.sheet[open] { animation: sheetIn 320ms var(--ease-out); }
.sheet[open]::backdrop { animation: fadeOnly 240ms ease-out; }
@keyframes sheetIn { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.sheet-close-form { position: absolute; top: 10px; right: 10px; margin: 0; }
.sheet-close { width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--ink); cursor: pointer; }
.sheet-close svg { width: 22px; height: 22px; }
.sheet-close:hover { color: var(--sky-ink); }
.sheet-title { font-size: 1.9rem; text-transform: uppercase; padding-right: 40px; }
.sheet-sub { margin-top: 10px; color: var(--muted); }
.sheet-options { margin-top: 22px; display: grid; gap: 10px; }
.sheet-opt { display: grid; grid-template-columns: 1fr 24px; gap: 2px 16px; align-items: center; padding: 18px 18px; border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 150ms var(--ease-out), background-color 150ms var(--ease-out); }
.sheet-opt:hover { border-color: var(--ink); background: var(--ice-2); color: var(--ink); }
.sheet-opt b { font-size: 1.15rem; text-transform: uppercase; font-variation-settings: "wdth" 80; }
.sheet-opt span { grid-column: 1; color: var(--muted); font-size: 0.95rem; }
.sheet-opt svg { grid-column: 2; grid-row: 1 / span 2; width: 22px; height: 22px; color: var(--sky-ink); transition: transform 200ms var(--ease-out); }
.sheet-opt:hover svg { transform: translateX(3px); }
.sheet-alt { margin-top: 20px; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 600px) {
  .sheet { margin: auto 0 0; width: 100%; max-width: 100%; padding: 30px 20px 28px; }
  .sheet[open] { animation-name: sheetUp; }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .sheet[open] { animation: fadeOnly 200ms ease-out; }
  .js .hero-urgent { transform: none !important; }
}

/* =========================================================
   BOLDER PASS (home)
   ========================================================= */

/* hero: taller, bigger type, photos drift apart as you scroll */
.hero { min-height: calc(100svh - var(--header-h)); }
.hero .display { font-size: clamp(3.4rem, 8.6vw, 7.5rem); line-height: 0.92; } /* auteur-allow: type-led hero */
.hero .lede { font-size: clamp(1.15rem, 1.6vw, 1.4rem); }
.panel .img { box-shadow: 0 30px 60px rgba(2, 8, 24, 0.45); }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
    .panel:nth-child(1) { animation: driftUp linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
    .panel:nth-child(2) { animation: driftDown linear both; animation-timeline: scroll(root); animation-range: 0 90vh; }
  }
}
@keyframes driftUp { to { translate: 0 -70px; } }
@keyframes driftDown { to { translate: 0 60px; } }

/* --- route: the signature section --- */
.route-sec { padding-bottom: clamp(72px, 9vw, 130px); }
.route-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.route-copy .prose { margin-top: 30px; color: var(--muted); font-size: 1.08rem; }
.route-copy .prose strong { color: var(--ink); }
.route { position: relative; margin: 0; width: 100%; max-width: 440px; justify-self: center; aspect-ratio: 360 / 760; }
.route svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.route .track { fill: none; stroke: var(--ice); stroke-width: 14; stroke-linecap: round; }
.route .draw { fill: none; stroke: var(--sky-ink); stroke-width: 14; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.route .stop circle { fill: var(--paper); stroke: var(--ink); stroke-width: 5; }
.route .stop .core { fill: var(--sky-ink); stroke: none; }
.route .stop-mid circle { fill: var(--sky); stroke: var(--paper); stroke-width: 4; }
.route-label { position: absolute; line-height: 1.25; }
.route-label b { display: block; font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 72; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1; }
.route-label span { display: block; margin-top: 6px; color: var(--muted); font-size: 0.95rem; }
.route-label.la { left: 31%; top: 6.2%; }
.route-label.lb { left: 31%; top: 87%; }
.route-label.lm { right: 30%; top: 46.6%; text-align: right; }
.route-label.lm span { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--sky-ink); margin: 0; }
/* line draws itself as the section scrolls through */
.js .route .draw { stroke-dashoffset: 1; }
@supports (animation-timeline: view()) {
  .js .route .draw { animation: drawRoute linear both; animation-timeline: view(); animation-range: entry 30% cover 62%; }
}
@supports not (animation-timeline: view()) {
  .js .route .draw { transition: stroke-dashoffset 2200ms var(--ease-soft); }
  .js .route.in .draw { stroke-dashoffset: 0; }
}
@keyframes drawRoute { to { stroke-dashoffset: 0; } }
@media (max-width: 860px) {
  .route-grid { grid-template-columns: 1fr; }
  .route { max-width: 340px; }
}

/* --- services on navy, huge rows, sky sweep --- */
.svc-sec { position: relative; }
.dark .svc-list { border-top-color: #fff; }
.dark .svc-list li { border-bottom-color: rgba(255,255,255,0.16); }
.dark .svc-list a { color: #fff; padding: 30px 4px; }
.dark .svc-list .name { font-size: clamp(1.8rem, 4.2vw, 3.6rem); }
.dark .svc-list .desc { color: var(--on-dark-muted); transition: color 200ms var(--ease-out); }
.dark .svc-list a::before { background: var(--sky); transform: scaleX(0); transform-origin: left; transition: transform 380ms var(--ease-out); }
.dark .svc-list a:hover::before, .dark .svc-list a:focus-visible::before { transform: scaleX(1); }
.dark .svc-list a:hover, .dark .svc-list a:focus-visible { color: var(--night); }
.dark .svc-list a:hover .desc, .dark .svc-list a:focus-visible .desc { color: var(--night); }
.dark .svc-list .arrow { border-color: #fff; }
.dark .svc-list a:hover .arrow { background: var(--night); color: var(--sky); border-color: var(--night); }
.dark .svc-list a:focus-visible { outline-color: #fff; }

/* --- statement: words light up as you scroll --- */
.statement { padding: clamp(90px, 13vw, 190px) 0; background: var(--ice); }
.statement-text { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(2rem, 5vw, 4.4rem); line-height: 1.12; letter-spacing: -0.01em; max-width: 22ch; color: var(--ink); text-wrap: balance; }
.statement-text .w { transition: color 200ms linear; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .statement-text.scrub .w { color: #A7B8CE; animation: lightUp linear both; animation-timeline: --stmt; }
    .statement-text.scrub { view-timeline: --stmt block; }
  }
}
@keyframes lightUp { to { color: var(--ink); } }

/* --- reviews: one featured, oversized quote mark --- */
.reviews-feature { grid-template-columns: 1.45fr 1fr; align-items: start; }
.reviews-feature .review { position: relative; }
.reviews-feature .review:first-child { border-top-width: 3px; }
.reviews-feature .review:first-child::before { content: "\201C"; position: absolute; top: -18px; right: 0; font-family: var(--serif); font-size: 11rem; line-height: 1; color: var(--sky); pointer-events: none; }
.reviews-feature .review:first-child p { font-size: clamp(1.5rem, 2.6vw, 2.2rem); line-height: 1.3; padding-right: 2.2em; }
@media (max-width: 760px) { .reviews-feature { grid-template-columns: 1fr; } .reviews-feature .review:first-child::before { font-size: 7rem; top: -6px; } }

@media (prefers-reduced-motion: reduce) {
  .js .route .draw { stroke-dashoffset: 0 !important; animation: none !important; }
}
/* bolder pass tweaks */
@media (min-width: 901px) {
  .hero-grid { align-items: center; }
  .diptych { align-self: stretch; padding-top: 10px; }
  .panel:nth-child(2) { align-self: start; margin-top: 220px; transform: none; }
  .hero { padding-bottom: 0; }
  .hero + .route-sec { padding-top: clamp(64px, 9vw, 120px); }
}
.reviews-feature .review:first-child::before { top: auto; bottom: -40px; right: auto; left: -8px; opacity: 0.18; font-size: 14rem; z-index: -1; }
.reviews-feature .review:first-child { isolation: isolate; }
.reviews-feature .review:first-child p { padding-right: 0; }
@media (min-width: 901px) {
  .panel:nth-child(2) figcaption { color: var(--on-dark-muted); }
  .panel:nth-child(2) figcaption b { color: #fff; }
}
.reviews-feature .review:first-child::before { content: none; }
.page-hero .bg img[src*="skyline-hudson-night"] { object-position: center top; }

/* ---------- rotating reviews ---------- */
.rv { border-top: 3px solid var(--ink); padding-top: 34px; max-width: 980px; }
.rv-track { position: relative; min-height: 15rem; }
.rv-slide { margin: 0; }
.rv-slide[hidden] { display: none; }
.js .rv-slide.enter { animation: rvIn 520ms var(--ease-out) both; }
.js .rv-slide.enter.back { animation-name: rvInBack; }
@keyframes rvIn { from { opacity: 0; transform: translateX(28px); } }
@keyframes rvInBack { from { opacity: 0; transform: translateX(-28px); } }
.rv-stars { display: flex; gap: 4px; color: #E0A100; }
.rv-stars svg { width: 22px; height: 22px; fill: currentColor; }
.rv blockquote { margin: 18px 0 0; }
.rv blockquote p { font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.4rem); line-height: 1.28; max-width: 30ch; color: var(--ink); }
.rv figcaption, .rv .rv-cite { margin-top: 18px; color: var(--muted); font-size: 0.95rem; }
.rv-controls { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.rv-btn { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out); }
.rv-btn svg { width: 20px; height: 20px; }
.rv-btn:hover { background: var(--ink); color: #fff; }
.rv-dots { display: flex; gap: 4px; }
.rv-dot { width: 28px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; padding: 0; }
.rv-dot::after { content: ""; position: absolute; left: 4px; right: 4px; top: 20px; height: 4px; background: var(--line); transition: background-color 200ms; }
.rv-dot[aria-current="true"]::after { background: var(--sky-ink); }
@media (prefers-reduced-motion: reduce) { .js .rv-slide.enter { animation: fadeOnly 200ms ease-out both; } }
/* stack all reviews in one cell so the box is as tall as the longest review (arrows never jump) */
.rv-track { display: grid; min-height: 0; }
.rv-slide { grid-area: 1 / 1; }
.rv-slide[hidden] { display: block; visibility: hidden; }
.rv-btn { flex: none; } @media (max-width: 420px) { .rv-dot { width: 22px; } .rv-controls { gap: 10px; } }
.rv-slide.rv-long blockquote p { font-size: clamp(1.15rem, 1.9vw, 1.6rem); line-height: 1.4; max-width: 46ch; }

/* =========================================================
   Scroll choreography for Services, New Patients, Contact.
   One idea per content type; content is fully visible without JS.
   Durations > 300ms are deliberate: these are reading-pace reveals, not UI feedback.
   ========================================================= */
:root { --ease-quart: cubic-bezier(0.23, 1, 0.32, 1); }

@media (prefers-reduced-motion: no-preference) {
  /* Services: a sky rule draws across each treatment as you reach it, then its list follows */
  .js [data-reveal="block"] { position: relative; }
  .js [data-reveal="block"]::before { content: ""; position: absolute; left: 0; top: -2px; width: 100%; height: 3px; background: var(--sky-ink); transform: scaleX(0); transform-origin: left; transition: transform 900ms var(--ease-quart); }
  .js [data-reveal="block"].in::before { transform: scaleX(1); }
  .js [data-reveal="block"] .prose { opacity: 0; transform: translateY(14px); transition: opacity 700ms var(--ease-quart) 150ms, transform 700ms var(--ease-quart) 150ms; }
  .js [data-reveal="block"].in .prose { opacity: 1; transform: none; }
  .js [data-reveal="block"] li { opacity: 0; transform: translateX(-10px); transition: opacity 500ms var(--ease-quart), transform 500ms var(--ease-quart); transition-delay: calc(320ms + var(--d, 0) * 60ms); }
  .js [data-reveal="block"].in li { opacity: 1; transform: none; }
  .js [data-reveal="block"] .btn-row { opacity: 0; transition: opacity 600ms var(--ease-quart) 400ms; }
  .js [data-reveal="block"].in .btn-row { opacity: 1; }

  /* New patients: the four steps arrive in order, like a path */
  .js [data-reveal="steps"] li { border-top-color: transparent; position: relative; }
  .js [data-reveal="steps"] li::after { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform 700ms var(--ease-quart); transition-delay: calc(var(--d, 0) * 180ms); }
  .js [data-reveal="steps"] li::before, .js [data-reveal="steps"] li > * { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease-quart), transform 600ms var(--ease-quart); transition-delay: calc(200ms + var(--d, 0) * 180ms); }
  .js [data-reveal="steps"].in li::after { transform: scaleX(1); }
  .js [data-reveal="steps"].in li::before, .js [data-reveal="steps"].in li > * { opacity: 1; transform: none; }

  /* New patients: each item on the checklist gets ticked off */
  .js [data-reveal="ticks"] li::before { opacity: 0; transform: rotate(45deg) scale(0.4); transition: opacity 300ms ease-out, transform 450ms cubic-bezier(0.34, 1.4, 0.64, 1); transition-delay: calc(150ms + var(--d, 0) * 110ms); }
  .js [data-reveal="ticks"].in li::before { opacity: 1; transform: rotate(45deg) scale(1); }

  /* FAQ + contact form: gentle rise, short stagger */
  .js [data-reveal="rise"] > * { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease-quart), transform 600ms var(--ease-quart); transition-delay: calc(var(--d, 0) * 60ms); }
  .js [data-reveal="rise"].in > * { opacity: 1; transform: none; }

  /* Contact: office cards lift in side by side; the map settles after */
  .js [data-reveal="cards"] > .office { opacity: 0; transform: translateY(28px); transition: opacity 800ms var(--ease-quart), transform 800ms var(--ease-quart); transition-delay: calc(var(--d, 0) * 140ms); }
  .js [data-reveal="cards"].in > .office { opacity: 1; transform: none; }
  .js [data-reveal="cards"] .office iframe { opacity: 0; transition: opacity 900ms ease-out 450ms; }
  .js [data-reveal="cards"].in .office iframe { opacity: 1; }
}

/* Services: the side list shows how far you've read */
.svc-toc { position: relative; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) and (min-width: 861px) {
    .svc-detail { view-timeline: --svcread block; }
    .svc-toc::before { content: ""; position: absolute; left: -2px; top: 0; width: 2px; height: 100%; background: var(--sky-ink); transform-origin: top; transform: scaleY(0); animation: tocFill linear both; animation-timeline: --svcread; animation-range: cover 15% cover 85%; }
  }
}
@keyframes tocFill { to { transform: scaleY(1); } }

/* ---------- services grid + service pages ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc-grid-sm { grid-template-columns: repeat(3, 1fr); gap: 16px; }
.svc-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 250px; padding: 30px 28px 26px; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--ink); color: var(--ink); text-decoration: none; overflow: hidden; isolation: isolate; transition: transform 220ms var(--ease-out), box-shadow 220ms var(--ease-out), border-color 220ms var(--ease-out); }
.svc-card::before { content: ""; position: absolute; inset: 0; background: var(--ice-2); transform: scaleY(0); transform-origin: bottom; transition: transform 320ms var(--ease-out); z-index: -1; }
.svc-card:hover { color: var(--ink); transform: translateY(-4px); box-shadow: 0 18px 40px rgba(11, 27, 58, 0.12); border-top-color: var(--sky-ink); }
.svc-card:hover::before { transform: scaleY(1); }
.svc-card-title { font-size: clamp(1.5rem, 2.2vw, 1.9rem); text-transform: uppercase; line-height: 1; }
.svc-card p { color: var(--muted); font-size: 1rem; }
.svc-card-go { margin-top: auto; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; font-variation-settings: "wdth" 88; color: var(--sky-ink); }
.svc-card-go .arrow { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid currentColor; transition: transform 240ms var(--ease-out), background-color 200ms, color 200ms; }
.svc-card-go .arrow svg { width: 14px; height: 14px; }
.svc-card:hover .svc-card-go .arrow { transform: translateX(4px); background: var(--sky-ink); color: #fff; }
.svc-card.is-urgent { background: var(--ink); color: #fff; border-color: var(--ink); border-top-color: var(--sky); }
.svc-card.is-urgent::before { background: #12285A; }
.svc-card.is-urgent:hover { color: #fff; }
.svc-card.is-urgent p { color: var(--on-dark); }
.svc-card.is-urgent .svc-card-go { color: var(--sky); }
.svc-card.is-urgent:hover .svc-card-go .arrow { background: var(--sky); color: var(--night); }
.svc-card.is-urgent { --focus: var(--sky); }
.svc-grid-sm .svc-card { min-height: 200px; padding: 24px 22px 20px; }
.svc-grid-sm .svc-card-title { font-size: 1.35rem; }
@media (max-width: 960px) { .svc-grid, .svc-grid-sm { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .svc-grid, .svc-grid-sm { grid-template-columns: 1fr; } .svc-card { min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .svc-card:hover { transform: none; } }

.crumb { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 6px; font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--sky); text-decoration: none; }
.crumb::before { content: "←"; font-style: normal; font-family: var(--display); transition: transform 200ms var(--ease-out); }
.crumb:hover { color: #fff; }
.crumb:hover::before { transform: translateX(-4px); }
.svc-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 6vw, 96px); align-items: start; }
.svc-body .prose { font-size: 1.15rem; line-height: 1.7; color: #22314F; }
.svc-body .prose p + p { margin-top: 1.1em; }
.svc-body .check-list { margin-top: 28px; max-width: 560px; }
.svc-aside { position: sticky; top: calc(var(--header-h) + 24px); background: var(--ice-2); border: 1px solid var(--line); border-top: 3px solid var(--sky-ink); padding: 28px; }
.svc-aside-title { font-weight: 800; font-size: 1.5rem; text-transform: uppercase; font-variation-settings: "wdth" 72; line-height: 1; }
.svc-aside > p:not(.svc-aside-title) { margin-top: 10px; color: var(--muted); }
.btn-col { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.btn-col .btn { justify-content: center; }
@media (max-width: 860px) { .svc-page { grid-template-columns: 1fr; } .svc-aside { position: static; } }
/* lone 7th card: Emergencies becomes a full-width band at the end of the main grid */
.svc-grid:not(.svc-grid-sm) .svc-card.is-urgent { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px 40px; }
.svc-grid:not(.svc-grid-sm) .svc-card.is-urgent .svc-card-go { margin-top: 0; }
@media (max-width: 760px) { .svc-grid:not(.svc-grid-sm) .svc-card.is-urgent { grid-template-columns: 1fr; } }
.btn-col .btn { white-space: nowrap; padding: 0 16px; }
.btn-label { font-family: var(--serif); font-style: italic; color: var(--muted); margin: 6px 0 -4px; }

/* ---------- legal pages ---------- */
.legal-hero { padding: clamp(48px, 6vw, 80px) 0 clamp(36px, 4vw, 56px); }
.legal-hero .display { font-size: clamp(2.4rem, 5vw, 4rem); }
.legal { max-width: 760px; color: #22314F; font-size: 1.05rem; }
.legal h2 { font-size: clamp(1.3rem, 2vw, 1.6rem); text-transform: uppercase; margin: 2.2em 0 0.6em; color: var(--ink); }
.legal h2:first-of-type { margin-top: 1.2em; }
.legal p + p { margin-top: 0.9em; }
.legal ul { padding-left: 20px; } .legal li + li { margin-top: 8px; }
.legal-note { background: #FFF4C2; color: #5A4500; padding: 12px 16px; font-size: 0.95rem; }
.taglines { list-style: none; padding: 0 !important; } .taglines li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.legal-links { display: flex; flex-wrap: wrap; gap: 0 22px; }
.legal-links a { display: inline-block; padding: 11px 0; }

/* Home services: marquee teaser */
.svc-mq { overflow: hidden; }
.svc-mq-head { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px 64px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.svc-mq-side p { color: var(--on-dark-muted); margin: 0 0 22px; max-width: 38ch; }
.svc-mq-side .btn svg { width: 16px; height: 16px; }
.mq { display: block; position: relative; color: #fff; text-decoration: none; padding: 8px 0; border-top: 1px solid rgba(255,255,255,0.16); border-bottom: 1px solid rgba(255,255,255,0.16); cursor: none; }
.mq:focus-visible { outline: 2px solid var(--sky); outline-offset: -4px; }
.mq-row { overflow: hidden; padding: 10px 0; }
.mq-track { display: flex; width: max-content; will-change: transform; animation: mq 46s linear infinite; }
.mq-rev .mq-track { animation-direction: reverse; animation-duration: 54s; }
.mq-set { display: flex; align-items: center; flex: none; }
.mq-item { font-weight: 800; text-transform: uppercase; font-variation-settings: "wdth" 72; font-size: clamp(2.6rem, 6.4vw, 6rem); line-height: 1; letter-spacing: -0.01em; padding: 0 0.32em; white-space: nowrap; transition: color 300ms var(--ease-out); }
.mq-outline { color: transparent; -webkit-text-stroke: 1.5px rgba(255,255,255,0.55); }
.mq-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--sky); flex: none; }
.mq:hover .mq-item:not(.mq-outline) { color: var(--sky); }
.mq-cursor { position: absolute; left: 0; top: 0; width: 120px; height: 120px; margin: -60px 0 0 -60px; pointer-events: none; z-index: 2; will-change: transform; }
.mq-cursor > span { width: 100%; height: 100%; border-radius: 50%; background: var(--sky); color: var(--night); display: grid; place-items: center; text-align: center; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; line-height: 1.15; transform: scale(0); transition: transform 380ms cubic-bezier(.2,.9,.3,1.2); }
.mq.is-hover .mq-cursor > span { transform: scale(1); }
@keyframes mq { to { transform: translateX(-50%); } }
@media (hover: none), (pointer: coarse) { .mq { cursor: pointer; } .mq-cursor { display: none; } }
@media (max-width: 860px) { .svc-mq-head { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none; }
  .mq-set + .mq-set, .mq-dup { display: none; }
  .mq-rev .mq-track { margin-left: -12vw; }
  .mq-cursor { display: none; } .mq { cursor: pointer; }
}

.portrait.has-photo { background: var(--ice); }
.portrait.has-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; }

/* ---------- mobile scroll smoothness ---------- */
/* Overscroll / toolbar gaps show navy (matches header + footer) instead of white */
html { background: var(--night); }
@media (max-width: 900px) {
  /* Header keeps one height on phones: shrinking it mid-scroll reflowed the whole page */
  :root { --header-h: 68px; }
  .site-header .bar, .site-header.condensed .bar { height: var(--header-h); transition: none; }
  /* Book/Call bar: its own layer, and a navy apron below it so Safari's toolbar
     animation never reveals a strip of white page underneath */
  .mobile-book { will-change: transform; transform: translateZ(0); background: var(--night); }
  .mobile-book::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 120px; background: var(--night); pointer-events: none; }
  /* Lighter reveal on phones: skip the image zoom (big repaint), keep the wipe */
  .js .reveal-img img { transform: none; transition: none; }
}
