/* Orthodontics City: single stylesheet. Mobile is the base; wider screens layer on with min-width. */

@font-face {
  font-family: "Fraunces"; /* ds-allow-hardcode: @font-face name */
  src: url("../fonts/fraunces.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree"; /* ds-allow-hardcode: @font-face name */
  src: url("../fonts/figtree.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  /* primitives (from the logo: steel blue, sky, lime, grey) */
  --p-ink-900: #14212b;
  --p-ink-700: #33434f;
  --p-ink-500: #5b6974;
  --p-steel-800: #123f57;
  --p-steel-700: #18577a;
  --p-steel-600: #1d6a92;
  --p-steel-100: #e3eef4;
  --p-steel-50: #f1f6f9;
  --p-sky-400: #5bc8f0;
  --p-lime-500: #8dc63f;
  --p-lime-100: #edf6df;
  --p-sand-50: #fbfaf7;
  --p-sand-100: #f4f1ea;
  --p-sand-200: #e8e3d8;
  --p-white: #ffffff;
  --p-wa-700: #0f7a3d;
  --p-wa-800: #0b6332;
  --p-red-700: #b42318;
  --p-red-50: #fdf1f0;
  --p-green-700: #1e6b3a;

  /* semantic */
  --text-primary: var(--p-ink-900);
  --text-secondary: var(--p-ink-700);
  --text-muted: var(--p-ink-500);
  --text-inverse: var(--p-white);
  --text-link: var(--p-steel-700);
  --surface-page: var(--p-sand-50);
  --surface-raised: var(--p-white);
  --surface-sunken: var(--p-sand-100);
  --surface-brand: var(--p-steel-800);
  --surface-brand-soft: var(--p-steel-50);
  --border-default: var(--p-sand-200);
  --border-strong: #8a8f93;
  --action-primary: var(--p-steel-700);
  --action-primary-hover: var(--p-steel-800);
  --action-primary-active: #0d3043;
  --action-whatsapp: var(--p-wa-700);
  --action-whatsapp-hover: var(--p-wa-800);
  --brand-mark: var(--p-lime-500);
  --brand-sky: var(--p-sky-400);
  --feedback-error: var(--p-red-700);
  --feedback-error-bg: var(--p-red-50);
  --feedback-success: var(--p-green-700);
  --focus-ring: #0b5cad;

  /* type: Major Third */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 1.875rem;
  --fs-3xl: 2.375rem;
  --fs-4xl: 2.75rem;
  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-body: 1.6;

  /* spacing: 4px rhythm */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --gutter: 1rem;
  --section-y: var(--sp-16);
  --measure: 66ch;
  --container: 72rem;

  /* shape and depth */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1.25rem;
  --radius-pill: 999px;
  --border-w: 1px;
  --shadow-raised: 0 1px 2px rgb(20 33 43 / 0.06), 0 8px 24px rgb(20 33 43 / 0.08);
  --shadow-overlay: 0 24px 64px rgb(20 33 43 / 0.24);

  /* motion */
  --dur-fast: 120ms;
  --dur-base: 200ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);


  /* inverse-surface text tints */
  --text-on-brand: #d8e4ea;
  --footer-text: #c9d2d8;
  --footer-link: #e7edf0;
  --footer-muted: #9fb0bb;
  --footer-hover-bg: #2a3946;

  /* strokes, offsets, blur */
  --stroke-2: 2px;
  --stroke-3: 3px;
  --stroke-4: 4px;
  --nudge: 3px;
  --nudge-lg: 4px;
  --blur-sm: 8px;
  --blur-md: 10px;
  --progress-h: 6px;
  --ring-mark-w: 14px;
  --logo-w: 168px;
  --logo-w-lg: 196px;
  --logo-w-footer: 180px;
  --dur-slow: 600ms;
  --dur-spin: 700ms;

  /* controls */
  --control-h: 3rem;
  --tap-min: 2.75rem;
  --header-h: 4rem;
  --z-header: 50;
  --z-sticky: 40;
  --z-modal: 100;
  --z-toast: 90;
}

@media (min-width: 48rem) {
  :root {
    --gutter: 2rem;
    --section-y: var(--sp-20);
    --fs-3xl: 2.75rem;
    --fs-4xl: 3.5rem;
  }
}
@media (min-width: 64rem) {
  :root {
    --section-y: var(--sp-24);
    --fs-4xl: 4rem;
    --header-h: 4.5rem;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--sp-4)); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--surface-page);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  margin: 0 0 var(--sp-4);
  color: var(--text-primary);
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); line-height: var(--lh-snug); }
h4 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
p, ul, ol, dl, figure, blockquote { margin: 0 0 var(--sp-4); }
a { color: var(--text-link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--action-primary-hover); text-decoration-thickness: var(--stroke-2); }
strong { font-weight: 650; }
:focus-visible { outline: var(--stroke-3) solid var(--focus-ring); outline-offset: var(--nudge); border-radius: var(--stroke-2); }
::selection { background: var(--p-steel-100); }
.visually-hidden {
  position: absolute !important; 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: var(--sp-4); top: -5rem; z-index: calc(var(--z-header) + 1);
  background: var(--surface-raised); color: var(--text-primary); padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-raised);
}
.skip-link:focus { top: var(--sp-2); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--sp-12); }
.section--sunken { background: var(--surface-sunken); }
.section--brand { background: var(--surface-brand); color: var(--text-inverse); }
.section--brand h2, .section--brand h3, .section--brand a:not(.btn) { color: var(--text-inverse); }
.section--brand .eyebrow { color: var(--p-lime-100); }
.section--brand .lead, .section--brand p { color: var(--text-on-brand); }
.section-head { max-width: 40rem; margin-bottom: var(--sp-10); }
.section-head > p:not(.eyebrow) { color: var(--text-secondary); font-size: var(--fs-lg); }
.section--brand .section-head > p:not(.eyebrow) { color: var(--text-on-brand); }
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 650;
  letter-spacing: 0.02em; color: var(--action-primary); margin-bottom: var(--sp-3);
}
.eyebrow::before { content: ""; width: 1.25rem; height: var(--stroke-2); background: var(--brand-mark); border-radius: var(--stroke-2); }
.lead { font-size: var(--fs-lg); color: var(--text-secondary); line-height: 1.55; }
.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--fs-2xl); margin-top: var(--sp-10); }
.prose h3 { margin-top: var(--sp-8); }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li { margin-bottom: var(--sp-2); }
.prose img { border-radius: var(--radius-md); margin-block: var(--sp-6); }
.prose blockquote { border: var(--border-w) solid var(--border-default); background: var(--surface-raised); padding: var(--sp-5); border-radius: var(--radius-md); font-style: italic; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin-bottom: var(--sp-6); display: block; overflow-x: auto; }
.prose th, .prose td { border: var(--border-w) solid var(--border-default); padding: var(--sp-2) var(--sp-3); text-align: left; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--action-primary);
  --btn-bg-hover: var(--action-primary-hover);
  --btn-fg: var(--text-inverse);
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: var(--control-h); padding: 0 var(--sp-6);
  font: 650 var(--fs-base)/1 var(--font-body);
  color: var(--btn-fg); background: var(--btn-bg);
  border: var(--border-w) solid transparent; border-radius: var(--radius-pill);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), border-color var(--dur-fast);
}
.btn:hover { background: var(--btn-bg-hover); color: var(--btn-fg); text-decoration: none; }
.btn:active { transform: translateY(var(--border-w)); background: var(--action-primary-active); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn[aria-busy="true"] { cursor: progress; }
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }
.btn--whatsapp { --btn-bg: var(--action-whatsapp); --btn-bg-hover: var(--action-whatsapp-hover); }
.btn--whatsapp:active { background: var(--action-whatsapp-hover); }
.btn--secondary {
  --btn-bg: transparent; --btn-bg-hover: var(--surface-brand-soft); --btn-fg: var(--text-primary);
  border-color: var(--border-strong);
}
.btn--secondary:active { background: var(--p-steel-100); }
.section--brand .btn--secondary { --btn-fg: var(--text-inverse); --btn-bg-hover: rgb(255 255 255 / 0.1); border-color: rgb(255 255 255 / 0.6); }
.section--brand .btn--secondary:active { background: rgb(255 255 255 / 0.16); }
.btn--light { --btn-bg: var(--p-white); --btn-bg-hover: var(--p-steel-50); --btn-fg: var(--p-steel-800); }
.btn--light:active { background: var(--p-steel-100); }
.btn--block { width: 100%; }
.btn--sm { min-height: var(--tap-min); padding: 0 var(--sp-4); font-size: var(--fs-sm); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }
.link-arrow { font-weight: 650; text-decoration: none; display: inline-flex; align-items: center; gap: var(--sp-1); min-height: var(--tap-min); }
.link-arrow::after { content: "\2192"; transition: transform var(--dur-fast) var(--ease-out); }
.link-arrow:hover::after { transform: translateX(var(--nudge)); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  border-bottom: var(--border-w) solid var(--border-default);
}
/* The blur lives on a pseudo-element: backdrop-filter on the header itself would trap the
   fixed mobile menu inside the header's box (it becomes the containing block). */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgb(251 250 247 / 0.94);
  backdrop-filter: saturate(1.4) blur(var(--blur-md)); -webkit-backdrop-filter: saturate(1.4) blur(var(--blur-md));
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-height: var(--tap-min); }
.brand img { width: var(--logo-w); height: auto; }
.header-actions { display: flex; align-items: center; gap: var(--sp-2); }
.header-actions .btn--cta { display: none; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-width: var(--tap-min); min-height: var(--tap-min); padding: 0 var(--sp-3);
  background: transparent; color: var(--text-primary); border: var(--border-w) solid var(--border-strong);
  border-radius: var(--radius-pill); font: 600 var(--fs-sm)/1 var(--font-body); cursor: pointer;
}
.nav-toggle:hover { background: var(--surface-sunken); }
.nav-toggle:active { background: var(--p-sand-200); }
.nav-toggle svg { width: 1.25rem; height: 1.25rem; }
.call-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap-min); height: var(--tap-min); border-radius: var(--radius-pill);
  color: var(--action-primary); border: var(--border-w) solid var(--border-strong);
}
.call-icon:hover { background: var(--surface-sunken); color: var(--action-primary-hover); }
.call-icon svg { width: 1.25rem; height: 1.25rem; }

