/* ==========================================================================
   DentCity Dental Clinic — styles.css
   Mobile-first. Breakpoints: 768px (tablet), 1024px (desktop), 1440px (wide).
   All clinic copy/data lives in js/main.js (CLINIC + I18N) — this file is
   layout/visuals only.
   ========================================================================== */

:root {
  /* Brand colours — the client's own brand CI (client_provided_data/CLINIC
     LOGO AND DESIGN) supersedes the earlier eyedropper-picked #A7441D with
     the exact "Main" value sampled directly from the official logo files
     (#A74524 — close enough to the old value that nothing visually shifts
     much, but this is now the authoritative source). --c-gold is new: the
     CI's "Support" colour, sampled the same way, not previously used
     anywhere on the site — see README for where it's applied. */
  --c-primary: #A74524;
  --c-primary-dark: #7C3215;
  --c-gold: #E99B4E;
  --c-gold-dark: #BA7C3E;
  --c-deep-red: #491C0A;
  --c-soft-rose: #F7EDE9;
  --c-bg: #FCF9F8;
  --c-white: #FFFFFF;
  --c-ink: #221A1C;
  --c-muted: #6B5F62;
  --c-border: #EEE2DD;
  /* NOTE: the brand's literal WhatsApp green (#25D366) only gives ~2:1 contrast
     with white text/icons, well under WCAG AA's 4.5:1. Using a darkened,
     still-clearly-"WhatsApp green" shade here instead so buttons stay
     accessible; #25D366 kept as --c-whatsapp-brand for any non-text use
     (e.g. a small brand-accurate accent) where contrast isn't a factor. */
  --c-whatsapp-brand: #25D366;
  --c-whatsapp: #1C824A;
  --c-whatsapp-dark: #145C35;

  /* Headings move to a serif (Playfair Display) to match the brand
     wordmark's own serif logotype — the site previously used the body sans
     for both, which didn't match the logo at all. Noto Sans SC stays the
     fallback for Chinese headings specifically: Playfair Display has no
     CJK glyphs, and there's no good serif CJK counterpart loaded, so zh
     headings render in sans rather than mismatched/missing serif — a
     common, acceptable trade-off on bilingual sites, not an oversight. */
  --font-heading: "Playfair Display", "Noto Sans SC", Georgia, serif;
  --font-body: "Plus Jakarta Sans", "Noto Sans SC", system-ui, sans-serif;

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;

  --shadow-sm: 0 2px 10px rgba(73, 28, 10, 0.07);
  --shadow-md: 0 12px 32px rgba(73, 28, 10, 0.12);
  --shadow-lg: 0 24px 56px rgba(73, 28, 10, 0.18);

  --container-w: 1600px;
  --header-h: 76px;
}

/* -------------------------------------------------------------------------
   Shared design-system motifs — adapted from a reference design the client
   supplied (a Webflow-exported template, "Nova Dental"): a small eyebrow
   "caption" (dot + label) before every section heading, italic-accent words
   inside headings, parenthesis-numbered tags, and a pill text-button. Kept
   our own established serif/sans pairing (Playfair Display headings, Plus
   Jakarta Sans body — chosen earlier to match the brand wordmark) rather
   than swapping to the reference's own typefaces; the accent/motif PATTERNS
   are what's being adopted, not its specific fonts or exact colours.
   ------------------------------------------------------------------------- */
.caption { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-primary-dark); margin-bottom: 14px; }
.caption-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c-gold); flex-shrink: 0; }
.text-accent { font-style: italic; color: var(--c-primary); }
.num-tag { font-family: var(--font-heading); font-style: italic; font-weight: 600; color: var(--c-gold-dark); }

.text-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--c-primary);
  padding-bottom: 3px;
  transition: transform 0.25s ease;
}
.text-btn::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: currentcolor;
  transform: scaleX(1);
  transform-origin: right;
  transition: transform 0.35s ease;
}
.text-btn:hover { transform: scale(0.97); }
.text-btn:hover::after { transform-origin: left; animation: text-btn-underline 0.5s ease; }
@keyframes text-btn-underline {
  0% { transform-origin: left; transform: scaleX(0); }
  100% { transform-origin: left; transform: scaleX(1); }
}
.text-btn-paren { opacity: 0.6; }

/* Line-split title reveal (js/motion.js splitLines) — each line gets its
   own overflow:hidden mask so the inner span can rise up from behind a
   hard edge instead of just fading in place. */
.split-line { display: block; overflow: hidden; }
.split-line-inner { display: block; }

/* Nav hover "roll" (js/motion.js initNavHoverRoll) — two stacked copies of
   the same label inside .roll-track; .roll-mask is the fixed-height
   clipping window (one line tall) that only ever shows one of them at a
   time. Hovering translates the (2-line-tall) track up by -50%, i.e.
   exactly one copy's height, sliding the first copy out through the top
   of the mask as the second slides in from the bottom. */
.roll-mask { display: inline-block; overflow: hidden; vertical-align: top; height: 1em; line-height: 1; }
.roll-track { display: block; line-height: 1; }
.roll-copy { display: block; line-height: 1; }

/* -------------------------------------------------------------------------
   Reset & base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--c-ink);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; color: var(--c-ink); }
p { margin: 0 0 1em; color: var(--c-muted); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
.zh { font-family: "Noto Sans SC", var(--font-body); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--c-primary);
  color: var(--c-white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

.container {
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}
@media (min-width: 768px) {
  .container { padding: 0 32px; }
}
@media (min-width: 1680px) {
  .container { padding: 0 48px; }
}
.container-wide { max-width: 1840px; }

/* So anchor/smooth-scroll navigation (nav links, footer links) lands a
   section's heading below the sticky header instead of hidden behind it. */
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }
.section { padding: 64px 0; }
.section-head { position: relative; z-index: 10; text-align: center; max-width: 680px; margin: 0 auto 40px; }
/* A little breathing room between the heading and its subtitle (was 0 —
   read as too tight, e.g. "Meet the Team" / "Our dentists, by specialty."
   sitting right on top of each other). Shared by every section's header,
   so this one change keeps the spacing consistent site-wide rather than
   fixing it just for Team. */
.section-head h2 { margin-bottom: 8px; }
.team-intro { max-width: 460px; margin: 10px auto 0; font-size: 1rem; }

.todo-note { font-size: 0.8rem; color: var(--c-primary); font-style: italic; opacity: 0.85; }

