﻿/*
Theme Name: MB Theme
Theme URI: https://www.drmaroofbeg.com
Author: Dr. Maroof Beg
Author URI: https://www.drmaroofbeg.com
Description: A custom, self-contained WordPress theme for Dr. Maroof Beg's cosmetic dentistry practice in Dubai. Ivory/near-black editorial design (Archivo + Newsreader), built from a hand-coded static site. Includes before/after comparison sliders, a smile-personality quiz, data-driven treatment tiles, and a fully native WordPress blog (home.php + single.php use the standard Loop, so posts are written in the normal WordPress editor).
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary — for Dr. Maroof Beg's use only.
Text Domain: mb-theme

------------------------------------------------------------------------------
HOW THIS FILE WORKS (read this if you are new to WordPress themes)
------------------------------------------------------------------------------
This comment block above is REQUIRED — it's how WordPress recognises this
folder as a theme and what shows up in Appearance > Themes. Don't delete it.

Everything BELOW this comment block is the actual site CSS, copied over
unchanged from the original static site's style.css. WordPress loads this
whole file automatically because functions.php enqueues it with
get_stylesheet_uri() — you do not need to link it in any template file
yourself. If you want to add small tweaks later (e.g. via Appearance >
Customize > Additional CSS, or by editing this file directly), anything you
add at the very end of this file will win over the rules above it, since
later CSS rules of equal specificity always override earlier ones.
------------------------------------------------------------------------------
*/

/* ==========================================================================
   WORDPRESS-SPECIFIC ADDITIONS
   Everything from here to the end of the file is NEW — it didn't exist
   in the original static site's style.css. It exists because native
   WordPress features (pagination, the block editor's own image/quote
   blocks) needed a small amount of styling to look native to the site
   the first time you use them, with zero extra work on your part.
   Everything ABOVE this comment is the original CSS, unchanged.
   ========================================================================== */

/* ---------- Blog pagination (home.php) ----------------------------
   WordPress's default pagination markup uses a class ("nav-links")
   that's also the site's own primary-menu class — without this, the
   pagination links would inherit the primary nav's "hidden until the
   mobile menu opens" styling and simply not show up. See the comment
   in home.php next to the_posts_pagination() for the full story. ---------- */
.mb-pagination { text-align: center; margin: clamp(2.5rem, 5vh, 3.5rem) 0 1rem; }
.mb-pagination .nav-links {
  display: flex !important; position: static !important; inset: auto !important;
  transform: none !important; background: none !important;
  flex-direction: row !important; justify-content: center !important; align-items: center !important;
  gap: 0.6rem !important;
}
.mb-pagination .page-numbers {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 700;
  padding: 0.6em 1em; border: 1px solid var(--line-strong); color: var(--ink-soft);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
a.page-numbers:hover { border-color: var(--ink); color: var(--ink); }
.mb-pagination .page-numbers.current { background: var(--ink); color: var(--ivory); border-color: var(--ink); }
.mb-pagination .page-numbers.dots { border: none; }

/* ---------- Block-editor defaults inside a post's body -------------
   the_content() on single.php prints whatever blocks you actually used
   in the post editor. .post-body h2/h3/p/ul/ol above already match
   WordPress's plain heading/paragraph/list block output exactly (they
   print plain <h2>/<h3>/<p>/<ul>/<ol> tags with no extra class), but the
   Quote and Image blocks add their own wrapper classes, so they need a
   couple of matching rules to look native to the site out of the box. ---------- */
.post-body .wp-block-quote {
  margin: 2.4rem 0; padding-left: 1.6rem; border-left: 2px solid var(--ink);
}
.post-body .wp-block-quote p {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1.25rem; line-height: 1.6; color: var(--ink); margin-bottom: 0;
}
.post-body .wp-block-quote cite {
  display: block; margin-top: 0.6rem;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); font-style: normal;
}
.post-body .wp-block-image { margin: 2.4rem 0; }
.post-body .wp-block-image img {
  width: 100%; height: auto; display: block;
  border-radius: var(--radius-md); filter: grayscale(1);
}
.post-body .wp-block-image figcaption {
  font-family: var(--serif); font-style: italic; font-size: 0.85rem;
  color: var(--ink-soft); margin-top: 0.7rem; text-align: center;
}
/* ==========================================================================
   Dr. Maroof Beg Homepage
   Editorial, magazine-like light theme. Ivory + near-black + B&W photography.
   Archivo (bold uppercase headings) + Newsreader (light serif body/quotes).
   ========================================================================== */

:root {
  --ivory:      #f6f3ec;
  --ivory-2:    #efeade;
  --ink:        #1a1815;
  --ink-soft:   #55524b;
  --line:       rgba(26,24,21,0.15);
  --line-strong: rgba(26,24,21,0.35);

  --footer-bg:  #16140f;
  --footer-ink: #f2ede2;

  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: 'Newsreader', Georgia, serif;

  --container: 1280px;
  --nav-h: 78px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: auto; } /* Lenis handles smooth scroll */

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:link, a:visited { color: inherit; }

h1, h2, h3 {
  font-family: var(--sans);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0;
}

p { margin: 0; }

.section-inner, .section-head { max-width: var(--container); margin: 0 auto; padding: 0 6vw; }

.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;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--ivory);
  padding: 0.8em 1.2em; z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Underlined links ---------- */
.link-underline {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--line-strong);
  transition: border-color 0.5s var(--ease), opacity 0.5s var(--ease);
}
.link-underline:hover { border-color: transparent; opacity: 0.6; }

/* ---------- Reveal (scroll-in) ---------- */
/* Base state is fully visible so content isn't hidden if JS fails to run;
   script.js sets the hidden starting state itself before animating in. */
.reveal { will-change: opacity, transform, filter; }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: var(--ivory);
  border-bottom: 1px solid transparent;
  transition: border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.nav.is-solid { border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(0,0,0,0.02); }
.nav-inner {
  width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 6vw;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 30px; width: auto; filter: brightness(0); }

.nav-links { display: none; list-style: none; margin: 0; padding: 0; align-items: center; gap: 2.2rem; }
.nav-links a {
  font-family: var(--sans);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  position: relative; padding-bottom: 4px;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1px;
  background: var(--ink); transition: width 0.4s var(--ease);
}
.nav-links a:hover::after { width: 100%; }
.nav-links .nav-cta { border-bottom: 1px solid var(--line-strong); padding-bottom: 4px; }
.nav-links .nav-cta::after { display: none; }
.nav-links .nav-cta:hover { border-color: transparent; opacity: 0.6; }
.nav-links a[aria-current="page"]::after { width: 100%; }

.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 32px; height: 32px; background: none; border: none; cursor: pointer; z-index: 600;
}
.nav-toggle span { display: block; width: 100%; height: 1px; background: var(--ink); transition: transform 0.4s var(--ease), opacity 0.4s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
}
@media (max-width: 959px) {
  /* Closed (default) state: fully removed from the page, not just
     transformed off-screen — this is the fix for the menu showing by
     default on load at mobile widths. */
  .nav-links {
    display: none;
  }

  /* Open state: full-viewport overlay, solid ivory (nothing shows
     through), above all page content. .nav-logo/.nav-toggle are
     siblings inside the same #siteNav stacking context, so they get
     their own stacking bump below so they stay visible on top of it. */
  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 610;
    background: var(--ivory);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* Safety net only — with the containing-block fix below and the
       compact sizing here, ~7 links + the CTA fit with room to spare on
       any real phone. This only kicks in on a genuinely short viewport
       (e.g. landscape), where it's the correct fallback. */
    overflow-y: auto;
    padding: 4.5rem 8vw 1.75rem;
  }
  .nav-logo, .nav-toggle {
    position: relative;
    z-index: 620;
  }

  .nav-links a {
    font-family: var(--serif);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-transform: none;
    padding: 0.3rem 0;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
  .nav-links a::after,
  .nav-links a[aria-current="page"]::after { display: none; }

  .nav-links .nav-cta {
    margin-top: 0.4rem;
    padding: 0.85rem 2.2rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius-pill);
    font-family: var(--sans);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    min-height: auto;
  }
  .nav-links .nav-cta:hover {
    background: var(--ink);
    color: var(--ivory);
    border-color: var(--ink);
    opacity: 1;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: flex;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-bg img {
  position: absolute; inset: 0;
  width: 100% !important; height: 100% !important;
  object-fit: cover !important;
  object-position: 83% 15% !important;
  filter: grayscale(1);
}
.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.1) 45%, rgba(0,0,0,0.55) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  align-self: flex-end;
  width: 100%;
  padding: 0 6vw 8vh;
  max-width: 900px;
  min-width: 0;
}
.hero-title {
  font-family: var(--serif);
  font-weight: 300;
  text-transform: none;
  font-size: 2.3rem;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #fff;
}
@media (min-width: 560px) { .hero-title { font-size: 2.9rem; } }
@media (min-width: 760px) { .hero-title { font-size: 3.7rem; } }
@media (min-width: 1100px) { .hero-title { font-size: 4.6rem; } }
@media (min-width: 1400px) { .hero-title { font-size: 5.3rem; } }

/* Forces the headline onto two lines below 500px instead of relying on
   organic wrap, which has proven unreliable for specific font/size
   combinations (see CLAUDE.md). Above 500px it fits on one line fine. */
.force-break { display: none; }
@media (max-width: 640px) {
  .force-break { display: block; content: ''; }
}

.hero-sub {
  margin-top: 1.4rem;
  max-width: 46ch;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: rgba(255,255,255,0.88);
}
.hero .link-hero {
  margin-top: 1.8rem;
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.5);
}
.hero .link-hero:hover { border-color: transparent; opacity: 0.75; }

/* ==========================================================================
   SECTION HEAD (shared)
   ========================================================================== */
.section-head { text-align: center; padding-top: clamp(4.5rem, 9vh, 6.5rem); }
.section-head h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: 0.01em;
}
.section-head .lede {
  margin: 1.1rem auto 0;
  max-width: 60ch;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--ink-soft);
}

/* ==========================================================================
   EXPERIENCE ROW
   ========================================================================== */
.experience { padding-bottom: clamp(4rem, 8vh, 6rem); }
.experience-grid {
  margin-top: clamp(3rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  background: var(--line);
}
@media (min-width: 860px) {
  .experience-grid { grid-template-columns: repeat(3, 1fr); }
}
.experience-grid figure { margin: 0; background: var(--ivory); overflow: hidden; }
.experience-grid img {
  width: 100% !important; aspect-ratio: 3 / 2 !important; object-fit: cover;
  height: auto !important;
  filter: grayscale(1);
  transition: filter 0.7s var(--ease), transform 0.7s var(--ease);
}
.experience-grid figure:hover img { filter: grayscale(0); transform: scale(1.04); }
/* Per-image crop: each source has a different subject position, so a
   single shared object-position crops at least one of them badly. */
.experience-grid figure:nth-child(1) img { object-position: center 45% !important; }
.experience-grid figure:nth-child(2) img { object-position: center 22% !important; }
.experience-grid figure:nth-child(3) img { object-position: center center !important; }
.experience-grid figcaption { padding: 1.6rem 1.8rem 2.2rem; }
.experience-grid h3 {
  font-size: 0.98rem; letter-spacing: 0.04em; margin-bottom: 0.7rem;
}
.experience-grid p {
  font-family: var(--serif); font-size: 0.98rem; color: var(--ink-soft); line-height: 1.65;
}

/* ==========================================================================
   MB CONCEPT (full-bleed)
   ========================================================================== */
.concept-full {
  position: relative;
  min-height: 90vh;
  display: flex;
  overflow: hidden;
}
.concept-full-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.concept-full-bg img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
  filter: grayscale(1);
}
.concept-full-scrim {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 55%, rgba(0,0,0,0.05) 100%);
}
.concept-full-content {
  position: relative; z-index: 2;
  align-self: flex-end;
  padding: 4rem 6vw;
  max-width: 640px;
  min-width: 0;
}
.concept-full-content h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
  color: #fff;
}
.concept-full-content p {
  margin-top: 1.3rem;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
}
.concept-full-content .link-underline {
  margin-top: 1.6rem;
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.5);
}
.concept-full-content .link-underline:hover { border-color: transparent; opacity: 0.75; }

