/* Client revision V27. Keep existing type, colour themes and unrelated sections. */

/* Hero: title, specialties, tagline, location, then the existing introduction. */
html body.client-update-v27[data-page="home"] .hero-copy { display: block; }
html body.client-update-v27[data-page="home"] .hero-copy > * { order: initial; }
html body.client-update-v27[data-page="home"] .hero-copy > h1 { margin-bottom: 16px; }
html body.client-update-v27[data-page="home"] .hero-copy > .hero-specialty { margin: 0 0 18px; }
html body.client-update-v27[data-page="home"] .hero-copy > .hero-tagline { margin: 0 0 9px; }
html body.client-update-v27[data-page="home"] .hero-section .hero-copy > .eyebrow {
  display: flex; align-items: center; justify-content: flex-start; gap: 9px;
  margin: 0 0 20px; font-size: 13px !important; line-height: 1.5; letter-spacing: .07em;
}
html body.client-update-v27[data-page="home"] .hero-copy > .hero-qualification { margin: 0 0 18px; }

/* A deliberate two-line team heading; no duplicate doctor summaries. */
html body.client-update-v27[data-page="home"] .home-specialists-grid { gap: clamp(24px,4vw,52px); }
html body.client-update-v27[data-page="home"] .home-specialists-copy { container-type: inline-size; }
html body.client-update-v27[data-page="home"] #home-specialists-heading {
  font-size: clamp(20px,2.6vw,36px); font-size: clamp(20px,6cqi,40px);
  line-height: 1.22; letter-spacing: -.025em; margin: 14px 0 18px; max-width: none;
}
html body.client-update-v27[data-page="home"] #home-specialists-heading > span { display: block; white-space: nowrap; }
html body.client-update-v27[data-page="home"] .home-team-intro { margin: 0 0 22px; font-size: 16px; line-height: 1.75; }
html body.client-update-v27[data-page="home"] .home-specialists-portrait {
  height: clamp(290px,28vw,380px); min-height: 0; aspect-ratio: auto; border-radius: 20px;
}
html body.client-update-v27[data-page="home"] .home-specialists-portrait img { height: 100%; min-height: 0; }

/* Home has concise profile previews; About holds every clinical detail. */
html body.client-update-v27[data-page="home"] #qualifications .profile-preview-header { display: grid; grid-template-columns: 136px minmax(0,1fr); gap: 20px; align-items: center; padding: 22px 22px 18px; }
html body.client-update-v27[data-page="home"] #qualifications .credential-profile { width: 136px; height: 164px; min-height: 0; aspect-ratio: auto; border-radius: 12px; overflow: hidden; }
html body.client-update-v27[data-page="home"] #qualifications .profile-preview-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-width: 0; }
html body.client-update-v27[data-page="home"] #qualifications .credential-profile img { object-position: center 22%; }
html body.client-update-v27[data-page="home"] #qualifications #home-doctor-pratheepa .credential-profile img { object-position: center 15%; }
html body.client-update-v27[data-page="home"] #qualifications .credential-copy { padding: 0 22px 22px; gap: 0; }
html body.client-update-v27[data-page="home"] #qualifications .client-doctor-name { font-family: Georgia,"Times New Roman",serif; font-size: clamp(22px,1.85vw,27px); line-height: 1.25; letter-spacing: -.025em; white-space: normal; margin: 0; }
html body.client-update-v27[data-page="home"] #qualifications .doctor-degree-badge { padding: 6px 9px; margin: 0; gap: 7px; }
html body.client-update-v27[data-page="home"] #qualifications .doctor-degree-badge > span { font-size: 18px; }
html body.client-update-v27[data-page="home"] #qualifications .doctor-degree-badge strong { font-size: 12px; letter-spacing: 0; }
html body.client-update-v27[data-page="home"] #qualifications .doctor-experience-inline { font-size: 12px; line-height: 1.5; }
html body.client-update-v27[data-page="home"] #qualifications .doctor-title { font-size: 15px; line-height: 1.55; margin: 0 0 18px; }
.home-profile-actions { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; align-items: stretch; margin-top: auto; }
html body.client-update-v27[data-page="home"] #qualifications .credential-more { align-self: stretch; margin: 0; min-height: 48px; padding: 12px 16px; white-space: nowrap; }
.home-profile-actions .doctor-booking-button { display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 62px; padding: 12px 16px; border-radius: 12px; text-align: left; font-size: 12px; line-height: 1.5; }
.doctor-booking-button strong { font: inherit; font-size: 14px; }
.doctor-booking-button svg { width: 20px; height: 20px; flex: 0 0 20px; }