.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: fixed; inset: var(--header-h) 0 0 0; overflow-y: auto;
  background: var(--surface-page); padding: var(--sp-4) var(--gutter) var(--sp-16);
  border-top: var(--border-w) solid var(--border-default);
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-item { border-bottom: var(--border-w) solid var(--border-default); }
.nav-link, .nav-group-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 3.25rem; padding: 0; background: none; border: 0; cursor: pointer;
  font: 600 var(--fs-lg)/1.2 var(--font-body); color: var(--text-primary); text-decoration: none; text-align: left;
}
.nav-link:hover, .nav-group-btn:hover { color: var(--action-primary); text-decoration: none; }
.nav-group-btn svg { width: 1.125rem; height: 1.125rem; transition: transform var(--dur-base) var(--ease-out); }
.nav-group-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-sub { list-style: none; margin: 0; padding: 0 0 var(--sp-3); display: none; }
.nav-group-btn[aria-expanded="true"] + .nav-sub { display: block; }
.nav-sub a {
  display: flex; align-items: center; min-height: var(--tap-min); padding-left: var(--sp-3);
  color: var(--text-secondary); text-decoration: none; font-size: var(--fs-base);
}
.nav-sub a:hover { color: var(--action-primary); }
.nav-sub a[aria-current="page"], .nav-link[aria-current="page"] { color: var(--action-primary); font-weight: 700; }
.nav-mobile-cta { margin-top: var(--sp-6); display: grid; gap: var(--sp-3); }

