@charset "UTF-8";
/* ==========================================================================
   SMILE+ ORTODONCIA — SISTEMA DE DISEÑO "PRECISIÓN VISIBLE"
   --------------------------------------------------------------------------
   La ortodoncia moderna es escaneo, medición y movimiento planificado.
   Ese es el material gráfico de esta página: retículas de medición,
   líneas de escáner, arcos dentales y progresión por etapas.
   ========================================================================== */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:root {
  /* -- Superficies claras -- */
  --ground:     #f2f6f7;
  --ground-2:   #e7eef0;
  --surface:    #ffffff;
  --surface-2:  #f8fbfb;

  /* -- Tinta -- */
  --ink:        #061a21;
  --ink-2:      #3a5259;
  --ink-3:      #71878e;
  --ink-on-dark:#eef6f7;

  /* -- Líneas -- */
  --line:       #d7e2e5;
  --line-2:     #e8eff1;
  --line-dark:  #0d3644;

  /* -- Fondo clínico oscuro (secciones instrumento) -- */
  --deep:       #04212c;
  --deep-2:     #062e3c;
  --deep-3:     #0a3d4e;

  /* -- Marca -- */
  --brand:      #0b5fd0;
  --brand-2:    #2f86f5;
  --brand-soft: #e8f1fe;

  /* -- Acento escáner: el color de la luz del escáner intraoral -- */
  --scan:       #0ba99a;
  --scan-2:     #16d3bd;
  --scan-3:     #6ef0dd;
  --scan-soft:  #ddf5f1;

  /* -- Neutro cálido para las secciones humanas -- */
  --warm:       #f3ece2;
  --warm-2:     #e6d9c7;
  --warm-ink:   #4a3d2c;

  /* -- Semánticos -- */
  --ok:         #16794f;
  --ok-soft:    #dcf0e6;

  /* -- Sombras: tintadas hacia el petróleo, nunca gris puro -- */
  --sh-1: 0 1px 2px rgba(6, 26, 33, .05);
  --sh-2: 0 4px 12px -2px rgba(6, 26, 33, .07), 0 2px 4px -2px rgba(6, 26, 33, .05);
  --sh-3: 0 16px 32px -12px rgba(6, 26, 33, .13), 0 4px 10px -4px rgba(6, 26, 33, .06);
  --sh-4: 0 32px 64px -20px rgba(6, 26, 33, .22), 0 8px 20px -8px rgba(6, 26, 33, .1);
  --sh-scan: 0 12px 32px -10px rgba(11, 169, 154, .45);

  /* -- Radios: contenidos, casi instrumentales -- */
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 14px;
  --r-4: 22px;
  --r-full: 999px;

  /* -- Tipografía -- */
  --f-display: Archivo, "Archivo Fallback", ui-sans-serif, system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* -- Escala tipográfica (fluida, razón 1.25) -- */
  --t-xs:   0.75rem;
  --t-sm:   0.85rem;
  --t-base: 1rem;
  --t-md:   clamp(1.05rem, 0.4vw + 0.95rem, 1.15rem);
  --t-lg:   clamp(1.25rem, 0.7vw + 1.1rem, 1.45rem);
  --t-xl:   clamp(1.5rem, 1.2vw + 1.25rem, 1.9rem);
  --t-2xl:  clamp(1.9rem, 2.2vw + 1.4rem, 2.6rem);
  --t-3xl:  clamp(2.4rem, 4vw + 1.4rem, 3.9rem);
  --t-4xl:  clamp(2.6rem, 5vw + 1.1rem, 4.5rem);

  /* -- Ritmo -- */
  --gap:      1.5rem;
  --pad-sec:  clamp(4.5rem, 9vw, 8rem);
  --container: 1200px;
  --measure:  62ch;

  /* -- Movimiento -- */
  --e-out:  cubic-bezier(.16, 1, .3, 1);
  --e-in-out: cubic-bezier(.65, 0, .35, 1);
  --e-spring: cubic-bezier(.34, 1.4, .64, 1);
  --d-1: .18s;
  --d-2: .34s;
  --d-3: .6s;

  color-scheme: light dark;
}

/* -- Modo oscuro por preferencia del sistema (sin elección explícita) -- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:     #041318;
    --ground-2:   #071e26;
    --surface:    #07222c;
    --surface-2:  #092b37;

    --ink:        #e9f4f5;
    --ink-2:      #a3bcc2;
    --ink-3:      #6f8b92;

    --line:       #103744;
    --line-2:     #0c2b36;

    --deep:       #020e13;
    --deep-2:     #04202a;
    --deep-3:     #073241;

    --brand:      #4b95f7;
    --brand-2:    #7db4fa;
    --brand-soft: #0a2544;

    --scan:       #21d6c0;
    --scan-2:     #55e8d5;
    --scan-3:     #8ff5e7;
    --scan-soft:  #06322e;

    --warm:       #1d1a15;
    --warm-2:     #332c22;
    --warm-ink:   #e3d5c1;

    --ok:         #4ecb92;
    --ok-soft:    #0c2a1d;

    --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
    --sh-2: 0 4px 12px -2px rgba(0, 0, 0, .5);
    --sh-3: 0 16px 32px -12px rgba(0, 0, 0, .6);
    --sh-4: 0 32px 64px -20px rgba(0, 0, 0, .7);
  }
}

/* -- Modo oscuro elegido explícitamente -- */
:root[data-theme="dark"] {
  --ground:     #041318;
  --ground-2:   #071e26;
  --surface:    #07222c;
  --surface-2:  #092b37;

  --ink:        #e9f4f5;
  --ink-2:      #a3bcc2;
  --ink-3:      #6f8b92;

  --line:       #103744;
  --line-2:     #0c2b36;

  --deep:       #020e13;
  --deep-2:     #04202a;
  --deep-3:     #073241;

  --brand:      #4b95f7;
  --brand-2:    #7db4fa;
  --brand-soft: #0a2544;

  --scan:       #21d6c0;
  --scan-2:     #55e8d5;
  --scan-3:     #8ff5e7;
  --scan-soft:  #06322e;

  --warm:       #1d1a15;
  --warm-2:     #332c22;
  --warm-ink:   #e3d5c1;

  --ok:         #4ecb92;
  --ok-soft:    #0c2a1d;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 4px 12px -2px rgba(0, 0, 0, .5);
  --sh-3: 0 16px 32px -12px rgba(0, 0, 0, .6);
  --sh-4: 0 32px 64px -20px rgba(0, 0, 0, .7);
}

/* ==========================================================================
   2. RESET Y BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }

ul, ol { list-style: none; }

:focus-visible {
  outline: 2.5px solid var(--scan);
  outline-offset: 3px;
  border-radius: var(--r-1);
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--scan); color: #04212c; }

/* ==========================================================================
   3. TIPOGRAFÍA
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-display);
  color: var(--ink);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 700;
  text-wrap: balance;
}

/* Titulares del hero: Archivo ensanchado. La anchura extra evoca la
   rotulación clínica y es lo que más separa esto de una plantilla. */
