/* ==========================================================================
   Cochin Hair Transplant — site styles
   ========================================================================== */

/* ---------- Fonts (self-hosted, variable weight) ---------- */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/bricolage-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/bricolage-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Design tokens ---------- */
:root {
  /* Colour — brand ink + one accent, warm neutral for quiet surfaces */
  --ink: #0C0C0E;
  --ink-2: #1A1A1D;
  --accent: #E1234F;
  --accent-hover: #C41A42;
  --accent-on-dark: #F0476F;   /* small accent text on ink, meets AA */
  --paper: #fff;
  --tint: #F5F1EC;

  --text: var(--ink);
  --text-2: rgba(12, 12, 14, .68);
  --text-3: rgba(12, 12, 14, .52);
  --line: rgba(12, 12, 14, .12);
  --line-strong: rgba(12, 12, 14, .28);

  --text-inv-2: rgba(255, 255, 255, .7);
  --text-inv-3: rgba(255, 255, 255, .52);
  --line-inv: rgba(255, 255, 255, .14);

  /* Type */
  --display: 'Bricolage Grotesque', 'Manrope', system-ui, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Fluid scale: each step grows smoothly from 320px to ~1280px, no per-breakpoint overrides */
  --fs-h1: clamp(2.5rem, 1.6rem + 4.2vw, 4.75rem);      /* 40 → 76 */
  --fs-h2: clamp(1.875rem, 1.35rem + 2vw, 2.875rem);    /* 30 → 46 */
  --fs-h3: clamp(1.125rem, 1rem + .5vw, 1.25rem);       /* 18 → 20 */
  --fs-lead: clamp(1rem, .95rem + .25vw, 1.0625rem);    /* 16 → 17 */
  --fs-body: 16px;
  --fs-sm: 14px;
  --fs-xs: 12px;

  /* Space + shape */
  --wrap: 1240px;
  --gutter: clamp(16px, 5vw, 40px);                     /* 16 at 320, 20 at 400, 40 on desktop */
  --section-y: clamp(64px, 10vw, 128px);
  --head-gap: clamp(32px, 4.5vw, 64px);
  --header-h: 88px;
  --tap: 44px;                                          /* minimum touch target */
  --r-1: 3px;   /* controls: buttons, inputs, tags */
  --r-2: 6px;   /* surfaces: images, panels */

  --t-fast: .15s ease;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  interpolate-size: allow-keywords;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; }
p, figure, dl, dd, blockquote, ol { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-1); font-weight: 600;
}
.skip-link:focus { top: 12px; }
.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;
}

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--ruled { padding-top: 0; }
/* Hairline drawn inside the gutters, aligned with the content edge */
.section--ruled > .wrap, .footer-bottom {
  background: linear-gradient(var(--line), var(--line)) no-repeat center top / calc(100% - var(--gutter) * 2) 1px;
}
.section--ruled > .wrap { padding-top: var(--section-y); }
.dark { background: var(--ink); color: #fff; }
.tint { background: var(--tint); }

.section-head { margin-bottom: var(--head-gap); }
.section-head--split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; align-items: end; }
.section-head--split > :last-child { justify-self: end; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: 16px;
}
.dark .eyebrow { color: var(--text-inv-3); }
.h2 { font-size: var(--fs-h2); line-height: 1.06; letter-spacing: -.022em; text-wrap: balance; }
.lead { font-size: var(--fs-lead); line-height: 1.65; color: var(--text-2); max-width: 440px; }
.dark .lead { color: var(--text-inv-2); }