@media (min-width: 64rem) {
  .brand img { width: var(--logo-w-lg); }
  .nav-toggle, .nav-mobile-cta { display: none; }
  .header-actions .btn--cta { display: inline-flex; }
  .site-nav, .site-nav.is-open {
    display: block; position: static; inset: auto; overflow: visible; padding: 0; border: 0; background: none;
  }
  .nav-list { display: flex; align-items: center; gap: var(--sp-1); }
  .nav-item { border: 0; position: relative; }
  .nav-link, .nav-group-btn {
    min-height: var(--tap-min); padding: 0 var(--sp-3); font-size: var(--fs-sm); gap: var(--sp-1); border-radius: var(--radius-pill);
  }
  .nav-link:hover, .nav-group-btn:hover { background: var(--surface-sunken); }
  .nav-sub {
    position: absolute; top: calc(100% + var(--sp-2)); left: 0; min-width: 17rem; padding: var(--sp-2);
    background: var(--surface-raised); border: var(--border-w) solid var(--border-default);
    border-radius: var(--radius-md); box-shadow: var(--shadow-raised);
  }
  .nav-sub a { padding: 0 var(--sp-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
  .nav-sub a:hover { background: var(--surface-sunken); }
}

/* ---------- Hero ---------- */
.hero { padding-block: var(--sp-10) var(--sp-16); position: relative; overflow: hidden; }
.hero__grid { display: grid; gap: var(--sp-10); align-items: center; }
.hero h1 { max-width: 15ch; margin-bottom: var(--sp-5); }
.hero .lead { max-width: 36rem; margin-bottom: var(--sp-8); }
.hero__trust { list-style: none; padding: 0; margin: var(--sp-8) 0 0; display: grid; gap: var(--sp-3); color: var(--text-secondary); font-size: var(--fs-sm); }
.hero__trust li { display: flex; gap: var(--sp-2); align-items: flex-start; }
.hero__trust svg { width: 1.25rem; height: 1.25rem; color: var(--action-primary); flex: none; margin-top: 0.1rem; }
.hero__media { position: relative; isolation: isolate; }
.hero__media img { width: 100%; border-radius: var(--radius-lg); object-fit: cover; aspect-ratio: 4 / 5; background: var(--surface-sunken); }
.hero__media::before {
  content: ""; position: absolute; inset: auto -8% -6% auto; width: 62%; aspect-ratio: 1; border-radius: 50%;
  border: var(--ring-mark-w) solid var(--brand-mark); opacity: 0.35; z-index: -1;
}
.hero__badge {
  position: absolute; left: var(--sp-4); bottom: var(--sp-4); right: var(--sp-4);
  background: var(--surface-raised); border-radius: var(--radius-md); padding: var(--sp-4);
  box-shadow: var(--shadow-raised); font-size: var(--fs-sm); color: var(--text-secondary);
}
.hero__badge strong { display: block; font-family: var(--font-display); font-size: var(--fs-lg); color: var(--text-primary); font-weight: 600; }
.hero--compact { padding-block: var(--sp-10) var(--sp-12); }
.hero--compact h1 { max-width: 20ch; }
.hero--plain .hero__grid { grid-template-columns: 1fr; }
@media (min-width: 48rem) {
  .hero__trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__badge { right: auto; max-width: 17rem; }
}
@media (min-width: 64rem) {
  .hero { padding-block: var(--sp-16) var(--sp-20); }
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--sp-16); }
  .hero__media img { aspect-ratio: 5 / 6; }
  .hero__badge { left: calc(var(--sp-8) * -1); bottom: var(--sp-10); }
  .hero--compact .hero__grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .hero--plain .hero__grid { grid-template-columns: 1fr; }
}

/* ---------- Facts strip ---------- */
.facts { border-block: var(--border-w) solid var(--border-default); background: var(--surface-raised); }
.facts__list { list-style: none; margin: 0; padding: var(--sp-6) 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6) var(--sp-4); }
.facts__item strong { display: block; font-family: var(--font-display); font-size: var(--fs-2xl); font-weight: 560; line-height: 1.1; color: var(--text-primary); }
.facts__item span { font-size: var(--fs-sm); color: var(--text-secondary); }
@media (min-width: 64rem) { .facts__list { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-block: var(--sp-8); } }

/* ---------- Service index: one leads, the rest list ---------- */
.svc { display: grid; gap: var(--sp-8); }
.svc__lead {
  position: relative; display: grid; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-brand); color: var(--text-inverse); text-decoration: none; min-height: 22rem;
}
.svc__lead img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.38; transition: transform var(--dur-slow) var(--ease-out); }
.svc__lead:hover img { transform: scale(1.03); }
.svc__lead-body { position: relative; align-self: end; padding: var(--sp-8) var(--sp-6); }
.svc__lead h3 { color: var(--text-inverse); font-size: var(--fs-2xl); margin-bottom: var(--sp-3); }
.svc__lead p { color: var(--text-on-brand); max-width: 32rem; }
.svc__lead .link-arrow { color: var(--text-inverse); }
.svc__lead:hover { color: var(--text-inverse); }
.svc__list { list-style: none; margin: 0; padding: 0; border-top: var(--border-w) solid var(--border-default); }
.svc__list li { border-bottom: var(--border-w) solid var(--border-default); }
.svc__list a {
  display: grid; grid-template-columns: 1fr auto; gap: var(--sp-1) var(--sp-4); padding: var(--sp-5) 0;
  text-decoration: none; color: var(--text-primary);
}
.svc__list a:hover h3 { color: var(--action-primary); }
.svc__list h3 { font-size: var(--fs-lg); margin: 0; transition: color var(--dur-fast); }
.svc__list p { grid-column: 1; margin: 0; color: var(--text-secondary); font-size: var(--fs-sm); }
.svc__list svg { grid-row: 1 / span 2; grid-column: 2; align-self: center; width: 1.25rem; height: 1.25rem; color: var(--action-primary); transition: transform var(--dur-fast) var(--ease-out); }
.svc__list a:hover svg { transform: translateX(var(--nudge-lg)); }
@media (min-width: 64rem) {
  .svc { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-12); align-items: start; }
  .svc__lead { position: sticky; top: calc(var(--header-h) + var(--sp-6)); min-height: 34rem; }
  .svc__lead-body { padding: var(--sp-10); }
}

/* ---------- Media + text ---------- */
.mt { display: grid; gap: var(--sp-8); align-items: center; }
.mt__media img { border-radius: var(--radius-lg); width: 100%; object-fit: cover; }
.mt__body .btn-row { margin-top: var(--sp-6); }
@media (min-width: 64rem) {
  .mt { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-16); }
  .mt--reverse .mt__media { order: 2; }
}

/* ---------- Feature list (benefits) ---------- */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-8); }
.features li { display: grid; grid-template-columns: auto 1fr; gap: var(--sp-4); align-items: start; }
.features__icon {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--surface-brand-soft); color: var(--action-primary);
}
.section--brand .features__icon { background: rgb(255 255 255 / 0.1); color: var(--p-lime-100); }
.features__icon svg { width: 1.375rem; height: 1.375rem; }
.features h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-1); }
.features p { margin: 0; color: var(--text-secondary); }
.section--brand .features p { color: var(--text-on-brand); }
@media (min-width: 48rem) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-10) var(--sp-12); } }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-6); counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: var(--sp-16); }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 2.75rem; height: 2.75rem; border-radius: 50%;
  display: grid; place-items: center; font: 600 var(--fs-lg)/1 var(--font-display);
  background: var(--surface-raised); border: var(--border-w) solid var(--border-strong); color: var(--text-primary);
}
.steps h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-1); padding-top: var(--sp-2); }
.steps p { margin: 0; color: var(--text-secondary); }
@media (min-width: 64rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-10); }
  .steps li { padding-left: 0; padding-top: var(--sp-16); }
}