/* Reveal-on-scroll — visible by default (no-JS / JS-failure fallback);
   only animates once html.js confirms JS initialised. */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
html.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* GSAP-driven elements (js/motion.js) — same no-JS-safe pattern as .reveal
   above: invisible only once html.js is present (so a no-JS visitor always
   sees everything), motion.js itself sets the final opacity/transform once
   it runs, whether or not GSAP actually loaded. The bg layers (hero/cta
   background photos) use a separate rule since they start pre-zoomed via
   `transform`, not hidden via `opacity`. */
html.js [data-hero]:not([data-hero="bg"]),
html.js [data-about],
html.js [data-services],
html.js [data-why-us],
html.js [data-testimonials],
html.js [data-team],
html.js [data-cta]:not([data-cta="bg"]) {
  opacity: 0;
}
html.js [data-hero="bg"], html.js [data-cta="bg"] { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) {
  html.js [data-hero]:not([data-hero="bg"]),
  html.js [data-about],
  html.js [data-services],
  html.js [data-why-us],
  html.js [data-testimonials],
  html.js [data-team],
  html.js [data-cta]:not([data-cta="bg"]) {
    opacity: 1;
  }
  html.js [data-hero="bg"], html.js [data-cta="bg"] { transform: none; }
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-primary { background: var(--c-primary); color: var(--c-white); }
.btn-primary:hover { background: var(--c-primary-dark); }
.btn-secondary { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-secondary:hover { background: var(--c-soft-rose); }
.btn-whatsapp { background: var(--c-whatsapp); color: var(--c-white); }
.btn-whatsapp:hover { background: var(--c-whatsapp-dark); }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; }
.btn-full { width: 100%; }

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 251, 250, 0.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 10px;
}
@media (min-width: 1024px) {
  .header-inner { gap: 20px; }
}
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-img { height: 30px; width: auto; display: block; }
.logo-zh { font-size: 0.78rem; font-weight: 600; color: var(--c-muted); padding-left: 10px; border-left: 1px solid var(--c-border); line-height: 1; }

.main-nav { display: none; }
.nav-links { display: flex; gap: 16px; }
.nav-links a {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--c-ink);
  position: relative;
  padding: 6px 0;
  white-space: nowrap;
  display: block;
}
/* Hover "roll" (js/motion.js initNavHoverRoll) replaces the plain
   underline-on-hover this used to have — see .roll-mask/.roll-track/
   .roll-copy above. */

.header-actions { display: flex; align-items: center; gap: 8px; }

.lang-switch { display: flex; gap: 4px; background: var(--c-soft-rose); border-radius: 999px; padding: 3px; }
.lang-btn {
  border: none;
  background: transparent;
  color: var(--c-muted);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  padding: 6px 8px;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}
.lang-btn[aria-pressed="true"] { background: var(--c-primary); color: var(--c-white); }
.lang-btn:not([aria-pressed="true"]):hover { background: rgba(142, 27, 44, 0.12); }

#header-whatsapp-btn { display: none; }

.hamburger {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--c-border);
  border-radius: 10px;
  color: var(--c-ink);
}
.hamburger .icon-close { display: none; }
.hamburger[aria-expanded="true"] .icon-open { display: none; }
.hamburger[aria-expanded="true"] .icon-close { display: block; }

/* Hamburger stays active through 1023px (was 767px) — adding a 7th nav
   item (Gallery) made the full inline nav genuinely too wide for the
   header at 768-1023px (real overflow found via the hover/overflow
   sweep: scrollWidth exceeded viewport width by ~40-50px at both 768px
   and 1024px before this change). Keeping one hamburger breakpoint
   through to 1024px — where the header already gains more horizontal
   room (the WhatsApp button, wider gaps — see the ≥1024px block below)
   — means the nav's own available width and everything else that
   shares the header row change size together at one width, instead of
   two separate, now-mismatched transition points. */
@media (max-width: 1023px) {
  .main-nav {
    display: block;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--c-white);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s ease;
  }
  .main-nav.is-open { max-height: 70vh; overflow-y: auto; }
  .nav-links { flex-direction: column; gap: 0; padding: 8px 20px 20px; }
  .nav-links a { display: block; padding: 12px 0; border-bottom: 1px solid var(--c-border); }
  /* Mobile menu never hovers — the roll effect is desktop/mouse-only
     (gated in JS) and the mask already clips the hidden copy out of view,
     so nothing extra is needed here beyond the block-display override. */
}

@media (min-width: 1024px) {
  .main-nav { display: block; }
  .hamburger { display: none; }
  .nav-links { gap: 20px; }
  .nav-links a { font-size: 0.92rem; }
}
@media (min-width: 1200px) {
  /* The header-row WhatsApp button specifically needs more room than
     1024px gives once the nav carries 7 items (was fine with 6) —
     logo + nav + lang-switch + this button genuinely don't fit together
     below ~1200px (found via a getBoundingClientRect() sweep after the
     Gallery nav item was added: only .header-actions/this button were
     ever the actual overflowing elements, not the nav itself, which is
     why just the nav moved to 1024px while this stayed later). */
  #header-whatsapp-btn { display: inline-flex; }
  .nav-links { gap: 28px; }
  .nav-links a { font-size: 0.95rem; }
}

/* -------------------------------------------------------------------------
   Image placeholders (used until real photos are added)
   ------------------------------------------------------------------------- */