.t-hero {
  font-size: var(--t-4xl);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.t-section {
  font-size: var(--t-3xl);
  font-weight: 700;
  font-variation-settings: "wdth" 105;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.t-card { font-size: var(--t-xl); font-weight: 700; }

.lede {
  font-size: var(--t-md);
  color: var(--ink-2);
  max-width: var(--measure);
  line-height: 1.7;
}

/* La voz "instrumento": todo dato medido se compone en monoespaciada. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--scan);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  flex: none;
}
.eyebrow-plain::before { display: none; }

.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ==========================================================================
   4. PRIMITIVAS DE MAQUETACIÓN
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.5rem);
}

.section { padding-block: var(--pad-sec); position: relative; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 60ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head.is-centered { max-width: 56ch; margin-inline: auto; text-align: center; align-items: center; }

.stack { display: flex; flex-direction: column; gap: var(--gap); }
.row { display: flex; align-items: center; gap: var(--gap); flex-wrap: wrap; }

/* Retícula de medición: el fondo técnico recurrente */
.grid-bg { position: relative; isolation: isolate; }
.grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 20%, transparent 78%);
  opacity: .55;
  pointer-events: none;
}

/* Regla de calibración: divisor con marcas, como un calibrador */
.rule {
  height: 10px;
  border-top: 1px solid var(--line);
  background-image: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px 14px);
  background-size: 100% 6px;
  background-repeat: no-repeat;
}

/* Secciones oscuras: el modo "instrumento" */
.on-dark {
  background: var(--deep);
  color: #b9d4d9;
  --ink: var(--ink-on-dark);
  --ink-2: #b9d4d9;
  --ink-3: #7ea3ab;
  --surface: var(--deep-2);
  --surface-2: var(--deep-3);
  --line: #0e3948;
  --line-2: #0a2f3c;
}

/* Secciones cálidas: el modo "humano" */
.on-warm {
  background: var(--warm);
  --line: var(--warm-2);
  --line-2: #eee5d8;
  --surface: #fbf7f1;
}

/* ==========================================================================
   5. BOTONES
   ========================================================================== */
.btn {
  --btn-bg: var(--brand);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 46px;
  padding: .8rem 1.4rem;
  border-radius: var(--r-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--f-body);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  overflow: hidden;
  transition: transform var(--d-1) var(--e-out), box-shadow var(--d-2) var(--e-out), background-color var(--d-1) linear;
}
.btn svg { flex: none; transition: transform var(--d-2) var(--e-out); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }
.btn:active { transform: translateY(0); }

.btn-primary { --btn-bg: var(--brand); box-shadow: 0 8px 22px -10px rgba(11, 95, 208, .8); }
.btn-primary:hover { --btn-bg: var(--brand-2); }
.btn-primary:hover svg { transform: translate(3px, -3px); }

.btn-scan { --btn-bg: var(--scan); --btn-fg: #02231f; box-shadow: var(--sh-scan); }
.btn-scan:hover { --btn-bg: var(--scan-2); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border: 1.5px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover { --btn-bg: var(--surface); border-color: var(--scan); box-shadow: var(--sh-2); }

.btn-lg { min-height: 54px; padding: 1rem 1.85rem; font-size: var(--t-base); }
.btn-sm { min-height: 44px; padding: .6rem 1.1rem; font-size: var(--t-xs); }
.btn-block { width: 100%; }

/* ==========================================================================
   6. PÍLDORAS Y ETIQUETAS
   ========================================================================== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .4rem .9rem .4rem .55rem;
  border-radius: var(--r-full);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
  box-shadow: var(--sh-1);
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--scan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--scan) 22%, transparent);
  flex: none;
  margin-left: .3rem;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: .28rem .6rem;
  border-radius: var(--r-1);
  background: var(--scan-soft);
  color: var(--scan);
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* ==========================================================================
   7. TARJETAS
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  padding: 1.6rem;
  box-shadow: var(--sh-1);
  transition: transform var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: color-mix(in srgb, var(--scan) 45%, var(--line)); }

.icon-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: var(--r-2);
  background: var(--scan-soft);
  color: var(--scan);
  flex: none;
}
.icon-box-brand { background: var(--brand-soft); color: var(--brand); }

/* ==========================================================================
   8. SALTO AL CONTENIDO
   ========================================================================== */
.skip-link {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -140%);
  z-index: 999;
  padding: .8rem 1.4rem;
  border-radius: 0 0 var(--r-2) var(--r-2);
  background: var(--scan);
  color: #02231f;
  font-size: var(--t-sm);
  font-weight: 700;
  transition: transform var(--d-2) var(--e-out);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ==========================================================================
   9. CABECERA
   ========================================================================== */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: color-mix(in srgb, var(--ground) 78%, transparent);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid transparent;
  transition: border-color var(--d-2) var(--e-out), background-color var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out);
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: var(--sh-2);
}

/* Barra de progreso de lectura: fina, en el color del escáner */
.scroll-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  background: linear-gradient(90deg, var(--brand), var(--scan));
  will-change: transform;
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  min-height: 44px;
  flex: none;
}
.brand-mark {
  width: 38px; height: 38px;
  border-radius: var(--r-2);
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--scan));
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(11, 95, 208, .7);
  flex: none;
}
.brand-name {
  display: block;
  font-family: var(--f-display);
  font-size: 1.16rem;
  font-weight: 800;
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.05;
}
.brand-name em { font-style: normal; color: var(--scan); }
.brand-sub {
  display: block;
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .19em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.nav-links { display: flex; align-items: center; gap: .15rem; }
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 .85rem;
  border-radius: var(--r-2);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
  transition: color var(--d-1) var(--e-out), background-color var(--d-1) var(--e-out);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 8px;
  width: 0; height: 2px;
  border-radius: 2px;
  background: var(--scan);
  transform: translateX(-50%);
  transition: width var(--d-2) var(--e-out);
}
.nav-link:hover { color: var(--ink); background: color-mix(in srgb, var(--scan) 8%, transparent); }
.nav-link[aria-current="true"] { color: var(--ink); }
.nav-link[aria-current="true"]::after { width: 18px; }

.nav-actions { display: flex; align-items: center; gap: .5rem; flex: none; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-2);
  color: var(--ink-2);
  border: 1px solid transparent;
  transition: background-color var(--d-1) var(--e-out), color var(--d-1) var(--e-out), border-color var(--d-1) var(--e-out);
}
.icon-btn:hover { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* Conmutador de tema: el icono gira al cambiar */
.theme-toggle svg { transition: transform var(--d-3) var(--e-spring); }
.theme-toggle:hover svg { transform: rotate(35deg); }
.theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: none; }
}

/* Hamburguesa que se convierte en aspa */
.menu-toggle { display: none; }
.menu-toggle span {
  display: block;
  width: 20px; height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform var(--d-2) var(--e-out), opacity var(--d-1) linear;
}
.menu-toggle span + span { margin-top: 5px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   10. HERO
   ========================================================================== */
.hero {
  position: relative;
  padding-top: clamp(8rem, 14vh, 11rem);
  padding-bottom: clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  top: -18%; right: -12%;
  width: min(760px, 78vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--scan) 26%, transparent) 0%, transparent 66%);
  filter: blur(28px);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-copy { display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-start; }
.hero-copy .lede { font-size: var(--t-md); }