/* ---------- Doctors ---------- */
.doctors { display: grid; gap: var(--sp-12); }
.doctor { display: grid; gap: var(--sp-6); }
.doctor__photo img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 4 / 5; object-fit: cover; object-position: top; background: var(--surface-sunken); }
.doctor__role { color: var(--action-primary); font-weight: 650; font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.doctor h3 { font-size: var(--fs-2xl); }
.doctor ul { padding-left: 1.1rem; color: var(--text-secondary); font-size: var(--fs-sm); }
.doctor li { margin-bottom: var(--sp-2); }
@media (min-width: 48rem) {
  .doctor { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--sp-10); align-items: start; }
}
@media (min-width: 64rem) {
  .doctors { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-12); }
  .doctor { grid-template-columns: 1fr; }
}

/* ---------- Cases rail ---------- */
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 82%; gap: var(--sp-4);
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: var(--sp-4);
  scrollbar-width: thin; overscroll-behavior-x: contain;
}
.rail > * { scroll-snap-align: start; }
.case { margin: 0; background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; }
.case img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface-sunken); }
.case figcaption { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); color: var(--text-secondary); }
.case figcaption strong { display: block; color: var(--text-primary); font-size: var(--fs-base); }
.case-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.rail-hint { font-size: var(--fs-sm); color: var(--text-muted); margin-top: var(--sp-2); }
@media (min-width: 48rem) { .rail { grid-auto-columns: minmax(17rem, 40%); } }
@media (min-width: 64rem) { .rail { grid-auto-columns: minmax(17rem, 28%); } .rail-hint { display: none; } }

/* ---------- Testimonials ---------- */
.quotes { display: grid; gap: var(--sp-6); }
.quote { margin: 0; padding: var(--sp-6); background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-md); display: grid; gap: var(--sp-4); align-content: start; }
.quote blockquote { margin: 0; color: var(--text-secondary); }
.quote figcaption { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); color: var(--text-muted); }
.quote figcaption img { width: 3rem; height: 3rem; border-radius: 50%; object-fit: cover; }
.quote figcaption strong { display: block; color: var(--text-primary); font-size: var(--fs-base); }
.quote--lead { background: var(--surface-brand); border-color: var(--surface-brand); }
.quote--lead blockquote { color: var(--text-inverse); font-family: var(--font-display); font-size: var(--fs-xl); line-height: 1.35; }
.quote--lead figcaption, .quote--lead figcaption strong { color: var(--text-on-brand); }
@media (min-width: 48rem) { .quotes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .quote--lead { grid-column: 1 / -1; } }
@media (min-width: 64rem) { .quotes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .quote--lead { grid-column: span 2; grid-row: span 2; align-content: center; padding: var(--sp-10); } }

.videos { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); margin-top: var(--sp-10); }
.video-facade {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; padding: 0;
  border: 0; border-radius: var(--radius-md); overflow: hidden; cursor: pointer; background: var(--surface-brand); color: var(--text-inverse);
}
.video-facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.video-facade__play { position: relative; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: var(--p-white); color: var(--p-steel-800); transition: transform var(--dur-fast) var(--ease-out); }
.video-facade__play svg { width: 1.5rem; height: 1.5rem; margin-left: var(--nudge); }
.video-facade:hover .video-facade__play { transform: scale(1.08); }
.video-facade:active .video-facade__play { transform: scale(0.97); }
.video-facade__label { position: absolute; left: var(--sp-3); bottom: var(--sp-3); right: var(--sp-3); text-align: left; font-size: var(--fs-sm); font-weight: 600; }
.video-frame { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-md); }

/* ---------- FAQ ---------- */
.faq { max-width: 48rem; border-top: var(--border-w) solid var(--border-default); }
.faq details { border-bottom: var(--border-w) solid var(--border-default); }
.faq summary {
  list-style: none; display: flex; justify-content: space-between; gap: var(--sp-4); align-items: center;
  min-height: var(--tap-min); padding: var(--sp-5) 0; cursor: pointer; font-weight: 650; font-size: var(--fs-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.75rem/1 var(--font-body); color: var(--action-primary); transition: transform var(--dur-base) var(--ease-out); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--action-primary); }
.faq .faq__a { padding-bottom: var(--sp-5); color: var(--text-secondary); max-width: var(--measure); }
.faq-wrap { display: grid; gap: var(--sp-8); }
@media (min-width: 64rem) { .faq-wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--sp-16); } }

/* ---------- CTA band ---------- */
.cta-band { display: grid; gap: var(--sp-6); align-items: center; }
.cta-band h2 { max-width: 18ch; }
@media (min-width: 64rem) { .cta-band { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } .cta-band .btn-row { justify-content: flex-end; } }

/* ---------- Location ---------- */
.location { display: grid; gap: var(--sp-8); }
.location__card { background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-lg); padding: var(--sp-6); }
.location dl { display: grid; gap: var(--sp-4); margin: 0 0 var(--sp-6); }
.location dt { font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.location dd { margin: 0; }
.location__media img { width: 100%; border-radius: var(--radius-lg); object-fit: cover; aspect-ratio: 4 / 3; }
@media (min-width: 64rem) { .location { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--sp-12); align-items: center; } }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: var(--fs-sm); color: var(--text-muted); padding-top: var(--sp-6); }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-2); margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: var(--sp-2); color: var(--border-strong); }
.crumbs a { color: var(--text-secondary); text-decoration: none; display: inline-flex; min-height: 1.75rem; align-items: center; }
.crumbs a:hover { color: var(--action-primary); text-decoration: underline; }

/* ---------- Article ---------- */
.article-head { padding-block: var(--sp-8) var(--sp-10); }
.article-head h1 { font-size: var(--fs-3xl); max-width: 22ch; }
.article-meta { font-size: var(--fs-sm); color: var(--text-muted); }
.article-layout { display: grid; gap: var(--sp-12); }
.article-aside { display: grid; gap: var(--sp-6); align-content: start; }
.aside-card { background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-md); padding: var(--sp-6); }
.aside-card h2 { font-size: var(--fs-xl); }
@media (min-width: 64rem) {
  .article-layout { grid-template-columns: minmax(0, 1fr) 20rem; gap: var(--sp-16); }
  .article-aside { position: sticky; top: calc(var(--header-h) + var(--sp-6)); }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--p-ink-900); color: var(--footer-text); padding-block: var(--sp-16) var(--sp-24); font-size: var(--fs-sm); }