/* ==========================================================================
   BEFORE & AFTER
   ========================================================================== */
.before-after { padding-bottom: clamp(4.5rem, 9vh, 7rem); }

.ba-grid {
  margin-top: clamp(3rem, 6vh, 4rem);
  max-width: var(--container);
  margin-left: auto; margin-right: auto;
  padding: 0 6vw;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-content: center;
  gap: 1.4rem;
}
@media (min-width: 640px) {
  .ba-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 420px)); }
}

.ba-case {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--ivory-2);
  border: 1px solid var(--line);
}
.ba-case img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 900ms var(--ease), transform 900ms var(--ease);
}
.ba-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(26,24,21,0) 45%, rgba(26,24,21,0.6) 100%);
  opacity: 0;
  transition: opacity 500ms var(--ease);
}
.ba-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.8rem;
  opacity: 0;
  transition: opacity 500ms var(--ease);
}
.ba-overlay-label {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivory);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--ivory);
}
.ba-case:hover img,
.ba-case:focus-visible img { filter: grayscale(0); transform: scale(1.04); }
.ba-case:hover .ba-scrim, .ba-case:focus-visible .ba-scrim,
.ba-case:hover .ba-overlay, .ba-case:focus-visible .ba-overlay { opacity: 1; }
.ba-view-all { text-align: center; margin-top: clamp(2rem, 4vh, 2.8rem); }

/* ---------- Before & After slider cards (shared: homepage grid + My
   Work grid, rendered by ba-cards.js from cases.js). New class names —
   .ba-case/.work-card above are left untouched and simply unused by
   these two pages now. Deliberately full colour at all times: no
   grayscale filter anywhere here, unlike .ba-case's hover-to-colour or
   .case-slider's grayscale "after" image on case.html, since the colour
   result is the entire point of this comparison. ---------- */
.ba-slider-grid {
  max-width: var(--container); margin: 0 auto; padding: 0 6vw;
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
}
@media (min-width: 640px) {
  .ba-slider-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .ba-slider-grid { grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
}
.ba-slider-card.is-hidden { display: none; }

.ba-slider {
  position: relative; width: 100%; aspect-ratio: 4 / 5;
  overflow: hidden; border-radius: var(--radius-lg);
  cursor: ew-resize; user-select: none; background: var(--ivory-2);
  box-shadow: var(--elevate-shadow);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
  /* Allow normal vertical page scroll when a touch merely passes over
     the card; the handle strip below opts out of that itself so
     dragging it doesn't fight the page. */
  touch-action: pan-y;
}
.ba-slider:hover { box-shadow: var(--elevate-shadow-hover); transform: translateY(-3px); }
/* Both layers are full-bleed base images — the "after" image sits
   underneath, the "before" image sits on top of it at the same size
   and is revealed only up to the divider via clip-path (set in
   ba-cards.js), never squeezed into a fraction of the card's width.
   pointer-events: none + the drag-prevention properties below mean the
   images themselves never intercept mouse/touch input or trigger the
   browser's native "drag this image" behaviour — only the handle strip
   (on top, see below) responds, so grabbing anywhere near the divider
   always moves the divider instead of dragging the photo. */
.ba-slider-after, .ba-slider-before {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
}
.ba-slider-before { clip-path: inset(0 50% 0 0); }
.ba-slider-tag {
  position: absolute; bottom: 1rem; z-index: 2;
  font-family: var(--sans); font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ivory); background: rgba(22,20,15,0.65);
  padding: 0.45em 0.9em; border-radius: var(--radius-pill);
  pointer-events: none;
}
.ba-slider-tag-before { left: 1rem; }
.ba-slider-tag-after { right: 1rem; }
/* The draggable zone is a full-height 44px strip centred on the
   divider — not just the thin visible line — so it can be grabbed
   anywhere top-to-bottom, not only right at the grip circle. The thin
   line itself is drawn separately via ::before so the strip stays
   visually elegant despite being much wider than it looks. */
.ba-slider-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 44px;
  transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize;
  touch-action: none;
  z-index: 3;
}
.ba-slider-handle::before {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; background: var(--ivory);
  transform: translateX(-50%);
  pointer-events: none;
}
.ba-slider-grip {
  /* Sized for a comfortable touch target even when 3 cards share a row
     on desktop and each card is fairly narrow. */
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ivory); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(26,24,21,0.3);
  transition: transform 0.3s var(--ease);
  pointer-events: none; /* clicks/touches land on .ba-slider-handle itself */
}
.ba-slider-handle:hover .ba-slider-grip,
.ba-slider-handle:focus-visible .ba-slider-grip { transform: scale(1.08); }

.ba-consent {
  text-align: center; font-family: var(--serif); font-style: italic;
  font-size: 0.85rem; color: var(--ink-soft); margin-top: 1.5rem;
}

/* ==========================================================================
   THE PROCESS
   ========================================================================== */
.process { padding-bottom: clamp(4.5rem, 9vh, 7rem); }
.process-grid {
  margin-top: clamp(3rem, 6vh, 4rem);
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
}
@media (min-width: 860px) { .process-grid { grid-template-columns: repeat(3, 1fr); } }

.process-item { position: relative; overflow: hidden; }
.process-item img {
  width: 100% !important; aspect-ratio: 1 / 1 !important; object-fit: cover;
  height: auto !important;
  filter: grayscale(1);
  transition: filter 0.7s var(--ease), transform 1.2s var(--ease);
}
.process-item:hover img { filter: grayscale(0); transform: scale(1.04); }
/* Per-image crop: these are wide/low-angle action shots, each with the
   actual subject (doctor + patient) in a different part of the frame. */
.process-item:nth-child(1) img { object-position: 62% 22% !important; }
.process-item:nth-child(2) img { object-position: 58% 62% !important; }
.process-item:nth-child(3) img { object-position: center 0% !important; }
.process-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.8rem;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.05) 60%);
}
.process-overlay h3 { font-size: 0.92rem; letter-spacing: 0.03em; color: #fff; margin-bottom: 0.6rem; }
.process-overlay p { font-family: var(--serif); font-size: 0.92rem; color: rgba(255,255,255,0.85); line-height: 1.55; }

/* ==========================================================================
   PORTRAIT SPLIT
   ========================================================================== */
.portrait-split {
  display: grid;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .portrait-split { grid-template-columns: 1fr 1fr; min-height: 82vh; }
}
.portrait-split-media { overflow: hidden; }
.portrait-split-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); min-height: 420px; }
.portrait-split-text {
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(3rem, 8vh, 5rem) 6vw;
  background: var(--ivory-2);
}
.portrait-split-text h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); max-width: 16ch; }
.portrait-split-text blockquote {
  margin: 1.8rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.6;
  color: var(--ink);
  max-width: 34ch;
}
.attribution {
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.6;
}
.portrait-split-text .link-underline { margin-top: 1.8rem; }

/* ==========================================================================
   CREDENTIALS
   ========================================================================== */
.credentials {
  padding: clamp(4.5rem, 9vh, 6.5rem) 0 clamp(5rem, 10vh, 7.5rem);
  background: var(--ivory-2);
  overflow: hidden;
}
.credentials .section-head { text-align: center; padding-top: 0; }

.credentials-eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 0.7rem;
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1.1rem;
}
.credentials-eyebrow .eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }

/* Compact bento grid: 2 columns of floating cards on desktop, single
   column on mobile. Replaces the old single-column divider list (which
   made this section tall enough to cause scroll fatigue) with the same
   floating-card / soft-shadow language already used elsewhere on the
   site (.cred-card, .tx-tile), so it stays on-brand while taking roughly
   half the vertical space. */
.credentials-grid {
  list-style: none;
  margin: clamp(3rem, 6vh, 4rem) auto 0;
  padding: 0;
  max-width: 980px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 700px) {
  .credentials-grid { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
}
.credential-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1.5rem 1.6rem;
  background: var(--ivory);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevate-shadow);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.credential-card:hover { box-shadow: var(--elevate-shadow-hover); transform: translateY(-3px); }
.credential-card:active { transform: translateY(-1px) scale(0.99); }
.credential-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--line-strong);
  line-height: 1;
}
.credential-kicker {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 0.45rem;
}
.credential-copy h3 { font-size: 0.92rem; letter-spacing: 0.005em; line-height: 1.35; margin-bottom: 0.4rem; }
.credential-detail { font-family: var(--serif); font-size: 0.85rem; color: var(--ink-soft); line-height: 1.4; }
.credential-card h3 a { text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.3s var(--ease); }
.credential-card h3 a:hover { opacity: 0.6; }

/* ---------- Rolling credentials gallery ---------- */
.cred-gallery-wrap { margin-top: clamp(4rem, 8vh, 5.5rem); }
.cred-gallery-label {
  text-align: center;
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 2rem;
}
.cred-gallery-mask {
  position: relative;
  width: 100%;
  display: flex;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.cred-gallery {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
  gap: 1.4rem;
  padding-right: 1.4rem;
  animation: cred-marquee 84s linear infinite;
}
.cred-gallery-mask:hover .cred-gallery,
.cred-gallery-mask:focus-within .cred-gallery {
  animation-play-state: paused;
}
@keyframes cred-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

.cred-card {
  flex: 0 0 auto;
  width: 230px;
  margin: 0;
  background: var(--ivory);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(26,24,21,0.1);
  display: flex;
  flex-direction: column;
}
.cred-card > img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  padding: 1.1rem 1.1rem 0.6rem;
  background: var(--ivory);
}
.cred-card figcaption {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 9.6rem;
  padding: 0 1.1rem 1.2rem;
  text-align: center;
}
.cred-card h3 { font-size: 0.82rem; letter-spacing: 0.01em; line-height: 1.35; margin-bottom: 0.4rem; }
.cred-card p { font-family: var(--serif); font-size: 0.78rem; color: var(--ink-soft); line-height: 1.4; }

/* Featured card: the Título Oficial diploma is called out with a bolder
   frame only, same footprint as the rest of the deck so no card is left
   stretched with empty space below its caption. */
.cred-card.featured {
  border: 2px solid var(--ink);
  box-shadow: 0 0 0 1px var(--ivory-2), 0 0 0 3px var(--ink), 0 26px 60px rgba(26,24,21,0.18);
}
.cred-tag {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.cred-card.featured h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.02rem; }

/* ---------- Smile quiz teaser (homepage, between credentials and the
   closing CTA) — reuses .section-head for consistent centered heading
   layout and .quiz-btn/.quiz-btn-primary, the same button already used
   for "Take the Smile Quiz" on mb-concept.html. Only new rule needed is
   the band's background/padding and spacing above the button. ---------- */