/* La palabra clave del titular lleva un subrayado dibujado a mano alzada */
.underline-scan { position: relative; white-space: nowrap; }
.underline-scan svg {
  position: absolute;
  left: 0; right: 0; bottom: -.12em;
  width: 100%; height: .28em;
  overflow: visible;
  color: var(--scan);
}
.underline-scan path {
  stroke-dasharray: var(--len, 300);
  stroke-dashoffset: var(--len, 300);
  animation: draw-underline 1.1s var(--e-out) .75s forwards;
}
@keyframes draw-underline { to { stroke-dashoffset: 0; } }

.hero-cta { display: flex; gap: .8rem; flex-wrap: wrap; }

.hero-proof {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  width: 100%;
  flex-wrap: wrap;
}
.face-stack { display: flex; }
.face-stack img {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2.5px solid var(--ground);
  object-fit: cover;
}
.face-stack img + img { margin-left: -12px; }
.hero-proof-text { font-size: var(--t-sm); color: var(--ink-3); line-height: 1.45; }
.hero-proof-text b { color: var(--ink); font-weight: 700; }

/* ==========================================================================
   11. ARCO DENTAL ANIMADO — la pieza tesis del hero
   --------------------------------------------------------------------------
   Los dientes entran desalineados y se colocan solos. La promesa del
   negocio, demostrada en lugar de enunciada.
   ========================================================================== */
.hero-visual { position: relative; }

.arch-stage {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

.arch-svg { width: 100%; height: auto; overflow: visible; }

/* Anillos de calibración que giran despacio */
.arch-ring {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
  transform-origin: 200px 190px;
}
.arch-ring-ticks {
  fill: none;
  stroke: color-mix(in srgb, var(--scan) 55%, transparent);
  stroke-width: 1.5;
  stroke-dasharray: 2 12;
  transform-origin: 200px 190px;
  animation: ring-spin 64s linear infinite;
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

/* Cada diente: entra desde su posición torcida hasta la alineada */
.tooth {
  fill: var(--surface);
  stroke: var(--ink);
  stroke-width: 1.6;
  stroke-linejoin: round;
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(var(--rot, 0deg)) translate(var(--dx, 0px), var(--dy, 0px));
  animation: align-tooth 1.3s var(--e-spring) forwards;
  animation-delay: calc(.35s + var(--i, 0) * .045s);
}
@keyframes align-tooth { to { transform: rotate(0) translate(0, 0); } }

.tooth-shine { fill: color-mix(in srgb, var(--scan) 22%, transparent); }

/* Línea del escáner que barre el arco */
.scan-line {
  stroke: var(--scan-2);
  stroke-width: 2.5;
  stroke-linecap: round;
  filter: drop-shadow(0 0 7px var(--scan-2));
  animation: scan-sweep 4.5s var(--e-in-out) 1.5s infinite;
  opacity: 0;
}
@keyframes scan-sweep {
  0%   { transform: translateY(-6px);  opacity: 0; }
  12%  { opacity: .95; }
  50%  { transform: translateY(300px); opacity: .95; }
  62%  { opacity: 0; }
  100% { transform: translateY(300px); opacity: 0; }
}

/* Cotas de medición: aparecen tras la alineación */
.arch-measure { opacity: 0; animation: fade-in .7s var(--e-out) 1.7s forwards; }
.arch-measure line { stroke: var(--scan); stroke-width: 1; stroke-dasharray: 3 3; }
.arch-measure text {
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 500;
  fill: var(--scan);
  letter-spacing: .08em;
}
@keyframes fade-in { to { opacity: 1; } }

/* Distintivos flotantes de instrumental */
.float-badge {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .9rem;
  border-radius: var(--r-3);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
  animation: float-y 6s var(--e-in-out) infinite;
  z-index: 2;
}
.float-badge:nth-of-type(2) { animation-delay: -2s; }
.float-badge:nth-of-type(3) { animation-delay: -4s; }
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.badge-tl { top: 3%;  left: -1%; }
.badge-br { bottom: 8%; right: -1%; }
.badge-bl { bottom: 1%; left: 7%; }

.float-badge .icon-box { width: 34px; height: 34px; border-radius: var(--r-1); }
.float-badge .fb-title {
  display: block;
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.float-badge .fb-value {
  display: block;
  font-size: .84rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

/* ==========================================================================
   12. BANDA DE CIFRAS
   ========================================================================== */
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  overflow: hidden;
  box-shadow: var(--sh-2);
}
.stat {
  background: var(--surface);
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.stat-n {
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  font-variation-settings: "wdth" 105;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-n span { color: var(--scan); }
.stat-k {
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ==========================================================================
   13. TARJETAS DE OBJETIVO
   ========================================================================== */
.goals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.goal-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  align-items: flex-start;
  text-align: left;
  padding: 1.5rem 1.4rem;
  min-height: 168px;
  border-radius: var(--r-3);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out);
}
/* Una lámina del color del escáner sube desde abajo al pasar el puntero */
.goal-card::before {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 0;
  background: linear-gradient(to top, var(--scan-soft), transparent);
  transition: height var(--d-3) var(--e-out);
  z-index: 0;
}
.goal-card > * { position: relative; z-index: 1; }
.goal-card:hover, .goal-card[aria-pressed="true"] {
  transform: translateY(-4px);
  border-color: var(--scan);
  box-shadow: var(--sh-3);
}
.goal-card:hover::before, .goal-card[aria-pressed="true"]::before { height: 100%; }
.goal-card h3 { font-size: var(--t-base); font-weight: 700; letter-spacing: -0.01em; }
.goal-card p { font-size: var(--t-sm); color: var(--ink-3); }
.goal-card .goal-go {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--scan);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--d-2) var(--e-out), transform var(--d-2) var(--e-out);
}
.goal-card:hover .goal-go, .goal-card:focus-visible .goal-go, .goal-card[aria-pressed="true"] .goal-go {
  opacity: 1; transform: translateX(0);
}

/* ==========================================================================
   14. TRATAMIENTOS (PESTAÑAS)
   ========================================================================== */
.treatments-layout {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.tab-rail {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: 1.1rem;
  border-radius: var(--r-3);
  background: var(--deep);
  box-shadow: var(--sh-3);
  position: sticky;
  top: 6.5rem;
}
.tab-rail-title {
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--scan-2);
  padding: .3rem .7rem .8rem;
}
.tab-btn {
  display: flex;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 48px;
  padding: .6rem .8rem;
  border-radius: var(--r-2);
  color: #a9c8ce;
  font-size: var(--t-sm);
  font-weight: 600;
  text-align: left;
  transition: background-color var(--d-2) var(--e-out), color var(--d-2) var(--e-out);
}
.tab-btn .tab-i {
  font-family: var(--f-mono);
  font-size: .7rem;
  font-weight: 500;
  color: #5f8c96;
  transition: color var(--d-2) var(--e-out);
  flex: none;
}
.tab-btn:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.tab-btn[aria-selected="true"] {
  background: linear-gradient(100deg, var(--brand), color-mix(in srgb, var(--scan) 78%, var(--brand)));
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(11, 169, 154, .7);
}
.tab-btn[aria-selected="true"] .tab-i { color: rgba(255, 255, 255, .82); }

.tab-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .78fr);
  gap: clamp(1.4rem, 3vw, 2.4rem);
  align-items: center;
  padding: clamp(1.5rem, 3vw, 2.4rem);
  border-radius: var(--r-3);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-2);
  view-transition-name: treatment-panel;
}
.tab-panel-copy { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.tab-panel-media { position: relative; }
.tab-panel-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--r-2);
  box-shadow: var(--sh-2);
}
.tab-panel-media .tag { position: absolute; left: .8rem; bottom: .8rem; background: var(--deep); color: var(--scan-2); }

