/*
  Ortho Dental landing. Marca real tomada del logo: morado #602483 y cian #11ADCE.
  Dirección: clínica costera, calma y editorial. Referencias de Awwwards: Sky Clinics (turismo dental,
  horizonte en degradado y tipografía serena), Aventura Dental Arts (SOTD 2026, paleta contenida y
  secciones modulares) y los paneles en arco de A.B.C. Smile.
  Reglas de forma: botones en píldora, tarjetas a 28px, retratos en arco (arco arriba, 28px abajo).
  Un solo acento (cian) sobre el morado de marca. Un solo tema por sistema (claro u oscuro, nunca mezclado).
*/

@font-face {
  font-family: 'Bricolage Grotesque Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('./fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Geist Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('./fonts/geist-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --bg: #f6f4f9;
  --surface: #ffffff;
  --ink: #1b1325;
  --muted: #5a5068;
  --line: #e4dfec;
  --brand: #602483;
  --brand-ink: #602483;
  --accent: #11adce;
  --accent-soft: #ddf2f8;
  --lilac-soft: #eee7f5;
  --on-brand: #ffffff;
  --hero-grad: linear-gradient(180deg, #d4eff6 0%, #e9f3f9 46%, var(--bg) 100%);
  --band-grad: linear-gradient(135deg, #cdeff6 0%, #e6dcf2 100%);
  --nav-bg: rgb(246 244 249 / 0.97);
  --shadow: 0 18px 40px -22px rgb(67 25 92 / 0.45);
  --nav: 68px;
  --r: 28px;
  --font-display: 'Bricolage Grotesque Variable', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Geist Variable', 'Segoe UI', system-ui, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #130c1b;
    --surface: #1d1428;
    --ink: #f3eef8;
    --muted: #b9aec7;
    --line: #34274a;
    --brand: #7b36a6;
    --brand-ink: #c9a2e6;
    --accent: #3cc6e4;
    --accent-soft: #11303a;
    --lilac-soft: #2a1b3d;
    --hero-grad: linear-gradient(180deg, #0f2c38 0%, #171428 50%, var(--bg) 100%);
    --band-grad: linear-gradient(135deg, #12313c 0%, #2d1c42 100%);
    --nav-bg: rgb(19 12 27 / 0.97);
    --shadow: 0 18px 40px -22px rgb(0 0 0 / 0.8);
  }
}
:root[data-theme='dark'] {
  --bg: #130c1b;
  --surface: #1d1428;
  --ink: #f3eef8;
  --muted: #b9aec7;
  --line: #34274a;
  --brand: #7b36a6;
  --brand-ink: #c9a2e6;
  --accent: #3cc6e4;
  --accent-soft: #11303a;
  --lilac-soft: #2a1b3d;
  --hero-grad: linear-gradient(180deg, #0f2c38 0%, #171428 50%, var(--bg) 100%);
  --band-grad: linear-gradient(135deg, #12313c 0%, #2d1c42 100%);
  --nav-bg: rgb(19 12 27 / 0.82);
  --shadow: 0 18px 40px -22px rgb(0 0 0 / 0.8);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav) + 12px); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -0.025em; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg.ico { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: clamp(16px, 4vw, 40px); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 999px; transition: top 0.2s; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.95rem 1.5rem; border-radius: 999px;
  background: var(--brand); color: var(--on-brand);
  font-weight: 600; font-size: 1rem; line-height: 1; white-space: nowrap; text-decoration: none;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -10px rgb(96 36 131 / 0.7); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-sm { padding: 0.7rem 1.1rem; font-size: 0.95rem; }
.btn-light { background: #fff; color: var(--brand); }
.btn-light:hover { box-shadow: 0 14px 30px -12px rgb(0 0 0 / 0.55); }
.link {
  display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; text-decoration: none;
  color: var(--brand-ink); padding-block: 0.4rem; background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.35s var(--ease);
}
.link:hover { background-size: 100% 2px; }
.link.link-light { color: #fff; }

/* Navegación: transparente sobre la portada, sólida al salir de ella (clase at-top la quita main.js) */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav); background: var(--nav-bg); box-shadow: 0 1px 0 var(--line); transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.js .nav.at-top { background: transparent; box-shadow: none; }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand .wm-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) .brand .wm-color { display: none; } :root:not([data-theme='light']) .brand .wm-light { display: block; } }
:root[data-theme='dark'] .brand .wm-color { display: none; }
:root[data-theme='dark'] .brand .wm-light { display: block; }
.js .nav.at-top .brand .wm-color { display: none; }
.js .nav.at-top .brand .wm-light { display: block; }
.nav-links { display: none; gap: 28px; }
.nav-links a { text-decoration: none; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.js .nav.at-top .nav-links a { color: rgb(255 255 255 / 0.86); }
.js .nav.at-top .nav-links a:hover { color: #fff; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang { font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.lang:hover { color: var(--ink); }
.js .nav.at-top .lang { color: rgb(255 255 255 / 0.92); }
.js .nav.at-top .btn-sm { background: #fff; color: var(--brand); }
@media (min-width: 900px) { .nav-links { display: flex; } }
@media (max-width: 560px) {
  .lang-t { display: none; }
  .nav-right { gap: 12px; }
  .btn-sm { padding: 0.7rem 1rem; font-size: 0.9rem; }
}

/* Hero: foto de Loreto a pantalla completa, con viñeta y grano de película */
.hero { position: relative; isolation: isolate; min-height: 100dvh; border-radius: 0 0 var(--r) var(--r); overflow: hidden; color: #fff; display: grid; align-items: end; background: #12213a; }
.hero-media { position: absolute; inset: 0; z-index: -4; overflow: hidden; }
.hero-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero-shade { position: absolute; inset: 0; z-index: -3; background:
  linear-gradient(180deg, rgb(14 6 26 / 0.62) 0%, rgb(14 6 26 / 0) 24%),
  linear-gradient(90deg, rgb(20 8 34 / 0.55) 0%, rgb(20 8 34 / 0) 62%),
  linear-gradient(0deg, rgb(20 8 34 / 0.84) 0%, rgb(30 12 50 / 0.44) 40%, rgb(30 12 50 / 0.04) 72%); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(120% 90% at 50% 38%, transparent 52%, rgb(8 3 16 / 0.5) 100%); }
.hero-grain { position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.09;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.hero-inner { padding-block: clamp(96px, 14vh, 140px) clamp(40px, 7vh, 88px); }
.hero h1 { font-size: clamp(2.1rem, 9.4vw, 3.4rem); line-height: 0.96; font-weight: 700; max-width: 15ch; text-shadow: 0 2px 30px rgb(0 0 0 / 0.25); }
@media (min-width: 700px) { .hero h1 { font-size: clamp(2.6rem, 6.6vw, 6rem); } }
.hero-sub { margin-top: 26px; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: rgb(255 255 255 / 0.9); max-width: 36rem; }
.hero-cta { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.arch { position: relative; z-index: 1; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px var(--r) var(--r); background: var(--lilac-soft); }
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; transform: scale(var(--z, 1)); transform-origin: var(--o, 50% 39%); }

/* Cifras */
.facts { padding-block: clamp(36px, 5vw, 64px); }
.facts ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
.facts .big { display: block; font-family: var(--font-display); font-size: clamp(2rem, 3.6vw, 2.9rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; color: var(--brand-ink); }
.facts .lbl { color: var(--muted); font-size: 0.98rem; }
@media (min-width: 800px) { .facts ul { grid-template-columns: repeat(4, 1fr); } }

/* Secciones */
.section { padding-block: clamp(56px, 8vw, 112px); }
.section-h2 { font-size: clamp(1.9rem, 3.8vw, 3.1rem); line-height: 1.06; max-width: 22ch; }

/* Tratamientos principales: paneles apilados con foto en duotono de marca */
.stack { margin-top: clamp(32px, 4vw, 56px); }
.panel {
  --tint-a: rgb(32 9 52 / 0.92); --tint-b: rgb(96 36 131 / 0.46); --tint-c: rgb(17 173 206 / 0.22);
  position: sticky; top: calc(var(--nav) + 14px + var(--i, 0) * 12px);
  display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; isolation: isolate; overflow: hidden;
  color: #fff; background: #230a3a; border-radius: var(--r);
  padding: clamp(24px, 4vw, 56px); margin-bottom: 22px; transform-origin: 50% 0;
}
.panel:nth-child(2) { --tint-b: rgb(120 40 150 / 0.42); --tint-c: rgb(17 173 206 / 0.2); }
.panel:nth-child(3) { --tint-a: rgb(20 40 70 / 0.92); --tint-b: rgb(60 50 140 / 0.44); --tint-c: rgb(17 173 206 / 0.32); }
.panel:nth-child(4) { --tint-b: rgb(80 25 110 / 0.5); --tint-c: rgb(17 173 206 / 0.22); }
.panel-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.panel-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, var(--tint-a) 0%, var(--tint-b) 52%, var(--tint-c) 100%); }
.panel h3 { font-size: clamp(2rem, 4.4vw, 3.6rem); line-height: 1.02; font-weight: 700; }
.panel p { margin-top: 18px; max-width: 34rem; color: rgb(255 255 255 / 0.88); }
.who { margin-top: 22px; display: flex; flex-direction: column; gap: 2px; }
.who b { font-family: var(--font-display); font-size: 1.15rem; font-weight: 650; }
.who span { color: rgb(255 255 255 / 0.72); font-size: 0.95rem; }
.panel .btn { margin-top: 26px; }
.panel-art { position: relative; justify-self: center; width: min(100%, 300px); }
.panel-art .arch { box-shadow: 0 0 0 6px rgb(255 255 255 / 0.9); }
@media (min-width: 800px) {
  .panel { grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; min-height: min(540px, 78dvh); }
}
@media (max-width: 799px) {
  .panel { position: relative; }
  .panel-art { order: -1; width: min(70%, 240px); justify-self: start; }
}

/* Todos los tratamientos */
.all { display: grid; gap: 40px; }
.all-head { align-self: start; }
.groups { display: grid; gap: clamp(36px, 5vw, 56px); }
@media (min-width: 1000px) {
  .all { grid-template-columns: 4fr 8fr; gap: 64px; }
  .all-head { position: sticky; top: calc(var(--nav) + 32px); }
}

/* Visitantes: el mar de Cortés de fondo */
.band { position: relative; isolation: isolate; overflow: hidden; color: #fff; border-radius: var(--r); background: #0d2b57; }
.band-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 30% 60%; }
.band-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, rgb(28 8 48 / 0.86) 0%, rgb(60 30 120 / 0.62) 55%, rgb(17 120 170 / 0.4) 100%); }
.band-body { padding: clamp(28px, 6vw, 80px); display: grid; gap: 40px; }
.band h2 { font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.04; max-width: 16ch; }
.band .pay { margin-top: 20px; max-width: 28rem; color: rgb(255 255 255 / 0.86); }
.band .btn { margin-top: 28px; }
.steps { display: grid; gap: 28px; align-content: center; }
.steps b { display: block; font-family: var(--font-display); font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 650; letter-spacing: -0.02em; }
.steps span { color: rgb(255 255 255 / 0.82); }
@media (min-width: 900px) { .band-body { grid-template-columns: 1fr 1fr; gap: 72px; } }

/* Consultorios */
.offices { display: grid; gap: 28px; margin-top: clamp(28px, 4vw, 48px); }
.office { display: flex; flex-direction: column; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 3.5vw, 40px); }
.office h3 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.office address { margin-top: 14px; font-style: normal; font-size: 1.15rem; line-height: 1.5; }
.office .note { color: var(--muted); font-size: 0.98rem; margin-top: 2px; }
.office .link { margin-top: auto; padding-top: 18px; }
.contact { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.contact a, .contact span { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.contact a:hover { color: var(--brand-ink); }
.contact .ico { color: var(--brand-ink); }
@media (min-width: 800px) { .offices { grid-template-columns: 1fr 1fr; } }

/* Preguntas */
.faq { max-width: 52rem; margin-top: clamp(24px, 3vw, 40px); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 22px; font-family: var(--font-display); font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 600; letter-spacing: -0.02em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { transition: transform 0.35s var(--ease); color: var(--brand-ink); }
.faq details[open] summary .ico { transform: rotate(45deg); }
.faq details p { padding-bottom: 24px; color: var(--muted); max-width: 42rem; }

/* Cierre: aguas de la bahía de fondo */
.final { position: relative; isolation: isolate; overflow: hidden; color: #fff; margin-inline: clamp(8px, 1.2vw, 16px); border-radius: var(--r); background: #0d2b57; }
.final-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.final-scrim { position: absolute; inset: 0; z-index: -1; background: linear-gradient(120deg, rgb(28 8 48 / 0.8) 0%, rgb(60 30 120 / 0.55) 60%, rgb(17 120 170 / 0.35) 100%); }
.final-inner { display: grid; gap: 28px; align-items: end; padding-block: clamp(56px, 9vw, 120px); }
.final h2 { font-size: clamp(2.4rem, 6.2vw, 5.2rem); line-height: 1; font-weight: 700; max-width: 14ch; }
@media (min-width: 900px) { .final-inner { grid-template-columns: 1fr auto; } }

/* Pie */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding-block: 48px 32px; margin-top: clamp(56px, 8vw, 112px); }
.footer .cols { display: grid; gap: 32px; }
.footer p.tag { color: var(--muted); margin-top: 12px; max-width: 22rem; }
.footer h4 { margin: 0 0 12px; font-size: 0.95rem; font-weight: 650; }
.footer li + li { margin-top: 8px; }
.footer a { text-decoration: none; color: var(--muted); }
.footer a:hover { color: var(--ink); }
.footer .fine { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted); font-size: 0.92rem; }
.fine-links { display: inline-flex; gap: 20px; flex-wrap: wrap; }
@media (min-width: 800px) { .footer .cols { grid-template-columns: 1.4fr 1fr 1fr; } }

/* Página legal */
.doc { max-width: 46rem; padding-block: clamp(40px, 6vw, 88px); }
.doc h1 { font-size: clamp(2rem, 4vw, 3rem); }
.doc .draft { margin-top: 16px; display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--lilac-soft); color: var(--brand-ink); font-weight: 600; font-size: 0.95rem; }
.doc h2 { font-size: 1.35rem; margin-top: 32px; }
.doc p { margin-top: 8px; color: var(--muted); }
.doc .back { margin-top: 40px; }

/* Movimiento: entradas y reveal. Todo se apaga con prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * { animation: rise 0.9s var(--ease) both; }
  .hero-inner > :nth-child(2) { animation-delay: 0.1s; }
  .hero-inner > :nth-child(3) { animation-delay: 0.2s; }
  @keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
  .js .reveal.in { opacity: 1; transform: none; }

  /* Los paneles apilados se encogen un poco cuando el siguiente los cubre (clase puesta por main.js con IntersectionObserver). */
  @media (min-width: 800px) {
    .panel { transition: transform 0.6s var(--ease), opacity 0.6s var(--ease); }
    .panel::after { content: ''; position: absolute; inset: 0; background: #10051c; opacity: 0; pointer-events: none; transition: opacity 0.6s var(--ease); }
    .panel.tucked { transform: scale(0.95); }
    .panel.tucked::after { opacity: 0.45; }
  }
}

/* Créditos de fotos */
.credits { margin-top: 28px; display: grid; gap: 18px; }
.credits li { display: grid; gap: 2px; }
.credits b { font-family: var(--font-display); font-weight: 650; }
.credits span { color: var(--muted); font-size: 0.97rem; }
.credits a { color: var(--brand-ink); }

/* Titulares por palabras: cada palabra sube desde una máscara */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.w > span { display: inline-block; }

/* Página legal con nav fijo */
main.doc { margin-top: var(--nav); }

/* Más escala y profundidad en las escenas */
.panel { min-height: min(660px, 90dvh); }
.panel h3 { font-size: clamp(2.4rem, 5.6vw, 4.8rem); }
.panel-scrim { background: radial-gradient(130% 100% at 50% 40%, transparent 55%, rgb(8 3 16 / 0.45) 100%), linear-gradient(100deg, var(--tint-a) 0%, var(--tint-b) 52%, var(--tint-c) 100%); }
.band { min-height: min(640px, 88dvh); display: grid; align-items: center; }
.band-scrim { background: radial-gradient(130% 100% at 50% 40%, transparent 55%, rgb(8 3 16 / 0.45) 100%), linear-gradient(120deg, rgb(28 8 48 / 0.86) 0%, rgb(60 30 120 / 0.62) 55%, rgb(17 120 170 / 0.4) 100%); }
.band h2 { font-size: clamp(2.2rem, 4.8vw, 4rem); }
.final { min-height: min(620px, 80dvh); display: grid; align-items: end; margin-inline: 0; border-radius: var(--r) var(--r) 0 0; }
.final h2 { font-size: clamp(2.8rem, 7.4vw, 6.4rem); line-height: 0.96; }
.footer { margin-top: 0; }

/* Movimiento cinematográfico. Todo corre una sola vez y se apaga con prefers-reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  .hero-media { animation: heroClip 1.6s var(--ease) both; }
  .hero-img { animation: pullback 26s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  @keyframes heroClip { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes pullback { from { transform: scale(1.16); } to { transform: scale(1); } }
  .hero .w > span { transform: translateY(112%); animation: wordUp 1s var(--ease) calc(0.55s + var(--i) * 70ms) both; }
  @keyframes wordUp { to { transform: none; } }
  .hero-inner > :not(h1) { animation: rise 1s var(--ease) both; }
  .hero-inner > .hero-sub { animation-delay: 1.15s; }
  .hero-inner > .hero-cta { animation-delay: 1.35s; }

  .js .sr .w > span { transform: translateY(112%); transition: transform 1s var(--ease) calc(var(--i) * 55ms); }
  .js .sr.in .w > span, .js .scene.in .sr .w > span { transform: none; }

  .js .scene .scene-bg { transform: scale(1.12); transition: transform 3.2s var(--ease); }
  .js .scene.in .scene-bg { transform: none; }
  @media (min-width: 800px) {
    .js .panel .panel-art .arch { clip-path: inset(100% 0 0 0); transition: clip-path 1.3s var(--ease) 0.25s; }
    .js .panel.in .panel-art .arch { clip-path: inset(0 0 0 0); }
  }
  .magnetic { transition: transform 0.35s var(--ease), box-shadow 0.3s var(--ease); }
}

#top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 80px; pointer-events: none; }

/* Video del Mar de Cortés dentro de la escena de visitantes (se carga solo en escritorio, ver main.js) */
.band-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s var(--ease); }
.band-video.playing { opacity: 1; }

/* Scroll suave con inercia (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* Apertura de película: barras negras que se retiran, destello de lente y luz que cruza la portada */
.hero-bar { position: absolute; left: 0; right: 0; height: 11dvh; background: #07030d; z-index: 3; pointer-events: none; }
.hero-bar-t { top: 0; }
.hero-bar-b { bottom: 0; }
.hero-flare { position: absolute; left: -10%; right: -10%; top: 46%; height: 2px; z-index: 1; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent 0%, rgb(17 173 206 / 0.0) 10%, rgb(120 220 240 / 0.9) 50%, rgb(17 173 206 / 0) 90%, transparent 100%);
  box-shadow: 0 0 24px 6px rgb(60 200 230 / 0.35); }
@media (prefers-reduced-motion: no-preference) {
  .hero-bar-t { animation: barUp 1.5s var(--ease) 0.25s both; }
  .hero-bar-b { animation: barDown 1.5s var(--ease) 0.25s both; }
  @keyframes barUp { to { transform: translateY(-101%); } }
  @keyframes barDown { to { transform: translateY(101%); } }
  .hero-flare { animation: flare 2.6s cubic-bezier(0.4, 0, 0.2, 1) 0.9s both; }
  @keyframes flare { 0% { opacity: 0; transform: scaleX(0.2); } 35% { opacity: 0.75; } 100% { opacity: 0; transform: scaleX(1.1); } }
}
@media (prefers-reduced-motion: reduce) { .hero-bar, .hero-flare { display: none; } }

/* ---------- Minuta 2026-10-02: reseñas, precios, especialistas y Loreto ---------- */
.section-intro { margin-top: 14px; max-width: 40rem; color: var(--muted); font-size: 1.08rem; }

/* Cifra de calificación con enlace a reseñas de Google */
.fact-link { display: block; text-decoration: none; color: inherit; }
.fact-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.9rem; font-weight: 600; color: var(--brand-ink); }
.fact-link:hover .fact-more { text-decoration: underline; text-underline-offset: 3px; }

/* Precios: precio fijo a la izquierda, cotización tras valoración a la derecha */
.prices { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: 22px; }
.price-fixed { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(24px, 3.5vw, 44px); }
.price-fixed h3, .price-quote h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.price-fixed ul { margin-top: 18px; display: grid; }
.price-fixed li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 18px; border-top: 1px solid var(--line); }
.price-fixed li strong { display: block; font-family: var(--font-display); font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; }
.price-fixed li span { color: var(--muted); font-size: 0.97rem; }
.price-fixed .amount { font-family: var(--font-display); font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 700; letter-spacing: -0.03em; color: var(--brand-ink); white-space: nowrap; }
.price-fixed .amount small { font-size: 0.5em; font-weight: 600; color: var(--muted); }
.price-fixed .pending { font-style: normal; font-size: 0.9rem; font-weight: 600; color: var(--muted); border: 1.5px dashed var(--line); border-radius: 999px; padding: 6px 14px; white-space: nowrap; }
.price-fixed .currency { margin-top: 10px; color: var(--muted); font-size: 0.92rem; }
.price-quote { position: relative; isolation: isolate; overflow: hidden; color: #fff; border-radius: var(--r); padding: clamp(24px, 3.5vw, 44px);
  background: radial-gradient(120% 120% at 100% 0%, rgb(17 173 206 / 0.38) 0%, transparent 55%), linear-gradient(135deg, #2a0f42 0%, #602483 100%); }
.price-quote p { margin-top: 14px; color: rgb(255 255 255 / 0.88); max-width: 34rem; }
.quote-cta { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }
@media (min-width: 900px) { .prices.two { grid-template-columns: 1fr 1fr; } }

/* Especialistas */
.team { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: 34px 26px; grid-template-columns: 1fr; }
.doctor .arch { max-width: 300px; }
.doctor h3 { margin-top: 18px; font-size: 1.3rem; line-height: 1.15; }
.doctor .role { margin-top: 4px; color: var(--brand-ink); font-weight: 600; font-size: 0.98rem; }
.doctor .focus { margin-top: 8px; color: var(--muted); font-size: 0.97rem; }
.doctor .ids { margin-top: 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 0.88rem; }
.doctor .ids dt { color: var(--muted); }
.doctor .ids dd { font-variant-numeric: tabular-nums; }
@media (min-width: 560px) { .team { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .team { grid-template-columns: repeat(4, 1fr); } }

/* Loreto: atractivos para el visitante */
.places { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: 34px 24px; grid-template-columns: 1fr; }
.place-img { overflow: hidden; border-radius: var(--r); aspect-ratio: 4 / 3; background: var(--lilac-soft); }
.place-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.place:hover .place-img img { transform: scale(1.05); }
.place h3 { margin-top: 16px; font-size: 1.3rem; line-height: 1.15; }
.place p { margin-top: 8px; color: var(--muted); font-size: 0.98rem; }
@media (min-width: 640px) { .places { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .places { grid-template-columns: repeat(4, 1fr); } }
/* Ajustes móviles de precios y especialistas */
.price-fixed li { flex-wrap: wrap; }
.price-fixed li > div { flex: 1 1 13rem; }
@media (max-width: 559px) {
  .team { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .doctor h3 { font-size: 1.08rem; }
  .doctor .role, .doctor .focus { font-size: 0.9rem; }
}

/* Currículum breve de cada especialista (aparece cuando se llena cv en content.mjs) */
.doctor .cv { margin-top: 12px; display: grid; gap: 6px; font-size: 0.9rem; }
.doctor .cv li { position: relative; padding-left: 14px; }
.doctor .cv li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- Feedback de Giovanni (2026-10-06) ---------- */
/* Botones de agendar más grandes */
.btn-lg { padding: 1.05rem 1.7rem; font-size: 1.08rem; }
.btn-xl { padding: 1.4rem 2.8rem; font-size: clamp(1.15rem, 2vw, 1.5rem); gap: 12px; box-shadow: 0 18px 40px -16px rgb(0 0 0 / 0.55); }
.btn-xl .ico { width: 1.35em; height: 1.35em; }


/* Todos los tratamientos: pestañas por categoría y tarjetas que llevan a WhatsApp */
.tabs { display: none; }
.group-title { font-size: 1rem; font-family: var(--font-body); font-weight: 650; color: var(--brand-ink); margin-bottom: 16px; }
.tcards { display: grid; gap: 14px; grid-template-columns: 1fr; }
.tcard { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px; border-radius: 20px; text-decoration: none; color: inherit;
  background: var(--surface); border: 1px solid var(--line); transition: transform 0.35s var(--ease), border-color 0.25s, box-shadow 0.35s var(--ease); }
.tcard strong { font-family: var(--font-display); font-size: 1.2rem; font-weight: 650; letter-spacing: -0.02em; }
.tcard-d { color: var(--muted); font-size: 0.97rem; }
.tcard-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 6px; background: var(--lilac-soft); color: var(--brand-ink); transition: background 0.3s, color 0.3s, transform 0.4s var(--ease); }
.tcard-ico .ico { width: 24px; height: 24px; }
.tcard-ask { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 0.92rem; color: var(--brand-ink); }
.tcard-ask .ico { width: 1.05em; height: 1.05em; }
.tcard-ask .ico:last-child { transition: transform 0.3s var(--ease); }
.tcard:hover, .tcard:focus-visible { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow); }
.tcard:hover .tcard-ico, .tcard:focus-visible .tcard-ico { background: var(--brand); color: #fff; transform: rotate(-6deg) scale(1.06); }
.tcard:hover .tcard-ask .ico:last-child { transform: translateX(4px); }
@media (min-width: 640px) { .tcards { grid-template-columns: 1fr 1fr; } }

/* Con JS: pestañas; solo se ve la categoría elegida y sus tarjetas entran escalonadas */
.js .tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.js .group-title { display: none; }
.js .group[hidden] { display: none; }
.tab { font: inherit; font-weight: 600; font-size: 0.95rem; cursor: pointer; padding: 0.7rem 1.15rem; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease); }
.tab:hover { border-color: var(--brand); }
.tab[aria-selected='true'] { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .js .group.show .tcards > li { animation: cardIn 0.6s var(--ease) both; animation-delay: calc(var(--k) * 70ms); }
  @keyframes cardIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
}


/* Más sobrio (2026-10-06): sin píldoras ni iconos en cuadritos */
.lang { color: inherit; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; border-bottom: 1.5px solid transparent; padding-bottom: 2px; }
.lang:hover { border-bottom-color: currentColor; }
.nav .lang-t, .lang-t { display: inline; }
.js .nav.at-top .lang { color: #fff; }
/* Pestañas con subrayado */
.js .tabs { gap: 4px 28px; border-bottom: 1px solid var(--line); }
.tab { border: 0; border-radius: 0; background: none; padding: 0.8rem 0; margin-bottom: -1px; color: var(--muted); border-bottom: 2px solid transparent; }
.tab:hover { color: var(--ink); border-color: transparent; border-bottom-color: var(--line); }
.tab[aria-selected='true'] { background: none; color: var(--ink); border-color: transparent; border-bottom-color: var(--brand); }
/* Tarjetas de tratamientos: texto limpio, sin icono ni llamado */
.tcard { padding: 20px 0 22px; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; height: auto; }
.tcard:hover { transform: none; box-shadow: none; border-color: var(--line); }
.tcard strong { transition: color 0.2s; }
.tcard:hover strong { color: var(--brand-ink); }
.tcards { gap: 0 40px; }
/* Costos: un solo bloque de texto mientras no haya cifras */


/* ---------- Feedback de Darlyn (2026-10-08) ---------- */
/* Fotos de los paneles: rectángulo redondeado con la foto completa (sin zoom ni arco) */
.panel-art .arch { border-radius: 22px; box-shadow: 0 30px 60px -28px rgb(0 0 0 / 0.7); }
.panel-art .arch img { transform: none; object-position: 50% 15%; }

/* Cifras con ícono de línea */
.facts .ico { display: block; width: 30px; height: 30px; color: var(--accent); margin-bottom: 10px; }

/* Costos: texto a la izquierda, de qué depende el costo a la derecha */
.price-quote { display: grid; gap: 28px; }
.price-quote .factors h4 { font-family: var(--font-body); font-size: 0.95rem; font-weight: 650; letter-spacing: 0.02em; color: rgb(255 255 255 / 0.75); }
.factors ol { margin-top: 14px; display: grid; gap: 0; counter-reset: f; }
.factors li { counter-increment: f; display: grid; grid-template-columns: 2.6rem 1fr; column-gap: 12px; padding: 14px 0; border-top: 1px solid rgb(255 255 255 / 0.18); }
.factors li::before { content: counter(f, decimal-leading-zero); grid-row: span 2; font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--accent); line-height: 1.2; }
.factors b { font-family: var(--font-display); font-size: 1.12rem; font-weight: 650; }
.factors span { color: rgb(255 255 255 / 0.78); font-size: 0.95rem; }
@media (min-width: 900px) {
  .prices:not(.two) .price-quote { grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: start; padding: clamp(32px, 4.5vw, 64px); }
}

/* Logo de Smartligner en el panel de alineadores */
.panel .partner { display: block; height: 26px; width: auto; margin-top: 16px; opacity: 0.95; }

/* Marina Puerto Escondido (bloque destacado dentro de Loreto; pedido de la doctora 2026-10-09) */
.marina { margin-top: clamp(28px, 4vw, 48px); display: grid; gap: 22px; align-items: center; padding: clamp(14px, 2vw, 20px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.marina-img { overflow: hidden; border-radius: 18px; aspect-ratio: 3 / 2; }
.marina-img img { width: 100%; height: 100%; object-fit: cover; }
.marina-body { padding: 4px clamp(4px, 2vw, 24px) 8px; }
.marina h3 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.marina p { margin-top: 10px; color: var(--muted); max-width: 34rem; }
.marina .link { margin-top: 16px; }
@media (min-width: 800px) { .marina { grid-template-columns: 1fr 1.1fr; gap: 36px; } }
.marina-img { max-width: 640px; }