.quiz-teaser { background: var(--ivory); padding-bottom: clamp(4.5rem, 9vh, 6.5rem); }
.quiz-teaser-btn { margin-top: 2rem; }
/* .quiz-btn-primary is sometimes a <button> (fine) and sometimes an <a>
   (mb-concept.html's selfie link, this teaser button, the homepage's
   "See All Transformations" link) — on an <a>, a:link/a:visited
   (element + pseudo-class) outrank a plain class selector, so
   color: var(--ivory) from .quiz-btn-primary was losing to a:link's
   color: inherit, making the label invisible (ink text on the button's
   own ink background). Fixed at the shared class so every current and
   future <a class="quiz-btn-primary"> gets it automatically. */
.quiz-btn-primary:link, .quiz-btn-primary:visited { color: var(--ivory); }

@media (prefers-reduced-motion: reduce) {
  .cred-gallery { animation: none; }
  .cred-gallery-mask { overflow-x: auto; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { background: var(--footer-bg); color: var(--footer-ink); padding: clamp(3.5rem, 8vh, 5rem) 6vw 2.5rem; }
.footer-inner { max-width: var(--container); margin: 0 auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.footer-eyebrow { font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: rgba(242,237,226,0.6); }
.footer-logo img { height: 30px; width: auto; }
.footer-tagline { font-family: var(--serif); font-size: 0.92rem; color: rgba(242,237,226,0.75); max-width: 46ch; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.6rem; margin: 0.6rem 0; padding: 0; }
.footer-links a { font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(242,237,226,0.75); }
.footer-links a:hover { color: var(--footer-ink); }
.footer-whatsapp { font-family: var(--sans); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.03em; color: var(--footer-ink); border-bottom: 1px solid rgba(242,237,226,0.4); padding-bottom: 2px; }
.footer-social { display: flex; gap: 1.1rem; margin-top: 0.4rem; color: rgba(242,237,226,0.75); }
.footer-social a { transition: color 0.4s var(--ease); }
.footer-social a:hover { color: var(--footer-ink); }
.footer-disclaimer { max-width: 520px; font-size: 0.72rem; color: rgba(242,237,226,0.45); margin-top: 0.8rem; }
.footer-copyright { font-size: 0.7rem; color: rgba(242,237,226,0.35); }

/* ==========================================================================
   WHATSAPP FLOAT
   ========================================================================== */
.whatsapp-float {
  position: fixed; right: 1.6rem; bottom: 1.6rem; z-index: 400;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--ink); color: var(--ivory);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transition: transform 0.5s var(--ease);
}
.whatsapp-float:hover { transform: translateY(-3px) scale(1.05); }

/* ==========================================================================
   ABOUT PAGE
   ========================================================================== */
.about-eyebrow {
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.about-eyebrow-light { color: rgba(242,237,226,0.65); }

/* ---------- Hero ---------- */
.about-hero {
  position: relative;
  height: 78vh;
  min-height: 460px;
  max-height: 780px;
  overflow: hidden;
  margin-top: var(--nav-h);
}
.about-hero-bg, .about-hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-hero-bg img { object-fit: cover; object-position: 50% 14%; filter: grayscale(1); }
.about-hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,24,21,0.05) 0%, rgba(26,24,21,0.15) 45%, rgba(26,24,21,0.75) 100%);
}
.about-hero-content { position: absolute; left: 6vw; bottom: clamp(1.8rem, 5vh, 3rem); color: var(--ivory); max-width: 90vw; }
.about-hero-name {
  font-size: clamp(1.35rem, 3.4vw, 2.3rem);
  letter-spacing: 0.01em;
  color: var(--ivory);
}
.about-hero-role {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: rgba(246,243,236,0.88);
  margin-top: 0.5rem;
}

/* ---------- Introduction ---------- */
.about-intro { padding: clamp(3.5rem, 8vh, 5.5rem) 6vw; }
.about-intro p {
  max-width: 74ch;
  margin: 0 auto;
  font-family: var(--serif);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.75;
  color: var(--ink);
  text-align: center;
}
.about-intro em { font-style: italic; }

/* ---------- Split (Education) ---------- */
.about-split { display: grid; grid-template-columns: 1fr; }
@media (min-width: 860px) { .about-split { grid-template-columns: 1fr 1fr; min-height: 640px; } }
.about-split-media { position: relative; min-height: 360px; }
.about-split-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; filter: grayscale(1); }
.about-split-text {
  display: flex; flex-direction: column; justify-content: center;
  min-width: 0;
  padding: clamp(2.8rem, 7vh, 4.5rem) 6vw;
  background: var(--ivory-2);
}
.about-split-text h2 { font-size: 1.4rem; margin-bottom: 1.1rem; overflow-wrap: break-word; }
@media (min-width: 640px) { .about-split-text h2 { font-size: 1.7rem; } }
@media (min-width: 960px) { .about-split-text h2 { font-size: 2rem; } }
.about-split-text p { font-family: var(--serif); font-size: 1rem; line-height: 1.7; color: var(--ink-soft); max-width: 48ch; }

/* ---------- Dark band (Career & Philosophy) ---------- */
.about-dark { position: relative; min-height: 620px; display: flex; align-items: center; overflow: hidden; }
.about-dark-bg, .about-dark-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-dark-bg img { object-fit: cover; object-position: 74% 12%; filter: grayscale(1); }
.about-dark-scrim { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(22,20,15,0.97) 0%, rgba(22,20,15,0.9) 50%, rgba(22,20,15,0.35) 100%); }
.about-dark-content { position: relative; z-index: 1; min-width: 0; max-width: 620px; padding: clamp(3.5rem, 8vh, 5rem) 6vw; color: var(--footer-ink); }
.about-dark-content h2 { color: var(--footer-ink); font-size: 1.4rem; margin-bottom: 1.1rem; overflow-wrap: break-word; }
@media (min-width: 640px) { .about-dark-content h2 { font-size: 1.7rem; } }
@media (min-width: 960px) { .about-dark-content h2 { font-size: 2rem; } }
.about-dark-content p { font-family: var(--serif); font-size: 1rem; line-height: 1.75; color: rgba(242,237,226,0.85); }

/* ---------- Recognition & Publications ---------- */
.about-recognition { padding: clamp(4rem, 9vh, 6rem) 0; }
.about-recognition .section-head { text-align: center; padding-bottom: clamp(2.5rem, 5vh, 3.5rem); }
/* Longer heading than the shared .section-head h2 rule's clamp()+vw combo
   reliably wraps at mobile widths (documented Chrome bug); fixed tiers instead. */
.about-recognition .section-head h2 { font-size: 1.5rem; overflow-wrap: break-word; }
@media (min-width: 640px) { .about-recognition .section-head h2 { font-size: 1.9rem; } }
@media (min-width: 960px) { .about-recognition .section-head h2 { font-size: 2.5rem; } }
.about-recognition-grid {
  max-width: var(--container); margin: 0 auto; padding: 0 6vw;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem;
}
@media (min-width: 720px) { .about-recognition-grid { grid-template-columns: 1fr 1fr; gap: 4vw; } }
.about-recognition-col { min-width: 0; }
.about-recognition-col h3 { font-size: 1rem; margin-bottom: 1.2rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line-strong); }
.about-recognition-col p {
  font-family: var(--serif); font-size: 0.95rem; line-height: 1.7; color: var(--ink-soft);
  margin-bottom: 1rem;
}
.about-recognition-col em { font-style: italic; color: var(--ink); }

/* ---------- Google reviews ---------------------------------------
   Sits directly after Recognition & Publications, on the same ivory
   background. Star colour is a deliberate, narrow exception to the
   site's ivory/near-black-only palette — gold stars are how patients
   recognise a review rating at a glance, and grayscale stars would
   read as broken rather than restrained. Used nowhere else. ---------- */
.about-reviews { padding: clamp(3.5rem, 8vh, 5.5rem) 0 clamp(4rem, 9vh, 6rem); overflow-wrap: break-word; overflow: hidden; }
.about-reviews .section-head { text-align: center; padding-bottom: clamp(2rem, 4.5vh, 3rem); }
.about-reviews .section-head h2 { font-size: 1.5rem; overflow-wrap: break-word; }
@media (min-width: 640px) { .about-reviews .section-head h2 { font-size: 1.9rem; } }
@media (min-width: 960px) { .about-reviews .section-head h2 { font-size: 2.5rem; } }