.site-footer a { color: var(--footer-link); text-decoration: none; }
.site-footer a:hover { color: var(--p-white); text-decoration: underline; }
.site-footer h2 { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--footer-muted); margin-bottom: var(--sp-4); }
.footer-grid { display: grid; gap: var(--sp-10); }
.footer-brand img { width: var(--logo-w-footer); margin-bottom: var(--sp-4); filter: brightness(0) invert(1); opacity: 0.92; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-1); }
.footer-list a { display: inline-flex; align-items: center; min-height: 2.25rem; }
.footer-bottom { border-top: var(--border-w) solid rgb(255 255 255 / 0.12); margin-top: var(--sp-12); padding-top: var(--sp-6); display: flex; flex-wrap: wrap; gap: var(--sp-4); justify-content: space-between; color: var(--footer-muted); }
.social { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.social a { width: var(--tap-min); height: var(--tap-min); display: grid; place-items: center; border-radius: 50%; border: var(--border-w) solid rgb(255 255 255 / 0.25); }
.social a:hover { background: var(--footer-hover-bg); color: var(--p-white); text-decoration: none; }
.social svg { width: 1.125rem; height: 1.125rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .footer-grid { grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 3fr)); } .site-footer { padding-bottom: var(--sp-16); } }

/* ---------- Floating WhatsApp + mobile action bar ---------- */
.action-bar {
  position: fixed; inset: auto 0 0 0; z-index: var(--z-sticky);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2);
  padding: var(--sp-2) var(--gutter) calc(var(--sp-2) + env(safe-area-inset-bottom));
  background: rgb(251 250 247 / 0.96); border-top: var(--border-w) solid var(--border-default);
  backdrop-filter: blur(var(--blur-sm)); -webkit-backdrop-filter: blur(var(--blur-sm));
}
.action-bar .btn { padding: 0 var(--sp-3); font-size: var(--fs-sm); }
body.has-action-bar { padding-bottom: 4.75rem; }
.wa-float { display: none; }
@media (min-width: 64rem) {
  .action-bar { display: none; }
  body.has-action-bar { padding-bottom: 0; }
  .wa-float {
    position: fixed; right: var(--sp-6); bottom: var(--sp-6); z-index: var(--z-sticky);
    display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 3.25rem; padding: 0 var(--sp-5);
    border-radius: var(--radius-pill); background: var(--action-whatsapp); color: var(--text-inverse);
    font-weight: 650; text-decoration: none; box-shadow: var(--shadow-raised);
    transition: background-color var(--dur-fast);
  }
  .wa-float:hover { background: var(--action-whatsapp-hover); color: var(--text-inverse); }
  .wa-float svg { width: 1.375rem; height: 1.375rem; }
}

/* ---------- Forms (lead flows) ---------- */
.lead-panel { background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-lg); padding: var(--sp-6); box-shadow: var(--shadow-raised); color: var(--text-primary); }
.lead-panel h2 { font-size: var(--fs-2xl); color: var(--text-primary); }
.lead-panel p { color: var(--text-secondary); }
.flow { display: grid; gap: var(--sp-5); }
.flow__progress { height: var(--progress-h); background: var(--surface-sunken); border-radius: var(--radius-pill); overflow: hidden; }
.flow__progress span { display: block; height: 100%; width: 0; background: var(--action-primary); transition: width var(--dur-base) var(--ease-out); }
.flow__count { font-size: var(--fs-sm); color: var(--text-muted); margin: 0; }
.flow__step[hidden] { display: none; }
.flow__step:focus { outline: none; }
.flow__q { font-family: var(--font-display); font-size: var(--fs-xl); line-height: var(--lh-snug); margin: 0 0 var(--sp-2); font-weight: 560; color: var(--text-primary); }
.flow__help { color: var(--text-secondary); font-size: var(--fs-sm); margin-bottom: var(--sp-4); }
.flow fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.flow legend { padding: 0; }
.options { display: grid; gap: var(--sp-2); }
@media (min-width: 30rem) { .options--2 { grid-template-columns: 1fr 1fr; } }
.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.option span {
  display: flex; align-items: center; gap: var(--sp-3); min-height: var(--control-h); padding: var(--sp-3) var(--sp-4);
  border: var(--border-w) solid var(--border-strong); border-radius: var(--radius-md); background: var(--surface-raised);
  font-weight: 600; color: var(--text-primary); transition: border-color var(--dur-fast), background-color var(--dur-fast);
}
.option span::before { content: ""; width: 1.125rem; height: 1.125rem; border-radius: 50%; border: var(--stroke-2) solid var(--border-strong); flex: none; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.option input:hover + span { border-color: var(--action-primary); background: var(--surface-brand-soft); }
.option input:focus-visible + span { outline: var(--stroke-3) solid var(--focus-ring); outline-offset: var(--stroke-2); }
.option input:checked + span { border-color: var(--action-primary); background: var(--surface-brand-soft); }
.option input:checked + span::before { border-color: var(--action-primary); box-shadow: inset 0 0 0 var(--stroke-4) var(--surface-raised); background: var(--action-primary); }
.option input:active + span { background: var(--p-steel-100); }
.option input:disabled + span { opacity: 0.55; cursor: not-allowed; }
.option--check span::before { border-radius: var(--stroke-4); }
.field { display: grid; gap: var(--sp-2); }
.field label { font-weight: 650; color: var(--text-primary); }
.field input, .field textarea {
  width: 100%; min-height: var(--control-h); padding: var(--sp-3) var(--sp-4);
  font: 400 var(--fs-base)/1.4 var(--font-body); color: var(--text-primary);
  background: var(--surface-raised); border: var(--border-w) solid var(--border-strong); border-radius: var(--radius-md);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--text-secondary); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--focus-ring); box-shadow: 0 0 0 var(--stroke-3) rgb(11 92 173 / 0.25); }