.img-placeholder {
  background: linear-gradient(145deg, var(--c-soft-rose), #f2d9dd);
  border: 1px dashed #d9b6bc;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--c-primary-dark);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 20px;
  min-height: 220px;
}

/* -------------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------------- */
.hero { padding: 40px 0 0; background: var(--c-bg); }
.hero-copy { max-width: 720px; text-align: center; margin: 0 auto; }
.pill {
  display: inline-block;
  background: var(--c-soft-rose);
  color: var(--c-primary-dark);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 8px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero-copy h1 { font-size: 2.25rem; letter-spacing: -0.01em; }
.hero-sub { font-size: 1.05rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 28px 0; }
.trust-row { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.trust-row li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 500; color: var(--c-ink); }
.trust-row svg { color: var(--c-primary); flex-shrink: 0; }

/* Full-bleed banner: the same 5 real stock photos (client_provided_data/
   downloaded_img) now tile edge-to-edge across the FULL viewport width
   (not held inside .container — .hero-banner is a direct child of
   .hero, nothing constrains its width), with the headline/CTAs/trust
   row overlaid on top via a dark scrim, closer to the "White Dental"
   style reference than the earlier contained collage-with-copy-above
   layout. No gaps/radius between tiles here (a single continuous banner
   reads as "fully fit horizontally", which a gapped collage does not).
   The two B&W photos are left pure black-and-white (no sepia/warm
   filter) — a deliberate contrast against the cream page background
   rather than trying to force them on-palette, since forcing it tends to
   just look like a muddy grey wash instead of a real design choice. */
.hero { padding: 0; background: var(--c-bg); }
/* height moved here from .hero-banner-grid (now fixed per breakpoint
   below) — .hero-banner-grid is the element js/motion.js scales/
   translates for the entrance-zoom + scroll parallax, and needed a
   permanent size independent of that transform (see its own comment)
   instead of being the thing that determines this box's own height. */
.hero-banner { position: relative; width: 100%; overflow: hidden; height: 680px; }
/* Positioned absolute with a permanent 20%-top/bottom overscan (height:
   140%, not just transform: scale) — found a real gap: once the
   entrance zoom-settle animation (scale 1.12 → 1, js/motion.js
   initHeroBanner) finishes, this element has no overscan left of its
   own, so the *separate* scroll-linked parallax (yPercent: 10) then
   translates it past .hero-banner's own edge, exposing .hero's
   background colour in a strip at the top once scrolled partway through
   — confirmed by measuring the live gap, not assumed. A permanent
   layout-level overscan (unaffected by either transform) comfortably
   covers the 10%-of-its-own-height translation regardless of what scale
   the entrance animation has settled to. */
.hero-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 140%;
}
.hero-gallery-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--c-soft-rose);
}
.hero-gallery-smile1 { grid-column: 1 / 3; }
.hero-gallery-tools, .hero-gallery-smile2, .hero-gallery-mold, .hero-gallery-braces { display: none; }

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 13, 9, 0.38) 0%, rgba(28, 13, 9, 0.52) 45%, rgba(28, 13, 9, 0.78) 100%);
}
.hero-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 20px;
  max-width: 760px;
  margin: 0 auto;
}
.hero-copy .pill { background: rgba(255, 255, 255, 0.16); color: var(--c-white); backdrop-filter: blur(6px); }
/* .btn-secondary's default transparent/red-text treatment assumed it would
   always sit on the plain cream page background — unreadable here against
   a busy, light-toned photo behind it (found by eye once the stacked
   landscape pair put brighter photo area directly behind this button). A
   solid near-white chip restores contrast regardless of which photo ends
   up behind it. */
.hero-copy .btn-secondary { background: rgba(255, 255, 255, 0.95); border-color: transparent; }
.hero-copy .btn-secondary:hover { background: var(--c-white); }
.hero-copy h1 { color: var(--c-white); font-size: 2.1rem; letter-spacing: -0.01em; }
.hero-sub { color: rgba(255, 255, 255, 0.92); font-size: 1rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 26px 0; }
.trust-row { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.trust-row li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 500; color: var(--c-white); }
.trust-row svg { color: var(--c-gold); flex-shrink: 0; }

@media (min-width: 600px) {
  .hero-banner { height: 760px; }
  .hero-banner-grid { grid-template-columns: repeat(4, 1fr); }
  .hero-gallery-smile1 { grid-column: 1 / 3; }
  .hero-gallery-tools { display: block; grid-column: 3 / 4; object-position: center 25%; }
  .hero-gallery-smile2 { display: block; grid-column: 4 / 5; object-position: center 70%; }
  .hero-copy h1 { font-size: 2.75rem; }
  .hero-sub { font-size: 1.08rem; }
}
@media (min-width: 1024px) {
  /* Every tile used to be its own single full-height column — which meant
     the 2 actually-landscape photos here (smile2, braces; see each img's
     real width/height in index.html) were forced into tall, narrow crops
     that cut off most of their width. Pairing them into one stacked
     2-row block instead (each keeping a landscape-ish aspect within half
     the banner's height) reads far better than cropping a landscape
     photo to a portrait sliver — and mixes the rhythm up against the
     anchor tile and the two genuinely-portrait photos (tools, mold),
     which still get full-height single columns since a portrait photo
     already suits that shape. */
  .hero-banner { height: 880px; }
  .hero-banner-grid { grid-template-columns: repeat(6, 1fr); grid-template-rows: repeat(2, 1fr); }
  .hero-gallery-smile1 { grid-column: 1 / 3; grid-row: 1 / 3; }
  .hero-gallery-tools { grid-column: 3 / 4; grid-row: 1 / 3; }
  .hero-gallery-smile2 { grid-column: 4 / 6; grid-row: 1 / 2; object-position: center 60%; }
  .hero-gallery-braces { display: block; grid-column: 4 / 6; grid-row: 2 / 3; object-position: center 40%; }
  .hero-gallery-mold { display: block; grid-column: 6 / 7; grid-row: 1 / 3; object-position: center 35%; }
  .hero-copy h1 { font-size: 3.75rem; }
  .hero-sub { font-size: 1.15rem; }
}
@media (min-width: 1440px) {
  .hero-banner { height: 960px; }
  .hero-copy h1 { font-size: 4.25rem; }
}
@media (min-width: 1920px) {
  .hero-banner { height: 1040px; }
}

.floating-card {
  position: absolute;
  top: 24px;
  right: 24px;
  background: var(--c-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 240px;
}
.floating-card svg { color: var(--c-primary); flex-shrink: 0; }
.floating-card div { display: flex; flex-direction: column; font-size: 0.85rem; }
.floating-card strong { color: var(--c-ink); font-size: 0.9rem; }

/* -------------------------------------------------------------------------
   About
   ------------------------------------------------------------------------- */
.about { background: var(--c-white); }
.about-grid { display: grid; gap: 36px; align-items: center; }
/* Replaced the two-photo pairing with the client's own brand assets
   (DENTCITY Mark - Main + DENTCITY Typeface - Main, both transparent
   PNGs — confirmed via a corner-pixel alpha check before using them).
   No card/background behind them (per the client — just the two images
   on the section's own white background), centred and sized like a
   brand lockup; object-fit: contain keeps them uncropped. */
.about-brand-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  width: 100%;
  max-width: 480px;
}
.about-brand-panel__mark { width: 30%; max-width: 150px; height: auto; object-fit: contain; }
.about-brand-panel__typeface { width: 78%; max-width: 300px; height: auto; object-fit: contain; }
.check-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; color: var(--c-ink); }
.check-list svg { color: var(--c-primary); flex-shrink: 0; margin-top: 2px; }