.reviews-badge {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-align: center; margin: 0 auto clamp(2.5rem, 5vh, 3.5rem);
}
.reviews-google-g { width: 28px; height: 28px; }
.reviews-badge-main { display: flex; align-items: baseline; gap: 0.6rem; }
.reviews-rating { font-family: var(--sans); font-weight: 700; font-size: 1.6rem; color: var(--ink); }
.reviews-stars { color: #C9A227; font-size: 1.1rem; letter-spacing: 0.15em; }
.reviews-count { font-family: var(--serif); font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- Auto-scrolling review row ------------------------------
   Same technique as the homepage's rolling credentials gallery
   (.cred-gallery-mask/.cred-gallery): the track is duplicated once
   (aria-hidden on the copy) and a CSS @keyframes loop scrolls it a
   full track-width left, so the seam is invisible. The CSS animation
   is the no-JS fallback; script.js hands off to a smooth
   requestAnimationFrame loop the same way it does for the credentials
   gallery, and additionally supports drag/swipe to move through cards
   at your own pace, pausing the auto-scroll while you do. ---------- */
.reviews-gallery-wrap { max-width: 100%; }
.reviews-gallery-mask {
  position: relative;
  width: 100%;
  display: flex;
  overflow: hidden;
  cursor: grab;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.reviews-gallery-mask:active { cursor: grabbing; }
.reviews-gallery {
  display: flex;
  align-items: stretch;
  flex: 0 0 auto;
  gap: 1.4rem;
  padding-right: 1.4rem;
  animation: reviews-marquee 60s linear infinite;
}
.reviews-gallery-mask:hover .reviews-gallery,
.reviews-gallery-mask:focus-within .reviews-gallery {
  animation-play-state: paused;
}
@keyframes reviews-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
@media (prefers-reduced-motion: reduce) {
  .reviews-gallery { animation: none; }
  .reviews-gallery-mask { overflow-x: auto; cursor: auto; }
}

.review-card {
  flex: 0 0 auto;
  width: 320px;
  height: 300px;
  overflow: hidden;
  background: var(--ivory-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevate-shadow);
  padding: 1.6rem 1.7rem;
}
.review-name { font-size: 0.9rem; margin-bottom: 0.5rem; }
.review-stars { color: #C9A227; font-size: 0.85rem; letter-spacing: 0.15em; margin-bottom: 0.8rem; }
.review-text {
  font-family: var(--serif); font-size: 0.92rem; line-height: 1.65; color: var(--ink-soft);
  display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden;
}

.reviews-cta { text-align: center; margin-top: clamp(2.5rem, 5vh, 3.5rem); padding: 0 6vw; }

/* ---------- Closing CTA ---------- */
.about-cta { position: relative; min-height: 520px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.about-cta-bg, .about-cta-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.about-cta-bg img { object-fit: cover; object-position: 50% 30%; filter: grayscale(1); }
.about-cta-scrim { position: absolute; inset: 0; background: rgba(22,20,15,0.6); }
.about-cta-content { position: relative; z-index: 1; min-width: 0; text-align: center; max-width: 640px; padding: 3rem 6vw; color: var(--footer-ink); }
.about-cta-content h2 { color: var(--footer-ink); font-size: 1.6rem; margin-bottom: 1rem; overflow-wrap: break-word; }
@media (min-width: 640px) { .about-cta-content h2 { font-size: 1.9rem; } }
@media (min-width: 960px) { .about-cta-content h2 { font-size: 2.4rem; } }
.about-cta-content p { font-family: var(--serif); font-size: 1.05rem; color: rgba(242,237,226,0.85); margin-bottom: 1.6rem; }
.about-cta-content .link-underline { color: var(--footer-ink); border-color: rgba(242,237,226,0.5); }
.about-cta-content .link-underline:hover { border-color: transparent; opacity: 0.75; }

/* ==========================================================================
   MB CONCEPT PAGE
   ========================================================================== */

/* ---------- Hero ---------- */
.mbc-hero {
  position: relative;
  height: 86vh;
  min-height: 520px;
  max-height: 840px;
  overflow: hidden;
  margin-top: var(--nav-h);
}
/* ---------- Hero: smile-collage Bento mosaic --------------------------
   Built entirely from real "after" photos, cropped to the smile so the
   wall reads as one cohesive gallery rather than a set of portraits.
   Mobile-first: a simple 2-column grid (7th tile spans full width to
   fill the last row); richer asymmetric bento compositions take over at
   tablet and desktop. Thin ink-coloured gaps read as gallery-wall
   mortar lines, same seamless-gap technique as .experience-grid /
   .process-grid elsewhere on the site. ---------- */
.mbc-hero-mosaic {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 3px;
  background: var(--ink);
}
.mbc-hero-tile:nth-child(7) { grid-column: 1 / 3; }
.mbc-hero-tile { position: relative; overflow: hidden; min-width: 0; }
.mbc-hero-tile img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(1); display: block;
  transition: filter 0.6s var(--ease), transform 0.6s var(--ease);
}
/* Colour-on-hover only where real hover exists, so it doesn't get stuck
   "on" from a tap on touch devices. */
@media (hover: hover) and (pointer: fine) {
  .mbc-hero-tile:hover img { filter: grayscale(0); transform: scale(1.03); }
}
/* Per-tile crop: keeps each mouth centred regardless of the tile's
   shape, since source photos vary between full-face and close-crop. */
.mbc-hero-tile:nth-child(1) img { object-position: 50% 74%; }
.mbc-hero-tile:nth-child(2) img { object-position: 50% 73%; }
.mbc-hero-tile:nth-child(3) img { object-position: 50% 76%; }
.mbc-hero-tile:nth-child(4) img { object-position: 50% 80%; }
.mbc-hero-tile:nth-child(5) img { object-position: 50% 48%; }
.mbc-hero-tile:nth-child(6) img { object-position: 50% 48%; }
.mbc-hero-tile:nth-child(7) img { object-position: 50% 50%; }

@media (min-width: 640px) {
  .mbc-hero-mosaic { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); }
  .mbc-hero-tile:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
  .mbc-hero-tile:nth-child(2) { grid-column: 3 / 4; grid-row: 1 / 2; }
  .mbc-hero-tile:nth-child(3) { grid-column: 3 / 4; grid-row: 2 / 3; }
  .mbc-hero-tile:nth-child(4) { grid-column: 1 / 2; grid-row: 3 / 4; }
  .mbc-hero-tile:nth-child(5) { grid-column: 2 / 3; grid-row: 3 / 4; }
  .mbc-hero-tile:nth-child(6) { grid-column: 3 / 4; grid-row: 3 / 4; }
  .mbc-hero-tile:nth-child(7) { grid-column: 1 / 4; grid-row: 4 / 5; }
}
@media (min-width: 960px) {
  .mbc-hero-mosaic { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(3, 1fr); }
  .mbc-hero-tile:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; }
  .mbc-hero-tile:nth-child(2) { grid-column: 3 / 5; grid-row: 1 / 2; }
  .mbc-hero-tile:nth-child(3) { grid-column: 3 / 4; grid-row: 2 / 3; }
  .mbc-hero-tile:nth-child(4) { grid-column: 4 / 5; grid-row: 2 / 3; }
  .mbc-hero-tile:nth-child(5) { grid-column: 1 / 3; grid-row: 3 / 4; }
  .mbc-hero-tile:nth-child(6) { grid-column: 3 / 4; grid-row: 3 / 4; }
  .mbc-hero-tile:nth-child(7) { grid-column: 4 / 5; grid-row: 3 / 4; }
}

/* Scrim strengthened vs. the old single-portrait version: a busy 7-tile
   mosaic needs more help than one calm photo did. Still darkest at the
   bottom, where the text sits. */
.mbc-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,24,21,0.35) 0%, rgba(26,24,21,0.45) 35%, rgba(26,24,21,0.96) 100%); }
.mbc-hero-content { position: absolute; left: 0; right: 0; bottom: clamp(2.2rem, 6vh, 3.5rem); text-align: center; color: var(--ivory); padding: 0 6vw; }
.mbc-hero-content h1 {
  color: var(--ivory);
  font-size: 1.9rem;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 16px rgba(0,0,0,0.55);
}
@media (min-width: 640px) { .mbc-hero-content h1 { font-size: 2.6rem; } }
@media (min-width: 960px) { .mbc-hero-content h1 { font-size: 3.4rem; } }
.mbc-hero-sub {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(246,243,236,0.9);
  max-width: 46ch;
  margin: 0.9rem auto 0;
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
}
@media (min-width: 640px) { .mbc-hero-sub { font-size: 1.25rem; } }

/* Section headings on this page use fixed tiers rather than the shared
   .section-head h2 clamp()+vw rule, which fails to wrap reliably for
   longer strings at narrow widths (documented Chrome bug). */
.mbc-hero .section-head h2,
.mbc-editorial .section-head h2,
.mbc-compare .section-head h2,
.mbc-process .section-head h2,
.mbc-book .section-head h2 {
  font-size: 1.5rem;
  overflow-wrap: break-word;
}
@media (min-width: 640px) {
  .mbc-editorial .section-head h2, .mbc-compare .section-head h2,
  .mbc-process .section-head h2, .mbc-book .section-head h2 { font-size: 1.9rem; }
}
@media (min-width: 960px) {
  .mbc-editorial .section-head h2, .mbc-compare .section-head h2,
  .mbc-process .section-head h2, .mbc-book .section-head h2 { font-size: 2.5rem; }
}

/* ---------- What Is Visagism (editorial) ---------- */
.mbc-editorial { padding: clamp(3rem, 6vh, 4.5rem) 0; }
.mbc-editorial-body {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 6vw;
}
.mbc-editorial-body p {
  font-family: var(--serif);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--ink);
  text-align: center;
  margin-bottom: 1.4rem;
}
.mbc-editorial-body p:last-child { margin-bottom: 0; }
.mbc-editorial-body em { font-style: italic; }

/* ---------- Personality: Four Temperaments (Bento) + Smile Quiz ------
   One cohesive section combining the temperament Bento grid with the
   quiz immediately below it. Ivory-2 background so the temperament
   tiles (ivory) pop the same way the homepage Credentials cards and
   Treatments tiles do; the quiz widget keeps its own border + shadow so
   it still reads as a distinct card even on the matching tone. ---------- */
.mbc-personality { padding: clamp(3rem, 6vh, 4.5rem) 0; background: var(--ivory-2); }
.mbc-temperaments { max-width: var(--container); margin: 0 auto; padding: 0 6vw; }
.mbc-temperaments-label {
  text-align: center; font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: clamp(1.8rem, 4vh, 2.4rem);
}
.mbc-temperaments-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem;
  max-width: 800px; margin: 0 auto;
}
@media (min-width: 700px) { .mbc-temperaments-grid { grid-template-columns: repeat(4, 1fr); } }
.mbc-temperament {
  position: relative; text-align: center; overflow: hidden;
  padding: 1.7rem 0.9rem;
  border-radius: var(--radius-lg);
  background: var(--ivory);
  box-shadow: var(--elevate-shadow);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.mbc-temperament:hover { box-shadow: var(--elevate-shadow-hover); transform: translateY(-3px); }
/* Large, faint archetypal shape behind each card: the four Jungian forms
   (square, triangle, circle, lemniscate) the Visagism literature itself
   cites as the visual basis of the four temperaments. Original artwork,
   not a reproduction of any illustration. */
.mbc-temperament-glyph {
  position: absolute; top: 50%; left: 50%;
  width: 132px; height: 132px;
  transform: translate(-50%, -50%);
  fill: none; stroke: var(--ink); stroke-width: 1px;
  opacity: 0.07; pointer-events: none; z-index: 0;
}
.mbc-tooth-icon, .mbc-temperament-shape, .mbc-temperament h3, .mbc-temperament-classical, .mbc-temperament > p {
  position: relative; z-index: 1;
}
.mbc-tooth-icon { width: 32px; height: 42px; color: var(--ink); fill: none; stroke: currentColor; stroke-width: 1.6; margin-bottom: 1rem; }
.mbc-temperament-shape {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 0.3rem;
}
.mbc-temperament h3 { font-size: 0.95rem; margin-bottom: 0.35rem; }
.mbc-temperament-classical {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 0.5rem;
}
.mbc-temperament p { font-family: var(--serif); font-size: 0.85rem; color: var(--ink-soft); line-height: 1.5; }
.mbc-temperaments-note {
  font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--ink-soft);
  text-align: center; max-width: 52ch; margin: clamp(1.8rem, 4vh, 2.4rem) auto 0; line-height: 1.6;
}

/* ---------- The Book ---------- */
.mbc-book { padding: clamp(3rem, 6vh, 4.5rem) 0; }
.mbc-book-grid {
  max-width: var(--container); margin: clamp(2rem, 4vh, 3rem) auto 0; padding: 0 6vw;
  display: grid; grid-template-columns: 1fr; gap: 2.5rem; align-items: center;
}
@media (min-width: 760px) { .mbc-book-grid { grid-template-columns: 280px 1fr; gap: 4vw; } }
.mbc-book-media img { width: 100%; height: auto; max-width: 260px; margin: 0 auto; box-shadow: 0 26px 60px rgba(26,24,21,0.18); }
.mbc-book-text { min-width: 0; }
.mbc-book-text > p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; color: var(--ink); margin-bottom: 1.4rem; }
.mbc-book-text em { font-style: italic; }
.mbc-book-quote {
  margin: 0 0 1.6rem; padding-left: 1.4rem; border-left: 2px solid var(--ink);
}
.mbc-book-quote p {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1.1rem; line-height: 1.6; color: var(--ink);
}

/* ---------- How This Is Different (Bento tiles) ---------- */
.mbc-compare { padding: clamp(3rem, 6vh, 4.5rem) 0; background: var(--ivory-2); }
.mbc-compare-grid {
  max-width: var(--container); margin: clamp(2rem, 4vh, 3rem) auto 0; padding: 0 6vw;
  display: grid; grid-template-columns: 1fr; gap: 1.2rem;
}
@media (min-width: 760px) { .mbc-compare-grid { grid-template-columns: 1fr 1fr; gap: 1.4rem; } }
.mbc-compare-col {
  min-width: 0;
  padding: 2.2rem;
  background: var(--ivory);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevate-shadow);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.mbc-compare-col:hover { box-shadow: var(--elevate-shadow-hover); transform: translateY(-3px); }