.field input:disabled { background: var(--surface-sunken); cursor: not-allowed; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--feedback-error); }
.field-error { color: var(--feedback-error); font-size: var(--fs-sm); display: flex; gap: var(--sp-2); align-items: flex-start; margin: 0; }
.field-error:empty { display: none; }
.field-error::before { content: "!"; flex: none; display: grid; place-items: center; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--feedback-error); color: var(--p-white); font-weight: 800; font-size: 0.75rem; margin-top: 0.15rem; }
.flow__nav { display: flex; gap: var(--sp-3); justify-content: space-between; align-items: center; flex-wrap: wrap; }
.flow__back { background: none; border: 0; padding: 0 var(--sp-2); min-height: var(--tap-min); color: var(--text-secondary); font: 600 var(--fs-sm)/1 var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.flow__back:hover { color: var(--text-primary); }
.flow__back:active { color: var(--action-primary-active); }
.flow__notice { padding: var(--sp-4); border-radius: var(--radius-md); border: var(--border-w) solid var(--border-default); background: var(--surface-sunken); color: var(--text-primary); }
.flow__notice--error { border-color: var(--feedback-error); background: var(--feedback-error-bg); color: var(--feedback-error); }
.flow__privacy { font-size: var(--fs-xs); color: var(--text-muted); margin: 0; }
.spinner { width: 1.125rem; height: 1.125rem; border-radius: 50%; border: var(--stroke-2) solid currentColor; border-right-color: transparent; animation: spin var(--dur-spin) linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.iti { width: 100%; }

/* ---------- Modal (lead flow on landings) ---------- */
.modal { border: 0; padding: 0; width: min(36rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--text-primary); box-shadow: var(--shadow-overlay); }
.modal::backdrop { background: rgb(20 33 43 / 0.55); }
.modal__inner { padding: var(--sp-6); overflow-y: auto; max-height: calc(100dvh - 2rem); }
.modal__head { display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.modal__head h2 { font-size: var(--fs-lg); margin: 0; font-family: var(--font-body); font-weight: 700; }
.modal__close { width: var(--tap-min); height: var(--tap-min); border-radius: 50%; border: var(--border-w) solid var(--border-default); background: var(--surface-raised); cursor: pointer; display: grid; place-items: center; color: var(--text-primary); flex: none; }
.modal__close:hover { background: var(--surface-sunken); }
.modal__close:active { background: var(--p-sand-200); }
.modal__close svg { width: 1.25rem; height: 1.25rem; }

/* ---------- Landing specifics ---------- */
.landing-header { border-bottom: var(--border-w) solid var(--border-default); background: var(--surface-page); }
.landing-footer { padding-block: var(--sp-10) var(--sp-24); font-size: var(--fs-sm); color: var(--text-muted); border-top: var(--border-w) solid var(--border-default); }
.landing-footer a { color: var(--text-secondary); }
@media (min-width: 64rem) { .landing-footer { padding-bottom: var(--sp-10); } }
.toast {
  position: fixed; left: var(--sp-4); bottom: 5.5rem; z-index: var(--z-toast); max-width: 20rem;
  background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-md);
  box-shadow: var(--shadow-raised); padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); color: var(--text-secondary);
  opacity: 0; transform: translateY(var(--sp-2)); transition: opacity var(--dur-base), transform var(--dur-base) var(--ease-out); pointer-events: none;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast strong { color: var(--text-primary); }
@media (min-width: 64rem) { .toast { bottom: var(--sp-6); left: var(--sp-6); } }

/* ---------- Thank-you ---------- */
.thanks { min-height: 70vh; display: grid; align-items: center; }
.thanks__card { max-width: 40rem; }
.thanks__icon { width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center; background: var(--p-lime-100); color: var(--feedback-success); margin-bottom: var(--sp-6); }
.thanks__icon svg { width: 1.75rem; height: 1.75rem; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.note { font-size: var(--fs-sm); color: var(--text-muted); }
.embed { width: 100%; border: 0; border-radius: var(--radius-md); min-height: 40rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .action-bar, .wa-float, .toast { display: none !important; }
}

/* ---------- Form block helpers ---------- */
.form-solo { max-width: 40rem; }
.field-legend { font-weight: 650; color: var(--text-primary); margin-bottom: var(--sp-2); }
.footer-address { font-style: normal; }
.steps--compact { margin: var(--sp-8) 0; gap: var(--sp-3); }
.steps--compact li { padding-left: var(--sp-12); min-height: 2.75rem; display: flex; align-items: center; }
.steps--compact li p { margin: 0; }
@media (min-width: 64rem) { .steps--compact { grid-template-columns: 1fr; } .steps--compact li { padding-left: var(--sp-12); padding-top: 0; } }

/* ---------- Narrow-screen safety (280px foldables) ---------- */
.location > *, .mt > *, .svc > *, .hero__grid > *, .faq-wrap > *, .cta-band > *, .doctor > * { min-width: 0; }
.location dd, .footer-list li { overflow-wrap: anywhere; }
.action-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.btn { max-width: 100%; }
@media (max-width: 22rem) { .btn { white-space: normal; text-align: center; line-height: var(--lh-snug); } }

/* ---------- Landing pages: before/after cases (added by the landings rebuild) ----------
   Many original before/after photos are wide side-by-side composites; show them whole
   instead of cropping them to a square. Applies only to cases blocks with anchor "casos-reales". */
#casos-reales .case img { aspect-ratio: 4 / 3; object-fit: contain; }

/* ---------- Case galleries (/antes-y-despues/, /casos-dentales/) ----------
   Added by the gallery pages: cases blocks with an anchor starting "galeria-" show
   the whole before/after photo (most are wide composites) instead of a square crop. */
section[id^="galeria-"] .case img { aspect-ratio: 4 / 3; object-fit: contain; }

/* =====================================================================
   Blog (blog/index.php, blog/post.php). Server-rendered PHP templates
   that share the site header, footer and tokens. Tokens only.
   ===================================================================== */
.blog-hero { padding-bottom: var(--sp-8); }
.blog-hero h1 { max-width: 22ch; }
.blog-hero .lead { max-width: 40rem; margin-bottom: var(--sp-6); }
.blog-search { display: flex; gap: var(--sp-2); max-width: 32rem; }
.blog-search input {
  flex: 1; min-width: 0; min-height: var(--tap-min); padding: 0 var(--sp-4);
  font: inherit; font-size: var(--fs-sm); color: var(--text-primary);
  background: var(--surface-raised); border: var(--border-w) solid var(--border-strong); border-radius: var(--radius-pill);
}
.blog-search input:focus { outline: var(--stroke-3) solid var(--focus-ring); outline-offset: var(--border-w); }

/* Category filter: links, horizontally scrollable on phones */
.blog-cats { margin: 0 calc(var(--gutter) * -1) var(--sp-8); overflow-x: auto; scrollbar-width: none; }
.blog-cats::-webkit-scrollbar { display: none; }
.blog-cats ul { list-style: none; display: flex; gap: var(--sp-2); margin: 0; padding: var(--sp-1) var(--gutter); width: max-content; }
.blog-cats a {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap-min); padding: 0 var(--sp-4);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); text-decoration: none; white-space: nowrap;
  background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-pill);
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.blog-cats a span { font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); }
.blog-cats a:hover { border-color: var(--border-strong); color: var(--text-primary); }
.blog-cats a[aria-current="page"] { background: var(--surface-brand); border-color: var(--surface-brand); color: var(--text-inverse); }
.blog-cats a[aria-current="page"] span { color: var(--text-on-brand); }
@media (min-width: 64rem) {
  .blog-cats { margin-inline: 0; overflow: visible; }
  .blog-cats ul { flex-wrap: wrap; width: auto; padding-inline: 0; }
}
.blog-list__title { font-size: var(--fs-2xl); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--sp-2) var(--sp-4); margin-bottom: var(--sp-6); }
.blog-list__page { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.blog-empty { padding: var(--sp-10) 0; color: var(--text-secondary); }

/* Post cards */
.post-grid { display: grid; gap: var(--sp-6); }
@media (min-width: 48rem) { .post-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .post-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-8) var(--sp-6); } }
.post-card {
  position: relative; display: flex; flex-direction: column; min-width: 0;
  background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-md); overflow: hidden;
  transition: box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out);
}
.post-card:hover { box-shadow: var(--shadow-raised); border-color: var(--border-strong); }
.post-card__media { display: block; }
.post-card__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5); flex: 1; }
.post-card__meta { margin: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.post-card__meta a { position: relative; z-index: 1; font-weight: 650; color: var(--action-primary); text-decoration: none; }
.post-card__meta a:hover { text-decoration: underline; }
.post-card__title { font-size: var(--fs-lg); line-height: var(--lh-snug); margin: 0; }
.post-card__title a { color: var(--text-primary); text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; }
.post-card:hover .post-card__title a { color: var(--action-primary); }
.post-card__excerpt { margin: 0; font-size: var(--fs-sm); color: var(--text-secondary); }

/* Branded image fallback (posts whose image is empty or a placehold.co placeholder) */
.post-fallback {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: var(--sp-2);
  padding: var(--sp-5); background: linear-gradient(135deg, var(--surface-brand), var(--p-steel-600)); color: var(--text-inverse);
}
.post-fallback::before {
  content: ""; position: absolute; z-index: -1; right: -12%; top: -30%; width: 55%; aspect-ratio: 1; border-radius: 50%;
  border: var(--ring-mark-w) solid var(--brand-mark); opacity: 0.45;
}
.post-fallback::after {
  content: ""; position: absolute; z-index: -1; right: 6%; top: 18%; width: 22%; aspect-ratio: 1; border-radius: 50%;
  background: var(--brand-sky); opacity: 0.18;
}
/* vary the decoration so a grid of fallbacks does not look stamped */
.post-card:nth-child(3n+2) .post-fallback::before { right: auto; left: 48%; top: 38%; width: 70%; }
.post-card:nth-child(3n+2) .post-fallback::after { right: 10%; top: 8%; width: 14%; }
.post-card:nth-child(3n) .post-fallback::before { right: -24%; top: -55%; width: 80%; opacity: 0.3; }
.post-card:nth-child(3n) .post-fallback::after { right: 30%; top: 12%; width: 10%; opacity: 0.3; }
.post-fallback__logo { width: 7rem; filter: brightness(0) invert(1); opacity: 0.85; }
.post-fallback__cat { font-family: var(--font-display); font-size: var(--fs-lg); font-weight: 560; line-height: var(--lh-snug); max-width: 16ch; }

/* Pagination */
.pager { margin-top: var(--sp-10); }
.pager ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin: 0; padding: 0; }
.pager a {
  display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap-min); min-height: var(--tap-min); padding: 0 var(--sp-3);
  font-weight: 650; font-size: var(--fs-sm); color: var(--text-primary); text-decoration: none;
  background: var(--surface-raised); border: var(--border-w) solid var(--border-default); border-radius: var(--radius-pill);
}
.pager a:hover { border-color: var(--border-strong); }
.pager a[aria-current="page"] { background: var(--surface-brand); border-color: var(--surface-brand); color: var(--text-inverse); }
.pager__gap { display: inline-flex; align-items: center; min-height: var(--tap-min); color: var(--text-muted); }

