/* Smile Craft Dental shared styles. Values come from tokens.css. */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 9rem;
  scrollbar-gutter: stable; /* locking scroll for the menu must not change page width and reflow text */
}
body {
  background: var(--porcelain);
  color: var(--ink);
  font: 400 var(--fs-0)/var(--lh-body) var(--font-body);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 4.5rem; /* room for the mobile call/book bar */
}
img {
  display: block;
  max-width: 100%;
}
h1,
h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  text-wrap: balance;
}
h3 {
  font-size: var(--fs-1);
  font-weight: 600;
  line-height: 1.3;
}
p {
  max-width: var(--measure);
}
a {
  color: inherit;
}
svg {
  flex: none;
}
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: 92rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 4rem);
}
.section {
  padding-top: var(--gap-section);
}
.muted {
  color: var(--ink-soft);
}
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: var(--space-2);
  top: var(--space-2);
  z-index: 50;
  background: var(--enamel);
  padding: var(--space-1) var(--space-2);
}

/* ---------- Buttons, pills, tags ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0 var(--space-3);
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: 600 var(--fs-0)/1 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn svg {
  width: 1.1rem;
  height: 1.1rem;
}
.btn-sm {
  min-height: 2.5rem;
  padding: 0 var(--space-2);
  font-size: 0.9375rem;
}
.btn-book {
  background: var(--genda);
  border-color: var(--genda-deep); /* marigold alone is only 1.9:1 against light pages */
  color: var(--ink);
}
/* Hover deepens toward the edge colour (ink text stays 5.4:1); lightening would fade it into the page */
.btn-book:hover {
  background: color-mix(in srgb, var(--genda), var(--genda-deep) 30%);
}
.btn:active {
  transform: translateY(1px);
}
.btn-ink {
  background: var(--ink);
  color: var(--porcelain);
}
.btn-ink:hover {
  background: color-mix(in srgb, var(--ink), var(--porcelain) 15%);
}
.btn-line {
  border-color: currentColor;
  color: inherit;
  background: none;
}
.btn-line:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--porcelain);
  border: 0;
  cursor: pointer;
  text-decoration: none;
}
.icon-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}
.icon-btn-sm {
  width: 2.25rem;
  height: 2.25rem;
}
.icon-btn-light {
  background: var(--enamel);
  color: var(--ink);
  border: 1px solid var(--line);
}
.icon-btn:hover {
  transform: translateY(-1px);
}

.link-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.35rem 0.35rem 0.35rem 1.25rem;
  background: var(--enamel);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}
.link-pill:hover {
  border-color: var(--ink);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--enamel);
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ---------- Cards and photo frames ---------- */
.card {
  background: var(--enamel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-3);
}
.card-mist {
  background: var(--mist);
  border-color: transparent;
}
.card-title {
  font: 400 var(--fs-2)/1.2 var(--font-display);
}
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--mist);
}
.media > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-dim::after {
  /* keeps white text readable over photos */
  content: "";
  position: absolute;
  inset: 40% 0 0;
  pointer-events: none;
  background: linear-gradient(transparent, color-mix(in srgb, var(--ink) 65%, transparent));
}
.media .corner {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  z-index: 1;
}
.media .corner-left {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 1;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--porcelain) 88%, transparent);
  backdrop-filter: blur(10px);
}
.site-header .wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 4.5rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: auto;
  text-decoration: none;
  font: 400 var(--fs-1)/1 var(--font-display);
}
/* Logo and favicon are the same file: a dental arch seen from above, which also reads as a smile */
.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
}
.site-nav {
  display: none;
}
.site-nav.open {
  display: block;
}
.site-nav ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.25rem;
}
.site-nav ul a {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
}
.site-nav ul a:hover,
.site-nav ul a[aria-current="page"] {
  background: var(--mist);
}
.nav-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
}
.header-call,
.header-book {
  display: none;
}