.feature-list { display: flex; flex-direction: column; gap: .6rem; }
.feature-list li {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.feature-list svg { color: var(--scan); margin-top: .28em; flex: none; }

.tab-nav { display: flex; gap: .5rem; margin-left: auto; }

/* ==========================================================================
   15. PROCESO SOBRE ARCO
   --------------------------------------------------------------------------
   Las etapas se disponen sobre la curva de un arco dental en lugar de una
   línea recta: la forma dice de qué trata el negocio.
   ========================================================================== */
.process-wrap { position: relative; padding-top: 104px; }
.process-curve {
  position: absolute;
  top: 0; left: 0; right: 0;
  width: 100%;
  height: 104px;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.process-curve path {
  fill: none;
  stroke: var(--line);
  stroke-width: 2;
  stroke-dasharray: 7 9;
  stroke-linecap: round;
}
.process-curve circle { fill: var(--scan); stroke: none; }
.process-curve .curve-live {
  stroke: var(--scan);
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  opacity: .9;
}

.process-steps {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem;
  align-items: start;
}
/* Las tarjetas 2 y 4 caen para dibujar el arco */
.process-steps > li:nth-child(2) { margin-top: clamp(1.5rem, 4vw, 3.2rem); }
.process-steps > li:nth-child(3) { margin-top: clamp(1.5rem, 4vw, 3.2rem); }

.step {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.5rem 1.3rem;
  border-radius: var(--r-3);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  height: 100%;
  transition: transform var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out);
}
.step:hover { transform: translateY(-5px); box-shadow: var(--sh-3); border-color: var(--scan); }
.step-n {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--scan-2);
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 600;
  flex: none;
}
.step h3 { font-size: var(--t-base); }
.step p { font-size: var(--t-sm); color: var(--ink-3); }
.step-when {
  margin-top: auto;
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--scan);
  padding-top: .5rem;
  border-top: 1px dashed var(--line);
}

/* ==========================================================================
   16. COMPARADOR ANTES / DESPUÉS
   --------------------------------------------------------------------------
   Mecánica corregida: la capa "después" mide siempre lo mismo que el
   contenedor y se recorta con clip-path. Nada cambia de tamaño, así que
   la foto no se deforma ni se re-encuadra al arrastrar.
   ========================================================================== */
@property --pos {
  syntax: "<percentage>";
  inherits: true;
  initial-value: 50%;
}

/* El recorte usa el porcentaje; el tirador y la línea necesitan píxeles,
   porque translateX(%) se mide contra el propio elemento. Ambas son
   propiedades registradas, así que interpolan y siguen en el compositor. */
@property --posPx {
  syntax: "<length>";
  inherits: true;
  initial-value: 0px;
}

.compare {
  --pos: 50%;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-3);
  overflow: hidden;
  background: var(--deep);
  box-shadow: var(--sh-4);
  touch-action: none;              /* el arrastre no debe hacer scroll */
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
  isolation: isolate;
}

/* Ambas capas ocupan el contenedor completo, siempre. */
.compare-layer {
  position: absolute;
  inset: 0;
  margin: 0;
}
.compare-layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* La capa superior solo se recorta. Nunca se redimensiona.
   Contiene la foto de ANTES, para que quede a la izquierda. */
.compare-top {
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
  z-index: 2;
}

/* Transición suave solo al soltar o al saltar por teclado, nunca al arrastrar */
.compare.is-animating { transition: --pos var(--d-3) var(--e-out), --posPx var(--d-3) var(--e-out); }

.compare-line {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 12px rgba(0, 0, 0, .45);
  transform: translateX(var(--posPx));
  z-index: 3;
  pointer-events: none;
}

.compare-grip {
  position: absolute;
  top: 50%; left: 0;
  width: 52px; height: 52px;
  margin: -26px 0 0 -26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  grid-auto-flow: column;
  gap: 1px;
  background: #fff;
  color: var(--brand);
  border: 2px solid var(--scan);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  transform: translateX(var(--posPx));
  z-index: 4;
  cursor: grab;
  transition: scale var(--d-2) var(--e-spring);
}
.compare-grip:hover { scale: 1.09; }
.compare-grip:active { cursor: grabbing; scale: .95; }
.compare.is-dragging .compare-grip { scale: 1.12; }
.compare-grip:focus-visible { outline: 3px solid var(--scan-2); outline-offset: 4px; }

/* Marcas de medición en el borde superior: el guiño al calibrador */
.compare-ticks {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 14px;
  z-index: 3;
  pointer-events: none;
  background-image: repeating-linear-gradient(to right, rgba(255,255,255,.5) 0 1px, transparent 1px 20px);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
}

.compare-tag {
  position: absolute;
  bottom: 1rem;
  z-index: 3;
  padding: .35rem .8rem;
  border-radius: var(--r-full);
  background: rgba(4, 33, 44, .8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
  font-family: var(--f-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity var(--d-2) linear;
}
.compare-tag-before { left: 1rem; }
.compare-tag-after  { right: 1rem; background: rgba(11, 169, 154, .9); }
/* Los rótulos se atenúan mientras arrastras para no estorbar */
.compare.is-dragging .compare-tag { opacity: .25; }

/* Pista de escaneo: recorre la imagen una vez al entrar en pantalla,
   para que se entienda que la pieza se puede arrastrar. */
.compare-hint {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--scan-2) 55%, transparent), transparent);
  width: 34%;
}
.compare.is-hinting .compare-hint { animation: compare-hint 1.5s var(--e-in-out) 1; }
@keyframes compare-hint {
  0%   { opacity: 0;  transform: translateX(-40%); }
  25%  { opacity: .85; }
  75%  { opacity: .85; }
  100% { opacity: 0;  transform: translateX(300%); }
}

.compare-readout {
  position: absolute;
  top: 1rem; left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  padding: .25rem .7rem;
  border-radius: var(--r-full);
  background: rgba(4, 33, 44, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--scan-3);
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .1em;
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity var(--d-2) linear;
  pointer-events: none;
}
.compare.is-dragging .compare-readout, .compare:focus-within .compare-readout { opacity: 1; }

/* Selector de casos */
.case-picker { display: flex; gap: .5rem; flex-wrap: wrap; }
.case-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .5rem 1rem;
  border-radius: var(--r-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-2);
  transition: all var(--d-2) var(--e-out);
}
.case-chip:hover { border-color: var(--scan); color: var(--ink); }
.case-chip[aria-pressed="true"] {
  background: var(--deep);
  border-color: var(--deep);
  color: #fff;
}
.case-chip[aria-pressed="true"] .num { color: var(--scan-2); }