/* Article */
.blog-article .article-head { padding-bottom: var(--sp-8); }
.blog-article .article-head h1 { max-width: 26ch; }
.blog-article .eyebrow a { color: inherit; text-decoration: none; }
.blog-article .eyebrow a:hover { text-decoration: underline; }
.article-lead { max-width: var(--measure); }
.article-figure { margin: 0 0 var(--sp-10); }
.article-figure__img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-lg); }
.article-figure .post-fallback { padding: var(--sp-6); aspect-ratio: 2 / 1; }
.article-figure .post-fallback__logo { width: 9rem; }
.article-figure .post-fallback__cat { font-size: var(--fs-2xl); }
@media (min-width: 48rem) {
  .article-figure__img { aspect-ratio: 12 / 5; }
  .article-figure .post-fallback { padding: var(--sp-10); aspect-ratio: 4 / 1; }
  .article-figure .post-fallback__cat { font-size: var(--fs-3xl); }
}
.article-main { min-width: 0; }
.key-points {
  max-width: var(--measure); margin-bottom: var(--sp-8); padding: var(--sp-5) var(--sp-6);
  background: var(--surface-brand-soft); border-left: var(--stroke-4) solid var(--brand-mark); border-radius: var(--radius-md);
}
.key-points h2 { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--action-primary); margin-bottom: var(--sp-3); }
.key-points ul { margin: 0; padding-left: 1.25rem; display: grid; gap: var(--sp-2); }
.key-points li { color: var(--text-secondary); }
.article-body { font-size: var(--fs-base); }
.article-body > :first-child { margin-top: 0; }
.article-body h2 { scroll-margin-top: calc(var(--header-h) + var(--sp-4)); }
.article-body h3 { font-size: var(--fs-xl); }
.article-body li::marker { color: var(--action-primary); }
.article-body blockquote { font-style: normal; border-left: var(--stroke-4) solid var(--brand-sky); color: var(--text-secondary); }
.article-body blockquote > :last-child { margin-bottom: 0; }
.article-body table { background: var(--surface-raised); }
.article-body th { background: var(--surface-sunken); font-weight: 650; }
.article-body a { overflow-wrap: anywhere; }
.article-disclaimer { max-width: var(--measure); margin-top: var(--sp-8); padding-top: var(--sp-4); border-top: var(--border-w) solid var(--border-default); }
.article-share { max-width: var(--measure); margin-top: var(--sp-8); }
.article-share h2 { font-family: var(--font-body); font-size: var(--fs-sm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-3); }
.article-share ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: 0; padding: 0; }
.article-share a {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: var(--tap-min); padding: 0 var(--sp-4);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-primary); text-decoration: none;
  border: var(--border-w) solid var(--border-default); border-radius: var(--radius-pill); background: var(--surface-raised);
}
.article-share a:hover { border-color: var(--border-strong); }
.article-share svg { width: 1.125rem; height: 1.125rem; }
.aside-card--cta { border-top: var(--stroke-4) solid var(--brand-mark); }
.aside-card--cta p { color: var(--text-secondary); font-size: var(--fs-sm); }
.aside-card__actions { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.aside-card__note { display: flex; align-items: center; gap: var(--sp-2); }
.aside-card__note svg { width: 1rem; height: 1rem; color: var(--action-primary); flex: none; }
.related-posts h2 { font-size: var(--fs-2xl); margin-bottom: var(--sp-8); }
.related-posts__more { margin: var(--sp-6) 0 0; }
/* ===================== end Blog ===================== */

/* Inline form blocks with a side column (landings rebuild): the multi-field form is much taller
   than its aside text, so pin the aside to the top instead of centering it in empty space. */
#agendar-cita .mt { align-items: start; }
@media (min-width: 64rem) {
  #agendar-cita .mt__body { position: sticky; top: calc(var(--header-h) + var(--sp-8)); }
}
.features li > div { min-width: 0; }
.features h3, .features p, .steps h3, .steps p { overflow-wrap: anywhere; }

/* ---------- Design review fixes ---------- */
.prose > :first-child, .prose > .eyebrow + h2 { margin-top: 0; }
@media (min-width: 64rem) {
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
}
#casos-reales .case img, section[id^="galeria-"] .case img { aspect-ratio: auto; height: auto; object-fit: initial; }
.hero__grid:not(:has(.hero__media)) { grid-template-columns: 1fr; }
.landing-footer img { width: 10rem; height: auto; }
.steps--compact li { padding-left: var(--sp-16); }
@media (min-width: 64rem) { .steps--compact li { padding-left: var(--sp-16); } }
.option { display: grid; }
.option span { height: 100%; }
.flow__nav { margin-top: var(--sp-4); }
@media (max-width: 22rem) { .action-bar .btn { white-space: normal; line-height: var(--lh-snug); text-align: center; } }
/* The sticky bar and the floating WhatsApp button appear once the hero buttons scroll away. */
.action-bar, .wa-float { transition: transform var(--dur-base) var(--ease-out), opacity var(--dur-base); }
.js-bars .action-bar { transform: translateY(110%); }
.js-bars .wa-float { opacity: 0; transform: translateY(var(--sp-4)); pointer-events: none; }
.js-bars.bars-on .action-bar { transform: none; }
.js-bars.bars-on .wa-float { opacity: 1; transform: none; pointer-events: auto; }
.video-facade::after { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(to top, rgb(20 33 43 / 0.85), transparent); }
.video-facade__label { z-index: 1; }
.video-facade__play { z-index: 1; }

/* ---------- Hero with Vimeo video (home) ---------- */
.hero__media--video .video-facade { border-radius: var(--radius-lg); }
.hero__media--video .video-facade img { aspect-ratio: auto; border-radius: 0; opacity: 0.85; }
.hero__media--video .video-facade__play { width: 4.5rem; height: 4.5rem; }
.hero__media--video .video-facade__play svg { width: 2rem; height: 2rem; }
.hero__media--video .video-frame { border-radius: var(--radius-lg); }
.hero__media--video .hero__badge { position: static; margin-top: var(--sp-4); max-width: none; box-shadow: none; border: var(--border-w) solid var(--border-default); }
.hero__media--video::before { inset: auto -6% -14% auto; width: 40%; }
@media (min-width: 64rem) {
  .hero--video .hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-12); }
}