/* ---------- Home: hero ---------- */
.hero {
  padding-block: var(--space-4) 0; /* the section gap below is enough */
}
.hero h1 {
  /* fills its column (16cqi), never bigger than the fluid hero size */
  font-size: min(16cqi, var(--fs-6));
  letter-spacing: -0.02em;
}
.hero-lede {
  font-size: var(--fs-1);
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
/* ---------- Home: about split ---------- */
.split {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
.story {
  display: grid;
  background: var(--mist);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.story .media {
  border-radius: 0;
  min-height: 18rem;
}
.story-quote {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3);
}
.story-quote blockquote {
  font: 400 var(--fs-1)/1.45 var(--font-display);
}
.person {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.initials {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--enamel);
  font: 400 1rem/1 var(--font-display);
  flex: none;
}
.person small {
  display: block;
  color: var(--ink-soft);
  font-size: 0.8125rem;
}
.about-copy {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}
.about-copy h2 {
  font-size: var(--fs-4);
}
.about-copy p {
  font-size: var(--fs-1);
  color: var(--ink-soft);
}

/* ---------- Home: bento ---------- */
.bento {
  display: grid;
  gap: var(--space-3);
}
.bento-stack {
  display: grid;
  gap: clamp(var(--space-3), 3vw, var(--space-4));
}
.team-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
  list-style: none;
  padding: 0;
}
.team-row a {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  width: 4.75rem;
  text-align: center;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
}
.team-row img {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--enamel);
  transition: border-color 0.2s;
}
.team-row a:hover img {
  border-color: var(--genda);
}
.media-tall {
  min-height: 26rem;
}
.media-caption {
  position: absolute;
  z-index: 1;
  left: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--enamel);
}
.media-caption h3 {
  font: 400 var(--fs-2)/1.2 var(--font-display);
  max-width: 22ch;
}

/* Shade guide: the signature element */
.tabs {
  display: flex;
  gap: clamp(0.5rem, 1.6vw, 1.25rem);
  justify-content: space-between;
  padding: var(--space-2) 2px var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.tab {
  flex: 1 0 2.25rem;
  max-width: 3rem;
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: 600 0.875rem/1 var(--font-body);
  color: var(--ink-soft);
  scroll-snap-align: center;
}
.tab::before {
  content: "";
  width: 0.5rem;
  height: 1.25rem;
  background: var(--line);
  border-radius: 2px;
}
.crown {
  width: 100%;
  height: 4.25rem;
  border-radius: var(--radius-tab);
  background: linear-gradient(
    var(--c) 0 68%,
    color-mix(in srgb, var(--c), #e3ebee 60%)
  );
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c), var(--ink) 10%);
  transition: transform 0.2s;
}
.tab:hover .crown {
  transform: translateY(-3px);
}
.tab:focus-visible {
  outline-offset: 6px;
}
.tab[aria-pressed="true"] {
  color: var(--ink);
}
.tab[aria-pressed="true"] .crown {
  outline: 3px solid var(--gingiva);
  outline-offset: 3px;
}
.tab::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
}
.tab[aria-pressed="true"]::after {
  background: var(--gingiva);
}
.shade-result {
  margin-top: var(--space-1);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line);
  min-height: 4.5em;
}
.guide-note {
  margin-top: var(--space-1);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
/* ---------- Home: children + treatments carousel ---------- */
.support-top {
  display: grid;
  gap: var(--space-4);
}
.kids {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--mist);
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 20rem;
}
.kids-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-3);
}
.kids-copy h3 {
  font: 400 var(--fs-2)/1.2 var(--font-display);
}
.kids .media {
  border-radius: 0;
}
.support-head {
  display: grid;
  gap: var(--space-2);
  align-content: center;
}
.support-head h2 {
  font-size: var(--fs-4);
  max-width: 20ch;
}
.support-head .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}
/* ---------- Home: reassurance strip ---------- */
.assure {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  list-style: none;
  padding: var(--space-4) 0;
  border-block: 1px solid var(--line);
}
.assure li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.assure svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--ink);
}