.results-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.spec-row {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 0;
  border-bottom: 1px dashed var(--line);
}
.spec-row:last-child { border-bottom: none; }
.spec-k {
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  min-width: 96px;
}
.spec-v { font-weight: 600; color: var(--ink); font-size: var(--t-sm); }

/* Selector de casos: alterna entre los pacientes del comparador */
.case-nav { display: flex; align-items: center; gap: .6rem; }
.case-dots { display: flex; gap: .4rem; }
.case-dot {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-2);
  background: var(--surface);
  border: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: .7rem;
  font-weight: 600;
  color: var(--ink-3);
  transition: background-color var(--d-2) var(--e-out), color var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out);
}
.case-dot:hover { color: var(--ink); border-color: var(--scan); }
.case-dot[aria-selected="true"] {
  background: linear-gradient(100deg, var(--brand), color-mix(in srgb, var(--scan) 78%, var(--brand)));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(11, 169, 154, .7);
}
.case-nav-arrows { display: flex; gap: .5rem; margin-left: auto; }

/* ==========================================================================
   17. TECNOLOGÍA (SECCIÓN INSTRUMENTO)
   ========================================================================== */
.tech-section { position: relative; overflow: hidden; }
.tech-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 30% 40%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 30% 40%, #000, transparent 75%);
  pointer-events: none;
}
.tech-section > * { position: relative; }
.tech-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.tech-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.tech-card {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  padding: 1.5rem 1.3rem;
  border-radius: var(--r-3);
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .09);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform var(--d-2) var(--e-out), background-color var(--d-2) var(--e-out), border-color var(--d-2) var(--e-out);
}
.tech-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, .085);
  border-color: color-mix(in srgb, var(--scan-2) 55%, transparent);
}
.tech-card .icon-box { background: rgba(22, 211, 189, .16); color: var(--scan-2); }
.tech-card h3 { color: #fff; font-size: var(--t-base); }
.tech-card p { font-size: var(--t-sm); color: #9fc0c7; }

/* ==========================================================================
   18. ESPECIALISTA (SECCIÓN HUMANA)
   ========================================================================== */
.doctor-layout {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
}
.doctor-photo {
  position: relative;
  border-radius: var(--r-4);
  overflow: hidden;
  box-shadow: var(--sh-4);
}
.doctor-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.doctor-photo figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2.5rem 1.3rem 1.1rem;
  background: linear-gradient(to top, rgba(4, 33, 44, .93), transparent);
  color: #fff;
}
.doctor-photo .dp-name { display: block; font-family: var(--f-display); font-weight: 700; font-size: var(--t-lg); letter-spacing: -0.02em; margin-top: .3rem; }
.doctor-photo .dp-role { display: block; font-family: var(--f-mono); font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--scan-2); }

.credentials { display: flex; flex-direction: column; gap: .55rem; }
.credentials li {
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  font-size: var(--t-sm);
  padding: .6rem .9rem;
  border-radius: var(--r-2);
  background: var(--surface);
  border: 1px solid var(--line);
}
.credentials svg { color: var(--scan); flex: none; margin-top: .2em; }

.clinic-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.clinic-gallery img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-2);
  transition: transform var(--d-2) var(--e-out);
}
.clinic-gallery img:hover { transform: scale(1.04); }