.mbc-compare-col-featured { box-shadow: var(--elevate-shadow-hover); }
.mbc-compare-label {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1rem;
}
.mbc-compare-col-featured .mbc-compare-label { color: var(--ink); }
.mbc-compare-col p:last-child { font-family: var(--serif); font-size: 1rem; line-height: 1.75; color: var(--ink-soft); }
.mbc-compare-col-featured p:last-child { color: var(--ink); }

/* ---------- The Process (compact 2x2 Bento grid) ---------- */
.mbc-process { padding: clamp(3rem, 6vh, 4.5rem) 0; }
.mbc-process-list {
  list-style: none; margin: clamp(2rem, 4vh, 3rem) auto 0; padding: 0;
  max-width: 900px;
  display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 700px) {
  .mbc-process-list { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
}
.mbc-process-row {
  display: grid; grid-template-columns: auto 1fr; gap: 1rem; align-items: start;
  padding: 1.6rem 1.7rem;
  background: var(--ivory);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevate-shadow);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.mbc-process-row:hover { box-shadow: var(--elevate-shadow-hover); transform: translateY(-3px); }
.mbc-process-num {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1.5rem; color: var(--line-strong); line-height: 1;
}
.mbc-process-copy h3 { font-size: 0.95rem; letter-spacing: 0.01em; line-height: 1.4; margin-bottom: 0.5rem; }
.mbc-process-copy p { font-family: var(--serif); font-size: 0.95rem; color: var(--ink-soft); line-height: 1.65; }

/* ---------- Closing CTA ---------- */
.mbc-cta { position: relative; min-height: 560px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mbc-cta-bg, .mbc-cta-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.mbc-cta-bg img { object-fit: cover; object-position: 50% 15%; filter: grayscale(1); }
.mbc-cta-scrim { position: absolute; inset: 0; background: rgba(22,20,15,0.55); }
.mbc-cta-content { position: relative; z-index: 1; min-width: 0; text-align: center; max-width: 640px; padding: 3rem 6vw; color: var(--footer-ink); }
.mbc-cta-content h2 {
  color: var(--footer-ink);
  font-size: 1.7rem;
  margin-bottom: 1.4rem;
}
@media (min-width: 640px) { .mbc-cta-content h2 { font-size: 2.1rem; } }
@media (min-width: 960px) { .mbc-cta-content h2 { font-size: 2.6rem; } }
.mbc-cta-content .link-underline { color: var(--footer-ink); border-color: rgba(242,237,226,0.5); }
.mbc-cta-content .link-underline:hover { border-color: transparent; opacity: 0.75; }

/* ==========================================================================
   SMILE PERSONALITY QUIZ
   ========================================================================== */
.quiz { margin-top: clamp(2.6rem, 6vh, 3.6rem); }
.quiz-widget {
  position: relative;
  max-width: 440px;
  margin: 0 auto;
  background: var(--ivory-2);
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(26,24,21,0.08);
  padding: clamp(1.8rem, 5vw, 2.4rem) clamp(1.4rem, 4vw, 2rem);
  overflow: hidden;
}

.quiz-screen {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.quiz-screen.is-active { opacity: 1; transform: translateY(0); }
.quiz-screen.is-leaving { opacity: 0; transform: translateY(-10px); }

/* ---------- Shared button ---------- */
.quiz-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.95em 1.8em;
  border: none;
  cursor: pointer;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.quiz-btn-primary { background: var(--ink); color: var(--ivory); }
.quiz-btn-primary:hover { opacity: 0.85; }

/* ---------- Intro ---------- */
.quiz-screen-intro { text-align: center; }
.quiz-screen-intro h2 {
  font-size: 1.2rem;
  margin: 0.8rem 0 0.9rem;
}
.quiz-sub {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.quiz-credibility {
  font-family: var(--sans);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  opacity: 0.75;
  margin-top: 1.4rem;
}

/* ---------- Question ---------- */
.quiz-progress {
  height: 2px;
  background: var(--line);
  margin-bottom: 1.6rem;
}
.quiz-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width 0.5s var(--ease);
}
.quiz-question-count {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}
.quiz-question-text {
  font-size: 1.1rem;
  text-transform: none;
  letter-spacing: 0.005em;
  line-height: 1.4;
  margin-bottom: 1.6rem;
}
.quiz-options { display: flex; flex-direction: column; gap: 0.7rem; }
.quiz-option {
  font-family: var(--serif);
  font-size: 0.92rem;
  text-align: left;
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--line-strong);
  padding: 0.95rem 1.2rem;
  cursor: pointer;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.quiz-option:hover:not(:disabled) { border-color: var(--ink); }
.quiz-option:disabled { cursor: default; opacity: 0.55; }
.quiz-option.is-selected {
  border-color: var(--ink);
  background: var(--ivory-2);
  opacity: 1;
  color: var(--ink);
  font-style: italic;
}

/* ---------- Result ---------- */
.quiz-screen-result { text-align: center; }
.quiz-result-eyebrow {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.quiz-result-title {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  text-transform: none;
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
}
.quiz-result-classical {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.quiz-result-icon {
  width: 40px; height: 52px;
  fill: none; stroke: var(--ink); stroke-width: 1.4;
  margin: 0 auto 1.6rem;
}
.quiz-result-desc {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
  max-width: 48ch;
  margin: 0 auto 1.6rem;
}
.quiz-result-note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-soft);
  max-width: 44ch;
  margin: 0 auto 0.9rem;
  line-height: 1.6;
}
.quiz-selfie-prompt {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  max-width: 38ch;
  margin: 0 auto 1.6rem;
  line-height: 1.5;
}
.quiz-result-actions {
  display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
  margin-bottom: 1.8rem;
}
@media (min-width: 480px) { .quiz-result-actions { flex-direction: row; justify-content: center; gap: 2rem; } }
.quiz-restart {
  display: block; margin: 0 auto;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft);
  background: none; border: none; cursor: pointer;
  border-bottom: 1px solid transparent;
}
.quiz-restart:hover { border-color: var(--ink-soft); }

/* ==========================================================================
   MY WORK GALLERY
   ========================================================================== */
.work-hero { margin-top: var(--nav-h); padding: clamp(3.5rem, 8vh, 5rem) 6vw clamp(2rem, 4vh, 3rem); }
.work-hero .section-head { padding-top: 0; max-width: 640px; margin: 0 auto; }

.work-gallery { padding-bottom: clamp(4.5rem, 9vh, 7rem); }

.work-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem;
  max-width: var(--container); margin: 0 auto clamp(2rem, 4vh, 3rem);
  padding: 0 6vw;
}
.work-filter {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.6em 1.3em;
  background: none; border: 1px solid var(--line-strong); color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.work-filter:hover { border-color: var(--ink); color: var(--ink); }
.work-filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--ivory); }

.work-grid {
  max-width: var(--container); margin: 0 auto; padding: 0 6vw;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}
@media (min-width: 640px) { .work-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.work-card.is-hidden { display: none; }
.work-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(26,24,21,0.15);
  opacity: 0; transition: opacity 500ms var(--ease);
}
.work-card:hover .work-overlay, .work-card:focus-visible .work-overlay { opacity: 1; }
.work-overlay-label {
  background: rgba(22,20,15,0.88); color: var(--ivory);
  font-family: var(--sans); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 0.85em 1.6em;
}
.work-empty {
  text-align: center; font-family: var(--serif); font-style: italic;
  color: var(--ink-soft); padding: 3rem 6vw 0;
}

/* ==========================================================================
   CASE DETAIL TEMPLATE
   ========================================================================== */
.case-hero {
  position: relative; height: 78vh; min-height: 460px; max-height: 780px;
  overflow: hidden; margin-top: var(--nav-h);
}
.case-hero-bg, .case-hero-bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.case-hero-bg img { object-fit: cover; filter: grayscale(1); }
.case-hero-scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26,24,21,0.1) 0%, rgba(26,24,21,0.25) 40%, rgba(26,24,21,0.88) 100%); }
.case-hero-content { position: absolute; left: 0; right: 0; bottom: clamp(2rem, 5vh, 3rem); text-align: center; color: var(--ivory); padding: 0 6vw; }
.case-hero-category {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: rgba(246,243,236,0.75);
  margin-bottom: 0.7rem;
}
.case-hero-content h1 { color: var(--ivory); font-size: 1.7rem; }
@media (min-width: 640px) { .case-hero-content h1 { font-size: 2.3rem; } }
@media (min-width: 960px) { .case-hero-content h1 { font-size: 2.8rem; } }
.case-hero-patient {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1rem; color: rgba(246,243,236,0.85); margin-top: 0.7rem;
}

.case-section { padding: clamp(4rem, 9vh, 6rem) 0; }
.case-section-alt { background: var(--ivory-2); }
.case-section-body { max-width: 680px; margin: 0 auto; padding: 0 6vw; text-align: center; }
.case-section-body p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; color: var(--ink); }
.case-smile-type {
  display: inline-block;
  font-family: var(--sans); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
  margin-bottom: 1.4rem; padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-strong);
}

.case-slider-wrap { max-width: 720px; margin: clamp(2.5rem, 5vh, 3.5rem) auto 0; padding: 0 6vw; }
.case-slider {
  position: relative; width: 100%; aspect-ratio: 1 / 1;
  overflow: hidden; border: 1px solid var(--line);
  cursor: ew-resize; user-select: none; background: var(--ivory-2);
}
.case-slider-after {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(1); display: block;
}
.case-slider-before-wrap { position: absolute; inset: 0; width: 50%; overflow: hidden; }
.case-slider-before-wrap img {
  position: absolute; inset: 0; height: 100%;
  object-fit: cover; display: block;
  /* width is set in pixels by case.js to match the full slider, so the
     image never looks squeezed as the wrapper narrows */
}
.case-slider-tag {
  position: absolute; top: 1rem; z-index: 2;
  font-family: var(--sans); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ivory); background: rgba(22,20,15,0.6);
  padding: 0.4em 0.9em; pointer-events: none;
}
.case-slider-tag-before { left: 1rem; }
.case-slider-tag-after { right: 1rem; }
.case-slider-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px;
  background: var(--ivory); transform: translateX(-50%);
  display: flex; align-items: center; justify-content: center;
  cursor: ew-resize;
}
.case-slider-grip {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--ivory); color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; letter-spacing: 0.02em;
  box-shadow: 0 6px 16px rgba(26,24,21,0.3);
}
.case-consent {
  text-align: center; font-family: var(--serif); font-style: italic;
  font-size: 0.85rem; color: var(--ink-soft); margin-top: 1.2rem;
}

.case-process-grid {
  max-width: var(--container); margin: clamp(2.5rem, 5vh, 3.5rem) auto 0; padding: 0 6vw;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem;
}
.case-process-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1); display: block; }

.case-disclaimer { font-family: var(--sans); font-size: 0.72rem; color: var(--ink-soft); opacity: 0.8; margin-top: 1.2rem; }

.case-cta { background: var(--footer-bg); padding: clamp(4rem, 9vh, 6rem) 6vw; text-align: center; }
.case-cta-content h2 { color: var(--footer-ink); font-size: 1.6rem; margin-bottom: 1.4rem; }
@media (min-width: 640px) { .case-cta-content h2 { font-size: 1.9rem; } }
@media (min-width: 960px) { .case-cta-content h2 { font-size: 2.4rem; } }
.case-cta-content .link-underline { color: var(--footer-ink); border-color: rgba(242,237,226,0.5); }
.case-cta-content .link-underline:hover { border-color: transparent; opacity: 0.75; }