/* ---------- Vertical videos and single-video sections ---------- */
.videos { grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); align-items: start; }
.videos--single { grid-template-columns: minmax(0, 1fr); max-width: 48rem; }
.video-facade--portrait, .video-frame--portrait { aspect-ratio: 9 / 16; }
.videos--single:has(.video-facade--portrait), .videos--single:has(.video-frame--portrait) { max-width: 22rem; }

/* ---------- Static service card (no link) ---------- */
.svc__lead--static img { transition: none; }
.svc__lead--static:hover img { transform: none; }

/* ---------- Enlarge case photos ---------- */
.case__zoom { display: block; position: relative; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.case__zoom img { display: block; }
.case__zoom-hint {
  position: absolute; right: var(--sp-3); bottom: var(--sp-3); width: var(--tap-min); height: var(--tap-min);
  display: grid; place-items: center; border-radius: 50%; background: var(--surface-raised); color: var(--text-primary);
  box-shadow: var(--shadow-raised); transition: transform var(--dur-fast) var(--ease-out);
}
.case__zoom-hint svg { width: 1.25rem; height: 1.25rem; }
.case__zoom:hover .case__zoom-hint { transform: scale(1.08); }
.case__zoom:active .case__zoom-hint { transform: scale(0.96); }
.case__zoom:focus-visible { outline: var(--stroke-3) solid var(--focus-ring); outline-offset: calc(var(--stroke-3) * -1); }
.lightbox-open { overflow: hidden; }
.lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: transparent; }
.lightbox::backdrop { background: rgb(20 33 43 / 0.96); }
.lightbox__frame { width: 100%; height: 100%; display: grid; place-items: center; align-content: center; gap: var(--sp-3); padding: var(--sp-16) var(--gutter) var(--sp-10); }
.lightbox__img { width: min(100%, 48rem); max-height: calc(100dvh - 9rem); height: auto; object-fit: contain; border-radius: var(--radius-md); }
.lightbox__caption { margin: 0; color: var(--text-on-brand); font-size: var(--fs-sm); text-align: center; max-width: 48rem; }
.lightbox__btn {
  position: fixed; width: 3rem; height: 3rem; display: grid; place-items: center; border-radius: 50%;
  border: 0; background: var(--surface-raised); color: var(--text-primary); cursor: pointer; box-shadow: var(--shadow-raised);
}
.lightbox__btn svg { width: 1.5rem; height: 1.5rem; }
.lightbox__btn:hover { background: var(--surface-sunken); }
.lightbox__btn:active { background: var(--p-sand-200); }
.lightbox__btn[hidden] { display: none; }
.lightbox__close { top: var(--sp-4); right: var(--sp-4); }
.lightbox__prev { left: var(--sp-4); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--sp-4); top: 50%; transform: translateY(-50%); }
@media (max-width: 40rem) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: var(--sp-4); transform: none; }
  .lightbox__prev { left: calc(50% - 3.5rem); }
  .lightbox__next { right: calc(50% - 3.5rem); }
}