/* ---------- Home: blog teaser ---------- */
.row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-4);
}
.row-head h2 {
  font-size: var(--fs-4);
  max-width: 18ch;
}
.row-head p {
  color: var(--ink-soft);
  max-width: 36ch;
}
.blog-grid {
  display: grid;
  gap: var(--space-4) var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  list-style: none;
  padding: 0;
}
.b-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-decoration: none;
}
.b-card .media {
  aspect-ratio: 4 / 5;
}
.blog-grid li:nth-child(even) .b-card .media {
  aspect-ratio: 4 / 3;
} /* staggered heights, as in the reference */
.b-card h3 {
  font: 400 var(--fs-1)/1.3 var(--font-display);
}
.b-card:hover h3 {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.b-meta {
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ---------- Call to action band ---------- */
.cta {
  display: grid;
  gap: var(--space-4);
  overflow: hidden;
  background: var(--ink);
  color: var(--porcelain);
  border-radius: var(--radius-card);
  padding: var(--space-6) var(--space-3);
}
.cta :focus-visible {
  outline-color: var(--genda);
}
.cta h2 {
  font-size: var(--fs-5);
}
.cta p {
  color: color-mix(in srgb, var(--porcelain) 78%, var(--ink));
  font-size: var(--fs-1);
  margin-top: var(--space-2);
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-4);
}
.cta .media {
  display: none;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--gap-section);
  background: var(--mist);
  padding-block: var(--space-8) var(--space-3);
}
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}
.footer-lead {
  font: 400 var(--fs-3)/1.15 var(--font-display);
  max-width: 14ch;
}
.footer-grid h2 {
  font: 600 var(--fs-0)/1.3 var(--font-body);
  margin-bottom: var(--space-2);
}
.footer-grid ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.footer-grid a {
  color: var(--ink-soft);
  text-decoration: none;
}
.footer-grid a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.footer-grid address {
  font-style: normal;
  color: var(--ink-soft);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  font-size: 0.875rem;
  color: var(--ink-soft);
}

/* ---------- Mobile call / book bar ---------- */
.mobile-bar {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2)
    calc(var(--space-1) + env(safe-area-inset-bottom));
  background: var(--porcelain);
  border-top: 1px solid var(--line);
}

/* ---------- Inner pages ---------- */
.page-hero {
  display: grid;
  gap: var(--space-4);
  align-items: center;
  padding-block: var(--space-3) var(--space-6);
}
.page-hero-copy {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
}
.crumbs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.crumbs li + li::before {
  content: "/";
  margin-right: 0.5rem;
}
.page-hero h1 {
  font-size: var(--fs-6);
}
.lede {
  font-size: var(--fs-1);
  color: var(--ink-soft);
}
.page-hero .media {
  aspect-ratio: 16 / 11;
}
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
}
.jump a {
  display: block;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--enamel);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
}
.jump a:hover {
  border-color: var(--ink);
}

.block {
  display: grid;
  gap: var(--space-4);
  padding-block: calc(var(--gap-section) / 2);
  border-top: 1px solid var(--line);
  align-items: start;
}
.block > .media {
  aspect-ratio: 4 / 3;
}
.block h2 {
  font-size: var(--fs-4);
}
.block-intro {
  color: var(--ink-soft);
  font-size: var(--fs-1);
  margin-top: var(--space-1);
}

/* Treatments */
.t-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
  list-style: none;
  padding: 0;
}
.t-item {
  display: grid;
  gap: 0.25rem;
  padding: var(--space-2) var(--space-3);
  background: var(--enamel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.t-item-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem var(--space-2);
}
.t-item p {
  color: var(--ink-soft);
}
.dur {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.steps {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-3);
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  gap: var(--space-1);
  padding: var(--space-3);
  background: var(--mist);
  border-radius: var(--radius-sm);
}
.steps li::before {
  content: counter(step);
  font: 400 var(--fs-3)/1 var(--font-display);
  color: var(--ink);
}
.steps p {
  color: var(--ink-soft);
}

.faq details {
  border-top: 1px solid var(--line);
  padding-block: var(--space-3);
}
.faq details:last-child {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--fs-1);
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font: 400 var(--fs-2)/1 var(--font-display);
  color: var(--ink-soft);
}
.faq details[open] summary::after {
  content: "−";
}
.faq details p {
  margin-top: var(--space-2);
  color: var(--ink-soft);
}

/* Doctors */
.doc > .media {
  aspect-ratio: 4 / 5;
  max-width: 28rem;
}
.doc-role {
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: var(--space-1);
}
.doc p.bio {
  font-size: var(--fs-1);
  margin-top: var(--space-3);
}
.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin-top: var(--space-3);
}
.facts-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem var(--space-3);
  margin-top: var(--space-3);
}
.facts-list dt {
  font-weight: 600;
}
.facts-list dd {
  color: var(--ink-soft);
}

/* Clinics */
.gallery {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-2);
  height: 24rem;
}
.gallery .media:first-child {
  grid-row: span 2;
}
.clinic-info {
  display: grid;
  gap: var(--space-4);
}
.hours {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-2);
}
.hours th,
.hours td {
  text-align: left;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}
.hours th {
  font-weight: 600;
}
.hours td {
  color: var(--ink-soft);
}
.map {
  display: block;
  width: 100%;
  height: 22rem;
  border: 0;
  border-radius: var(--radius-card);
  background: var(--mist);
}