.case-not-found {
  margin-top: var(--nav-h); min-height: 50vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; text-align: center; padding: 4rem 6vw;
}
.case-not-found p { font-family: var(--serif); font-size: 1.2rem; color: var(--ink); }

/* ==========================================================================
   TREATMENTS
   ========================================================================== */
.tx-hero { margin-top: var(--nav-h); padding: clamp(3.5rem, 8vh, 5rem) 6vw clamp(2rem, 4vh, 3rem); }
.tx-hero .section-head { padding-top: 0; max-width: 640px; margin: 0 auto; }
.tx-hero h1 { font-size: 1.9rem; }
@media (min-width: 640px) { .tx-hero h1 { font-size: 2.5rem; } }
@media (min-width: 960px) { .tx-hero h1 { font-size: 3.1rem; } }

.tx-category { padding: clamp(2.25rem, 4.5vh, 3.25rem) 0; overflow-wrap: break-word; }
.tx-category-featured, .tx-category-alt { background: var(--ivory-2); }

/* Tighter than the shared .section-head padding-top elsewhere on the
   site — the treatments page has four of these back to back, so the
   default spacious padding compounds into a very long page. */
.tx-category .section-head { padding-top: clamp(2.25rem, 4.5vh, 3.25rem); }

/* Category headings use fixed tiers, not the shared .section-head h2
   clamp()+vw rule, which fails to wrap reliably for longer strings at
   narrow widths (documented Chrome bug). */
.tx-category .section-head h2, .tx-category-text h2 {
  font-size: 1.4rem;
}
@media (min-width: 640px) { .tx-category .section-head h2, .tx-category-text h2 { font-size: 1.8rem; } }
@media (min-width: 960px) { .tx-category .section-head h2, .tx-category-text h2 { font-size: 2.3rem; } }

.tx-category-num {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1.3rem; color: var(--line-strong); margin-bottom: 0.6rem;
}

/* ---------- Featured (Cosmetic) category head ----------------------
   Was a split text+image layout; the image is gone (redundant next to
   the photo-led tile grid below it), so this is just the text block
   now, kept as its own class in case a future category head needs the
   same treatment. ---------------------------------------------------- */
.tx-category-head {
  max-width: var(--container); margin: 0 auto clamp(1.5rem, 3vh, 2.25rem);
  padding: 0 6vw;
}
.tx-category-text { min-width: 0; text-align: left; }
.tx-category-text h2 { margin-bottom: 0.9rem; }
.tx-category-intro { font-family: var(--serif); font-size: 1.05rem; color: var(--ink-soft); line-height: 1.7; max-width: 46ch; }

/* ---------- Card grid: compact Bento mosaic, every tile a true
   square -------------------------------------------------------------
   Data-driven via a `size` field on each treatment in treatments.js
   ('large', or omitted for the default square tile). Mobile-first:
   every tile is full-width/stacked below 640px.
   The grid caps out narrower than the site's usual --container so
   tiles stay compact and refined rather than oversized, with tight
   gaps to match. Each tile's photo (.tx-tile-media) is a fixed square
   (aspect-ratio: 1/1) — object-fit: cover shows the whole square photo
   with no cropping and no empty space. A `large` tile stays square
   too, just bigger (spans 2 columns; its own aspect-ratio makes it
   exactly as tall as it is wide, so it's never a thin strip). Cosmetic
   keeps its 3-column mosaic (`.tx-grid-featured`, 2 large + 2 small
   tiles); Rehabilitation, Preventive and General use a simpler
   2-column layout where the one `large` tile spans the full width on
   its own row and the two small tiles sit side by side below it — a
   clean "one big + two small" bento without needing fragile
   row-spanning to line tiles up.
   New class name (.tx-tile, not .tx-card) so this doesn't touch the
   .tx-card/.blog-card divider-list rules shared with blog.html further
   down this file — those are left completely untouched. ---------- */
.tx-grid {
  max-width: 1000px; margin: 0 auto; padding: 0 6vw;
  display: grid; grid-template-columns: 1fr; gap: 0.9rem;
}
.tx-tile { grid-column: span 1; }
/* Rehabilitation/Preventive/General list their `large` treatment in
   whatever order makes sense for the copy, not necessarily first — but
   the bento needs it visually first (full-width row, two small tiles
   below), so it's reordered here rather than relying on data order. */
.tx-grid:not(.tx-grid-featured) .tx-tile[data-size="large"] { order: -1; }

@media (min-width: 640px) {
  .tx-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .tx-tile[data-size="large"] { grid-column: span 2; }
}
@media (min-width: 960px) {
  .tx-grid-featured { grid-template-columns: repeat(3, 1fr); grid-auto-flow: dense; gap: 1.1rem; }
  .tx-grid:not(.tx-grid-featured) { grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
  .tx-tile[data-size="large"] { grid-column: span 2; }
}

/* ---------- Tile: a clean square photo (same floating-card language —
   radius, soft elevation, hover lift — used elsewhere on the site)
   with a plain caption below it. No overlay on the image itself, so
   it's fully visible by default; hover/focus handles colour + the
   one-line description (see .tx-tile-hover below). ---------- */
.tx-tile {
  display: flex; flex-direction: column;
  min-width: 0;
}
.tx-tile-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevate-shadow);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.tx-tile:hover .tx-tile-media, .tx-tile:focus-visible .tx-tile-media {
  box-shadow: var(--elevate-shadow-hover);
  transform: translateY(-3px);
}
.tx-tile:active .tx-tile-media { transform: translateY(-1px) scale(0.99); }

/* Photo: clean and fully visible by default (grayscale, no overlay).
   Colour only on hover — desktop (real hover) only; mobile has no
   hover state to reveal colour, so it shows colour outright there. */
.tx-tile-media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  filter: grayscale(1);
  transition: transform 0.7s var(--ease), filter 0.7s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tx-tile:hover .tx-tile-media img, .tx-tile:focus-visible .tx-tile-media img {
    transform: scale(1.04); filter: grayscale(0);
  }
}
@media (hover: none) {
  .tx-tile-media img { filter: grayscale(0); }
}

/* Description: sits on the photo, but hidden until hover/focus — a
   light (subtle, bottom-only) scrim fades in with it purely so the
   text stays legible over whatever photo is underneath; the rest of
   the time the image is completely clean. On mobile (no hover to
   reveal it) it's shown outright, same as the colour reveal above. */
.tx-tile-hover {
  position: absolute; inset: 0; z-index: 1;
  display: flex; align-items: flex-end;
  padding: 0.85rem;
  opacity: 0;
  background: linear-gradient(180deg, rgba(26,24,21,0) 45%, rgba(26,24,21,0.62) 100%);
  transition: opacity 0.35s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .tx-tile:hover .tx-tile-hover, .tx-tile:focus-visible .tx-tile-hover { opacity: 1; }
}
@media (hover: none) {
  .tx-tile-hover { opacity: 1; }
}
.tx-tile-hover p {
  font-family: var(--serif); font-size: 0.82rem; color: rgba(246,243,236,0.92); line-height: 1.5; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* Caption: plain text below the tile, always visible, on the page
   background — no scrim needed since it's never over the photo. */
.tx-tile-caption { padding: 0.55rem 0.1rem 0; }
.tx-tile-caption h3 { font-size: 0.86rem; color: var(--ink); transition: opacity 0.3s var(--ease); }
.tx-tile[data-size="large"] .tx-tile-caption h3 { font-size: 1.02rem; }
.tx-tile:hover .tx-tile-caption h3, .tx-tile:focus-visible .tx-tile-caption h3 { opacity: 0.7; }

.tx-cta-sub { font-family: var(--serif); font-size: 1rem; color: rgba(242,237,226,0.85); margin: -0.8rem 0 1.6rem; }

.tx-back { text-align: center; padding: clamp(2.5rem, 5vh, 3.5rem) 6vw; }

/* ==========================================================================
   BLOG INDEX
   ========================================================================== */
.blog-hero { margin-top: var(--nav-h); padding: clamp(3.5rem, 8vh, 5rem) 6vw clamp(2rem, 4vh, 3rem); }
.blog-hero .section-head { padding-top: 0; max-width: 640px; margin: 0 auto; }
.blog-hero h1 { font-size: 1.9rem; }
@media (min-width: 640px) { .blog-hero h1 { font-size: 2.5rem; } }
@media (min-width: 960px) { .blog-hero h1 { font-size: 3.1rem; } }

.blog-filters {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem;
  max-width: var(--container); margin: 0 auto clamp(2.5rem, 5vh, 3.5rem);
  padding: 0 6vw;
}
.blog-filter {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 0.6em 1.3em;
  background: none; border: 1px solid var(--line-strong); color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.blog-filter:hover { border-color: var(--ink); color: var(--ink); }
.blog-filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--ivory); }

.blog-card-category {
  font-family: var(--sans); font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 0.7rem;
}
.blog-card-date {
  font-family: var(--sans); font-size: 0.72rem; color: var(--ink-soft);
  margin-bottom: 0.9rem;
}
.blog-card-link {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1px solid var(--line-strong); padding-bottom: 2px;
  transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}