@media (min-width: 1024px) {
  /* Reverted from the earlier 3fr/2fr (photo-dominant) split — paired
     with the smaller max-width above, now an even split with the photo
     naturally staying well under its own max-width. */
  .about-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* -------------------------------------------------------------------------
   Gallery
   ------------------------------------------------------------------------- */
.gallery { background: var(--c-soft-rose); overflow: hidden; }
/* Slow, continuous horizontal drift — all 8 interior photos are landscape
   shots, so a moving strip reads better than a static grid for them (the
   client's own request). .gallery-marquee clips to the viewport width;
   .gallery-track is the thing that actually moves, sized by its own
   content (width: max-content) so the -50% keyframe always lands exactly
   at the seam between the real set and its aria-hidden duplicate,
   whatever each image's rendered width ends up being. */
.gallery-marquee { width: 100%; overflow: hidden; margin-top: 36px; }
.gallery-track, .gallery-track-dup { display: flex; align-items: center; gap: 14px; width: max-content; }
.gallery-track { animation: gallery-scroll 48s linear infinite; }
.gallery-marquee:hover .gallery-track,
.gallery-marquee:focus-within .gallery-track { animation-play-state: paused; }
@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.gallery-item {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  width: 280px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
}
.gallery-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Small, transparent caption chip in the bottom-left corner of the photo
   itself — no card/border around the tile (the client's explicit ask:
   "just show and display", corners only "slightly rounded"). */
.gallery-item figcaption {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--c-white);
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(20, 10, 8, 0.4);
  backdrop-filter: blur(3px);
}
@media (min-width: 600px) {
  .gallery-item { width: 380px; }
}
@media (min-width: 1024px) {
  .gallery-item { width: 480px; border-radius: 18px; }
  .gallery-item figcaption { font-size: 0.76rem; padding: 4px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-track { animation: none; }
  .gallery-track-dup { display: none; }
  .gallery-marquee { overflow-x: auto; }
}

/* -------------------------------------------------------------------------
   Team — single-dentist-per-slide layout, rebuilt to match the client's
   own reference screenshot (client_provided_data/sample design
   screenshot/our_team.png): name/role at left, portrait centred, bio at
   right, specialization tags bottom-left, arrow+counter nav bottom-right.
   Bio text is still the client's full bilingual copy (js/main.js
   CLINIC.team bioEn/bioZh) — only visually clamped to a few lines per
   language here (.team-slide__bio-p), not shortened; a PDF link covers
   reading the rest. See README "Team section — single-slide layout, v4".
   ------------------------------------------------------------------------- */
/* min-height, re-measured per breakpoint tier (worst case = narrowest
   width in that tier, since narrower wraps to more lines) across all 3
   languages — Malay is consistently the longest translation and wraps to
   an extra line EN/ZH don't need, which was making the slider below jump
   to a different vertical position every time the language changed
   (confirmed: heading block height varied 132-288px by language/width
   before this). Pinning the heading block's own height stops that,
   without needing to touch or shorten any of the translated wording. */
.team-section-head { text-align: left; max-width: none; margin: 0 0 48px; min-height: 292px; }
.team-section-head h2 { font-size: 1.5rem; max-width: 900px; }
.team-slider { position: relative; }
/* width:100% + min-width:0 on both the slide and the grid inside it:
   without these, the grid's fr columns were computing against Splide's
   full (all-slides-wide) track width instead of just this one slide —
   found via direct measurement (a "1fr 1.3fr 1fr" row came out to
   several thousand px wide, with the photo positioned thousands of
   pixels off-screen), a classic flex/grid child sizing bug where a flex
   item's default min-width:auto lets a grid descendant's intrinsic size
   escape its intended containing block. */
.team-splide .splide__slide { height: auto; width: 100%; min-width: 0; }
.team-slide {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: 1fr;
  grid-template-areas: "info" "media" "bio" "tags";
  gap: 28px;
  padding-bottom: 60px;
}
.team-slide__name { font-size: 2rem; line-height: 1; margin: 0 0 8px; }
.team-slide__name-title { display: block; font-family: var(--font-heading); font-style: italic; }
.team-slide__name-rest { display: block; font-family: var(--font-body); font-weight: 700; }
.team-slide__role { color: var(--c-muted); font-weight: 500; margin: 0; }
.team-slide__media { grid-area: media; aspect-ratio: 3 / 4; border-radius: var(--radius-lg); overflow: hidden; background: var(--c-soft-rose); max-width: 420px; margin: 0 auto; }
.team-slide__media img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.team-slide__info { grid-area: info; }
/* A visible, bordered rectangle now (was plain inline text) — stretched
   (via grid align-items:stretch at the ≥768px breakpoint below, not
   center) to exactly match the photo's own rendered height, so the two
   sit level rather than the bio trailing off well past the bottom of the
   photo. overflow-y:auto is a safety net, not the primary fit mechanism:
   the per-language line-clamp below is tuned to fit 3 languages inside a
   ~560px box without needing it on the great majority of entries, but a
   fixed-height box can't guarantee that for every possible future bio
   length, so content is still scrollable rather than silently clipped if
   it ever runs over. */
/* Box styling (border/background/shadow/padding) and the line-clamp both
   removed per the client's follow-up request — "remove the box and
   display directly, without scrolling". With the box gone, the
   fixed-height .team-slide (see the ≥768px breakpoint below) can only
   stay scroll-free if the text itself is short enough to fit, which is
   what the bio copy was trimmed for (see js/main.js CLINIC.team —
   bioEn/bioMs/bioZh for Dr. Yew, Dr. Mey and Dr. Alice specifically were
   condensed; nothing reworded beyond cutting length, same facts). */
.team-slide__bio { grid-area: bio; overflow: hidden; }
.team-card-bio-lang { font-family: var(--font-heading); font-style: italic; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.03em; color: var(--c-gold-dark); margin: 0 0 4px; }
.team-slide__bio-block + .team-slide__bio-block { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--c-border); }
.team-slide__bio-p {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--c-muted);
  margin: 0 0 6px;
}
.team-slide__bio-p:last-child { margin-bottom: 0; }
.team-slide__links { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.team-slide__links .text-btn { font-size: 0.85rem; }
.team-slide__tags { grid-area: tags; }
.team-slide__tags-label { font-size: 0.78rem; color: var(--c-muted); margin: 0 0 4px; }
/* Clamped to 2 lines — this was the main source of the slide's overall
   height varying by dentist (found by measuring each dentist's actual
   rendered slide height: 620-985px, confirmed not remotely uniform
   despite media's own fixed aspect-ratio, because this column's natural
   wrapped height still drove the shared grid row taller for longer
   qualification lists). Full qualifications are still listed on the
   linked PDF profile. */
.team-slide__tags-list {
  font-weight: 600;
  color: var(--c-ink);
  font-size: 0.92rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.team-slider__counter { position: absolute; left: 0; bottom: 14px; font-size: 0.85rem; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.team-splide .splide__arrows {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  gap: 10px;
}
.team-splide .splide__arrow {
  position: static;
  transform: none;
  width: 60px;
  height: 60px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  opacity: 1;
}
.team-splide .splide__arrow svg { fill: var(--c-primary); width: 22px; height: 22px; }
.team-splide .splide__arrow:hover { background: var(--c-soft-rose); }
.team-splide .splide__arrow:disabled { opacity: 0.35; }

@media (min-width: 768px) {
  .team-slide {
    /* bio widened (1fr→1.2fr) and media narrowed slightly (1.3fr→1.1fr)
       to give the now-boxed, 3-language bio more room — "wider" was the
       explicit ask once it became a fixed-height box instead of
       unconstrained flowing text. */
    grid-template-columns: 1fr 1.1fr 1.2fr;
    grid-template-areas: "info media bio" "tags media .";
    /* stretch (the grid default — removed the earlier "center") is what
       makes .team-slide__bio automatically match .team-slide__media's
       own rendered height, since they're both items in the same grid
       row: "same length as the figure" per the client's request. */
    align-items: stretch;
    gap: 36px;
    /* A true fixed height (not min-height) — paired with the tags-list
       clamp above, this guarantees every dentist's slide is identically
       sized regardless of content length, rather than just having a
       floor some entries grow past. "the section size is fixed" was the
       explicit ask; confirmed uniform afterwards by measuring all 5
       slides' actual rendered height, not just checking one. Tall enough
       to fit most entries' 3-language bio without scrolling; the
       longest (Dr. Alice's) still needs .team-slide__bio's own
       overflow-y:auto for the last bit — an explicit, intentional
       trade-off once "fixed/uniform size" and "every single bio fits
       with zero scrolling" turned out not to both be satisfiable without
       a much taller box than the other 4 dentists need. */
    height: 700px;
  }
  .team-slide__info, .team-slide__tags { align-self: center; }
  .team-section-head { min-height: 190px; }
  .team-section-head h2 { font-size: 2rem; }
}
@media (min-width: 1200px) {
  .team-section-head { min-height: 226px; }
  .team-section-head h2 { font-size: 2.5rem; }
}

/* -------------------------------------------------------------------------
   Services (Treatments) — flip cards, adapted from the client's own
   services.png reference: a square icon card that flips on hover/click to
   reveal its description + a "Book via WhatsApp" link pre-filled with
   that specific treatment's name (js/main.js renderTreatments(),
   wa.treatment_specific). All 14 real services in a responsive grid.
   Only one card flipped at a time (js/motion.js initServices()).
   ------------------------------------------------------------------------- */
.services-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, 1fr); }
.service-card {
  position: relative;
  width: 100%;
  min-width: 0;
  /* True square, per the client's explicit request. A square box is
     tighter than the taller 1/1.6-1/1.15 ratios tried previously to fit
     a bigger icon + an unbounded 2-line title — fitting everything back
     into a square meant trimming content height elsewhere instead (the
     num-tag moved out of flow as a corner badge below, the title capped
     to 2 lines with an ellipsis fallback, tighter padding/gap), rather
     than growing the box. Re-verified at zero overflow, every breakpoint
     and all 3 languages, same as the ratio approach before it. */
  aspect-ratio: 1 / 1;
  cursor: pointer;
  /* perspective lives on the outer (static) element, not the flipping
     one, so the 3D effect has somewhere to project from. width:100% +
     min-width:0 — without these, the card's own intrinsic content size
     (grown by the bigger icon/title in this round) could exceed its 1fr
     grid track's allotted width, since grid items default to
     min-width:auto; same class of bug as the Team slider and
     Testimonials grid fixes above, same fix. */
  perspective: 1200px;
}
.service-card__flip {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transform-style: preserve-3d;
}
.service-card.is-flipped .service-card__flip { transform: rotateY(180deg); }
.service-card__front, .service-card__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  overflow: hidden;
  padding: 20px;
}
/* Icon + title centred as one block (flex column, justify-content:
   center) rather than pinning the icon to the card's literal
   top/left:50% independent of the footer — that approach overlapped
   longer, wrapping titles ("Tooth-coloured Fillings", "Crown & Bridge")
   on narrower cards, since the icon no longer reserved any layout space
   for the footer below it. Centring the group keeps icon and title from
   ever colliding, at any title length or card width, while still landing
   the icon in the visual middle of the card (previously pushed to the
   top by justify-content: space-between). */