/* Blog */
.prose {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.prose ul,
.prose ol {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
  max-width: var(--measure);
}
.prose li::marker {
  color: var(--genda);
}

/* Booking */
.book {
  display: grid;
  gap: var(--space-4);
  align-items: start;
}
.form {
  display: grid;
  grid-template-columns: minmax(
    0,
    1fr
  ); /* long option text must not widen the form past its card */
  gap: var(--space-3);
}
.field {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}
.field label {
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  min-height: 3rem;
  padding: 0.6rem var(--space-2);
  font: inherit;
  color: var(--ink);
  background: var(--porcelain);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-ui);
}
.field textarea {
  min-height: 6rem;
  resize: vertical;
}
.field small {
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.form .btn-book {
  justify-self: start;
}
.aside {
  display: grid;
  gap: var(--space-3);
}
.big-phone {
  font: 400 var(--fs-3)/1.1 var(--font-display);
  text-decoration: none;
}

/* Grids default to an auto column sized by content; pin them so scroll rows (shade tabs) can't widen the page */
.bento,
.bento-stack,
.support-top,
.split,
.book,
.clinic-info,
.page-hero,
.block {
  grid-template-columns: minmax(0, 1fr);
}
/* ---------- Breakpoints ---------- */
@media (min-width: 36rem) {
  .story {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (min-width: 48rem) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .form {
    grid-template-columns: 1fr 1fr;
  }
  .form .wide,
  .form .btn-book {
    grid-column: 1 / -1;
  }
  .clinic-info {
    grid-template-columns: 1fr 1fr;
  }
  .card {
    padding: var(--space-4);
  }
  .cta {
    padding: var(--space-8) var(--space-6);
  }
}
@media (min-width: 64rem) {
  body {
    padding-bottom: 0;
  }
  .mobile-bar,
  .nav-toggle {
    display: none;
  }
  .site-nav {
    display: block;
    background: var(--enamel);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.3rem;
  }
  .site-nav ul {
    display: flex;
  }
  .site-nav ul a {
    padding: 0.5rem 1rem;
  }
  .header-call,
  .header-book {
    display: inline-flex;
  }
  .header-call {
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    text-decoration: none;
  }
  .header-call svg {
    width: 1rem;
    height: 1rem;
  }

  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .bento {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .support-top {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .cta {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: center;
  }
  .cta .media {
    display: block;
    aspect-ratio: 4 / 3;
  }
  .page-hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .block {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
  .block.flip > .media {
    order: 2;
  }
  .block.flip {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .doc {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    align-items: center;
  }
  .doc.flip {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  }
  .book {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }
  .gallery {
    height: 30rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Helpers (replace one-off inline styles) ---------- */
.block + .section {
  padding-top: calc(var(--gap-section) / 2);
}
.card-sub {
  margin-top: var(--space-1);
}
.card .form {
  margin-top: var(--space-3);
}
.block-cta {
  margin-top: var(--space-3);
}
.block .b-meta {
  margin-top: var(--space-1);
}
.row-head-tight {
  margin-bottom: 0;
}
.footer-sub {
  margin-top: var(--space-2);
}
.aside .card > * + * {
  margin-top: var(--space-1);
}
@media (min-width: 48rem) {
  .block.block-full {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Sticky section bar on long pages ---------- */
.jump-bar {
  position: sticky;
  top: 4.5rem;
  z-index: 20;
  padding-block: var(--space-1);
  background: color-mix(in srgb, var(--porcelain) 88%, transparent);
  backdrop-filter: blur(10px);
}
.jump-bar .jump {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.jump-bar .jump a {
  white-space: nowrap;
}
.jump a.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--porcelain);
}

/* ---------- Open now / closed status ---------- */
[data-open-status] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
[data-open-status]::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--genda);
  flex: none;
}
[data-open-status][data-open="true"]::before {
  background: var(--open);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--open) 18%, transparent);
}
.status-line {
  font-weight: 600;
  margin-top: var(--space-1);
}

/* ---------- Carousel ends ---------- */
.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
  transform: none;
}

/* ---------- Footer wordmark ---------- */
.footer-mark {
  margin-top: var(--space-6);
  font: 400 clamp(4rem, 16vw, 15rem)/0.85 var(--font-display);
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: color-mix(in srgb, var(--ink) 9%, var(--mist));
  user-select: none;
}

/* ---------- Modern layer ---------- */
p,
li,
dd {
  text-wrap: pretty;
}
@view-transition {
  navigation: auto;
} /* soft cross-fade between pages in supporting browsers */

/* Header lifts off the page once you scroll (scroll-driven, no JS) */
@supports (animation-timeline: scroll()) {
  .site-header {
    animation: header-lift linear both;
    animation-timeline: scroll();
    animation-range: 0 140px;
  }
  @keyframes header-lift {
    to {
      box-shadow:
        0 1px 0 var(--line),
        0 12px 32px -24px color-mix(in srgb, var(--ink) 50%, transparent);
    }
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* ---------- Mobile fixes ---------- */
@media (max-width: 35.99rem) {
  .kids {
    grid-template-columns: minmax(0, 1fr);
  }
  .kids .media {
    min-height: 14rem;
    order: -1;
  }
}

/* Header: keep links on one line; the phone number returns once there's room for it */
.site-nav ul a,
.header-call {
  white-space: nowrap;
}
@media (min-width: 64rem) and (max-width: 79.99rem) {
  .header-call {
    display: none;
  }
} /* stays on one line on 320px phones */

/* Footer on phones: brand line full width, link lists two per row */
@media (max-width: 47.99rem) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4) var(--space-3);
  }
  .footer-grid > :first-child,
  .footer-grid > :last-child {
    grid-column: 1 / -1;
  } /* brand + Visit us full width */
}

/* Booking form: long option text must not widen the form past its card */
.field select,
.field input,
.field textarea {
  min-width: 0;
  width: 100%;
}
@media (min-width: 48rem) {
  .form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

/* ---------- Mobile menu ---------- */
.nav-toggle .i-close {
  display: none;
}
.nav-toggle[aria-expanded="true"] .i-open {
  display: none;
}
.nav-toggle[aria-expanded="true"] .i-close {
  display: block;
}
.nav-extra {
  display: none;
}
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 25;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}
.nav-backdrop[hidden] {
  display: none;
}
body.menu-open {
  overflow: hidden;
} /* page behind the menu stays put */
body.menu-open .mobile-bar {
  display: none;
} /* the menu carries its own actions */

@media (max-width: 63.99rem) {
  .site-nav ul a {
    padding: 0.9rem 1.1rem;
    font-size: var(--fs-1);
    border-radius: var(--radius-sm);
  }
  .site-nav ul a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--genda);
  }
  .nav-extra .status-line {
    margin: 0 0 var(--space-1);
    font-size: 0.9375rem;
  }
  .nav-extra-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-1);
  }
}