/* ==========================================================================
   19. PLANES
   ========================================================================== */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.1rem;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.8rem 1.6rem;
  border-radius: var(--r-3);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-1);
  transition: transform var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out);
}
.plan:hover { transform: translateY(-5px); box-shadow: var(--sh-3); }
.plan-featured {
  background: var(--deep);
  border-color: var(--deep);
  color: #b9d4d9;
  box-shadow: var(--sh-4);
}
.plan-featured h3, .plan-featured .plan-price { color: #fff; }
.plan-featured .plan-feats li { color: #b9d4d9; }
.plan-featured .plan-feats svg { color: var(--scan-2); }
.plan-flag {
  position: absolute;
  top: -11px; right: 1.4rem;
  padding: .2rem .7rem;
  border-radius: var(--r-full);
  background: var(--scan);
  color: #02231f;
  font-family: var(--f-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.plan h3 { font-size: var(--t-lg); }
.plan-price {
  font-family: var(--f-display);
  font-size: clamp(2rem, 3.5vw, 2.7rem);
  font-weight: 800;
  font-variation-settings: "wdth" 104;
  letter-spacing: -0.04em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.plan-price small { font-family: var(--f-mono); font-size: .7rem; font-weight: 400; letter-spacing: .08em; color: var(--ink-3); }
.plan-featured .plan-price small { color: #8fb3bb; }
.plan-feats { display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.plan-feats li { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--t-sm); color: var(--ink-2); }
.plan-feats svg { color: var(--scan); flex: none; margin-top: .25em; }

.plan-cta-card { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem; align-items: center; }
@media (max-width: 640px) {
  .plan-cta-card { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .plan-cta-card .btn { width: 100%; }
}

/* ==========================================================================
   20. TESTIMONIOS
   ========================================================================== */
.quotes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.1rem; }
.quote {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.6rem 1.5rem;
  border-radius: var(--r-3);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  transition: transform var(--d-2) var(--e-out), background-color var(--d-2) var(--e-out);
}
.quote:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .085); }
.quote-stars { display: flex; gap: .15rem; color: var(--scan-2); }
.quote p { color: #cfe3e7; font-size: var(--t-sm); line-height: 1.72; flex: 1; }
.quote-by { display: flex; align-items: center; gap: .7rem; padding-top: .9rem; border-top: 1px solid rgba(255,255,255,.1); }
.quote-by img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.quote-by b { display: block; color: #fff; font-size: var(--t-sm); font-weight: 700; }
.quote-by span { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--scan-2); }

/* ==========================================================================
   21. PREGUNTAS FRECUENTES
   ========================================================================== */
.faq-list { display: flex; flex-direction: column; gap: .6rem; }
.faq-item {
  border-radius: var(--r-2);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color var(--d-2) var(--e-out), box-shadow var(--d-2) var(--e-out);
}
.faq-item:has([aria-expanded="true"]) { border-color: var(--scan); box-shadow: var(--sh-2); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 56px;
  padding: 1rem 1.2rem;
  text-align: left;
  font-family: var(--f-display);
  font-size: var(--t-base);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.faq-q .chev { color: var(--scan); transition: transform var(--d-2) var(--e-out); flex: none; }
.faq-q[aria-expanded="true"] .chev { transform: rotate(180deg); }
/* Despliegue con altura interpolable, sin medir con JS */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--d-2) var(--e-out);
}
.faq-item:has([aria-expanded="true"]) .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding: 0 1.2rem 1.2rem; font-size: var(--t-sm); color: var(--ink-2); max-width: 68ch; }

/* ==========================================================================
   22. LLAMADA FINAL
   ========================================================================== */
.final-cta {
  position: relative;
  border-radius: var(--r-4);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  background: linear-gradient(125deg, var(--brand) 0%, #0a4fae 42%, var(--scan) 130%);
  color: #fff;
  overflow: hidden;
  box-shadow: var(--sh-4);
}
.final-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.06) 0 1px, transparent 1px 22px);
  pointer-events: none;
}
.final-cta > * { position: relative; }
.final-cta h2 { color: #fff; }
.final-cta p { color: rgba(255, 255, 255, .88); max-width: 48ch; }
.final-cta .btn-ghost { --btn-fg: #fff; border-color: rgba(255,255,255,.45); }
.final-cta .btn-ghost:hover { --btn-bg: rgba(255,255,255,.14); border-color: #fff; }

/* ==========================================================================
   23. PIE
   ========================================================================== */
.site-footer { background: var(--deep); color: #92b4bc; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.site-footer h3 {
  color: #fff;
  font-family: var(--f-mono);
  font-size: .66rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: .1rem; }
.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;          /* zona táctil mínima WCAG 2.5.8 */
  font-size: var(--t-sm);
  color: #92b4bc;
  transition: color var(--d-1) var(--e-out), transform var(--d-1) var(--e-out);
}
.footer-links a:hover { color: var(--scan-2); transform: translateX(3px); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-family: var(--f-mono);
  font-size: .68rem;
  color: #6d949d;
}
.social-row { display: flex; gap: .4rem; }
.social-btn {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-2);
  background: rgba(255, 255, 255, .06);
  color: #b9d4d9;
  transition: background-color var(--d-1) var(--e-out), color var(--d-1) var(--e-out), transform var(--d-1) var(--e-out);
}
.social-btn:hover { background: var(--scan); color: #02231f; transform: translateY(-2px); }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.2rem;
  border-radius: var(--r-full);
  background: #1eb355;
  color: #fff;
  font-size: var(--t-sm);
  font-weight: 700;
  box-shadow: 0 14px 30px -10px rgba(30, 179, 85, .75);
  transition: transform var(--d-2) var(--e-spring), box-shadow var(--d-2) var(--e-out);
}
.wa-float:hover { transform: translateY(-3px) scale(1.03); }
.wa-float span { display: none; }
@media (min-width: 640px) { .wa-float span { display: inline; } }

/* ==========================================================================
   24. VENTANAS MODALES
   ========================================================================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 20, 26, .62);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--d-2) var(--e-out), visibility 0s linear var(--d-2);
}
.modal.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }

.modal-box {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88vh, 900px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(1.5rem, 4vw, 2.2rem);
  border-radius: var(--r-4);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--sh-4);
  transform: translateY(18px) scale(.97);
  transition: transform var(--d-3) var(--e-spring);
}
.modal.is-open .modal-box { transform: translateY(0) scale(1); }

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--r-2);
  color: var(--ink-3);
  transition: background-color var(--d-1) var(--e-out), color var(--d-1) var(--e-out);
}
.modal-close:hover { background: var(--ground-2); color: var(--ink); }

.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field select, .field textarea {
  min-height: 48px;
  padding: .7rem .9rem;
  border-radius: var(--r-2);
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-size: var(--t-sm);
  transition: border-color var(--d-1) var(--e-out), box-shadow var(--d-1) var(--e-out);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--scan);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--scan) 22%, transparent);
}
.field .err {
  font-size: var(--t-xs);
  color: #c0442a;
  min-height: 1.1em;
}
:root[data-theme="dark"] .field .err { color: #ff9b7d; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .field .err { color: #ff9b7d; }
}
.field input[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #c0442a; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Cuestionario del simulador */
.quiz-step { display: none; flex-direction: column; gap: 1.1rem; }
.quiz-step.is-active { display: flex; animation: quiz-in var(--d-3) var(--e-out); }
@keyframes quiz-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
.quiz-progress { display: flex; gap: .3rem; }
.quiz-progress i {
  height: 3px; flex: 1;
  border-radius: 2px;
  background: var(--line);
  transition: background-color var(--d-2) var(--e-out);
}
.quiz-progress i.is-done { background: var(--scan); }
.quiz-opts { display: flex; flex-direction: column; gap: .55rem; }
.quiz-opt {
  display: flex;
  align-items: center;
  gap: .8rem;
  width: 100%;
  min-height: 56px;
  padding: .8rem 1rem;
  border-radius: var(--r-2);
  border: 1.5px solid var(--line);
  background: var(--surface-2);
  text-align: left;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink);
  transition: all var(--d-2) var(--e-out);
}
.quiz-opt:hover { border-color: var(--scan); background: var(--scan-soft); transform: translateX(4px); }
.quiz-result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.quiz-result-grid div {
  padding: .9rem .8rem;
  border-radius: var(--r-2);
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
}
.quiz-result-grid dt {
  font-family: var(--f-mono);
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: .25rem;
}
.quiz-result-grid dd { font-size: var(--t-sm); font-weight: 700; color: var(--ink); }

/* ==========================================================================
   24-BIS. CURSOR DE PRECISIÓN
   --------------------------------------------------------------------------
   Sustituye al puntero por una retícula de calibrador: el mismo lenguaje
   visual del escáner, llevado hasta el propio cursor. Solo se activa por JS
   en dispositivos con ratón real; en táctil o con reduced-motion no existe.
   ========================================================================== */
@property --crX { syntax: '<length>'; inherits: true; initial-value: -100px; }
@property --crY { syntax: '<length>'; inherits: true; initial-value: -100px; }

.cursor-reticle {
  position: fixed;
  top: 0; left: 0;
  width: 0; height: 0;
  z-index: 999;
  pointer-events: none;
  transform: translate(var(--crX), var(--crY));
  opacity: 0;
  transition: opacity var(--d-2) var(--e-out), --crX .12s linear, --crY .12s linear;
}
.has-cursor .cursor-reticle { opacity: 1; }

.cr-ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 34px; height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--scan) 70%, transparent);
  transition: width var(--d-2) var(--e-spring), height var(--d-2) var(--e-spring),
              margin var(--d-2) var(--e-spring), border-color var(--d-2) var(--e-out), background-color var(--d-2) var(--e-out);
}
.cr-dot {
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--scan);
  transition: background-color var(--d-2) var(--e-out), transform var(--d-2) var(--e-spring);
}
.cr-tick { position: absolute; background: color-mix(in srgb, var(--scan) 85%, transparent); transition: opacity var(--d-2) var(--e-out); }
.cr-tick-t, .cr-tick-b { width: 1px; height: 7px; left: -0.5px; }
.cr-tick-l, .cr-tick-r { height: 1px; width: 7px; top: -0.5px; }
.cr-tick-t { top: -24px; }
.cr-tick-b { top: 17px; }
.cr-tick-l { left: -24px; }
.cr-tick-r { left: 17px; }

.cr-label {
  position: absolute;
  top: 22px; left: 22px;
  padding: .2rem .5rem;
  border-radius: var(--r-full);
  background: var(--deep);
  color: var(--scan-2);
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(2px);
  transition: opacity var(--d-1) var(--e-out), transform var(--d-1) var(--e-out);
}

/* Estado "objetivo adquirido": sobre cualquier elemento interactivo, el
   anillo se cierra sobre el dato y aparece la etiqueta de lo que es. */
.has-cursor.is-targeting .cr-ring { width: 52px; height: 52px; margin: -26px 0 0 -26px; border-color: var(--scan); background: color-mix(in srgb, var(--scan) 10%, transparent); }
.has-cursor.is-targeting .cr-dot { transform: scale(0); }
.has-cursor.is-targeting .cr-tick { opacity: 0; }
.has-cursor.is-targeting .cr-label { opacity: 1; transform: translateY(0); }

