/* Sonrisa Dental · concepto */
:root {
  --azul: #0A2A5E;
  --azul-2: #1E4FA3;
  --menta: #6FE3C8;
  --menta-suave: #E3F8F2;
  --teal: #0B7A6B;
  --teal-osc: #08665A;
  --texto: #33465F;
  --gris: #586A80;
  --fondo: #FFFFFF;
  --superficie: #F3F8FC;
  --linea: #DCE6F0;
  --wa: #25D366;
  --f-tit: "Lexend", system-ui, sans-serif;
  --f-txt: "Figtree", system-ui, sans-serif;
  --top-h: 98px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 400 1rem/1.6 var(--f-txt); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
a, button, summary, label { touch-action: manipulation; -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 8px; background: #fff; color: #111; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
h1, h2, h3 { margin: 0; color: var(--azul); font-family: var(--f-tit); letter-spacing: -.02em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--azul-2); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.ico { width: 1.15em; height: 1.15em; flex: none; }
.nota { margin-top: 16px; font-size: .875rem; color: var(--gris); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 50px; padding: 0 1.5em; border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1 var(--f-txt); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .25s, transform .25s var(--ease), box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--teal { background: var(--teal); color: #fff; box-shadow: 0 10px 24px -10px rgba(11, 122, 107, .7); }
.btn--teal:hover { background: var(--teal-osc); }
.btn--light { background: rgba(255, 255, 255, .9); color: var(--azul); border-color: var(--linea); }
.btn--line { background: #fff; color: var(--azul); border-color: var(--linea); }
.btn--mint { background: var(--menta); color: var(--azul); }
.btn--wa { background: var(--wa); color: #052E16; }
.btn--sm { min-height: 44px; padding: 0 1.1em; font-size: .9375rem; }
.btn--lg { min-height: 58px; padding: 0 1.8em; font-size: 1.0625rem; }

/* ---------- Barra de concepto + navegación ---------- */
.top { position: fixed; inset: 0 0 auto; z-index: 50; }
.concepto {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 12px;
  min-height: 34px; padding: 6px 16px;
  background: var(--azul); color: #DCE8F7; font-size: .8125rem; text-align: center;
}
.concepto strong { color: #fff; font-weight: 600; }
.concepto__cta { color: var(--menta); font-weight: 600; text-underline-offset: 3px; }
.nav {
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(16px, calc((100% - 1180px) / 2));
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 230, 240, .8);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__ico { width: 34px; height: 34px; color: var(--azul-2); }
.logo b { display: block; font: 700 1.1875rem/1.1 var(--f-tit); color: var(--azul); letter-spacing: -.02em; }
.logo small { display: none; font-size: .6875rem; color: var(--gris); letter-spacing: .04em; }
.nav__links { display: none; gap: 28px; }
.nav__links a { text-decoration: none; font-weight: 500; color: var(--texto); padding: 10px 0; }
.nav__links a:hover { color: var(--teal); }
@media (max-width: 400px) { .nav .btn--sm { padding: 0 .9em; font-size: .875rem; } .nav .btn--sm .ico { display: none; } }
@media (min-width: 640px) { .logo small { display: block; } }
@media (min-width: 900px) { .nav__links { display: flex; } }

/* ---------- Hero = recorrido ---------- */
.hero { position: relative; height: 280vh; --p: 0; }
.hero__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; background: #EEF2F4; }
.hero__poster, .hero__poster img, .hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__veil {
  position: absolute; inset: 0;
  /* Velo de abajo hacia arriba que cubre toda la zona del texto (contraste ≥ 4.5:1 sobre la foto) */
  background: linear-gradient(0deg, rgba(255, 255, 255, .97) 0%, rgba(255, 255, 255, .95) 55%, rgba(255, 255, 255, .82) 72%, rgba(255, 255, 255, .35) 86%, rgba(255, 255, 255, 0) 96%);
  opacity: clamp(0, calc((var(--p) - .72) * 5), 1);
}
.hero__hint {
  position: absolute; left: 50%; bottom: 32px; translate: -50% 0;
  padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .9); color: var(--azul);
  font-weight: 600; font-size: .9375rem; white-space: nowrap;
  box-shadow: 0 10px 30px -10px rgba(10, 42, 94, .35);
  opacity: clamp(0, calc(1 - var(--p) * 12), 1);
  animation: flota 2.4s var(--ease) infinite;
}
@keyframes flota { 50% { transform: translateY(-6px); } }
.hero__copy {
  position: absolute; left: 16px; right: 16px; bottom: max(28px, 5svh);
  max-width: 620px;
  opacity: clamp(0, calc((var(--p) - .8) * 6), 1);
  transform: translateY(calc((1 - clamp(0, calc((var(--p) - .8) * 6), 1)) * 40px));
}
.hero__lugar { color: var(--teal); font-weight: 600; font-size: .9375rem; }
.hero h1 { margin-top: 10px; font: 700 clamp(2.4rem, 1.4rem + 4.4vw, 4.8rem)/1.02 var(--f-tit); letter-spacing: -.04em; text-wrap: balance; }
.hero__sub { margin-top: 16px; font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); color: var(--texto); max-width: 34rem; }
.hero__ctas { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 768px) {
  .hero { height: 320vh; }
  .hero__veil { background: linear-gradient(90deg, rgba(255, 255, 255, .96) 25%, rgba(255, 255, 255, .7) 45%, rgba(255, 255, 255, 0) 68%); }
  .hero__copy { left: max(32px, calc((100% - 1180px) / 2)); bottom: max(48px, 10svh); }
}
.rm .hero, html:not(.js) .hero { height: auto; }
.rm .hero__sticky, html:not(.js) .hero__sticky { position: relative; --p: 1; }
.rm .hero__hint, .rm .hero__canvas { display: none; }

/* ---------- Confianza ---------- */
.confianza { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px 16px; padding: 36px 0; border-bottom: 1px solid var(--linea); }
.confianza li { display: flex; align-items: center; gap: 12px; font-weight: 500; color: var(--azul); font-size: .9375rem; line-height: 1.3; }
.confianza svg { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--azul-2); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 900px) { .confianza { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Encabezados de sección ---------- */
section { padding-block: clamp(72px, 10vw, 128px); }
.head { margin-bottom: clamp(32px, 5vw, 56px); max-width: 44rem; }
.head h2, .antes h2, .agenda h2, .cierre h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.1rem); line-height: 1.08; font-weight: 700; text-wrap: balance; }
.head p { margin-top: 12px; color: var(--gris); }

/* ---------- Servicios con íconos animados ---------- */
.serv { display: grid; gap: 16px; }
.serv__item {
  position: relative; padding: 28px 24px 26px; border-radius: 24px;
  background: var(--superficie); border: 1px solid var(--linea);
  transition: transform .35s var(--ease), box-shadow .35s, background-color .35s;
}
.serv__item:hover { transform: translateY(-4px); background: #fff; box-shadow: 0 24px 50px -24px rgba(10, 42, 94, .35); }
.serv__ico { width: 56px; height: 56px; padding: 8px; border-radius: 18px; background: var(--menta-suave); fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.serv__ico * { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .serv__item:not(.in) .serv__ico * { stroke-dashoffset: 1; }
.serv__item.in .serv__ico * { transition: stroke-dashoffset 1.2s var(--ease) .15s; }
.serv__item.in .serv__ico .spark { transition-delay: .9s; }
.serv__item:hover .serv__ico { animation: brinco .6s var(--ease); }
.serv__item:hover .spark { animation: brillo 1s ease-in-out infinite; }
@keyframes brinco { 40% { transform: translateY(-5px) rotate(-6deg); } }
@keyframes brillo { 50% { opacity: .2; } }
.serv h3 { margin-top: 20px; font-size: 1.25rem; font-weight: 600; }
.serv p { margin-top: 6px; color: var(--gris); }
.precio { display: inline-block; margin-top: 16px; font-weight: 600; color: var(--teal); }
@media (min-width: 620px) { .serv { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .serv { grid-template-columns: repeat(5, 1fr); } .serv__item { padding: 26px 20px; } }

/* ---------- Antes / después ---------- */
.antes { display: grid; gap: 36px; align-items: center; }
.antes__txt > p:not(.nota) { margin-top: 16px; font-size: 1.0625rem; max-width: 30rem; }
.ba { position: relative; aspect-ratio: 3 / 2; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 70px -30px rgba(10, 42, 94, .5); user-select: none; touch-action: pan-y; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__antes { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__linea { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; translate: -50% 0; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .3); pointer-events: none; }
.ba__linea i { position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; translate: -50% -50%; border-radius: 50%; background: #fff; box-shadow: 0 6px 20px rgba(10, 42, 94, .35); }
.ba__linea i::before, .ba__linea i::after { content: ""; position: absolute; top: 50%; width: 9px; height: 9px; border: solid var(--azul); border-width: 0 0 2.5px 2.5px; }
.ba__linea i::before { left: 12px; transform: translateY(-50%) rotate(45deg); }
.ba__linea i::after { right: 12px; transform: translateY(-50%) rotate(-135deg); }
.ba__tag { position: absolute; top: 14px; padding: 5px 12px; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: rgba(255, 255, 255, .92); color: var(--azul); }
.ba__tag--a { left: 14px; }
.ba__tag--d { right: 14px; }
.ba__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba:has(.ba__range:focus-visible) { outline: 3px solid var(--azul-2); outline-offset: 4px; }
@media (min-width: 900px) { .antes { grid-template-columns: .8fr 1.2fr; gap: 64px; } }

/* ---------- Clínica ---------- */
.clinica { background: var(--superficie); }
.clinica__fotos { display: grid; gap: 16px; }
.clinica figure { margin: 0; position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; }
.clinica img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.clinica figure:hover img { transform: scale(1.04); }
.clinica figcaption { position: absolute; left: 14px; bottom: 14px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--azul); font-weight: 600; font-size: .875rem; }
@media (min-width: 760px) { .clinica__fotos { grid-template-columns: 1.3fr 1fr 1fr; } .clinica figure:first-child { aspect-ratio: auto; } }

/* ---------- Agenda ---------- */
.agenda { background: linear-gradient(160deg, var(--azul) 0%, #0D3A7E 100%); color: #DCE8F7; }
.agenda h2 { color: #fff; }
.agenda__intro > p:first-of-type { margin-top: 14px; font-size: 1.0625rem; }
.nota--claro { color: #B9CBE4; }
.agenda__grid { display: grid; gap: 36px; }
.cita { background: #fff; color: var(--texto); border-radius: 28px; padding: 24px 18px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); }
.cita__pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 22px; }
.cita__pasos li { padding-top: 10px; border-top: 3px solid var(--linea); font-size: .8125rem; font-weight: 600; color: var(--gris); transition: border-color .3s, color .3s; }
.cita__pasos li.on { border-color: var(--teal); color: var(--teal); }
.cita fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cita legend { padding: 0; margin-bottom: 16px; font: 600 1.25rem/1.3 var(--f-tit); color: var(--azul); }
.opciones { display: grid; gap: 10px; }
.opciones--serv { grid-template-columns: 1fr 1fr; }
.opciones--dias { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.opciones--horas { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.opciones label { position: relative; display: block; }
.opciones input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.opciones span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 10px 8px; border-radius: 14px; border: 1.5px solid var(--linea);
  font-weight: 600; color: var(--azul); line-height: 1.25; cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s, transform .2s var(--ease);
}
.opciones span small { font-weight: 500; color: var(--gris); font-size: .75rem; }
.opciones label:hover span { border-color: var(--teal); }
.opciones input:checked + span { background: var(--teal); border-color: var(--teal); color: #fff; transform: scale(1.02); }
.opciones input:checked + span small { color: #D6F5EE; }
.opciones input:focus-visible + span { outline: 3px solid var(--azul-2); outline-offset: 2px; }
.opciones input:disabled + span { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.cita__paso:not([hidden]) { animation: entra .45s var(--ease); }
@keyframes entra { from { opacity: 0; transform: translateX(18px); } }
.cita__fin { margin-top: 22px; padding: 18px; border-radius: 18px; background: var(--menta-suave); display: grid; gap: 14px; }
.cita__resumen { color: var(--azul); font-weight: 600; }
.cita__nav { margin-top: 18px; display: flex; align-items: center; gap: 14px; min-height: 50px; }
.cita__error { color: #B42318; font-size: .9375rem; font-weight: 500; }
@media (min-width: 560px) { .cita { padding: 32px; } .opciones--serv { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .agenda__grid { grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; } .agenda__intro { position: sticky; top: calc(var(--top-h) + 40px); } }

/* ---------- Equipo ---------- */
.equipo__lista { display: grid; gap: 20px; }
.equipo__lista li { border-radius: 24px; overflow: hidden; background: var(--superficie); border: 1px solid var(--linea); padding-bottom: 22px; }
.equipo__lista img, .equipo__mono { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.equipo__mono { display: grid; place-items: center; background: linear-gradient(150deg, var(--menta-suave), #CFE3F7); font: 700 4rem/1 var(--f-tit); color: var(--azul-2); }
.equipo__lista h3 { margin: 18px 22px 0; font-size: 1.1875rem; font-weight: 600; }
.equipo__lista p { margin: 4px 22px 0; color: var(--gris); }
@media (min-width: 640px) { .equipo__lista { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Opiniones ---------- */
.opiniones { background: var(--superficie); }
.opiniones__lista { display: grid; gap: 16px; }
.opiniones__lista li { padding: 28px 24px; border-radius: 24px; background: #fff; border: 1px solid var(--linea); }
.stars { display: flex; gap: 2px; color: #F5B300; }
.stars svg { width: 18px; height: 18px; }
.opiniones blockquote { margin: 16px 0 0; font: 500 1.125rem/1.45 var(--f-tit); color: var(--azul); letter-spacing: -.01em; }
.opiniones__lista p { margin-top: 16px; color: var(--gris); font-size: .9375rem; }
@media (min-width: 860px) { .opiniones__lista { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Cierre + pie ---------- */
.cierre { background: var(--azul); color: #DCE8F7; }
.cierre h2 { color: #fff; }
.cierre__grid { display: grid; gap: 28px; align-items: center; }
.cierre p { margin-top: 10px; }
@media (min-width: 860px) { .cierre__grid { grid-template-columns: 1fr auto; } }
.pie { padding: 36px 0 calc(96px + env(safe-area-inset-bottom)); background: #071E45; color: #B9CBE4; font-size: .9375rem; }
.pie p + p { margin-top: 8px; }
.pie strong { color: #fff; }
.pie a { color: var(--menta); }

.wa-float { position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .7); }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Apariciones ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.serv .reveal.in { transition-delay: calc(var(--i, 0) * 80ms); }
.rm .reveal { transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