/* Clinic gallery on phones: main photo full width, the other two side by side below */
@media (max-width: 47.99rem) {
  .gallery {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: none;
    height: auto;
    gap: var(--space-1);
  }
  .gallery .media {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-sm);
  }
  .gallery .media:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 16 / 11;
    border-radius: var(--radius-card);
  }
}

/* ---------- Clinic details ---------- */
.clinic-details {
  display: grid;
  gap: var(--space-4);
  align-content: start;
}
.detail-group {
  display: grid;
  gap: var(--space-2);
}
.detail-group h3 {
  font: 600 var(--fs-0)/1.3 var(--font-body);
}
.status-chip {
  width: fit-content;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  background: var(--mist);
  font-weight: 600;
  font-size: 0.9375rem;
}
.clinic-cta {
  display: grid;
  gap: var(--space-1);
}
.clinic-cta .btn-book {
  width: 100%;
}
.clinic-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-1);
}
.quick {
  display: grid;
  justify-items: center;
  gap: 0.35rem;
  padding: 0.8rem 0.5rem;
  min-height: 4.25rem;
  background: var(--enamel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}
.quick svg {
  width: 1.3rem;
  height: 1.3rem;
}
.quick:hover {
  border-color: var(--ink);
}

.hours-list {
  background: var(--enamel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.hours-list > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  padding: 0.85rem 1rem;
}
.hours-list > div + div {
  border-top: 1px solid var(--line);
}
.hours-list dt {
  font-weight: 600;
}
.hours-list dd {
  white-space: nowrap; /* each time range stays on one line */
  text-align: right;
  color: var(--ink-soft);
}
.hours-list .today {
  background: var(--mist);
}
.hours-list .today dt::after {
  content: "Today";
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--porcelain);
  font-size: 0.75rem;
  vertical-align: 0.1em;
}

.info-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.info-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.info-list svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  color: var(--ink-soft);
}
.info-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.doc-chips {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.doc-chips a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.85rem 0.3rem 0.3rem;
  border-radius: 999px;
  background: var(--enamel);
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}
.doc-chips a:hover {
  border-color: var(--ink);
}
.doc-chips img {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  object-fit: cover;
}
@media (max-width: 47.99rem) {
  .map {
    height: 16rem;
  }
}
@media (min-width: 48rem) {
  .clinic-info {
    align-items: start;
  }
  .clinic-info .map {
    position: sticky;
    top: 9rem;
    height: 26rem;
  } /* map stays beside the details while you read */
}