/* El cursor nativo desaparece solo sobre lo interactivo: nunca sobre texto
   corrido, para no estorbar la lectura ni la selección. */
.has-cursor a, .has-cursor button, .has-cursor [role="slider"], .has-cursor input, .has-cursor select {
  cursor: none;
}

@media (hover: none), (pointer: coarse) {
  .cursor-reticle { display: none; }
}

/* ==========================================================================
   24-TER. LIENZO GENERATIVO DEL HERO
   --------------------------------------------------------------------------
   Una malla de puntos tipo nube de escaneo 3D, dibujada en <canvas>, con
   leve deriva y parallax al cursor. Decorativa: aria-hidden, se detiene
   fuera de pantalla y con reduced-motion.
   ========================================================================== */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;              /* detrás del contenido, como .hero::after */
  opacity: .55;
  pointer-events: none;
}
:root[data-theme="dark"] .hero-canvas { opacity: .8; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero-canvas { opacity: .8; }
}

/* ==========================================================================
   24-QUATER. CABECERA CINÉTICA
   --------------------------------------------------------------------------
   Cada palabra entra desde un peso y anchura de fuente más ligeros hasta su
   estado final grueso y ensanchado: las letras "se alinean" al llegar, el
   mismo gesto que el arco dental de al lado. Si GSAP no carga, el CSS ya
   deja el titular en su estado final: no hay parpadeo ni contenido oculto.
   ========================================================================== */
@property --wght { syntax: '<number>'; inherits: true; initial-value: 800; }
@property --wdth { syntax: '<number>'; inherits: true; initial-value: 112; }

.kinetic-heading .kw {
  display: inline-block;
  font-variation-settings: "wght" var(--wght), "wdth" var(--wdth);
}

/* ==========================================================================
   24-QUINQUIES. CINTA DE MEDICIÓN (MARQUESINA)
   ========================================================================== */
.ticker {
  border-block: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track { display: flex; width: max-content; animation: ticker-scroll 34s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-set { display: flex; align-items: center; flex: none; }
.ticker-set span {
  padding: .9rem 1.4rem;
  font-family: var(--f-mono);
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-3);
  white-space: nowrap;
}
.ticker-set i {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--scan);
  flex: none;
}
@keyframes ticker-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* ==========================================================================
   24-SEXIES. BENTO — OBJETIVOS
   --------------------------------------------------------------------------
   Deja de ser una rejilla de cuatro celdas idénticas: una tarjeta grande
   (el motivo de consulta más frecuente, con más texto y jerarquía real),
   dos compactas, y una en formato banner horizontal. El tamaño codifica
   la frecuencia real del caso, no es solo decoración.
   ========================================================================== */
@media (min-width: 781px) {
  .goals-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1rem;
    grid-template-areas:
      "a b"
      "a c"
      "d d";
  }
  .goal-card--a { grid-area: a; justify-content: center; padding: 2.1rem 2rem; min-height: 100%; position: relative; overflow: hidden; }
  .goal-card--a::after {
    content: "";
    position: absolute;
    inset: auto -8% -12% auto;
    width: 200px; height: 200px;
    background-image: radial-gradient(circle, var(--scan) 1.4px, transparent 1.4px);
    background-size: 16px 16px;
    opacity: .14;
    -webkit-mask-image: radial-gradient(circle at bottom right, #000 35%, transparent 72%);
    mask-image: radial-gradient(circle at bottom right, #000 35%, transparent 72%);
    pointer-events: none;
    z-index: 0;
  }
  .goal-card--a > * { position: relative; z-index: 1; }
  .goal-card--a h3 { font-size: var(--t-lg); }
  .goal-card--a p { font-size: var(--t-sm); max-width: 34ch; }
  .goal-card--b { grid-area: b; }
  .goal-card--c { grid-area: c; }
  .goal-card--d {
    grid-area: d;
    flex-direction: row;
    align-items: center;
    gap: 1.1rem;
    min-height: auto;
    padding: 1.3rem 1.5rem;
  }
  .goal-card--d .goal-card--d-copy { display: flex; flex-direction: column; gap: .15rem; }
  .goal-card--d h3 { font-size: var(--t-base); }
  .goal-card--d p { font-size: var(--t-sm); }
  .goal-card--d .goal-go { margin-left: auto; flex: none; }
}
.goal-tag {
  display: inline-flex;
  align-self: flex-start;
  padding: .22rem .6rem;
  border-radius: var(--r-full);
  background: var(--scan-soft);
  color: var(--scan);
  font-family: var(--f-mono);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ==========================================================================
   24-SEPTIES. BENTO — TECNOLOGÍA
   --------------------------------------------------------------------------
   El escáner es el primer paso de todo tratamiento, así que ocupa la
   columna alta; los otros tres se apilan al lado, más ligeros.
   ========================================================================== */
@media (min-width: 781px) {
  .tech-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
  }
  .tech-card--a { grid-column: 1; grid-row: 1 / -1; justify-content: flex-end; position: relative; overflow: hidden; }
  .tech-card--a::before {
    content: "";
    position: absolute;
    inset: auto -10% -10% auto;
    width: 220px; height: 220px;
    background-image: radial-gradient(circle, var(--scan-2) 1.4px, transparent 1.4px);
    background-size: 16px 16px;
    opacity: .1;
    -webkit-mask-image: radial-gradient(circle at bottom right, #000 35%, transparent 72%);
    mask-image: radial-gradient(circle at bottom right, #000 35%, transparent 72%);
    pointer-events: none;
  }
  .tech-card--b { grid-column: 2; grid-row: 1; }
  .tech-card--c { grid-column: 2; grid-row: 2; }
  .tech-card--d { grid-column: 2; grid-row: 3; }
}
.tech-card-stat {
  font-family: var(--f-display);
  font-size: 3rem;
  font-weight: 800;
  font-variation-settings: "wdth" 108;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1;
}
.tech-card-stat small { font-family: var(--f-mono); font-size: .95rem; font-weight: 500; color: var(--scan-2); margin-left: .3rem; letter-spacing: .04em; }
.tech-card-specs {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-top: .3rem;
}
.tech-card-specs li {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding-bottom: .55rem;
  border-bottom: 1px dashed rgba(255, 255, 255, .12);
}
.tech-card-specs .num {
  font-family: var(--f-mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--scan-2);
  min-width: 4.6ch;
}
.tech-card-specs li span:last-child { font-size: .82rem; color: #9fc0c7; }

.tech-card-tag {
  margin-top: auto;
  padding-top: .8rem;
  border-top: 1px dashed rgba(255, 255, 255, .18);
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--scan-2);
}

/* ==========================================================================
   24-OCTIES. TRATAMIENTO FOTOGRÁFICO — DUOTONO DE MARCA
   --------------------------------------------------------------------------
   Las fotografías reales quedan tan frías como las piezas técnicas si se
   dejan a color plano dentro de tarjetas blancas. Un velo en el color de
   marca, mezclado por luminosidad, las integra sin perder el detalle.
   ========================================================================== */
.doctor-photo, .clinic-gallery picture {
  position: relative;
  overflow: hidden;
  isolation: isolate;   /* contiene el mix-blend-mode: sin esto, el tono
                            se filtra a cualquier cosa pintada antes en la
                            misma pila de apilamiento, como el comparador. */
}
.clinic-gallery picture { display: block; border-radius: var(--r-2); }
.doctor-photo::after, .clinic-gallery picture::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, var(--brand) 0%, var(--scan) 100%);
  mix-blend-mode: color;
  opacity: .38;
  pointer-events: none;
}
.doctor-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(4, 33, 44, .1), transparent 45%);
  pointer-events: none;
}