/* ---------- Featured post ---------- */
.blog-featured {
  display: block; max-width: 820px; margin: 0 auto clamp(3.5rem, 7vh, 5rem);
  padding: clamp(2.2rem, 5vh, 3.2rem) 6vw;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
  text-align: center;
}
.blog-featured.is-hidden { display: none; }
.blog-featured-eyebrow {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.blog-featured-media {
  width: 100%; max-width: 280px; height: auto;
  aspect-ratio: 3 / 2; object-fit: cover; filter: grayscale(1);
  display: block; margin: 0 auto 1.6rem;
}
.blog-featured .blog-card-category { margin-bottom: 0.9rem; }
.blog-featured-title {
  font-family: var(--serif); font-weight: 400; text-transform: none;
  font-size: 1.5rem; line-height: 1.3; max-width: 26ch; margin: 0 auto 1rem;
}
@media (min-width: 640px) { .blog-featured-title { font-size: 1.9rem; } }
@media (min-width: 960px) { .blog-featured-title { font-size: 2.3rem; } }
.blog-featured .blog-card-date { text-align: center; }
.blog-featured-excerpt {
  font-family: var(--serif); font-size: 1.05rem; color: var(--ink-soft);
  line-height: 1.75; max-width: 46ch; margin: 0 auto 1.4rem;
}
.blog-featured:hover .blog-featured-title { opacity: 0.75; }
.blog-featured:hover .blog-card-link { border-color: transparent; opacity: 0.6; }

/* ---------- Grid ---------- */
.blog-gallery { padding-bottom: clamp(4.5rem, 9vh, 7rem); }
.blog-grid {
  max-width: var(--container); margin: 0 auto; padding: 0 6vw;
  display: grid; grid-template-columns: 1fr;
  border-top: 1px solid var(--line-strong);
}
@media (min-width: 760px) { .blog-grid { grid-template-columns: 1fr 1fr; } }
.blog-card { display: block; min-width: 0; padding: 2rem 0; border-bottom: 1px solid var(--line); }
.blog-card.is-hidden { display: none; }
@media (min-width: 760px) {
  .blog-card:nth-child(odd) { padding-right: 2.4rem; border-right: 1px solid var(--line); }
  .blog-card:nth-child(even) { padding-left: 2.4rem; }
}
.blog-card-title {
  font-family: var(--serif); font-weight: 400; text-transform: none;
  font-size: 1.15rem; line-height: 1.35; margin-bottom: 0.7rem;
  transition: opacity 0.3s var(--ease);
}
.blog-card-excerpt {
  font-family: var(--serif); font-size: 0.95rem; color: var(--ink-soft);
  line-height: 1.65; margin-bottom: 0.9rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.blog-card:hover .blog-card-title { opacity: 0.7; }
.blog-card:hover .blog-card-link { border-color: transparent; opacity: 0.6; }
.blog-empty {
  text-align: center; font-family: var(--serif); font-style: italic;
  color: var(--ink-soft); padding: 3rem 6vw 0;
}

/* ==========================================================================
   BLOG POST
   ========================================================================== */
/* ---------- Breadcrumb ---------- */
.breadcrumb { margin-top: var(--nav-h); max-width: var(--container); padding: 1.4rem 6vw 0; }
.breadcrumb ol {
  list-style: none; display: flex; flex-wrap: wrap; margin: 0; padding: 0;
}
.breadcrumb li {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
}
.breadcrumb li:not(:last-child)::after { content: '/'; margin: 0 0.5em; opacity: 0.5; }
.breadcrumb a { color: var(--ink-soft); transition: color 0.3s var(--ease); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb li[aria-current] { color: var(--ink); }

.post-hero { padding: clamp(2rem, 4.5vh, 3rem) 6vw clamp(2rem, 4vh, 3rem); text-align: center; }
.post-hero .section-head { padding-top: 0; max-width: 720px; margin: 0 auto; }
.post-meta {
  font-family: var(--sans); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1.3rem;
}
.post-category { color: var(--ink); }
.post-meta-dot { margin: 0 0.4em; opacity: 0.6; }
.post-title {
  font-family: var(--serif); font-weight: 400; text-transform: none;
  font-size: 1.6rem; line-height: 1.3; max-width: 22ch; margin: 0 auto;
}
@media (min-width: 640px) { .post-title { font-size: 2.1rem; } }
@media (min-width: 960px) { .post-title { font-size: 2.6rem; } }

.post-body { max-width: 660px; margin: 0 auto; padding: 0 6vw clamp(3.5rem, 7vh, 5rem); }
.post-lede {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1.2rem; color: var(--ink); line-height: 1.7; margin-bottom: 2rem;
}
.post-body h2 {
  font-size: 1.15rem; margin: clamp(2.2rem, 5vh, 2.8rem) 0 1.1rem;
}
.post-body p {
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.8;
  color: var(--ink); margin-bottom: 1.4rem;
}
.post-body ul { margin: 0 0 1.4rem; padding-left: 1.3rem; }
.post-body li {
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.75;
  color: var(--ink); margin-bottom: 0.6rem;
}
.post-quote { margin: 2.4rem 0; padding-left: 1.6rem; border-left: 2px solid var(--ink); }
.post-quote p {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 1.25rem; line-height: 1.6; color: var(--ink); margin-bottom: 0;
}
.post-disclaimer { font-family: var(--sans); font-size: 0.75rem; color: var(--ink-soft); opacity: 0.85; margin-top: 2rem; }

/* ---------- Featured image (post header) ---------- */
.post-featured-figure { max-width: 780px; margin: 0 auto clamp(2.5rem, 5vh, 3.5rem); padding: 0 6vw; }
.post-featured-image {
  width: 100% !important; height: auto !important; aspect-ratio: 3 / 2 !important; object-fit: cover; object-position: center;
  filter: grayscale(1);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevate-shadow);
  display: block;
}
.post-featured-caption {
  font-family: var(--serif); font-style: italic; font-size: 0.88rem;
  color: var(--ink-soft); text-align: center; margin-top: 0.9rem;
}

/* ---------- Body: H3, ordered lists, inline images, prose links ---------- */
.post-body h3 { font-size: 1rem; margin: 2rem 0 0.9rem; }
.post-body ol { margin: 0 0 1.4rem; padding-left: 1.3rem; }
.post-body ol li {
  font-family: var(--serif); font-size: 1.05rem; line-height: 1.75;
  color: var(--ink); margin-bottom: 0.6rem;
}
.post-body a { text-decoration: underline; text-underline-offset: 3px; transition: opacity 0.3s var(--ease); }
.post-body a:hover { opacity: 0.6; }

.post-inline-figure { margin: 2.4rem 0; }
.post-inline-image {
  width: 100% !important; height: auto !important; aspect-ratio: 4 / 3 !important; object-fit: cover; object-position: center;
  filter: grayscale(1);
  border-radius: var(--radius-md);
  display: block;
}
.post-inline-caption {
  font-family: var(--serif); font-style: italic; font-size: 0.85rem;
  color: var(--ink-soft); margin-top: 0.7rem;
}

/* ---------- Key Takeaways callout ---------- */
.post-callout {
  background: var(--ivory-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevate-shadow);
  padding: 1.7rem 1.8rem;
  margin: 2.6rem 0;
}
.post-callout-label {
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 1rem;
}
.post-callout ul { margin: 0; padding-left: 1.2rem; }
.post-callout li {
  font-family: var(--serif); font-size: 0.98rem; line-height: 1.65;
  color: var(--ink); margin-bottom: 0.6rem;
}
.post-callout li:last-child { margin-bottom: 0; }

/* ---------- FAQ accordion (native <details>/<summary>, no JS needed) ---------- */
.post-faq { max-width: 660px; margin: 0 auto; padding: clamp(1rem, 3vh, 2rem) 6vw clamp(3rem, 6vh, 4rem); }
.post-faq h2 { margin-bottom: 1.6rem; }
.post-faq-item { border-bottom: 1px solid var(--line); }
.post-faq-item summary {
  font-family: var(--sans); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.01em;
  padding: 1.2rem 2rem 1.2rem 0;
  cursor: pointer; list-style: none; position: relative;
}
.post-faq-item summary::-webkit-details-marker { display: none; }
.post-faq-item summary::after {
  content: '+';
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 1.1rem; color: var(--ink-soft);
}
.post-faq-item[open] summary::after { content: '\2212'; }
.post-faq-item summary:hover { color: var(--ink-soft); }
.post-faq-item summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.post-faq-item p {
  font-family: var(--serif); font-size: 0.98rem; line-height: 1.7;
  color: var(--ink-soft); margin: 0 0 1.3rem;
}

/* ---------- Author bio ---------- */
.post-author { max-width: 660px; margin: 0 auto; padding: 0 6vw clamp(2.5rem, 5vh, 3.5rem); }
.post-author-card {
  display: flex; align-items: center; gap: 1.4rem;
  background: var(--ivory-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevate-shadow);
  padding: 1.6rem;
}
.post-author-photo {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  flex: 0 0 auto;
}
.post-author-text { min-width: 0; }
.post-author-name { font-size: 0.9rem; margin-bottom: 0.15rem; }
.post-author-title {
  font-family: var(--sans); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 0.6rem;
}
.post-author-summary { font-family: var(--serif); font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 0.7rem; }
.post-author-link {
  display: inline-block;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1px solid var(--line-strong); padding-bottom: 2px;
  transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.post-author-link:hover { border-color: transparent; opacity: 0.6; }
@media (max-width: 520px) {
  .post-author-card { flex-direction: column; text-align: center; }
}

/* ---------- Related posts ---------- */
.post-related { max-width: var(--container); margin: 0 auto; padding: clamp(2.5rem, 5vh, 3.5rem) 6vw clamp(3.5rem, 7vh, 5rem); }
.post-related h2 { text-align: center; margin-bottom: clamp(2rem, 4vh, 2.6rem); }
.related-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
@media (min-width: 760px) { .related-grid { grid-template-columns: repeat(3, 1fr); } }
.related-card {
  display: block; min-width: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ivory);
  box-shadow: var(--elevate-shadow);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.related-card:hover, .related-card:focus-visible { box-shadow: var(--elevate-shadow-hover); transform: translateY(-3px); }
.related-card:active { transform: translateY(-1px) scale(0.99); }
.related-card img {
  width: 100% !important; height: auto !important; aspect-ratio: 3 / 2 !important; object-fit: cover; object-position: center;
  filter: grayscale(1);
  display: block;
  transition: filter 0.6s var(--ease), transform 0.7s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .related-card:hover img, .related-card:focus-visible img { filter: grayscale(0); transform: scale(1.04); }
}
@media (hover: none) {
  .related-card img { filter: grayscale(0); }
}
.related-card-body { display: block; padding: 1.2rem 1.3rem 1.4rem; }
.related-card-category {
  display: block;
  font-family: var(--sans); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.related-card-title {
  display: block;
  font-family: var(--serif); font-size: 1.02rem; line-height: 1.4;
  color: var(--ink);
  transition: opacity 0.3s var(--ease);
}
.related-card:hover .related-card-title { opacity: 0.7; }

/* ==========================================================================
   AFTERCARE GUIDES
   ========================================================================== */
.aftercare-hero { margin-top: var(--nav-h); padding: clamp(3.5rem, 8vh, 5rem) 6vw clamp(2rem, 4vh, 3rem); }
.aftercare-hero .section-head { padding-top: 0; max-width: 640px; margin: 0 auto; }
.aftercare-hero h1 { font-size: 1.9rem; }
@media (min-width: 640px) { .aftercare-hero h1 { font-size: 2.5rem; } }
@media (min-width: 960px) { .aftercare-hero h1 { font-size: 3.1rem; } }

.aftercare-gallery { padding-bottom: clamp(3rem, 6vh, 4.5rem); }
.aftercare-grid {
  max-width: var(--container); margin: 0 auto; padding: 0 6vw;
  display: grid; grid-template-columns: 1fr; gap: 2.6rem 1.8rem;
}
@media (min-width: 560px) { .aftercare-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) { .aftercare-grid { grid-template-columns: repeat(3, 1fr); } }

.aftercare-card { display: flex; flex-direction: column; min-width: 0; }
.aftercare-thumb {
  display: block; margin-bottom: 1.2rem;
  border: 1px solid var(--line); background: var(--ivory);
  box-shadow: 0 14px 32px rgba(26,24,21,0.08);
  transition: box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.aftercare-thumb img { width: 100%; height: auto; aspect-ratio: 700 / 497; object-fit: cover; display: block; }
.aftercare-thumb:hover, .aftercare-thumb:focus-visible {
  box-shadow: 0 20px 44px rgba(26,24,21,0.14);
  transform: translateY(-3px);
}
.aftercare-title { font-size: 0.95rem; letter-spacing: 0.01em; line-height: 1.4; margin-bottom: 0.5rem; }
.aftercare-desc {
  font-family: var(--serif); font-size: 0.92rem; color: var(--ink-soft);
  line-height: 1.6; margin-bottom: 1rem;
}
.aftercare-download {
  align-self: flex-start;
  font-family: var(--sans); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink);
  border-bottom: 1px solid var(--line-strong); padding-bottom: 2px;
  transition: border-color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.aftercare-download:hover { border-color: transparent; opacity: 0.6; }

.aftercare-disclaimer {
  text-align: center; font-family: var(--sans); font-size: 0.78rem;
  color: var(--ink-soft); opacity: 0.85; max-width: 60ch;
  margin: 0 auto; padding: 0 6vw clamp(3.5rem, 7vh, 5rem);
}

/* ==========================================================================
   LUXURY POLISH — subtle, site-wide surface treatment (Apple/visionOS feel)
   Purely additive: every rule below only touches background, border-color,
   border-radius, box-shadow, backdrop-filter, transition and hover
   transforms. Nothing here changes layout, position, size, spacing, type
   or color palette. Safe to delete this whole section to revert; a full
   pre-change copy also lives in style-backup.css.
   ========================================================================== */
:root {
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --glass-blur: blur(28px) saturate(160%);
  /* Nav sits over a filter:grayscale(1) hero photo with almost no
     scrim near the top. At low opacity the ivory tint reads as grey
     because the desaturated image dominates the mix — keep this high
     enough that ivory, not the photo, is the visible color. */
  --glass-bg: rgba(246, 243, 236, 0.88);
  --glass-bg-solid: rgba(246, 243, 236, 0.95);
  --glass-border: rgba(255, 255, 255, 0.4);

  --glass-dark-bg: rgba(22, 20, 15, 0.38);
  --glass-dark-border: rgba(255, 255, 255, 0.16);

  --elevate-shadow: 0 20px 48px rgba(26, 24, 21, 0.10);
  --elevate-shadow-hover: 0 28px 60px rgba(26, 24, 21, 0.16);
}

/* ---------- Nav: glass, only truly "solid" once scrolled past the hero ---------- */
.nav {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.is-solid {
  background: var(--glass-bg-solid);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 32px rgba(26, 24, 21, 0.06);
}
@media (max-width: 959px) {
  .nav-links {
    background: rgba(246, 243, 236, 0.94);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
  }
}

/* ---------- Floating WhatsApp button: glass ---------- */
.whatsapp-float {
  background: var(--glass-dark-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-dark-border);
  box-shadow: 0 12px 32px rgba(26, 24, 21, 0.22);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.whatsapp-float:hover {
  background: rgba(22, 20, 15, 0.5);
  box-shadow: 0 16px 40px rgba(26, 24, 21, 0.28);
}

/* ---------- Buttons sitting directly on photography: glass pill ---------- */
.hero .link-hero,
.concept-full-content .link-underline,
.mbc-cta-content .link-underline,
.about-cta-content .link-underline {
  display: inline-block;
  padding: 0.85em 1.8em;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease),
    transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.hero .link-hero:hover,
.concept-full-content .link-underline:hover,
.mbc-cta-content .link-underline:hover,
.about-cta-content .link-underline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.55);
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

/* ---------- Hover labels on gallery photography: glass chip ---------- */
.ba-overlay-label {
  display: inline-block;
  padding: 0.6em 1.3em;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-pill);
}
.work-overlay-label {
  background: rgba(22, 20, 15, 0.4);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
}

/* ---------- Quiz widget: treated as a floating card/pop-up ---------- */
.quiz-widget {
  background: rgba(246, 243, 236, 0.72);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-md);
}
.quiz-btn { border-radius: var(--radius-pill); transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.quiz-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(26, 24, 21, 0.22); }
.quiz-option {
  border-radius: var(--radius-sm);
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease),
    transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.quiz-option:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(26, 24, 21, 0.08); }

/* ---------- Flat-background cards: soft elevation, no fake blur ---------- */
.cred-card {
  border-radius: var(--radius-sm);
  transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.cred-card:hover { box-shadow: var(--elevate-shadow-hover); transform: translateY(-3px); }

.ba-case, .aftercare-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
}
.aftercare-thumb:hover {
  box-shadow: var(--elevate-shadow-hover);
  transform: translateY(-3px);
}

/* .tx-card / .blog-card are a shared-divider list, not boxed cards, so
   elevation only appears on hover, keeping the resting layout identical. */
.tx-card, .blog-card {
  position: relative;
  border-radius: var(--radius-sm);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.tx-card:hover, .blog-card:hover {
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: var(--elevate-shadow);
  transform: translateY(-2px);
  z-index: 1;
}

/* ---------- Filter chips: pill shape ---------- */
.work-filter, .blog-filter { border-radius: var(--radius-pill); }

/* ---------- Image frames: gentle rounding, full-bleed imagery excluded ---------- */
.experience-grid figure,
.process-item,
.blog-featured-media,
.mbc-book-media img,
.case-slider {
  border-radius: var(--radius-md);
}

/* ---------- Focus states: keep them visible on the new glass/pill surfaces ---------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}
.whatsapp-float:focus-visible { outline-color: var(--ivory); }

/* ==========================================================================
   NAV FIX — gray flash on first paint
   The `will-change`/`translateZ` hint alone didn't fully stop Chromium
   painting the fixed, backdrop-filter nav as flat gray for the first
   frame. This replaces that attempt: backdrop-filter is no longer
   present on `.nav` at all until script.js adds `.glass-ready` (which it
   does via double requestAnimationFrame, once a real frame has already
   painted). Before that, `.nav` is just the original solid ivory bar, so
   there is nothing for the bug to trigger on.
   ========================================================================== */
.nav {
  background: var(--ivory);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
}
.nav.is-solid {
  background: var(--ivory);
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}
.nav.glass-ready {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom-color: var(--glass-border);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.nav.glass-ready.is-solid {
  background: var(--glass-bg-solid);
  border-bottom-color: var(--line);
  box-shadow: 0 8px 32px rgba(26, 24, 21, 0.06);
}

/* ==========================================================================
   NAV FIX — mobile menu "short box with a scrollbar" bug
   `backdrop-filter` on an ancestor makes that ancestor the containing
   block for any `position: fixed` descendant (CSS spec, not a bug). `.nav`
   gets a backdrop-filter via `.glass-ready`, added moments after load — so
   by the time a visitor taps the hamburger, `#navLinks.is-open`'s
   `position: fixed` was sizing against `.nav`'s own ~78px-tall box instead
   of the real viewport, which is exactly the "short box with an internal
   scrollbar" symptom. Force backdrop-filter off on `.nav` for as long as
   the mobile menu is open, so the fixed overlay sizes against the actual
   viewport again. !important because `.nav.glass-ready`/`.is-solid` combos
   above carry equal specificity and can be present in either scroll state.
   ========================================================================== */
@media (max-width: 959px) {
  .nav:has(.nav-links.is-open) {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ==========================================================================
   ATMOSPHERE POLISH — soft shadows, warm ambient light, gallery-like images
   Purely additive, same rules as the LUXURY POLISH section above: only
   background, border, border-radius, box-shadow and padding/margin
   (spacing only, no grid/flex structure) are touched. Safe to delete this
   section to revert; a pre-change copy also lives in style-backup2.css.
   ========================================================================== */
:root {
  --radius-lg: 22px;
  --line-soft: rgba(26, 24, 21, 0.07);
  --warm-glow: rgba(255, 246, 224, 0.4);
}

/* ---------- Floating surfaces: soft shadow instead of hard border ---------- */
.ba-case { border: none; box-shadow: 0 18px 40px rgba(26, 24, 21, 0.10); }
.ba-case:hover, .ba-case:focus-visible { box-shadow: 0 26px 56px rgba(26, 24, 21, 0.16); }

.cred-card:not(.featured) { border-color: var(--line-soft); }
.aftercare-thumb { border-color: var(--line-soft); }

/* List-style dividers lightened rather than removed, they still carry
   real structural meaning (separating rows of text with no other cue).
   (.mbc-process-list/.mbc-process-row and .mbc-compare-col used to be
   listed here too, but both are now shadow-based Bento cards with no
   border left to tint — see the MB CONCEPT rules above.) */
.tx-grid, .blog-grid { border-top-color: var(--line-soft); }
.tx-card, .blog-card { border-bottom-color: var(--line-soft); padding-top: 2.2rem; padding-bottom: 2.2rem; }
.tx-card:nth-child(odd), .blog-card:nth-child(odd) { border-right-color: var(--line-soft); }

/* ---------- Ambient warm light behind a few key sections ---------- */
.credentials, .process, .before-after {
  background-image: radial-gradient(ellipse 70% 55% at 50% 0%, var(--warm-glow) 0%, rgba(255, 246, 224, 0) 70%);
}

/* ---------- Floating image containers: generous radius + soft shadow ---------- */
.cred-card, .aftercare-thumb {
  border-radius: var(--radius-lg);
}
.blog-featured-media,
.mbc-book-media img {
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 50px rgba(26, 24, 21, 0.12);
}

/* ---------- WhatsApp float: transparency made it swing between "too
   grey" over light content and "too black" over dark content depending
   on what's behind it. Back to fully solid ink (its original, pre-polish
   color) so it's consistently visible everywhere; the only "glass" touch
   left is a soft inner highlight and shadow for a little dimension. ---------- */
.whatsapp-float {
  background: var(--ink);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px rgba(26, 24, 21, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.whatsapp-float:hover {
  background: var(--ink);
  box-shadow: 0 16px 38px rgba(26, 24, 21, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* ---------- Real root cause of the icon being invisible, found while
   verifying: `a:link, a:visited { color: inherit; }` near the top of this
   file (element + pseudo-class) is MORE specific than a plain
   `.whatsapp-float` class selector, so it was always winning and forcing
   the icon back to inherited ink — ink icon on an ink button, invisible,
   no matter what the background was set to. Matching its specificity here
   is what actually fixes visibility, not the background-color changes. ---------- */
.whatsapp-float:link,
.whatsapp-float:visited {
  color: var(--ivory);
}

/* ==========================================================================
   MOTION POLISH — premium micro-interactions, tactile press states
   Purely additive: reuses the existing --ease timing curve and existing
   hover language already in the file. Adds two things that didn't exist
   anywhere before this pass: (1) :active press feedback on buttons/pills/
   cards, so tapping something on mobile feels acknowledged, and (2) hover
   motion on the handful of interactive elements that previously had zero
   feedback (nav logo, footer social icons). No layout, color, spacing or
   content changed. Safe to delete this section to revert; a pre-change
   copy also lives in style-backup3.css.
   ========================================================================== */

/* ---------- Press feedback: pills, filters, quiz ---------- */
.quiz-btn,
.work-filter,
.blog-filter,
.quiz-option,
.quiz-restart {
  transition-duration: 0.3s;
}
.quiz-btn:active,
.work-filter:active,
.blog-filter:active,
.quiz-option:active:not(:disabled),
.quiz-restart:active {
  transform: scale(0.96);
}
.quiz-btn-primary:active { transform: translateY(-1px) scale(0.97); }
.work-filter:hover, .blog-filter:hover { transform: translateY(-1px); }
.work-filter, .blog-filter { transition-property: background, color, border-color, transform; }

/* ---------- Press feedback: elevated cards ---------- */
.cred-card:active { transform: translateY(-1px) scale(0.99); }
.aftercare-thumb:active { transform: scale(0.99); }
.tx-card:active, .blog-card:active { transform: scale(0.99); }
.ba-case:active { box-shadow: 0 14px 30px rgba(26, 24, 21, 0.14); }
.work-card:active { transform: scale(0.99); }

/* ---------- Floating WhatsApp CTA: tactile press ---------- */
.whatsapp-float:active { transform: scale(0.94); }

/* ---------- Nav logo: previously had no hover feedback at all ---------- */
.nav-logo { transition: opacity 0.35s var(--ease); }
.nav-logo:hover { opacity: 0.7; }
.nav-logo:active { opacity: 0.5; }

/* ---------- Footer social icons: previously color-only, now a touch of lift ---------- */
.footer-social a { display: inline-flex; transition: color 0.35s var(--ease), transform 0.35s var(--ease); }
.footer-social a:hover { transform: translateY(-2px) scale(1.1); }
.footer-social a:active { transform: scale(0.92); }

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; filter: none !important; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