.service-card__front {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 14px;
  background: var(--c-white);
  border: 1px solid var(--c-border);
}
.service-card__plus { position: absolute; top: 16px; right: 18px; font-size: 0.8rem; color: var(--c-muted); font-weight: 600; }
.service-card__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: var(--c-soft-rose);
  color: var(--c-primary);
}
.service-card__icon svg { width: 36px; height: 36px; }
.service-card__front-foot { text-align: center; }
/* Out of flow (top-left corner, paired with the "+" at top-right)
   instead of stacked above the title — freed up the vertical room a
   bigger icon + full 2-line title needed inside the square box, without
   losing the number from the front face entirely. */
.service-card__front .num-tag { position: absolute; top: 16px; left: 18px; margin: 0; font-size: 0.8rem; }
/* Clamped to 2 lines with an ellipsis fallback — a hard ceiling on the
   title's height is what makes a true square box safe at every title
   length and in all 3 languages; the full, untruncated name is always
   shown on the card's back (flip/tap reveals it), so nothing is lost. */
.service-card__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.05rem;
  margin: 0;
}
.service-card__back {
  display: flex;
  flex-direction: column;
  background: var(--c-deep-red);
  color: var(--c-white);
  transform: rotateY(180deg);
  justify-content: center;
  text-align: center;
}
.service-card__back .num-tag { color: var(--c-gold); margin-bottom: 6px; }
.service-card__back .service-card__title { color: var(--c-white); margin-bottom: 10px; }
.service-card__back p { color: rgba(255, 255, 255, 0.88); font-size: 0.92rem; line-height: 1.55; margin: 0; }