/* ==========================================================================
   24-NOVIES. GRANO — TEXTURA TÁCTIL
   --------------------------------------------------------------------------
   Un grano casi imperceptible sobre las zonas oscuras evita el plano
   perfecto de degradado que delata a una plantilla sin retocar.
   ========================================================================== */
.on-dark, .final-cta, .site-footer {
  position: relative;
  isolation: isolate;
}
.on-dark::before, .final-cta::before, .site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: .05;
  mix-blend-mode: overlay;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.on-dark > *, .final-cta > *, .site-footer > * { position: relative; z-index: 1; }

/* ==========================================================================
   24-DECIES. INCLINACIÓN 3D AL PASAR EL CURSOR
   --------------------------------------------------------------------------
   Profundidad táctil en las tarjetas principales: el ángulo lo fija JS por
   variables CSS según la posición del cursor dentro de la tarjeta.
   ========================================================================== */
@media (hover: hover) and (pointer: fine) {
  .tilt {
    --tx: 0deg; --ty: 0deg;
    transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)) translateY(0);
    transition: transform .5s var(--e-out);
  }
  .tilt.is-tilting { transition: transform .08s linear; }

  /* Las tarjetas bento ya tienen su propio :hover{transform:translateY()};
     estas reglas, más específicas, lo funden con la inclinación en vez de
     que una pise a la otra. */
  .goal-card--a.tilt:hover, .goal-card--a.tilt[aria-pressed="true"] {
    transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)) translateY(-4px);
  }
  .tech-card--a.tilt:hover {
    transform: perspective(900px) rotateX(var(--tx)) rotateY(var(--ty)) translateY(-5px);
  }
}

/* ==========================================================================
   25. REVELADO AL DESPLAZAR
   25. REVELADO AL DESPLAZAR
   --------------------------------------------------------------------------
   El contenido solo se oculta si el JS confirmó que está vivo (clase .js en
   <html>). Sin JavaScript, o si algo falla, todo permanece visible.
   ========================================================================== */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--d-3) var(--e-out), transform var(--d-3) var(--e-out);
  transition-delay: var(--reveal-delay, 0s);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* Donde el navegador lo soporta, el revelado lo conduce el propio scroll
   y el observador de JS deja de hacer falta. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .js .reveal {
      opacity: 1;
      transform: none;
      transition: none;
      animation: reveal-in linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 26%;
    }
    @keyframes reveal-in {
      from { opacity: 0; transform: translateY(24px); }
      to   { opacity: 1; transform: none; }
    }
  }
}

/* ==========================================================================
   26. TRANSICIONES DE VISTA
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(treatment-panel) { animation: vt-out .22s var(--e-in-out) both; }
  ::view-transition-new(treatment-panel) { animation: vt-in .34s var(--e-out) both; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-10px) scale(.99); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(14px) scale(.99); } }
}

/* ==========================================================================
   27. MOVIMIENTO REDUCIDO
   --------------------------------------------------------------------------
   Ausente por completo en la versión anterior. Es una barrera real para
   personas con trastornos vestibulares, no un detalle opcional.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }

  /* Los elementos que dependen de una animación para mostrarse
     tienen que quedar en su estado final, no congelados en el inicial. */
  .js .reveal { opacity: 1 !important; transform: none !important; }
  .tooth { animation: none !important; transform: none !important; }
  .arch-measure { opacity: 1 !important; }
  .underline-scan path { stroke-dashoffset: 0 !important; animation: none !important; }
  .scan-line, .compare-hint, .arch-ring-ticks, .float-badge { animation: none !important; }
  .scan-line { opacity: .5; }
  .compare-hint { opacity: 0; }
  .btn:hover, .card-hover:hover, .step:hover, .tech-card:hover,
  .quote:hover, .plan:hover, .goal-card:hover { transform: none; }
}

/* ==========================================================================
   28. ADAPTACIÓN A PANTALLAS
   ========================================================================== */
@media (max-width: 1080px) {
  .treatments-layout { grid-template-columns: 1fr; }
  .tab-rail { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: thin; }
  .tab-rail-title { display: none; }
  .tab-btn { white-space: nowrap; min-width: max-content; }
  .results-layout,
  .tech-layout,
  .doctor-layout { grid-template-columns: 1fr; }
  .tab-panel { grid-template-columns: 1fr; }
  .tab-panel-media { order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { align-items: flex-start; }
  .arch-stage { max-width: 420px; }
  .process-steps { grid-template-columns: repeat(2, 1fr); }
  .process-steps > li:nth-child(2) { margin-top: 0; }
  .process-steps > li:nth-child(3) { margin-top: clamp(1rem, 3vw, 2rem); }
  .process-steps > li:nth-child(4) { margin-top: clamp(1rem, 3vw, 2rem); }
  .process-curve { display: none; }
  .process-wrap { padding-top: 0; }

}

/* La barra con siete enlaces deja de caber bastante antes de 900px. */
@media (max-width: 1080px) {
  /* Menú desplegable a pantalla completa */
  .menu-toggle { display: grid; place-items: center; }
  .nav-links {
    position: fixed;
    inset: 74px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem clamp(1.1rem, 4vw, 2.5rem) 1.6rem;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-3);
    transform: translateY(-118%);
    visibility: hidden;
    transition: transform var(--d-3) var(--e-out), visibility 0s linear var(--d-3);
  }
  .nav-links.is-open { transform: translateY(0); visibility: visible; transition-delay: 0s; }
  .nav-link { min-height: 52px; padding: 0 .5rem; font-size: var(--t-md); border-bottom: 1px solid var(--line-2); border-radius: 0; }
  .nav-link::after { display: none; }
  .nav-actions .btn { display: none; }
}

@media (max-width: 640px) {
  :root { --gap: 1.1rem; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .process-steps { grid-template-columns: 1fr; }
  .process-steps > li { margin-top: 0 !important; }
  .form-grid { grid-template-columns: 1fr; }
  .quiz-result-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .clinic-gallery { grid-template-columns: repeat(3, 1fr); }
  .compare { aspect-ratio: 1 / 1; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1 1 auto; }
  .float-badge { display: none; }
  .float-badge.badge-br { display: flex; right: 0; bottom: 0; }
}

/* ==========================================================================
   29. IMPRESIÓN
   ========================================================================== */
@media print {
  .site-header, .wa-float, .modal, .float-badge, .compare-grip, .compare-line { display: none !important; }
  body { background: #fff; color: #000; }
  .on-dark, .tech-section, .site-footer { background: #fff !important; color: #000 !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .7em; color: #555; }
}

/* Ayuda bajo el comparador */
.cmp-help {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .06em;
  color: var(--ink-3);
}
.cmp-help svg { color: var(--scan); flex: none; }