/* Full profiles: natural-height columns and clearly grouped expertise. */
html body.client-update-v27[data-page="about"] .about-kicker { color: var(--blue) !important; margin: 0 0 12px; font-size: 12px; line-height: 1.5; letter-spacing: .1em; }
html body.client-update-v27[data-page="about"] .about-intro { color: var(--ink); margin: 20px 0 24px; font-size: 17px; line-height: 1.75; max-width: 60ch; }
html body.client-update-v27[data-page="about"] .doctors-section .split-heading { align-items: center; }
html body.client-update-v27[data-page="about"] .doctors-section .split-heading > p { margin: 0; line-height: 1.7; max-width: 55ch; }
html body.client-update-v27[data-page="about"] .doctor-grid { align-items: start; }
html body.client-update-v27[data-page="about"] .doctor-grid .doctor-card { height: auto; align-self: start; }
html body.client-update-v27[data-page="about"] .doctor-grid .doctor-portrait { height: clamp(280px,27vw,350px); min-height: 0; aspect-ratio: auto; }
html body.client-update-v27[data-page="about"] .doctor-grid .doctor-portrait img { height: 100%; min-height: 0; object-fit: cover; object-position: center 22%; }
html body.client-update-v27[data-page="about"] #dr-pratheepa-ranjith .doctor-portrait img { object-position: center 15%; }
html body.client-update-v27[data-page="about"] .doctor-card-body { padding: 24px; }
html body.client-update-v27[data-page="about"] .doctor-card-body .doctor-description { margin-bottom: 22px; }
html body.client-update-v27[data-page="about"] .expertise-box .doctor-focus { display: grid; gap: 9px; padding-left: 19px; margin: 0; list-style: disc; }
html body.client-update-v27[data-page="about"] .expertise-box .doctor-focus li { padding: 0; border: 0; background: transparent; line-height: 1.65; }
html body.client-update-v27[data-page="about"] .expertise-box .doctor-focus li::before { display: none; }
html body.client-update-v27[data-page="about"] .expertise-box .doctor-focus li::marker { color: var(--blue); }
html body.client-update-v27[data-page="about"] .expertise-groups { gap: 20px; }
html body.client-update-v27[data-page="about"] .expertise-groups > section + section { border-top: 1px solid var(--line); padding-top: 18px; }
html body.client-update-v27[data-page="about"] .doctor-grid .doctor-cta { margin-top: 0; min-height: 48px; line-height: 1.5; }

/* Retain the approved two-part treatment introduction, with measured spacing. */
html body.client-update-v27[data-page="home"] .services-section > .section-shell > .section-heading:first-child { margin-bottom: 18px; }
html body.client-update-v27[data-page="home"] .explore-treatment-options { margin: 0 0 22px; }
html body.client-update-v27[data-page="home"] .home-treatment-heading { padding-top: 22px; margin-bottom: 16px; }