/* Hover-capable pointers get the flip on hover for free, in addition to
   the click/tap toggle (js/motion.js) that works on every device —
   matches the client's reference, where hovering is what triggers it. */
@media (hover: hover) and (pointer: fine) {
  .service-card:hover .service-card__flip { transform: rotateY(180deg); }
}

@media (min-width: 600px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; }
  .service-card__icon { width: 86px; height: 86px; }
  .service-card__icon svg { width: 40px; height: 40px; }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(5, 1fr); gap: 22px 22px; }
  /* Narrower per-card than even the 600px tier, since 5 columns lands
     before the viewport is wide enough to give each card much more room
     — re-measured for this tier specifically (square box, 2-line-clamped
     title, corner-badge num-tag) and capped a touch smaller than the
     600px tier's icon to stay clipping-free here too. */
  .service-card__icon { width: 88px; height: 88px; }
  .service-card__icon svg { width: 42px; height: 42px; }
  /* Explicit 5 / (empty)+4 / 5 row shape, per the client's specific
     layout request — row 1 fills all 5 columns normally (cards 1-5);
     card 6 is pinned to start at column 2 (not auto-placed at column 1),
     leaving column 1 of row 2 empty and pushing cards 6-9 into columns
     2-5; card 10 then auto-wraps to column 1 of row 3 as normal (grid
     auto-flow continues from wherever the explicit placement left off),
     giving row 3 all 5 columns again — 5 + 4 + 5 = 14, matching the
     full service list exactly. */
  .service-card:nth-child(6) { grid-column-start: 2; }
}
/* From 1440px each card is noticeably wider, so the icon can grow again
   while staying comfortably inside the square box. */
@media (min-width: 1440px) {
  .service-card__icon { width: 100px; height: 100px; }
  .service-card__icon svg { width: 48px; height: 48px; }
}
.treatments-note { text-align: center; margin-top: 36px; font-weight: 500; }
.treatments-note a { color: var(--c-primary); font-weight: 700; text-decoration: underline; }

/* -------------------------------------------------------------------------
   Why Us — alternating editorial rows (replaces the earlier pinned-
   stacking-cards design entirely — see README "Why Choose DentCity —
   editorial layout, v2"). Large photo + text per row, normal document
   flow (no pin, no scroll-jacking), alternating sides via
   .why-row--reverse on the even rows. Plain per-row scroll-reveal
   (js/motion.js initWhyUs()).
   ------------------------------------------------------------------------- */
.why-editorial { background: var(--c-white); }
.why-editorial-head { text-align: left; max-width: 640px; margin: 0 0 56px; }
/* gap: 0 at ≥768px (below) — rows touch vertically on purpose, per the
   client's "chessboard" request: since rows alternate image-left/
   image-right, two consecutive rows' image rectangles only ever share
   a single corner point at the row boundary (one sits in the left
   half, the other in the right half) rather than a full shared edge —
   that's the "corner connected to the image on the previous and next
   row" effect. Kept a normal gap on mobile, where everything stacks in
   one column and there's no alternating-side geometry to connect. */
.why-rows { display: flex; flex-direction: column; gap: 32px; }
.why-row { display: flex; flex-direction: column; gap: 28px; align-items: center; }
/* Chessboard cells, sharp corners, no shadow — border-radius/box-shadow
   removed per the client, a "tight angle" look instead of the earlier
   soft-card treatment. aspect-ratio drives the row's height now, not the
   text, so all 4 rows still come out the same height automatically
   (same ratio + same column width), without needing a min-height
   override. */
.why-row__media { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-soft-rose); }
.why-row__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Horizontal padding here (not on .why-row__media) — .why-rows is
   intentionally full-bleed/outside .container so the chessboard images
   can run edge-to-edge, but that left the wording touching the
   viewport's own left/right edges too on mobile (single-column stack),
   with nothing to indent it back in. 20px matches .container's own
   mobile gutter; removed again at ≥768px, where the row's own 56px
   image-text gap already does that job on the inner side. */
.why-row__text { width: 100%; padding: 18px 20px; }
.why-row__text .num-tag { font-size: 1.1rem; }
.why-row__text h3 { font-size: 1.5rem; margin: 10px 0 12px; }
.why-row__text p { font-size: 1rem; line-height: 1.65; margin-bottom: 16px; }
.why-row__tag { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-primary); }

@media (min-width: 768px) {
  .why-rows { gap: 0; }
  .why-row { flex-direction: row; gap: 56px; align-items: center; }
  .why-row--reverse { flex-direction: row-reverse; }
  /* Was 1/1 (square) — the client found that "too lengthy" and asked
     for about 45% of that height back at the same width, which is a
     2.2/1 ratio (1 / 0.45 ≈ 2.22). */
  .why-row__media { width: 50%; aspect-ratio: 2.2 / 1; }
  .why-row__text { width: 50%; max-width: 440px; padding: 18px 0; }
}
@media (min-width: 1200px) {
  .why-editorial-head h2 { font-size: 2.5rem; }
  .why-row__text h3 { font-size: 1.75rem; }
}

/* -------------------------------------------------------------------------
   Testimonials — static grid (replaces the earlier Splide carousel),
   rebuilt to match the client's own reference screenshot
   (client_provided_data/sample design screenshot/google_review.png): a
   photo tile top-left, a photo tile bottom-right, 4 review cells filling
   the rest (js/main.js renderReviews()).
   ------------------------------------------------------------------------- */
/* White/bordered cards (not the brand-rose tint used elsewhere) and a
   real multi-colour Google "G" mark are the two things that make this
   read as "a Google review" at a glance, rather than site-authored
   testimonial copy — matching Google's own clean white review-card look
   instead of this site's warmer palette is deliberate here. */
.testimonials { background: var(--c-soft-rose); }
.testimonials-track { margin-top: 36px; }
.testimonials-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
/* min-width:0 — grid items default to min-width:auto, which won't let a
   track shrink below its content's own min-content size (the avatar +
   name + Google-mark row inside .testimonial-card). At the 4-column
   768px tier specifically that was wide enough to push real page
   overflow — same class of bug as the Team slider's grid-sizing fix
   above, same fix. */