.text-link {
  font-size: var(--fs-sm); font-weight: 600;
  text-decoration: underline; text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px; text-underline-offset: 5px;
  transition: text-decoration-color var(--t-fast), color var(--t-fast);
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 22px; border: 1px solid transparent; border-radius: var(--r-1); background: transparent;
  font-family: var(--body); font-size: 15px; font-weight: 600; line-height: 1.2; text-align: center;
  transition: background-color var(--t-fast), border-color var(--t-fast), color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: var(--fs-sm); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-outline-inv { border-color: rgba(255, 255, 255, .32); color: #fff; }
.btn-outline-inv:hover { border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  background: var(--ink); border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.headbar { display: flex; align-items: center; gap: 40px; height: var(--header-h); }
.brand { flex: none; }
/* The logo is a stacked lockup, so the wordmark line is only ~1/5 of its height:
   it needs this much height for "Cochin Hair Transplant" to stay legible */
.brand img { height: 66px; width: auto; }
.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--text-inv-2); font-size: var(--fs-sm); font-weight: 500;
  text-decoration: underline; text-decoration-color: transparent;
  text-decoration-thickness: 2px; text-underline-offset: 8px;
  transition: color var(--t-fast), text-decoration-color var(--t-fast);
}
.nav a:hover { color: #fff; }
.nav a.is-active { color: #fff; text-decoration-color: var(--accent); }
.head-actions { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.head-phones { display: grid; gap: 1px; font-size: 13px; line-height: 1.4; }
.head-phones a {
  display: flex; justify-content: space-between; gap: 14px;
  color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; transition: color var(--t-fast);
}
.head-phones span { color: var(--text-inv-3); font-weight: 500; }
.head-phones a:hover { color: var(--accent-on-dark); }

.menu-toggle {
  display: none; margin-left: auto; position: relative; width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: var(--r-1); background: transparent; color: #fff;
}
.menu-toggle span {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor;
  transition: transform .2s ease;
}
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 55;
  display: flex; flex-direction: column; padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  background: var(--ink); color: #fff; overflow-y: auto; overscroll-behavior: contain;
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; transition: opacity .2s ease; }
.mm-links a {
  display: block; padding: 14px 0; border-bottom: 1px solid var(--line-inv);
  font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -.01em;
}
.mm-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 32px; }
.mm-call { justify-content: space-between; font-variant-numeric: tabular-nums; }
.mm-call span { color: var(--text-inv-3); font-weight: 500; }
.mm-meta { margin-top: 8px; font-size: 13px; color: var(--text-inv-3); }
html.menu-open, html.menu-open body { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(40px, 7vw, 104px)); padding-bottom: 0; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px); align-items: end;
}
.hero h1 { font-size: var(--fs-h1); line-height: 1; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-sub { max-width: 470px; margin-top: clamp(20px, 2.5vw, 28px); font-size: clamp(1rem, .9rem + .5vw, 1.125rem); line-height: 1.6; color: var(--text-inv-2); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(28px, 3vw, 36px); }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-2); background: var(--ink-2); }
.hero-media figcaption { margin-top: 14px; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-inv-3); }
.hero-media figcaption strong { display: block; color: #fff; font-weight: 600; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line-inv);
}
.hero-stats > div {
  display: flex; flex-direction: column-reverse; justify-content: flex-end;
  padding: clamp(18px, 2.5vw, 24px) clamp(12px, 2.5vw, 24px) clamp(22px, 3vw, 32px); border-left: 1px solid var(--line-inv);
}
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dd { font-family: var(--display); font-size: clamp(1.3125rem, .9rem + 2vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.hero-stats dd span { color: var(--accent); }
.hero-stats dt { margin-top: 6px; font-size: clamp(12px, 1vw + 9px, 13px); line-height: 1.35; color: var(--text-inv-3); }

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.service img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-2); background: var(--tint); }
.service-top {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 20px;
  font-size: 13px; color: var(--text-3);
}
.service-top .num { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.service h3 { margin: 10px 0 8px; font-size: var(--fs-h3); line-height: 1.25; letter-spacing: -.01em; }
.service p { font-size: 15px; line-height: 1.6; color: var(--text-2); }

.offer {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 48px;
  margin-top: clamp(48px, 6vw, 72px); padding: clamp(24px, 3vw, 36px) clamp(24px, 3vw, 40px);
  background: var(--tint); border-radius: var(--r-2);
}
.offer-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.offer h3 { margin: 8px 0 6px; font-size: clamp(1.3125rem, 1.15rem + .6vw, 1.5rem); letter-spacing: -.015em; line-height: 1.2; }
.offer p { color: var(--text-2); max-width: 560px; }

/* ---------- Results (slow marquee) ---------- */
.marquee {
  --card: 480px; --gap: 24px;
  position: relative; overflow: hidden;
  /* soft fade at the edges so cards drift in and out rather than being cut */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.marquee:focus-visible { outline-offset: -2px; }
.marquee-track { display: flex; width: max-content; }
.marquee .ba { flex: none; width: var(--card); margin-right: var(--gap); transition: opacity .35s ease; }
.marquee.is-running .marquee-track { animation: marquee var(--marquee-dur, 90s) linear infinite; }
.marquee.is-running:hover .marquee-track,
.marquee.is-running:focus-within .marquee-track { animation-play-state: paused; }
/* On hover the strip pauses and the case under the pointer comes forward */
@media (hover: hover) {
  .marquee.is-running:hover .ba { opacity: .45; }
  .marquee.is-running:hover .ba:hover { opacity: 1; }
}
@keyframes marquee { to { transform: translate3d(-50%, 0, 0); } }
/* Without JS or with reduced motion: a plain swipeable row */
.marquee:not(.is-running) {
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-inline: var(--gutter); -webkit-mask-image: none; mask-image: none;
}
.marquee:not(.is-running)::-webkit-scrollbar { display: none; }
.marquee:not(.is-running) .ba { scroll-snap-align: start; }
.ba-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; border-radius: var(--r-2); overflow: hidden; }
.ba-pair figure { position: relative; aspect-ratio: 1; background: var(--ink-2); }
.ba-pair img { width: 100%; height: 100%; object-fit: cover; }
.ba-tag {
  position: absolute; left: 8px; top: 8px; padding: 4px 7px; border-radius: 2px;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2;
  background: rgba(12, 12, 14, .8); color: #fff;
}
.ba-tag--after { background: var(--accent); }
.ba-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: var(--fs-sm); }
.ba-meta strong { font-weight: 600; }
.ba-meta span { color: var(--text-inv-3); }