/* ---------- Booking: validation and confirmation ---------- */
.field-error {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  color: var(--error);
  font-size: 0.875rem;
  font-weight: 600;
}
.field-error::before {
  content: "!";
  flex: none;
  display: grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  border-radius: 50%;
  background: var(--error);
  color: var(--enamel);
  font-size: 0.75rem;
  line-height: 1;
}
.field-error[hidden] {
  display: none;
}
.field [aria-invalid="true"] {
  border-color: var(--error);
  background: color-mix(in srgb, var(--error) 5%, var(--porcelain));
}
.field [aria-invalid="true"]:focus-visible {
  outline-color: var(--error);
}
.form-alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-ui);
  background: color-mix(in srgb, var(--error) 8%, var(--enamel));
  border-left: 4px solid var(--error);
  color: var(--error);
  font-weight: 600;
}
.form-alert[hidden] {
  display: none;
}
@media (min-width: 48rem) {
  .form .form-alert {
    grid-column: 1 / -1;
  }
}

.confirm {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
  animation: rise-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.confirm[hidden] {
  display: none;
}
.confirm h2:focus {
  outline: none;
}
.confirm-icon {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: var(--open);
  color: var(--enamel);
}
.confirm-icon svg {
  width: 1.9rem;
  height: 1.9rem;
}
.confirm-list {
  width: 100%;
  background: var(--porcelain);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.confirm-list > div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 0.8rem 1rem;
}
.confirm-list > div + div {
  border-top: 1px solid var(--line);
}
.confirm-list dt {
  color: var(--ink-soft);
}
.confirm-list dd {
  font-weight: 600;
  text-align: right;
}
.confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}
.confirm [data-out="phone"],
.confirm a[href^="tel"] {
  white-space: nowrap;
}

/* ---------- Spacing pass: more air between and inside sections ---------- */
/* Kept separate on purpose: it must come after .row-head-tight, which it currently overrides on the Clinics page */
.row-head {
  margin-bottom: var(--space-6);
}
.row-head h2,
.about-copy h2,
.support-head h2 {
  font-size: var(--fs-5);
  letter-spacing: -0.015em;
}
.split,
.bento,
.support-top,
.book {
  gap: clamp(var(--space-3), 4vw, var(--space-8));
}
@media (min-width: 48rem) {
  .card,
  .kids-copy,
  .story-quote {
    padding: var(--space-6) var(--space-4);
  }
}