.testimonials-grid > * { min-width: 0; }
.testimonial-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
}
/* Name-first header row (avatar + name + meta), same order Google's own
   review UI uses — moved up from the bottom of the card, which read as
   uneven/backwards next to how real Google reviews are laid out. */
.review-top { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.review-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-white);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
}
.review-who { flex: 1 1 auto; min-width: 0; }
.testimonial-card .review-name { font-weight: 700; color: var(--c-ink); margin: 0; font-size: 0.95rem; }
.testimonial-card .review-meta { font-size: 0.78rem; color: var(--c-muted); margin: 2px 0 0; }
.review-google-mark { flex-shrink: 0; margin-top: 3px; }
/* Full review text, no clamping — the card stretches to match its row's
   tallest cell (the grid default; .testimonial-card no longer overrides
   align-self), so the text has room to show in full without clipping,
   and the photo tile beside it fills that same row height via
   object-fit: cover. */
.testimonial-card .review-body p { color: var(--c-ink); margin: 0 0 10px; font-size: 0.86rem; line-height: 1.55; }
.testimonial-card .review-body p:last-child { margin-bottom: 0; }
.testimonial-img-slide { position: relative; border-radius: var(--radius-md); overflow: hidden; min-height: 220px; }
/* Absolutely positioned (inset: 0) rather than a normal-flow 100%/100%
   image — a normal-flow img contributes its own loaded size to the
   grid's row-auto-sizing calculation (confirmed: once the real image
   file has loaded, Chromium uses ITS actual pixel dimensions for this,
   not the width/height HTML attributes, so shrinking those attributes
   turned out to have zero effect). Taking the img out of flow entirely
   means this tile contributes ~nothing to its row's auto height, so the
   row sizes to the review text next to it instead (its actual governing
   content); object-fit: cover then fills the tile at whatever height
   the grid's default align-items: stretch gives it. */
.testimonial-img-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.reviews-cta { text-align: center; margin-top: 32px; }

@media (min-width: 600px) {
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-img-slide--wide { grid-column: span 2; }
}
@media (min-width: 768px) {
  /* 4 columns either way: row 1 is the wide photo (span 2) + 2 reviews
     (2+1+1=4); row 2 is 3 reviews + the narrow photo (1+1+1+1=4) — DOM
     order in js/main.js renderReviews() already matches this fill order,
     so plain grid auto-placement lands everything correctly without
     needing explicit grid-area names. */
  .testimonials-grid { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, 1fr); }
  /* No aspect-ratio here (deliberately) — a grid item with a CSS
     aspect-ratio does NOT get stretched to match its row by
     align-items: stretch in Chromium, it sizes itself from the ratio
     instead, which is exactly why the photo tile wasn't matching its
     row's height even with the grid default stretch active. Without it,
     the tile fully stretches to the row (object-fit: cover crops it to
     fit, no distortion); the row's own height is kept sane — not
     ballooned by the photo — by giving its <img> a short, wide
     width/height HTML attribute ratio in js/main.js's photoHtml(),
     which is what the grid's auto row-track sizing actually measures. */
  .testimonial-img-slide { min-height: 0; }
}

/* -------------------------------------------------------------------------
   Location
   ------------------------------------------------------------------------- */
.location { background: var(--c-soft-rose); }
.location-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
.hours-card { background: var(--c-white); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); }
.hours-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.hours-table td { padding: 10px 4px; border-bottom: 1px solid var(--c-border); font-size: 0.92rem; }
.hours-table td:first-child { font-weight: 600; color: var(--c-ink); }
.hours-table td:last-child { text-align: right; color: var(--c-muted); }
.hours-table tr:last-child td { border-bottom: none; }
.hours-table tr.is-today { color: var(--c-primary); }
.hours-table tr.is-today td { font-weight: 700; color: var(--c-primary); }
.hours-table tr.is-today td:first-child::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-primary);
  margin-left: 8px;
}

.map-wrap { position: relative; border-radius: var(--radius-md); overflow: hidden; min-height: 340px; box-shadow: var(--shadow-sm); }
.map-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-overlay-card {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: var(--c-white);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 16px;
}
.map-address { font-size: 0.85rem; margin-bottom: 12px; color: var(--c-ink); }
.map-overlay-actions { display: flex; flex-wrap: wrap; gap: 10px; }

@media (min-width: 1024px) {
  .location-grid { grid-template-columns: 0.9fr 1.1fr; }
  .map-wrap { min-height: 420px; }
  .map-overlay-card { max-width: 320px; }
}

/* -------------------------------------------------------------------------
   Contact
   ------------------------------------------------------------------------- */
/* Soft tint behind the section (not white) so the two white, bordered
   panels below — the contact-info box and the form — read as clearly
   defined cards rather than blending into the page. Both panels are
   plain CSS Grid children with no height set, so Grid's default
   `align-items: stretch` already makes them equal height automatically;
   giving both the *same* visible border/background/shadow treatment is
   what actually makes that equal height legible at a glance, which is
   the point of this redesign — previously only the form had a filled
   background, so the two sides never looked like a matched, aligned
   pair even though they may have already been the same height. */
.contact { background: var(--c-bg); }
.contact-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
/* Both panels share one transition (hover lift, matching the treatment
   cards' already-established hover pattern elsewhere on the site) so
   they read as the same kind of surface, not just coincidentally the
   same color. */
.contact-info-box,
.enquiry-form {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.contact-info-box:hover,
.enquiry-form:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
/* Small uppercase label at the top of each panel — gives both a matching
   "header row" the same way a heading would, without needing a full <h3>
   (the section already has its own `<h2>Get in Touch</h2>` just above). */
.contact-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin: 0 0 16px;
}
.contact-info-box { position: relative; overflow: hidden; }
/* Same faint tooth watermark used on the team hover popup — a small,
   consistent brand touch rather than a one-off decoration. */