/* ---------- Why CHT ---------- */
.why-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(48px, 7vw, 112px); align-items: start; }
.why-intro .lead { margin-top: 24px; }
.rotator { color: var(--accent); white-space: nowrap; display: inline-block; transition: opacity .3s ease, transform .3s ease; }
.rotator.is-out { opacity: 0; transform: translateY(.12em); }

.gallery-wrap { margin-top: 40px; max-width: 440px; }
.gallery { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-2); overflow: hidden; background: var(--tint); touch-action: pan-y; }
.gallery img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease; }
.gallery img.is-on { opacity: 1; }
.g-bar { display: flex; align-items: center; gap: 16px; margin-top: 12px; font-size: 13px; color: var(--text-3); }
.g-count { font-variant-numeric: tabular-nums; }
.g-nav { display: flex; gap: 6px; margin-left: auto; }
.g-nav button {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid var(--line-strong); border-radius: var(--r-1); background: transparent; color: var(--ink);
  transition: border-color var(--t-fast);
}
.g-nav button:hover { border-color: var(--ink); }
.g-nav svg { width: 16px; height: 16px; }

.mini-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.mini-stats > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.mini-stats dd { font-family: var(--display); font-size: clamp(1.375rem, 1.2rem + .6vw, 1.625rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.mini-stats dt { margin-top: 2px; font-size: clamp(12px, 1vw + 9px, 13px); color: var(--text-3); }

.reasons { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.reason { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.reason-num { padding-top: 3px; font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.reason h3 { font-size: clamp(1.0625rem, .98rem + .3vw, 1.1875rem); line-height: 1.3; letter-spacing: -.01em; margin-bottom: 6px; }
.reason p { font-size: 15px; line-height: 1.6; color: var(--text-2); max-width: 62ch; }

/* ---------- Reviews ---------- */
.rating { text-align: right; }
.rating-label { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.rating-score { margin-top: 6px; font-family: var(--display); font-size: clamp(2.375rem, 2.1rem + 1vw, 2.75rem); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.rating-score .stars { font-family: var(--body); font-size: 15px; vertical-align: middle; margin-left: 6px; }
.rating-count { margin-top: 10px; font-size: var(--fs-sm); color: var(--text-2); }
.stars { color: var(--accent); letter-spacing: 2px; }

.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(32px, 5vw, 72px); }
.quote { display: flex; flex-direction: column; padding: 32px 0 40px; border-top: 1px solid var(--line-strong); }
.quote .stars { font-size: 13px; }
.quote blockquote {
  margin: 14px 0 22px; font-family: var(--display); font-size: clamp(1.125rem, 1rem + .6vw, 1.3125rem); font-weight: 500;
  line-height: 1.45; letter-spacing: -.01em; max-width: 34em;
}
.quote figcaption { margin-top: auto; font-size: var(--fs-sm); color: var(--text-3); }
.quote figcaption strong { color: var(--ink); font-weight: 600; margin-right: 8px; }

/* ---------- Assessment ---------- */
.assess-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(48px, 7vw, 112px); align-items: start; }
.assess-intro .lead { margin-top: 24px; }
.contact-list { margin-top: 36px; border-top: 1px solid var(--line); max-width: 440px; }
.contact-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { font-size: 13px; color: var(--text-3); }
.contact-list dd { font-size: 15px; font-weight: 600; text-align: right; }
.contact-list dd a { transition: color var(--t-fast); }
.contact-list dd a:hover { color: var(--accent); }
.contact-list .contact-phone dd { font-family: var(--display); font-size: 20px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.contact-note { margin-top: 18px; max-width: 440px; font-size: var(--fs-sm); line-height: 1.6; color: var(--text-3); }

.form { background: var(--ink); color: #fff; border-radius: var(--r-2); padding: clamp(28px, 4vw, 48px); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.field { display: block; }
.field-label {
  display: block; margin-bottom: 6px; padding: 0;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-inv-3);
}
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .28); border-radius: 0;
  background: transparent; color: #fff; font-size: 16px; outline: none;
  transition: border-color var(--t-fast);
  -webkit-appearance: none; appearance: none;
}
.field input::placeholder, .field textarea::placeholder { color: rgba(255, 255, 255, .34); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: #fff; }
.field input:user-invalid { border-bottom-color: var(--accent-on-dark); }
.field select {
  cursor: pointer; padding-right: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23fff' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 2px center;
}
.field select option { color: var(--ink); background: #fff; }
.field textarea { resize: vertical; min-height: 80px; }
.field--full { margin-top: 32px; }
.form-foot { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; margin-top: 36px; }
.form-foot small { max-width: 280px; font-size: 13px; line-height: 1.5; color: var(--text-inv-3); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: clamp(48px, 7vw, 112px); align-items: start; }
.faq-intro { position: sticky; top: calc(var(--header-h) + 32px); }
.faq-intro .lead { margin-top: 24px; max-width: 360px; }
.help { margin-top: 32px; max-width: 360px; padding: 24px; background: var(--tint); border-radius: var(--r-2); }
.help h3 { font-size: 18px; letter-spacing: -.01em; }
.help p { margin: 6px 0 18px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.help-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.faq-list { border-top: 1px solid var(--line-strong); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
  padding: 20px 0; cursor: pointer; list-style: none;
  font-family: var(--display); font-size: clamp(1rem, .93rem + .3vw, 1.125rem); font-weight: 600; line-height: 1.4; letter-spacing: -.005em;
  transition: color var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary:hover { color: var(--accent); }
.qa-icon { position: relative; flex: none; width: 14px; height: 14px; margin-top: 6px; color: var(--ink); transition: transform .2s ease; }
.qa-icon::before, .qa-icon::after { content: ""; position: absolute; left: 0; top: 50%; width: 14px; height: 1.5px; margin-top: -.75px; background: currentColor; }
.qa-icon::after { transform: rotate(90deg); }
.qa[open] .qa-icon { transform: rotate(45deg); }
.qa p { max-width: 640px; padding: 0 38px 22px 0; color: var(--text-2); }
/* Smooth open/close where supported */
.qa::details-content { block-size: 0; overflow: hidden; transition: block-size .3s ease, content-visibility .3s allow-discrete; }
.qa[open]::details-content { block-size: auto; }

.faq-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.faq-more > div { overflow: hidden; min-height: 0; }
.faq-more.is-open { grid-template-rows: 1fr; }
.faq-toggle-row { display: flex; align-items: center; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.caret { width: 7px; height: 7px; margin-top: -3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s ease; }
#faq-toggle[aria-expanded="true"] .caret { margin-top: 3px; transform: rotate(-135deg); }
.faq-count { font-size: 13px; color: var(--text-3); }

/* ---------- Branches ---------- */
.branch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-inv); }
.branch { display: flex; flex-direction: column; padding: 32px 32px 8px clamp(32px, 5vw, 64px); border-left: 1px solid var(--line-inv); }
.branch:first-child { padding-left: 0; border-left: 0; }
.branch h3 { font-size: 24px; letter-spacing: -.015em; line-height: 1.2; }
.branch-tag { margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--accent-on-dark); }
.branch address { margin-top: 20px; font-style: normal; font-size: 15px; line-height: 1.7; color: var(--text-inv-2); }
.branch-contact { margin-top: 12px; font-size: 15px; line-height: 1.7; color: var(--text-inv-2); }
.branch-contact a { color: #fff; font-variant-numeric: tabular-nums; transition: color var(--t-fast); }
.branch-contact a:hover { color: var(--accent-on-dark); }
.branch .text-link { align-self: flex-start; margin-top: auto; padding-top: 24px; }

/* ---------- Footer ---------- */
.site-footer { padding-top: clamp(56px, 7vw, 88px); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 40px; padding-bottom: clamp(40px, 5vw, 64px); }
.footer-brand img { height: 88px; width: auto; margin-left: -4px; }
.footer-brand p { margin-top: 16px; max-width: 320px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.footer-col h2 { margin-bottom: 6px; font-family: var(--body); font-size: var(--fs-xs); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.footer-col a { font-size: 15px; transition: color var(--t-fast); overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--accent); }
.footer-muted { font-size: var(--fs-sm); color: var(--text-3); }
.footer-phone { font-variant-numeric: tabular-nums; }
.footer-phone span { display: block; font-size: 12px; color: var(--text-3); line-height: 1.3; }
.footer-wa { font-size: 15px; color: var(--text-3); }
.footer-wa a { color: var(--ink); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap;
  padding-top: 24px; padding-bottom: 32px;
  font-size: 13px; color: var(--text-3);
}
.footer-bottom a { color: var(--ink); font-weight: 600; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }

/* ==========================================================================
   Responsive
   Type and spacing are fluid (see tokens), so breakpoints below only change
   layout. Three tiers: desktop (> 1100), tablet (641–1100), phone (≤ 640).
   ========================================================================== */

/* ---------- ≤ 1100: small laptops and landscape tablets ---------- */
@media (max-width: 1100px) {
  .head-phones { display: none; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 32px; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

/* ---------- ≤ 960: tablets. Menu collapses, two-column sections restack ---------- */
@media (max-width: 960px) {
  :root { --header-h: 76px; }
  .brand img { height: 58px; }
  .nav, .head-actions { display: none; }
  .menu-toggle { display: block; }

  /* Touch layouts lead with the photo: full-bleed under the header, so the
     first screen shows the whole picture instead of slicing it at the fold */
  .hero { padding-top: var(--header-h); }
  .hero-grid { grid-template-columns: 1fr; align-items: start; gap: clamp(28px, 5vw, 40px); }
  .hero-media { order: -1; position: relative; margin-inline: calc(var(--gutter) * -1); }
  .hero-media img { aspect-ratio: 2 / 1; border-radius: 0; object-position: 50% 40%; }
  /* Caption becomes a slim strip attached under the photo: nothing covers the image */
  .hero-media figcaption {
    margin: 0; padding: 10px var(--gutter); background: var(--ink-2);
    border-bottom: 1px solid var(--line-inv); font-size: 13px; line-height: 1.4;
  }

  .marquee { --card: 400px; --gap: 20px; }

  .why-grid, .assess-grid, .faq-grid { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
}

/* ---------- 641–960: tablet compositions — use the width instead of one long column ---------- */
@media (min-width: 641px) and (max-width: 960px) {
  /* Heading + copy on the left, supporting block on the right */
  .why-intro, .assess-intro, .faq-intro {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr;
    column-gap: 40px; align-items: start;
  }
  .why-intro > :not(.gallery-wrap), .assess-intro > .eyebrow, .assess-intro > .h2, .assess-intro > .lead,
  .faq-intro > :not(.help) { grid-column: 1; }
  .why-intro .gallery-wrap { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; max-width: none; }
  .assess-intro .contact-list { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; max-width: none; }
  .assess-intro .contact-note { grid-column: 2; max-width: none; }
  .faq-intro .help { grid-column: 2; grid-row: 1 / span 3; margin-top: 0; max-width: none; }
}

/* ---------- ≤ 640: phones — composed for a 375–430px canvas, not a squeezed desktop ----------
   Everything here is scoped to this query, so desktop and tablet are untouched. */
@media (max-width: 640px) {
  :root {
    --header-h: 78px;
    --gutter: clamp(20px, 5.6vw, 24px);
    --section-y: clamp(52px, 14vw, 60px);
    --head-gap: 28px;
    --fs-h2: clamp(1.625rem, 1.2rem + 2.2vw, 2rem);      /* 26 → 29 */
    --fs-lead: 15px;
  }
  body { font-size: 15px; }
  .eyebrow { margin-bottom: 12px; letter-spacing: .1em; }
  .lead { line-height: 1.6; }

  /* Header: compact bar, borderless menu icon with a full 44px hit area */
  .brand img { height: 64px; }
  .menu-toggle { width: 44px; height: 44px; margin-right: -10px; border: 0; }
  .menu-toggle span { left: 12px; right: 12px; }
  .mm-links a { font-size: 22px; padding: 13px 0; }

  /* ---------- Hero: one composed first screen ----------
     Message → value → action on top; the photo fills whatever height is left,
     edge to edge, so it ends at the bottom of the screen instead of being sliced. */
  .hero { padding-top: var(--header-h); }
  .hero-grid {
    display: flex; flex-direction: column; gap: 0;
    min-height: calc(100vh - var(--header-h));
    min-height: calc(100svh - var(--header-h));
  }
  .hero-copy { padding-top: 28px; }
  .hero h1 { font-size: clamp(2.125rem, 1.35rem + 3.8vw, 2.625rem); line-height: 1.02; }   /* 34 → 42 */
  .hero-sub { margin-top: 14px; font-size: 15px; line-height: 1.55; }
  .hero-ctas { flex-direction: column; gap: 2px; margin-top: 22px; }
  .hero-ctas .btn { width: 100%; }
  /* One clear primary action; the secondary becomes a quiet text link */
  .hero-ctas .btn-outline-inv {
    min-height: 44px; padding: 0; border-color: transparent;
    text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35);
    text-decoration-thickness: 1px; text-underline-offset: 5px;
  }
  .hero-ctas .btn-outline-inv:hover { text-decoration-color: #fff; }

  /* Figure dissolves so its caption can sit with the copy and the photo can flex */
  .hero-media { display: contents; }
  .hero-media figcaption {
    order: 1; margin: 12px 0 20px; padding: 0; background: none; border: 0;
    font-size: 13px; line-height: 1.45; color: var(--text-inv-3);
  }
  .hero-media img {
    order: 2; flex: 1 1 0; min-height: 160px;
    width: calc(100% + var(--gutter) * 2); max-width: none; height: auto; aspect-ratio: auto;
    margin-inline: calc(var(--gutter) * -1);
    object-fit: cover; object-position: 55% 38%; border-radius: 0;
  }
  .hero-stats { margin-top: 0; border-top: 0; }
  .hero-stats > div { padding: 18px 10px 22px; }
  .hero-stats > div:first-child { padding-left: 0; }
  /* Short phones (e.g. 360×640, 375×667): tighten the copy so the photo still ends at the fold */
  @media (max-height: 700px) {
    .hero-copy { padding-top: 18px; }
    .hero-media figcaption { margin: 10px 0 14px; }
    .hero-media img { min-height: 150px; }
  }

  /* ---------- Services: an editorial list, not a card grid ---------- */
  .services { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
  .service {
    display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: start;
    padding: 20px 0; border-bottom: 1px solid var(--line);
  }
  .service img { aspect-ratio: 1; border-radius: var(--r-1); }
  /* Number and details flow as one line of text, wrapping naturally */
  .service-top { display: block; margin-top: 0; font-size: 12px; line-height: 1.5; }
  .service-top .num::after { content: "·"; margin: 0 6px; color: var(--text-3); }
  .service h3 { margin: 4px 0 4px; font-size: 17px; }
  .service p { font-size: 14px; line-height: 1.55; }
  /* Offer: a full-width band that closes the section, not a floating card */
  .offer {
    grid-template-columns: 1fr; gap: 18px; margin-top: 32px;
    margin-inline: calc(var(--gutter) * -1); padding: 26px var(--gutter); border-radius: 0;
  }
  .offer h3 { font-size: 20px; }
  .offer p { font-size: 14px; }
  .offer .btn { width: 100%; }

  /* ---------- Results ---------- */
  .section-head--split { grid-template-columns: 1fr; gap: 14px; align-items: start; }
  .section-head--split > :last-child { justify-self: start; }
  .marquee { --card: min(300px, 80vw); --gap: 12px; -webkit-mask-image: none; mask-image: none; }
  .ba-meta { margin-top: 10px; font-size: 13px; }

  /* ---------- Why CHT: reasons first, the clinic gallery supports them ---------- */
  .why-grid { gap: 0; }
  .why-intro { display: contents; }
  .why-intro .lead { margin-top: 14px; }
  .reasons { order: 1; margin-top: 28px; }
  .reason { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; padding: 18px 0; }
  .reason h3 { font-size: 17px; margin-bottom: 4px; }
  .reason p { font-size: 14px; }
  .gallery-wrap { order: 2; margin-top: 32px; max-width: none; }
  .gallery { aspect-ratio: 16 / 10; }

  /* ---------- Reviews: a swipeable row instead of a long stack ---------- */
  .rating { text-align: left; }
  .rating-score { font-size: 36px; }
  .quotes {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; gap: 16px;
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .quotes::-webkit-scrollbar { display: none; }
  .quote { scroll-snap-align: start; padding: 20px 0 8px; }
  .quote blockquote { margin: 12px 0 16px; font-size: 17px; line-height: 1.5; }

  /* ---------- Assessment: the form comes first, alternatives after ---------- */
  .assess-grid { gap: 0; }
  .assess-intro { display: contents; }
  .assess-intro .lead { margin-top: 14px; }
  .form {
    order: 1; margin: 24px calc(var(--gutter) * -1) 0; border-radius: 0; padding: 28px var(--gutter) 32px;
  }
  .form-grid { grid-template-columns: 1fr; gap: 22px; }
  .field--full { margin-top: 22px; }
  .form-foot { margin-top: 28px; }
  .form-foot .btn { width: 100%; }
  .form-foot small { max-width: none; }
  .contact-list { order: 2; margin-top: 28px; max-width: none; }
  .contact-note { order: 3; max-width: none; }

  /* ---------- FAQ: questions first, the help prompt closes the section ---------- */
  .faq-grid { gap: 0; }
  .faq-intro { display: contents; }
  .faq-intro .lead { margin-top: 14px; }
  .faq-grid > :last-child { order: 1; margin-top: 24px; }
  /* Same full-width band treatment as the services offer */
  .help { order: 2; margin: 32px calc(var(--gutter) * -1) 0; max-width: none; padding: 26px var(--gutter); border-radius: 0; }
  .help-actions .btn { flex: 1 1 100%; }
  .qa summary { padding: 17px 0; gap: 16px; }
  .qa p { padding-right: 0; font-size: 15px; }

  /* ---------- Branches ---------- */
  .branch-grid { grid-template-columns: 1fr; }
  .branch, .branch:first-child { padding: 22px 0; border-left: 0; }
  .branch + .branch { border-top: 1px solid var(--line-inv); }
  .branch h3 { font-size: 22px; }
  .branch address { margin-top: 12px; }

  .nf-actions .btn { flex: 1 1 100%; max-width: 340px; }   /* 404 page */

  /* ---------- Footer: brand, then how to reach us, then navigation ---------- */
  .site-footer { padding-top: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-bottom: 32px; }
  .footer-brand img { height: 92px; }
  .footer-brand p { margin-top: 12px; font-size: 14px; }
  .footer-col:nth-child(3) { order: 1; grid-column: 1 / -1; }   /* Contact */
  .footer-col:nth-child(2) { order: 2; }                        /* Explore */
  .footer-col:nth-child(4) { order: 3; }                        /* Branches */
  .footer-bottom { flex-direction: column; font-size: 12px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* ---------- Sticky action bar ---------- */
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    display: grid; grid-template-columns: auto 1fr; gap: 8px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line);
    transform: translateY(100%); transition: transform .25s ease;
  }
  .action-bar.is-visible { transform: none; }
  .action-bar .btn { width: 100%; min-height: 46px; padding: 8px clamp(14px, 5vw, 22px); white-space: nowrap; }
  .menu-open .action-bar { transform: translateY(100%); }

  /* Branch pickers: tap Call / Free consultation, then choose a branch */
  .pick summary { list-style: none; cursor: pointer; }
  .pick summary::-webkit-details-marker { display: none; }
  .pick[open] summary.btn-outline { border-color: var(--ink); }
  .pick[open] summary.btn-primary { background: var(--accent-hover); }
  .pick-list {
    position: absolute; left: var(--gutter); right: var(--gutter); bottom: calc(100% + 8px);
    display: grid; background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-2);
    box-shadow: 0 8px 24px rgba(12, 12, 14, .12); overflow: hidden;
  }
  .pick-list a {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    min-height: 52px; padding: 12px 16px; font-weight: 600; font-variant-numeric: tabular-nums;
  }
  .pick-list a + a { border-top: 1px solid var(--line); }
  .pick-list a:active { background: var(--tint); }
  .pick-list span { font-weight: 500; color: var(--text-3); }
}

/* ---------- Touch devices: every tappable thing gets a 44px target ---------- */
@media (pointer: coarse) {
  .btn-sm { min-height: var(--tap); }
  .g-nav button { width: var(--tap); height: var(--tap); }
  .brand { display: flex; align-items: center; min-height: var(--tap); }

  /* Stacked link lists: grow the row, not the text */
  .footer-col { gap: 0; }
  .footer-col h2 { margin-bottom: 8px; }
  .footer-col > a { display: flex; flex-direction: column; justify-content: center; min-height: var(--tap); min-width: var(--tap); }
  .footer-muted { padding-top: 10px; }

  /* Inline links inside text: extend the hit area without moving the layout */
  .footer-wa a, .contact-list dd a, .branch-contact a, .branch .text-link, .rating-count a, .footer-bottom a {
    display: inline-block; padding-block: 12px; margin-block: -12px;
  }
  .footer-wa { padding-block: 12px; }
  .branch .text-link { margin-top: auto; }
}

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