.shade-hero {
  display: grid;
  gap: var(--space-4);
  margin-top: clamp(var(--space-6), 7vw, var(--space-12));
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.shade-head {
  display: grid;
  gap: var(--space-1);
}
.shade-head h2 {
  font-size: var(--fs-4);
}
.shade-head p {
  max-width: 52ch;
}
.shade-hero .tab {
  flex: 1 0 2.75rem;
  max-width: none;
  font-size: 0.9375rem;
}
.shade-hero .tab::before {
  width: 0.6rem;
  height: clamp(1.25rem, 3vw, 2.5rem);
}
.shade-hero .crown {
  height: clamp(5.5rem, 13vw, 12rem);
}
.shade-hero .tab[aria-pressed="true"] .crown {
  transform: translateY(-0.6rem);
}
.shade-out {
  display: grid;
  gap: var(--space-2);
  justify-items: start;
  align-content: end;
}
.shade-out .shade-result {
  font: 400 var(--fs-2)/1.3 var(--font-display);
  margin: 0;
  padding: 0;
  border: 0;
  min-height: 3.9em;
}

@media (min-width: 64rem) {
  .hero-side {
    padding-bottom: 0.6rem;
  } /* sit on the heading's baseline */
  .shade-hero {
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    column-gap: var(--space-8);
  }
  .shade-head {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
  }
}

/* Specialist card shares a row with a tall photo: heading at the top, faces at the base */
.bento-stack .card {
  display: flex;
  flex-direction: column;
}
.bento-stack .team-row {
  margin-top: auto;
  padding-top: var(--space-4);
}

/* ---------- Home hero: full photo behind the headline ---------- */
.hero-photo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  align-items: end;
  min-height: calc(100svh - 5.5rem);
  margin-inline: clamp(0.5rem, 1.5vw, 1.5rem);
  padding-block: var(--space-12) clamp(var(--space-6), 6vw, var(--space-12));
  border-radius: var(--radius-card);
  color: var(--porcelain);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 115%;
  object-fit: cover;
  object-position: 70% 35%;
} /* extra height for the parallax drift */
/* One photo per "Who's the visit for?" choice; the chosen one fades in over the others */
.hero-bg img:not(.on) {
  opacity: 0;
}
.hero-bg img {
  transition: opacity 0.8s ease;
}
.hero-bg [data-for="child"] {
  object-position: 80% 30%;
}
.hero-bg [data-for="parent"] {
  object-position: 60% 30%;
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg img {
    transition: none;
  }
}
.hero-bg::after {
  /* deep teal from the bottom-left keeps the text readable on any part of the photo */
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      color-mix(in srgb, var(--ink) 92%, transparent),
      color-mix(in srgb, var(--ink) 45%, transparent) 55%,
      color-mix(in srgb, var(--ink) 10%, transparent)
    ),
    linear-gradient(to right, color-mix(in srgb, var(--ink) 60%, transparent), transparent 65%);
}
.hero-inner {
  width: 100%; /* a size container centred with auto margins would otherwise collapse to 0 */
  container-type: inline-size;
  display: grid;
  gap: var(--space-4);
  align-items: end;
}
.hero-photo h1 {
  color: var(--porcelain);
  font-size: min(15cqi, var(--fs-6));
}
.hero .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.1em;
  margin-bottom: -0.1em;
} /* mask for the line rise */
.hero .line > span {
  display: block;
}
.hero-side {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
}
.hero-photo .hero-lede {
  color: color-mix(in srgb, var(--porcelain) 86%, transparent);
}
.hero-photo .btn-line {
  color: var(--porcelain);
}
.hero-status {
  display: grid;
  gap: 0.35rem;
  justify-items: start;
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--porcelain) 80%, transparent);
}
.hero-status a {
  text-underline-offset: 0.2em;
}
.hero-status a:hover {
  color: var(--porcelain);
}

/* "Who's the visit for?": native radios styled as one pill bar on the photo */
.who {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.who[hidden] {
  display: none;
} /* display: flex would otherwise beat the hidden attribute */
.who legend {
  padding: 0;
  margin-bottom: var(--space-1);
  font-size: 0.9375rem;
  color: color-mix(in srgb, var(--porcelain) 80%, transparent);
}
.who label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--porcelain) 12%, transparent);
  backdrop-filter: blur(8px);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 0.25s,
    color 0.25s;
}
.who label:hover {
  background: color-mix(in srgb, var(--porcelain) 22%, transparent);
}
.who input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.who label:has(:checked) {
  background: var(--porcelain);
  color: var(--ink);
}
.who label:has(:focus-visible) {
  outline: 3px solid var(--genda);
  outline-offset: 3px;
}
.hero-photo :focus-visible {
  outline-color: var(--genda);
}
/* Hidden until GSAP plays the entrance (the class is removed if GSAP never loads) */
.motion .hero .line > span {
  transform: translateY(105%);
}
.motion .hero-side > * {
  opacity: 0;
}
@media (min-width: 64rem) {
  .hero-inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--space-8);
  }
}