/* Small, consistent treatment cards: image, name and appointment action only. */
html body.client-update-v27[data-page="home"] .home-treatment-stack .home-treatment-card,
html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll .treatment-bento-card {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; height: auto;
  width: 100%; margin: 0; grid-column: auto; grid-row: auto;
  border: 1px solid var(--line); border-radius: 16px; box-shadow: none; transform: none;
}
html body.client-update-v27[data-page="home"] .home-treatment-stack .home-treatment-media { height: 174px; min-height: 0; flex: 0 0 174px; }
html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll .treatment-bento-card > img { height: 174px; min-height: 0; flex: 0 0 174px; width: 100%; object-fit: cover; transform: none; }
html body.client-update-v27[data-page="home"] .home-treatment-stack .home-treatment-copy,
html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll .treatment-bento-copy {
  display: flex; flex: 1; flex-direction: column; gap: 12px; min-height: 0; padding: 16px;
}
html body.client-update-v27[data-page="home"] .home-treatment-stack .home-treatment-copy h3,
html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll .treatment-bento-copy h2 {
  font-size: clamp(21px,1.85vw,25px); line-height: 1.22; letter-spacing: -.02em;
  margin: 0; min-height: 2.44em; text-wrap: balance;
}
html body.client-update-v27 .treatment-booking-button { align-self: stretch; display: flex; justify-content: space-between; margin-top: auto; min-height: 44px; padding: 11px 13px; border-radius: 10px; font-size: 13px; line-height: 1.4; gap: 8px; text-align: left; }
html body.client-update-v27 .treatment-booking-button > span { color: inherit; font-size: 18px; }
html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-flow: row; gap: 20px; padding: 0; max-height: none; height: auto; overflow: visible; }
html body.client-update-v27 .treatment-carousel-caption { margin-bottom: 0; }
.treatment-carousel-pagination { display: flex; justify-content: center; align-items: center; width: min(100%,360px); margin: 0 auto 6px; padding: 0; gap: 0; }
.treatment-carousel-pagination[hidden] { display: none; }
.treatment-carousel-dot { display: grid; place-items: center; flex: 1 1 24px; max-width: 32px; min-width: 24px; height: 32px; border: 0; border-radius: 8px; padding: 0; background: transparent; color: var(--blue); cursor: pointer; }
.treatment-carousel-dot::before { content: ""; width: 7px; height: 7px; border: 1px solid var(--muted); border-radius: 50%; background: var(--soft-surface); transition: background-color .2s, transform .2s; }
.treatment-carousel-dot[aria-current="true"]::before { background: var(--blue); border-color: var(--blue); transform: scale(1.25); }
.treatment-carousel-dot:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
html body.client-update-v27 #home-treatment-track,
html body.client-update-v27 #treatment-page-track { scrollbar-width: none; scrollbar-gutter: auto; scroll-behavior: auto; }
html body.client-update-v27 :is(#home-treatment-track,#treatment-page-track)::-webkit-scrollbar { display: none; }
html body.client-update-v27 #treatment-page-track:is(.is-scrolling,.is-dragging) { scroll-snap-type: none; }
html body.client-update-v27 #treatment-page-track > * { scroll-snap-stop: always; }
html body.client-update-v27 #treatment-page-track.is-dragging,
html body.client-update-v27 #treatment-page-track.is-dragging * { cursor: grabbing; user-select: none; }

/* First-visit motion: 24px at most, once per element; content is visible by default. */
.client-reveal-enter { animation: client-directional-reveal .6s cubic-bezier(.22,.72,.2,1) both; }
@keyframes client-directional-reveal { from { opacity: 0; transform: translateX(var(--reveal-x,-24px)); } to { opacity: 1; transform: none; } }

/* Draw the actual red tooth and blue RP mark, then dock it at the header logo. */
html.logo-intro-pending { overflow: hidden; }
html.logo-intro-pending .site-header .brand > img { visibility: hidden; }
html.logo-intro-pending body::after { content: ""; display: block; position: fixed; inset: 0; z-index: 9999; background: var(--warm); pointer-events: auto; }
html.logo-intro-mounted body::after { display: none; }
.brand-intro { position: fixed; inset: 0; z-index: 10000; overflow: hidden; pointer-events: auto; }
.brand-intro-backdrop { position: absolute; inset: 0; background: var(--warm); }
.brand-intro-mark { position: absolute; top: 0; left: 0; width: 156px; height: 156px; transform-origin: top left; will-change: transform; }
.brand-intro-mark svg { display: block; width: 100%; height: 100%; }
.brand-intro-mark .logo-trace { stroke: #fff; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.brand-intro-mark .logo-complete { opacity: 0; }
.logo-intro-running .logo-trace { animation: logo-ink-draw .64s ease-out both; }
.logo-intro-running .logo-trace-red-two { animation-delay: .25s; animation-duration: .45s; }
.logo-intro-running .logo-trace-blue-one { animation-delay: .58s; animation-duration: .55s; }
.logo-intro-running .logo-trace-blue-two { animation-delay: .72s; animation-duration: .4s; }
.logo-intro-running .logo-trace-blue-three { animation-delay: .87s; animation-duration: .36s; }
.logo-intro-running .logo-trace-blue-four { animation-delay: 1s; animation-duration: .3s; }
.logo-intro-running .logo-complete { animation: logo-ink-complete .16s 1.25s both; }
.logo-intro-running .brand-intro-mark { animation: logo-dock-v27 .8s 1.4s cubic-bezier(.65,0,.22,1) both; }
.logo-intro-running .brand-intro-backdrop { animation: logo-curtain-v27 .5s 1.7s both; }
@keyframes logo-ink-draw { to { stroke-dashoffset: 0; } }
@keyframes logo-ink-complete { to { opacity: 1; } }
@keyframes logo-dock-v27 {
  from { transform: translate3d(var(--logo-start-x),var(--logo-start-y),0) scale(1); }
  to { transform: translate3d(var(--logo-end-x),var(--logo-end-y),0) scale(var(--logo-end-scale)); }
}
@keyframes logo-curtain-v27 { to { opacity: 0; } }

@media (min-width: 821px) and (max-width: 1100px) {
  html body.client-update-v27[data-page="home"] #qualifications .profile-preview-header { grid-template-columns: 100px minmax(0,1fr); gap: 14px; padding: 18px; }
  html body.client-update-v27[data-page="home"] #qualifications .credential-profile { width: 100px; height: 140px; }
  .home-profile-actions { grid-template-columns: 1fr; gap: 9px; }
  html body.client-update-v27[data-page="home"] #qualifications .credential-more { justify-content: center; }
  html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  html body.client-update-v27[data-page="home"] .hero-copy { display: block; width: 100%; margin-bottom: 16px; }
  html body.client-update-v27[data-page="home"] .hero-visual { order: initial; }
  html body.client-update-v27[data-page="home"] .hero-copy > h1 { margin-bottom: 12px; }
  html body.client-update-v27[data-page="home"] .hero-copy > .hero-specialty { margin-bottom: 14px; }
  html body.client-update-v27[data-page="home"] .hero-copy > .hero-tagline { margin-bottom: 7px; }
  html body.client-update-v27[data-page="home"] .hero-section .hero-copy > .eyebrow { font-size: 12px !important; margin-bottom: 16px; }
  html body.client-update-v27[data-page="home"] .hero-copy > .hero-qualification { margin-bottom: 16px; }
  html body.client-update-v27[data-page="home"] .home-specialists-portrait { height: clamp(220px,62vw,300px); }
  html body.client-update-v27[data-page="home"] .home-team-intro { font-size: 15px; line-height: 1.65; }
  html body.client-update-v27[data-page="home"] #qualifications .profile-preview-header { grid-template-columns: 100px minmax(0,1fr); gap: 14px; padding: 16px 16px 14px; }
  html body.client-update-v27[data-page="home"] #qualifications .credential-profile { width: 100px; height: 134px; }
  html body.client-update-v27[data-page="home"] #qualifications .credential-copy { padding: 0 16px 16px; }
  html body.client-update-v27[data-page="home"] #qualifications .client-doctor-name { font-size: clamp(20px,4.8vw,25px); }
  .home-profile-actions { grid-template-columns: 1fr; gap: 9px; }
  html body.client-update-v27[data-page="home"] #qualifications .credential-more { justify-content: center; min-height: 44px; padding: 10px 14px; }
  .home-profile-actions .doctor-booking-button { min-height: 58px; }
  html body.client-update-v27[data-page="about"] .about-intro { margin: 16px 0 20px; font-size: 15px; line-height: 1.7; }
  html body.client-update-v27[data-page="about"] .doctors-section .doctor-grid .doctor-card-body { padding: 18px; }
  html body.client-update-v27[data-page="about"] .doctor-grid .doctor-portrait { height: clamp(240px,70vw,340px); }
  html body.client-update-v27[data-page="about"] .expertise-box .doctor-focus { gap: 8px; }
  html body.client-update-v27[data-page="about"] .expertise-groups { gap: 16px; }
  html body.client-update-v27[data-page="home"] .services-section .split-heading { gap: 12px; }
  html body.client-update-v27[data-page="home"] .explore-treatment-options { margin-bottom: 18px; }
  html body.client-update-v27[data-page="home"] .home-treatment-heading { padding-top: 18px; }
  html body.client-update-v27 .treatment-carousel { --carousel-control: 44px; --carousel-gap: 0px; --treatment-image-height: 160px; }
  html body.client-update-v27 .treatment-carousel-stage {
    display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; grid-template-rows: auto; gap: 0; align-items: start;
  }
  html body.client-update-v27 .treatment-carousel-stage > :is(.swipe-track,.mobile-swipe-track) { grid-column: 1 / -1; grid-row: 1; }
  html body.client-update-v27 .treatment-carousel-stage > [data-swipe-prev] { grid-column: 1; grid-row: 1; }
  html body.client-update-v27 .treatment-carousel-stage > [data-swipe-next] { grid-column: 3; grid-row: 1; }
  html body.client-update-v27 .treatment-carousel-stage > .treatment-carousel-arrow {
    display: grid; align-self: start; margin-top: calc(var(--treatment-image-height) / 2 - 18px);
    z-index: 2; width: 44px; height: 44px; border: 2px solid var(--soft-surface);
    color: #fff; background: var(--blue); opacity: 1; box-shadow: 0 2px 6px rgb(0 0 0 / 12%);
  }
  html body.client-update-v27 .treatment-carousel-stage > .treatment-carousel-arrow:disabled { color: var(--muted); background: var(--soft-surface); border-color: var(--line); box-shadow: none; }
  html body.client-update-v27 .treatment-carousel-arrow svg { width: 23px; height: 23px; }
  html body.client-update-v27[data-page="home"] .home-treatment-stack.swipe-track,
  html body.client-update-v27[data-page="treatments"] .treatment-page-carousel .treatment-bento-scroll.mobile-swipe-track {
    display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 100%;
    gap: 14px; width: 100%; margin: 0; padding: 4px 0; height: auto;
    overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  }
  html body.client-update-v27[data-page="home"] .home-treatment-stack .home-treatment-media,
  html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll .treatment-bento-card > img { height: var(--treatment-image-height); min-height: 0; flex-basis: var(--treatment-image-height); }
  html body.client-update-v27[data-page="home"] .home-treatment-stack .home-treatment-copy,
  html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll .treatment-bento-copy { padding: 14px; gap: 10px; }
  html body.client-update-v27[data-page="home"] .home-treatment-stack .home-treatment-copy h3,
  html body.client-update-v27[data-page="treatments"] .treatment-bento-scroll .treatment-bento-copy h2 { font-size: clamp(21px,5.6vw,26px); min-height: 2.44em; }
  html body.client-update-v27 .treatment-booking-button { min-height: 44px; font-size: 13px; }
  .treatment-carousel-pagination { margin-bottom: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .client-reveal-enter { animation: none !important; transform: none !important; opacity: 1 !important; }
  .brand-intro { display: none; }
  html.logo-intro-pending { overflow: auto; }
  html.logo-intro-pending body::after { display: none; }
  html.logo-intro-pending .site-header .brand > img { visibility: visible; }
  .treatment-carousel-dot::before { transition: none; }
}