.contact-info-box::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 46px;
  height: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23A7441D' d='M12 3c-2.2 0-3.2 1.2-4.6 1.2C5.8 4.2 4 5.8 4 8.5c0 2 .7 3.3 1.3 5 .5 1.4.9 2.8 1.1 4.3.2 1.4.5 3.2 1.8 3.2.9 0 1.1-1.1 1.3-2.5.2-1.5.6-2.5 1.5-2.5s1.3 1 1.5 2.5c.2 1.4.4 2.5 1.3 2.5 1.3 0 1.6-1.8 1.8-3.2.2-1.5.6-2.9 1.1-4.3.6-1.7 1.3-3 1.3-5 0-2.7-1.8-4.3-3.4-4.3C15.2 4.2 14.2 3 12 3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.06;
  pointer-events: none;
}
.contact-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--c-border);
  transition: transform 0.18s ease;
}
.contact-item:last-child { padding-bottom: 0; border-bottom: none; }
.contact-item:hover { transform: translateX(3px); }
.contact-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(155deg, var(--c-soft-rose), var(--c-white));
  color: var(--c-primary);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(167, 68, 29, 0.12);
  transition: background 0.18s ease, color 0.18s ease;
}
.contact-item:hover .contact-icon { background: var(--c-primary); color: var(--c-white); }
.contact-item > div { display: flex; flex-direction: column; }
.contact-item strong { font-size: 0.85rem; color: var(--c-ink); }
.contact-item span { font-size: 0.88rem; color: var(--c-muted); word-break: break-word; }
.contact-item-static { cursor: default; }
.contact-item-static:hover { transform: none; }
.contact-item-static:hover .contact-icon { background: linear-gradient(155deg, var(--c-soft-rose), var(--c-white)); color: var(--c-primary); }

.enquiry-form { gap: 16px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 600; font-size: 0.88rem; color: var(--c-ink); }
.form-row input, .form-row select, .form-row textarea {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--c-white);
  color: var(--c-ink);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--c-primary); }
.form-row.has-error input, .form-row.has-error select { border-color: var(--c-primary); }
.field-error { font-size: 0.78rem; color: var(--c-primary); min-height: 1em; }
.pdpa-note { font-size: 0.78rem; color: var(--c-muted); text-align: center; margin: 0; }

@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 0.85fr 1.15fr; gap: 56px; }
}

/* -------------------------------------------------------------------------
   CTA band — pre-footer, mirrors the hero banner's own full-bleed photo +
   scrim + parallax/zoom treatment (js/motion.js initCtaBand), adapted from
   the reference design's matching pre-footer section.
   ------------------------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; padding: 110px 0; }
/* top: -15%/height: 130% (not inset: 0) — a permanent layout-level
   overscan, independent of either GSAP transform applied to this
   element (js/motion.js initCtaBand): the entrance zoom-settle (scale
   1.1 → 1) leaves zero overscan once it finishes, and the *separate*
   scroll-linked parallax (yPercent: 8) was then translating this layer
   past .cta-band's own edge — confirmed by measuring the live gap (not
   assumed): about 28px of the section's own background exposed at the
   top once scrolled partway through. This fixed-size margin comfortably
   covers that translation regardless of what scale the entrance
   animation has settled to. */
.cta-band__bg { position: absolute; left: 0; right: 0; top: -15%; width: 100%; height: 130%; display: flex; }
/* 4 downloaded_img photos now (was 3), laid out in quarters, each one's
   outer edge faded to transparent via a mask gradient and overlapped
   slightly (negative margin) into its neighbour — so every seam between
   photos is a soft blend through the shared dark scrim below, not a hard
   vertical line, per the client's "blend naturally... not separate image
   blocks" request. The scrim (next rule) still carries the actual
   text-contrast job; this is purely about the photos reading as one
   continuous strip. */
.cta-band__bg-img { width: 28%; height: 100%; object-fit: cover; flex-shrink: 0; }
.cta-band__bg-img--a { mask-image: linear-gradient(to right, black 55%, transparent 100%); -webkit-mask-image: linear-gradient(to right, black 55%, transparent 100%); }
.cta-band__bg-img--b, .cta-band__bg-img--c { width: 30%; margin: 0 -4%; mask-image: linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%); -webkit-mask-image: linear-gradient(to right, transparent 0%, black 18%, black 82%, transparent 100%); }
.cta-band__bg-img--d { mask-image: linear-gradient(to right, transparent 0%, black 45%); -webkit-mask-image: linear-gradient(to right, transparent 0%, black 45%); }
.cta-band__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28, 13, 9, 0.6), rgba(28, 13, 9, 0.8)); }
.cta-band__inner { position: relative; z-index: 1; text-align: center; max-width: 640px; margin: 0 auto; }
.cta-band__inner h2 { color: var(--c-white); font-size: 2rem; }
.cta-band__inner p { color: rgba(255, 255, 255, 0.88); font-size: 1.05rem; margin-bottom: 28px; }
.cta-band__btn { margin: 0 auto; }
@media (min-width: 768px) {
  .cta-band { padding: 150px 0; }
  .cta-band__inner h2 { font-size: 2.75rem; }
}

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer { background: var(--c-deep-red); color: rgba(255,255,255,0.85); padding: 56px 0 0; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; padding-bottom: 40px; }
.logo-footer .logo-zh { color: rgba(255,255,255,0.75); border-left-color: rgba(255,255,255,0.25); }
.footer-brand p { color: rgba(255,255,255,0.75); margin: 14px 0 16px; }
.social-links { display: flex; gap: 12px; }
.social-links a {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--c-white);
  transition: background 0.18s ease;
}
.social-links a:hover { background: rgba(255,255,255,0.22); }
.footer-links h3, .footer-contact h3 { color: var(--c-white); font-size: 0.95rem; margin-bottom: 14px; }
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: rgba(255,255,255,0.75); font-size: 0.92rem; }
.footer-links a:hover { color: var(--c-white); }
.footer-contact p { color: rgba(255,255,255,0.75); font-size: 0.88rem; margin: 0 0 8px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.14); padding: 20px 0; text-align: center; font-size: 0.82rem; color: rgba(255,255,255,0.6); }
.footer-bottom p { margin: 0; color: inherit; }

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; }
}

/* -------------------------------------------------------------------------
   Floating WhatsApp button
   ------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--c-whatsapp);
  color: var(--c-white);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-lg);
  z-index: 600;
  transition: transform 0.18s ease;
}
.whatsapp-float:hover { transform: scale(1.06); background: var(--c-whatsapp-dark); }
.whatsapp-tooltip {
  position: absolute;
  right: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--c-ink);
  color: var(--c-white);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
@media (min-width: 1024px) {
  .whatsapp-float:hover .whatsapp-tooltip,
  .whatsapp-float:focus-visible .whatsapp-tooltip { opacity: 1; }
}