/* Shade guide now has its own section */
.shade-section .shade-hero {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

/* ---------- Treatments: cards that stack as you scroll ---------- */
.stack {
  list-style: none;
  padding: 0;
  margin-top: var(--space-6);
  display: grid;
  gap: var(--space-4);
}
/* .stack-card is the item that pins; .stack-inner is the panel you see, and the part that shrinks */
.stack-card {
  position: sticky;
  top: calc(5.5rem + var(--i) * 0.75rem);
} /* each card pins a little lower than the last */
.stack-inner {
  display: grid;
  overflow: hidden;
  transform-origin: 50% 0;
  background: var(--enamel);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: 0 -18px 40px -28px color-mix(in srgb, var(--ink) 45%, transparent);
}
.stack-card[data-tone="mist"] .stack-inner {
  background: var(--mist);
  border-color: transparent;
}
.stack-card[data-tone="ink"] .stack-inner {
  background: var(--ink);
  border-color: transparent;
  color: var(--porcelain);
}
.stack-media {
  position: relative;
  overflow: hidden;
  min-height: 13rem;
}
.stack-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stack-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-3);
}
.stack-body h3 {
  font: 400 var(--fs-4)/1.1 var(--font-display);
  letter-spacing: -0.01em;
}
.stack-body p {
  font-size: var(--fs-1);
  color: var(--ink-soft);
  max-width: 38ch;
}
.stack-foot {
  margin-top: auto;
  padding-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}
.stack-card[data-tone="mist"] .tag {
  background: var(--enamel);
}
.stack-card[data-tone="ink"] p {
  color: color-mix(in srgb, var(--porcelain) 78%, var(--ink));
}
.stack-card[data-tone="ink"] .tag {
  background: rgb(255 255 255 / 0.1);
  border-color: transparent;
  color: var(--porcelain);
}
.stack-card[data-tone="ink"] .link-pill {
  background: none;
  border-color: rgb(255 255 255 / 0.35);
  color: var(--porcelain);
}
.stack-card[data-tone="ink"] .link-pill .icon-btn {
  background: var(--genda);
  color: var(--ink);
}
.stack-card[data-tone="ink"] :focus-visible {
  outline-color: var(--genda);
}
.stack-more {
  margin-top: var(--space-6);
}
@media (min-width: 48rem) {
  .stack-card {
    top: calc(7rem + var(--i) * 1.25rem);
  }
  .stack-inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: min(26rem, 60svh);
  }
  .stack-body {
    padding: var(--space-6);
  }
}

/* Inner page heroes: hidden until GSAP plays their entrance (the class goes if GSAP never loads) */
.motion .page-hero-copy > * {
  opacity: 0;
}
.motion .page-hero .media {
  clip-path: inset(100% 0 0 0);
}

/* ---------- Mobile menu motion (CSS only) ---------- */
@media (max-width: 63.99rem) {
  /* Panel styles live on the menu itself, not only .open, so it keeps its shape while closing */
  .site-nav {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: var(--space-2);
    right: var(--space-2);
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: var(--space-2);
    background: var(--enamel);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: 0 20px 40px -20px color-mix(in srgb, var(--ink) 35%, transparent);
    transform-origin: top right;
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    transition:
      opacity 0.22s ease,
      transform 0.22s ease,
      display 0.22s allow-discrete; /* fades out too */
  }
  .site-nav.open {
    opacity: 1;
    transform: none;
    animation: none;
  }
  @starting-style {
    .site-nav.open {
      opacity: 0;
      transform: translateY(-10px) scale(0.98);
    }
  }
  .site-nav .nav-extra {
    display: grid;
    gap: var(--space-1);
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--line);
  }

  /* Links arrive one after another */
  .site-nav.open ul li,
  .site-nav.open .nav-extra {
    animation: link-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }
  .site-nav.open ul li:nth-child(2) {
    animation-delay: 40ms;
  }
  .site-nav.open ul li:nth-child(3) {
    animation-delay: 80ms;
  }
  .site-nav.open ul li:nth-child(4) {
    animation-delay: 120ms;
  }
  .site-nav.open ul li:nth-child(5) {
    animation-delay: 160ms;
  }
  .site-nav.open .nav-extra {
    animation-delay: 220ms;
  }

  /* Backdrop fades both ways */
  .nav-backdrop {
    animation: none;
    opacity: 1;
    transition:
      opacity 0.25s ease,
      display 0.25s allow-discrete;
  }
  .nav-backdrop[hidden] {
    opacity: 0;
  }
  @starting-style {
    .nav-backdrop:not([hidden]) {
      opacity: 0;
    }
  }

  /* The close icon turns in */
  .nav-toggle[aria-expanded="true"] .i-close {
    animation: turn-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  }
}
@keyframes link-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
@keyframes turn-in {
  from {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
  }
}

/* ScrollTrigger measures by jumping to the top and back; page-level smooth scrolling turns that jump
   into a slow scroll, so a reload below the hero measured every trigger ~2500px off. In-page links
   still scroll smoothly via main.js. */
html.motion {
  scroll-behavior: auto;
}
