/* =========================================================
   Clínica Dental Muñoz y Revert — Hoja de estilos
   Mobile-first · tokens en :root · sin dependencias
   ========================================================= */

/* ---------- Fuentes (autoalojadas: rendimiento + RGPD) ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../assets/fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url("../assets/fonts/fraunces-italic-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fonts/manrope-latin.woff2") format("woff2");
}

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

  /* Color — contraste AA comprobado sobre --c-bg y --c-surface */
  --c-bg: #FBF8F3;            /* marfil cálido */
  --c-bg-alt: #F4EEE6;        /* arena clara */
  --c-surface: #FFFFFF;
  --c-ink: #142A2C;           /* texto principal (petróleo casi negro) */
  --c-ink-soft: #46595A;      /* texto secundario · 6,9:1 */
  --c-ink-muted: #5C6D6E;     /* texto terciario · 5,1:1 */
  --c-accent: #0F5257;        /* azul petróleo · 8,7:1 sobre blanco */
  --c-accent-strong: #0A3D41;
  --c-accent-soft: #DDEBE8;
  --c-brand: #8BB23B;         /* verde lima del logo */
  --c-accent-2: var(--c-brand); /* solo decorativo o sobre oscuro (no da AA como texto sobre claro) */
  --c-accent-2-soft: #EEF4DE;
  --c-accent-2-light: #A9CC5E; /* lima para fondos oscuros · 7:1 sobre --c-deep */
  --c-accent-2-strong: #6F9128; /* lima oscuro para iconos sobre claro · 3,6:1 */
  --c-deep: #0C3336;          /* secciones oscuras */
  --c-on-dark: #F6F1EA;
  --c-on-dark-soft: #B8CDCB;
  --c-line: #E7DFD4;
  --c-line-strong: #D3C8B9;
  --c-error: #B42318;
  --c-success: #2E8B62;
  --c-wa: #1B9E4B;            /* verde WhatsApp oscurecido para contraste 3:1 */

  /* Tipografía */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  --step-1: clamp(1.125rem, 1.07rem + 0.3vw, 1.3rem);
  --step-2: clamp(1.35rem, 1.22rem + 0.65vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.45rem + 1.5vw, 2.75rem);
  --step-4: clamp(2.1rem, 1.6rem + 2.6vw, 3.6rem);
  --step-hero: clamp(2.65rem, 1.7rem + 4.6vw, 5.4rem);

  /* Espaciado y layout */
  --section-y: clamp(4.5rem, 3rem + 7vw, 8.5rem);
  --gutter: clamp(1rem, 0.6rem + 2vw, 2rem);
  --container: 1220px;
  --header-h: 68px;

  /* Formas */
  --r-sm: 12px;
  --r: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  --shadow-xs: 0 1px 2px rgb(20 42 44 / .06);
  --shadow-sm: 0 1px 2px rgb(20 42 44 / .05), 0 4px 14px -4px rgb(20 42 44 / .1);
  --shadow: 0 2px 6px rgb(20 42 44 / .04), 0 18px 40px -16px rgb(20 42 44 / .2);
  --shadow-lg: 0 4px 10px rgb(15 82 87 / .05), 0 32px 64px -24px rgb(15 82 87 / .34);

  /* Movimiento */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.45, .64, 1);
}
@media (min-width: 1024px) {
  :root { --header-h: 80px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body.menu-open { overflow: hidden; }

img, svg, video, iframe { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
ul[role="list"], ol { list-style: none; padding: 0; }
address { font-style: normal; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 450;
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--c-ink);
  text-wrap: balance;
}
p { text-wrap: pretty; }

::selection { background: var(--c-accent-2-soft); color: var(--c-ink); }

:focus-visible {
  outline: 2.5px solid var(--c-accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.why :focus-visible,
.site-footer :focus-visible { outline-color: var(--c-accent-2-light); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100;
  padding: .75rem 1.25rem;
  border-radius: var(--r-pill);
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  translate: 0 -150%;
  transition: translate .3s var(--ease-out);
}
.skip-link:focus { translate: none; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

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

.muted { color: var(--c-ink-muted); font-size: .88rem; }

/* Marcadores de contenido pendiente */
.todo {
  padding: 1rem 1.25rem;
  border-radius: var(--r);
  border: 1.5px dashed #C98F68;
  background: var(--c-accent-2-soft);
  color: #6B3F22;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.55;
}

/* ---------- Tipografía de sección ---------- */
.eyebrow {
  display: block;
  margin-bottom: 1rem;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-accent);
}
.eyebrow--light { color: var(--c-accent-2-light); }

.section-title { font-size: var(--step-4); max-width: 18ch; }
.section-title em,
.hero__em {
  font-style: italic;
  font-weight: 400;
  color: var(--c-accent);
}
.section-lead {
  max-width: 52ch;
  margin-top: 1.1rem;
  font-size: var(--step-1);
  line-height: 1.6;
  color: var(--c-ink-soft);
}
.section-head { margin-bottom: clamp(2.5rem, 2rem + 2.5vw, 4rem); }
.section-head--center { text-align: center; }
.section-head--center .section-title,
.section-head--center .section-lead { margin-inline: auto; }
.section-head--split { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) {
  .section-head--split {
    grid-template-columns: 1.1fr .9fr;
    gap: 4rem;
    align-items: end;
  }
}

/* ---------- Botones ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--c-ink);
  --tx: 0px;
  --ty: 0px;
  --s: 1;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6em;
  min-height: 48px;
  padding: .8em 1.5em;
  overflow: hidden;
  border: 1.5px solid transparent;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: .975rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .005em;
  text-align: center;
  text-decoration: none;
  transform: translate3d(var(--tx), var(--ty), 0) scale(var(--s));
  transition:
    transform .5s var(--ease-out),
    background-color .3s,
    color .3s,
    border-color .3s,
    box-shadow .45s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { --s: .975; }
.btn .icon { transition: transform .45s var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }

.btn--primary {
  --btn-bg: var(--c-accent);
  --btn-fg: #fff;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 10px 24px -10px rgb(15 82 87 / .6);
}
.btn--primary:hover {
  --btn-bg: var(--c-accent-strong);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .16), 0 18px 34px -12px rgb(15 82 87 / .65);
}
/* Botón de marca (lima del logo y la fachada) para fondos oscuros · texto 7,4:1 */
.btn--brand {
  --btn-bg: var(--c-accent-2-light);
  --btn-fg: var(--c-deep);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 10px 28px -12px rgb(169 204 94 / .55);
}
.btn--brand:hover { --btn-bg: #BCDA74; box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), 0 18px 34px -12px rgb(169 204 94 / .6); }
/* Secundario sobre fondo oscuro (sin backdrop-filter: el vídeo de detrás se mueve) */
.btn--glass {
  --btn-bg: rgb(4 14 16 / .35);
  --btn-fg: #fff;
  border-color: rgb(255 255 255 / .5);
}
.btn--glass:hover { --btn-bg: rgb(4 14 16 / .55); border-color: #fff; }

/* Brillo que recorre el botón */
.btn--primary::after,
.btn--brand::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .3) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .9s var(--ease-out);
}
.btn--primary:hover::after,
.btn--brand:hover::after { transform: translateX(120%); }

.btn--ghost {
  --btn-bg: rgb(255 255 255 / .62);
  --btn-fg: var(--c-accent-strong);
  border-color: var(--c-line-strong);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { --btn-bg: #fff; border-color: var(--c-accent); }

.btn--sm { min-height: 42px; padding: .55em 1.15em; font-size: .92rem; }
.btn--lg { min-height: 56px; padding: 1em 1.75em; font-size: 1.02rem; }
.btn--block { width: 100%; }

/* ---------- Cabecera ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--header-h);
  transition: background-color .4s, box-shadow .4s;
}
.site-header.is-scrolled,
body.menu-open .site-header {
  background: rgb(251 248 243 / .8);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 rgb(20 42 44 / .06), 0 10px 30px -22px rgb(20 42 44 / .3);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-right: auto;
  color: var(--c-ink);
  text-decoration: none;
}
.brand__logo {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--c-line), 0 6px 14px -6px rgb(20 42 44 / .25);
  transition: transform .7s var(--ease-spring);
}
.brand:hover .brand__logo { transform: rotate(-8deg); }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__kicker {
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
}
.brand__name {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -.01em;
}
.brand--light { color: var(--c-on-dark); }
.brand--light .brand__logo { box-shadow: none; }
.brand--light .brand__kicker { color: var(--c-on-dark-soft); }

.site-nav { display: none; }
.site-nav__list { display: flex; gap: .15rem; padding: 0; list-style: none; }
.site-nav a {
  position: relative;
  display: block;
  padding: .55rem .8rem;
  border-radius: var(--r-pill);
  color: var(--c-ink-soft);
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  transition: color .25s;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: .8rem;
  right: .8rem;
  bottom: .32rem;
  height: 1.5px;
  background: var(--c-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.site-nav a:hover,
.site-nav a.is-active { color: var(--c-ink); }
.site-nav a:hover::after,
.site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }

.site-header__actions { display: flex; align-items: center; gap: .5rem; }

.header-phone {
  display: none;
  align-items: center;
  gap: .45rem;
  padding: .5rem .75rem;
  color: var(--c-accent-strong);
  font-size: .93rem;
  font-weight: 700;
  text-decoration: none;
}
.header-phone:hover { text-decoration: underline; }

.menu-toggle {
  display: inline-grid;
  place-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: rgb(255 255 255 / .7);
}
.menu-toggle__bar {
  display: block;
  width: 18px;
  height: 1.75px;
  border-radius: 2px;
  background: var(--c-ink);
  transition: transform .45s var(--ease-out);
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:first-child { transform: translateY(3.9px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:last-child { transform: translateY(-3.9px) rotate(-45deg); }

/* Cabecera sobre el vídeo del hero: textos claros hasta que se hace scroll o se abre el menú */
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .brand,
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .header-phone,
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .site-nav a:hover,
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .site-nav a.is-active { color: #fff; }
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .brand__kicker { color: rgb(255 255 255 / .78); }
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .site-nav a { color: rgb(255 255 255 / .86); }
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .site-nav a::after { background: var(--c-accent-2-light); }
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .btn--primary { --btn-bg: var(--c-accent-2-light); --btn-fg: var(--c-deep); }
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .btn--primary:hover { --btn-bg: #BCDA74; }
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .menu-toggle { border-color: rgb(255 255 255 / .4); background: rgb(4 14 16 / .35); }
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) .menu-toggle__bar { background: #fff; }
body:not(.menu-open) .site-header--overlay:not(.is-scrolled) :focus-visible { outline-color: var(--c-accent-2-light); }

@media (min-width: 1024px) {
  .site-nav { display: block; }
  .menu-toggle { display: none; }
}
@media (min-width: 1200px) {
  .header-phone { display: inline-flex; }
}
@media (max-width: 400px) {
  .brand { gap: .5rem; }
  .brand__logo { width: 38px; height: 38px; }
  .brand__name { font-size: 1.05rem; }
  .brand__kicker { font-size: .58rem; letter-spacing: .18em; }
  .site-header__actions .btn--sm { padding-inline: .9em; font-size: .88rem; }
}

/* Menú móvil */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
  padding: calc(var(--header-h) + 1.5rem) var(--gutter) calc(2rem + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--c-bg);
  opacity: 0;
  transition: opacity .35s var(--ease-out);
}
.mobile-menu.is-open { opacity: 1; }
.mobile-menu__list { padding: 0; list-style: none; }
.mobile-menu__list li {
  opacity: 0;
  translate: 0 14px;
  transition: opacity .5s var(--ease-out), translate .6s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 45ms + 80ms);
}
.mobile-menu.is-open .mobile-menu__list li { opacity: 1; translate: none; }
.mobile-menu__list a {
  display: block;
  padding: .55rem 0;
  border-bottom: 1px solid var(--c-line);
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.3rem + 2vw, 2.3rem);
  line-height: 1.2;
  text-decoration: none;
}
.mobile-menu__contact { display: grid; gap: .75rem; }
.mobile-menu__hours { text-align: center; color: var(--c-ink-muted); font-size: .9rem; }
@media (min-width: 1024px) {
  .mobile-menu { display: none !important; }
}

/* ---------- Hero con intro en vídeo ---------- */
/* El vídeo (o su póster) cubre la pantalla y el texto va encima en blanco.
   Estados en <html>, fijados antes del primer pintado por el script en línea del hero:
   .intro-pending → el intro se está reproduciendo: texto oculto, botón "Saltar intro" visible
   .intro-off     → sesión ya vista o movimiento reducido: póster y texto desde el inicio */
.hero {
  --hero-focus: 50% 50%; /* encuadre compartido por vídeo y póster: así nunca hay saltos */
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding: calc(var(--header-h) + 3rem) 0 clamp(3.5rem, 2.5rem + 4vw, 6rem);
  overflow: hidden;
  background: #071416;
  color: #fff;
}
@media (orientation: portrait) {
  .hero { --hero-focus: 35% 50%; }
}

.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__poster,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero__poster {
  background: #071416 url("../assets/img/poster-fachada.webp") var(--hero-focus) / cover no-repeat;
}
.hero__video {
  object-fit: cover;
  object-position: var(--hero-focus);
  transition: opacity .8s var(--ease-in-out);
}
/* Mientras el intro arranca se ve el póster (precargado para el LCP) y el vídeo entra con un fundido.
   Al saltar el intro, o si falla, se funde hacia el póster, que es su último fotograma. */
.intro-pending .hero:not(.is-playing) .hero__video,
.hero.is-poster .hero__video { opacity: 0; }

/* Franja superior fija: contraste del header sobre cualquier fotograma */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 32%;
  background: linear-gradient(to bottom, rgb(4 14 16 / .62), rgb(4 14 16 / 0));
  pointer-events: none;
}
/* Degradado bajo el texto (contraste AA); se aligera durante el vuelo y se asienta al revelar */
.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgb(4 14 16 / .92) 0%, rgb(4 14 16 / .8) 42%, rgb(4 14 16 / .56) 70%, rgb(4 14 16 / 0) 92%);
  transition: opacity 1.4s var(--ease-in-out);
}
.intro-pending .hero__shade { opacity: .35; }
@media (min-width: 1024px) {
  .hero__shade {
    background:
      linear-gradient(90deg, rgb(4 14 16 / .86) 0%, rgb(4 14 16 / .76) 34%, rgb(4 14 16 / .58) 50%, rgb(4 14 16 / .16) 72%, rgb(4 14 16 / 0) 88%),
      linear-gradient(to top, rgb(4 14 16 / .55) 0%, rgb(4 14 16 / 0) 38%);
  }
}

.hero__content {
  max-width: 40rem;
  text-shadow: 0 1px 2px rgb(0 0 0 / .25), 0 2px 18px rgb(0 0 0 / .3);
}
.hero :focus-visible { outline-color: var(--c-accent-2-light); }
.hero__eyebrow { margin-bottom: 1.25rem; }

.hero__title {
  max-width: 13ch;
  margin-bottom: 1.5rem;
  color: #fff;
  font-size: var(--step-hero);
  font-weight: 400;
  line-height: 1.03;
  letter-spacing: -.028em;
}
.hero .hero__em { color: var(--c-accent-2-light); }
/* Revelado palabra a palabra */
.hero__title .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-block: .06em .16em;
  margin-block: -.06em -.16em;
}
.hero__title .w > span {
  display: inline-block;
  transform: translate3d(0, 108%, 0);
  animation: word-up 1s var(--ease-out) forwards;
  animation-delay: calc(.05s + var(--i) * .06s);
}
.hero__em .w { padding-right: .08em; margin-right: -.08em; }

.hero__lead {
  max-width: 46ch;
  color: rgb(255 255 255 / .9);
  font-size: var(--step-1);
  line-height: 1.6;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 2rem;
  text-shadow: none;
}
.hero__ctas .btn { flex: 1 1 auto; }
.hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  margin-top: 1.75rem;
  padding: 0;
  list-style: none;
  color: rgb(255 255 255 / .85);
  font-size: var(--step--1);
  font-weight: 600;
}
.hero__trust li { display: inline-flex; align-items: center; gap: .5rem; }
.hero__trust .icon { color: var(--c-accent-2-light); }
.hero__status strong { color: #fff; font-weight: 800; }

.load-in {
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  animation: fade-up 1.1s var(--ease-out) forwards;
  animation-delay: var(--d, 0s);
}

/* Durante el intro el texto espera (oculto también para teclado y lectores de pantalla).
   Al quitar .intro-pending, las animaciones arrancan en ese instante con su escalonado. */
.intro-pending .hero__content { visibility: hidden; }
.intro-pending .hero__title .w > span,
.intro-pending .load-in { animation: none; }
/* Visitas posteriores y movimiento reducido: texto visible desde el primer pintado */
.intro-off .hero__title .w > span,
.intro-off .load-in { animation: none; opacity: 1; transform: none; }

.status-dot {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgb(255 255 255 / .55);
}
.is-open .status-dot { background: var(--c-accent-2-light); }
.is-open .status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 2px solid var(--c-accent-2-light);
  border-radius: 50%;
  animation: pulse 2.2s var(--ease-out) infinite;
}

/* Botón "Saltar intro": visible desde t=0 mientras dura el intro */
.intro-skip {
  position: absolute;
  top: calc(var(--header-h) + 1rem);
  right: max(var(--gutter), (100% - var(--container)) / 2);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .55rem 1.1rem;
  border: 1px solid rgb(255 255 255 / .45);
  border-radius: var(--r-pill);
  background: rgb(4 14 16 / .5);
  color: #fff;
  font-size: .9rem;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s, visibility 0s .4s, background-color .3s, border-color .3s;
}
.intro-skip .icon { width: 1.1em; height: 1.1em; }
.intro-skip:hover { border-color: #fff; background: rgb(4 14 16 / .7); }
.intro-pending .intro-skip {
  opacity: 1;
  visibility: visible;
  transition: opacity .4s, background-color .3s, border-color .3s;
}

.hero__scroll { display: none; }

@media (min-width: 640px) {
  .hero__ctas .btn { flex: 0 0 auto; }
}
@media (min-width: 1024px) {
  .hero__scroll {
    position: absolute;
    left: 50%;
    bottom: 26px;
    display: block;
    width: 26px;
    height: 42px;
    border: 1.5px solid rgb(255 255 255 / .5);
    border-radius: 20px;
    translate: -50% 0;
    transition: opacity .6s;
  }
  .hero__scroll span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    border-radius: 4px;
    background: var(--c-accent-2-light);
    translate: -50% 0;
    animation: scroll-dot 2s var(--ease-in-out) infinite;
  }
  .intro-pending .hero__scroll { opacity: 0; }
}

/* ---------- Placeholders de imagen ---------- */
.ph {
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: .6rem;
  padding: 1.25rem;
  overflow: hidden;
  color: var(--c-accent-strong);
  text-align: center;
  background:
    radial-gradient(120% 90% at 15% 0%, rgb(255 255 255 / .75), transparent 55%),
    linear-gradient(150deg, #D6E8E4 0%, #ECE4D8 52%, #E6EDD4 100%);
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgb(15 82 87 / .045) 0 1px, transparent 1px 16px);
  pointer-events: none;
}
.ph__icon {
  position: relative;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .65;
}
.ph__label {
  position: relative;
  padding: .45rem .9rem;
  border: 1px dashed rgb(15 82 87 / .38);
  border-radius: 14px;
  background: rgb(255 255 255 / .75);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1.4;
}
.ph__label small { font-size: .92em; font-weight: 600; letter-spacing: .02em; opacity: .85; }
.ph--portrait { aspect-ratio: 4 / 5; }

/* ---------- Servicios ---------- */
.services__grid { display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}
@media (min-width: 1024px) {
  .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}

.service-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.75rem;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-xs);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), border-color .4s;
}
/* Foco de luz que sigue al cursor */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgb(139 178 59 / .16), transparent 45%);
  opacity: 0;
  transition: opacity .5s;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgb(15 82 87 / .18);
  box-shadow: var(--shadow-lg);
}
.service-card:hover::before { opacity: 1; }
.service-card:has(.service-card__link:focus-visible) {
  outline: 2.5px solid var(--c-accent);
  outline-offset: 3px;
}

.service-card__icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  transition: background-color .5s, color .5s, transform .7s var(--ease-spring);
}
.service-card__icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service-card:hover .service-card__icon {
  background: var(--c-accent);
  color: #fff;
  transform: rotate(-6deg) scale(1.05);
}
.service-card:hover .icon-draw { animation: draw 1.2s var(--ease-in-out); }

.service-card__title { font-size: var(--step-2); font-weight: 450; }
.service-card__text { color: var(--c-ink-soft); font-size: .98rem; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: auto;
  padding-top: .25rem;
}
.tags li {
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  background: var(--c-bg-alt);
  color: var(--c-ink-soft);
  font-size: .78rem;
  font-weight: 700;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: .35rem;
  color: var(--c-accent);
  font-size: .93rem;
  font-weight: 800;
  text-decoration: none;
}
.service-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.service-card__link:focus-visible { outline: none; }
.service-card__link .icon { transition: transform .45s var(--ease-out); }
.service-card:hover .service-card__link .icon { transform: translateX(5px); }

/* Iconos que se dibujan */
.icon-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.6s .2s var(--ease-in-out);
}
.js [data-reveal]:not(.is-visible) .icon-draw { stroke-dashoffset: 1; }

/* ---------- Por qué elegirnos (sección oscura) ---------- */
.why {
  isolation: isolate;
  overflow: hidden;
  background: var(--c-deep);
  color: var(--c-on-dark);
}
.why::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 50% at 90% 0%, rgb(169 204 94 / .16), transparent 70%),
    radial-gradient(50% 60% at 0% 100%, rgb(64 140 140 / .24), transparent 70%);
}
.why::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  pointer-events: none;
}
.why .section-title { color: var(--c-on-dark); }
.why .section-title em { color: var(--c-accent-2-light); }
.why .section-lead { color: var(--c-on-dark-soft); }

.why__inner { display: grid; gap: 3.5rem; }
@media (min-width: 1024px) {
  .why__inner { grid-template-columns: .95fr 1.05fr; gap: 5rem; align-items: center; }
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgb(255 255 255 / .12);
}
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: .4rem; }
.stat dd {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.4rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--c-accent-2-light);
}
.stat dt { color: var(--c-on-dark-soft); font-size: .82rem; font-weight: 600; line-height: 1.35; }

.why__list { display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .why__list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .why-item:nth-child(even) { margin-top: 2.5rem; margin-bottom: -2.5rem; }
}
.why-item {
  padding: 1.75rem;
  border: 1px solid rgb(255 255 255 / .09);
  border-radius: var(--r-lg);
  background: rgb(255 255 255 / .04);
  transition: transform .6s var(--ease-out), background-color .5s, border-color .5s;
}
.why-item:hover {
  transform: translateY(-4px);
  border-color: rgb(169 204 94 / .4);
  background: rgb(255 255 255 / .07);
}
.why-item__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  background: rgb(169 204 94 / .14);
  color: var(--c-accent-2-light);
}
.why-item__icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.why-item h3 { margin-bottom: .5rem; color: var(--c-on-dark); font-size: var(--step-1); font-weight: 500; }
.why-item p { color: var(--c-on-dark-soft); font-size: .96rem; }

/* ---------- Clínica y equipo ---------- */
.team__grid { display: grid; gap: 1.25rem; }
@media (min-width: 640px) {
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .team__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; }
}
.team-card {
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.team-card > .ph,
.team-card > img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: scale 1.2s var(--ease-out);
}
.team-card:hover > .ph,
.team-card:hover > img { scale: 1.03; }
.team-card__body { position: relative; padding: 1.25rem 1.5rem 1.5rem; background: var(--c-surface); }
.team-card__name { font-size: var(--step-1); font-weight: 500; }
.team-card__role { margin-top: .25rem; color: var(--c-accent); font-size: .9rem; font-weight: 700; }
.team-card__meta { margin-top: .5rem; color: var(--c-ink-muted); font-size: .82rem; }

.gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
}
.gallery__item {
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: var(--r-lg);
}
.gallery__item > .ph,
.gallery__item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery__item--feature { grid-column: span 2; aspect-ratio: 16 / 10; }
.gallery__item--feature > .ph,
.gallery__item--feature > img { height: 116%; margin-top: -8%; }
.gallery__item--wide { grid-column: span 2; aspect-ratio: 16 / 9; }
@media (min-width: 1024px) {
  .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(2, clamp(200px, 18vw, 260px));
    gap: 1.25rem;
  }
  .gallery__item { aspect-ratio: auto; }
  .gallery__item--feature { grid-column: span 2; grid-row: span 2; }
  .gallery__item--wide { grid-column: span 2; }
}

/* ---------- Opiniones ---------- */
.reviews { background: var(--c-bg-alt); }
.reviews__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .5rem 1rem;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2.5rem;
  padding: .75rem 1.4rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  font-size: .95rem;
  text-align: center;
}
.reviews__stars { display: flex; gap: 2px; color: var(--c-accent-2-strong); }
.reviews__stars .icon { width: 18px; height: 18px; }

.reviews__grid { display: grid; gap: 1rem; }
@media (min-width: 768px) {
  .reviews__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}
.review-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 1.75rem 1.75rem;
  border: 1.5px dashed var(--c-line-strong);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.review-card__quote { width: 32px; height: 32px; color: var(--c-accent-2); }
.review-card blockquote p {
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.45;
  color: var(--c-ink-soft);
}
.review-card__author {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: auto;
  font-size: .9rem;
}
.review-card__author > span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.review-card__author > span:last-child span { color: var(--c-ink-muted); font-size: .84rem; }
.review-card__avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-accent-soft);
  color: var(--c-accent);
  font-weight: 800;
}
.reviews__cta { margin-top: 2.5rem; text-align: center; }

/* ---------- Pedir cita ---------- */
.booking { overflow: hidden; }
.booking::before {
  content: "";
  position: absolute;
  top: 10%;
  right: -10%;
  width: min(70vw, 640px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(221 235 232 / .9), transparent);
  pointer-events: none;
}
.booking__inner { position: relative; display: grid; gap: 3rem; }
@media (min-width: 1024px) {
  .booking__inner { grid-template-columns: .9fr 1.1fr; gap: 5rem; align-items: start; }
  .booking__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.steps { position: relative; display: grid; gap: 2rem; padding: 0; list-style: none; }
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 23.25px;
  width: 1.5px;
  background: var(--c-line-strong);
}
.steps::after {
  background: var(--c-accent);
  transform-origin: top;
  transition: scale 1.8s .35s var(--ease-in-out);
}
.js .steps:not(.is-visible)::after { scale: 1 0; }

.step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1.25rem;
  align-items: start;
}
.step__num {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--c-accent);
  border-radius: 50%;
  background: var(--c-surface);
  box-shadow: 0 0 0 6px var(--c-bg);
  color: var(--c-accent);
  font-family: var(--font-display);
  font-size: 1.25rem;
  transition: background-color .5s, color .5s;
}
.steps.is-visible .step__num,
.no-js .step__num { background: var(--c-accent); color: #fff; }
.steps.is-visible .step:nth-child(1) .step__num { transition-delay: .35s; }
.steps.is-visible .step:nth-child(2) .step__num { transition-delay: 1.05s; }
.steps.is-visible .step:nth-child(3) .step__num { transition-delay: 1.85s; }
.step h3 { margin-bottom: .3rem; padding-top: .6rem; font-size: var(--step-1); font-weight: 500; }
.step p { color: var(--c-ink-soft); font-size: .97rem; }

.booking__direct {
  margin-top: 2.5rem;
  padding: 1.5rem;
  border-radius: var(--r-lg);
  background: var(--c-bg-alt);
}
.booking__direct > p { margin-bottom: .9rem; font-weight: 700; }
.booking__direct-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .55rem 1rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  background: var(--c-surface);
  color: var(--c-accent-strong);
  font-size: .92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform .4s var(--ease-out), border-color .3s, box-shadow .4s;
}
.chip-link:hover { transform: translateY(-2px); border-color: var(--c-accent); box-shadow: var(--shadow-sm); }
.chip-link--wa .icon { color: var(--c-wa); }

/* Formulario */
.form-card {
  position: relative;
  padding: clamp(1.5rem, 1rem + 2.5vw, 2.75rem);
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  background: var(--c-surface);
  box-shadow: var(--shadow-lg);
}
.form-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(140deg, rgb(15 82 87 / .4), transparent 38%, transparent 62%, rgb(139 178 59 / .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
.form { display: grid; gap: 1.15rem; }
.form__title { font-size: var(--step-2); font-weight: 500; }
.form__subtitle { margin-top: .25rem; color: var(--c-ink-soft); font-size: .95rem; }

.field { display: grid; gap: .4rem; }
.field > label { font-size: .9rem; font-weight: 700; }
.field__optional { color: var(--c-ink-muted); font-weight: 500; }
.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  padding: .8rem 1rem;
  border: 1.5px solid var(--c-line-strong);
  border-radius: 14px;
  background: var(--c-bg);
  font-size: 1rem;
  transition: border-color .25s, box-shadow .25s, background-color .25s;
}
.field input:not([type="checkbox"]):hover,
.field select:hover,
.field textarea:hover { border-color: #B9AC9B; }
.field input:not([type="checkbox"]):focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgb(15 82 87 / .15);
}
.field textarea { min-height: 104px; resize: vertical; }
.field select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F5257' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px;
  cursor: pointer;
}
.field [aria-invalid="true"] { border-color: var(--c-error) !important; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgb(180 35 24 / .14) !important; }
.field__error { color: var(--c-error); font-size: .84rem; font-weight: 700; }
.field__error:empty { display: none; }
.field__hint { color: var(--c-ink-muted); font-size: .82rem; line-height: 1.5; }
.field.is-highlight select { animation: ring 1.6s var(--ease-out); }

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: .75rem;
}
.field--check input {
  width: 22px;
  height: 22px;
  margin-top: .1rem;
  accent-color: var(--c-accent);
  cursor: pointer;
}
.field--check label { color: var(--c-ink-soft); font-size: .92rem; font-weight: 500; cursor: pointer; }
.field--check a { color: var(--c-accent); font-weight: 700; }
.field--check .field__error { grid-column: 1 / -1; }

.form__legal {
  padding: .8rem 1rem;
  border-radius: 12px;
  background: var(--c-bg);
  color: var(--c-ink-muted);
  font-size: .76rem;
  line-height: 1.55;
}
.form__legal a { color: inherit; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.btn__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgb(255 255 255 / .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn.is-loading { pointer-events: none; }
.btn.is-loading .btn__spinner { display: inline-block; }

.form__status { font-size: .9rem; font-weight: 700; text-align: center; }
.form__status:empty { display: none; }
.form__status.is-error { color: var(--c-error); }

.form-success {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 2rem 0;
  text-align: center;
}
.form-success:focus { outline: none; }
.form-success__icon {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--c-accent-soft);
  color: var(--c-accent);
}
.form-success__icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.form-success:not([hidden]) .icon-draw { animation: draw 1s .15s var(--ease-out) both; }
.form-success h3 { font-size: var(--step-3); }
.form-success p { max-width: 40ch; color: var(--c-ink-soft); }

/* ---------- Ubicación y contacto ---------- */
.contact { background: var(--c-bg-alt); }
.contact__grid { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) {
  .contact__grid { grid-template-columns: 1.35fr 1fr; gap: 2rem; align-items: stretch; }
}

.map {
  position: relative;
  min-width: 0;
  height: clamp(340px, 90vw, 480px);
  overflow: hidden;
  border-radius: var(--r-xl);
  background: #EFE8DD;
  box-shadow: var(--shadow);
}
@media (min-width: 1024px) {
  .map { height: auto; min-height: 500px; }
}
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__facade { position: absolute; inset: 0; }
.map__art { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__pin {
  position: absolute;
  top: 40%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50% 50% 50% 0;
  background: var(--c-accent);
  box-shadow: var(--shadow-lg);
  translate: -50% -50%;
  rotate: -45deg;
}
.map__pin .icon { width: 26px; height: 26px; color: #fff; rotate: 45deg; }
.map__pin::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid var(--c-accent);
  border-radius: inherit;
  opacity: 0;
  animation: pulse 2.6s var(--ease-out) infinite;
}
.map__cta {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .6rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgb(255 255 255 / .85);
  border-radius: var(--r);
  background: rgb(255 255 255 / .78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.map__cta p { color: var(--c-ink-soft); font-size: .8rem; line-height: 1.45; }
.map__cta a { color: var(--c-accent); font-weight: 700; }
@media (min-width: 640px) {
  .map__cta { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
  .map__cta p { max-width: 30ch; text-align: right; }
}

.contact__list { display: grid; gap: 1rem; }
@media (min-width: 640px) and (max-width: 1023px) {
  .contact__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.contact-item {
  display: flex;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out);
}
.contact-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.contact-item > div { flex: 1; min-width: 0; }
.contact-item__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--c-accent-soft);
  color: var(--c-accent);
}
.contact-item__icon .icon { width: 22px; height: 22px; }
.contact-item h3 {
  margin-bottom: .35rem;
  color: var(--c-ink-muted);
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.contact-item address { font-weight: 600; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-top: .5rem;
  color: var(--c-accent);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: rgb(15 82 87 / .3);
  transition: text-decoration-color .25s;
}
.text-link:hover { text-decoration-color: currentColor; }
.text-link--plain {
  margin-top: 0;
  color: var(--c-ink);
  font-size: 1.08rem;
  text-decoration: none;
}
.text-link--plain:hover { color: var(--c-accent); text-decoration: underline; }

.hours { display: grid; gap: .25rem; }
.hours div { display: flex; justify-content: space-between; gap: 1rem; font-size: .95rem; }
.hours dt { color: var(--c-ink-soft); }
.hours dd { font-weight: 800; font-variant-numeric: tabular-nums; }

.socials { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.socials a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--c-accent);
  font-weight: 800;
  text-decoration: none;
}
.socials a:hover { text-decoration: underline; }

/* ---------- Pie ---------- */
.site-footer {
  padding: 4.5rem 0 calc(6.5rem + env(safe-area-inset-bottom));
  background: var(--c-deep);
  color: var(--c-on-dark-soft);
  font-size: .93rem;
}
@media (min-width: 768px) {
  .site-footer { padding-bottom: 2rem; }
}
.footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 640px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 3rem; }
}
.footer__brand p { max-width: 36ch; margin-top: 1rem; }
.footer__title {
  margin-bottom: 1rem;
  color: var(--c-on-dark);
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.footer__list { display: grid; gap: .55rem; }
.site-footer a,
.footer__link-btn {
  color: var(--c-on-dark-soft);
  text-decoration: none;
  transition: color .25s;
}
.site-footer a:hover,
.footer__link-btn:hover { color: var(--c-on-dark); text-decoration: underline; }
.site-footer .brand { color: var(--c-on-dark); }
.site-footer .brand:hover { text-decoration: none; }
.footer__social { display: flex; gap: .5rem; margin-top: 1.25rem; }
.footer__social a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgb(255 255 255 / .16);
  border-radius: 50%;
  transition: color .25s, border-color .25s, transform .4s var(--ease-out);
}
.footer__social a:hover { border-color: var(--c-accent-2-light); color: var(--c-accent-2-light); transform: translateY(-2px); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 2rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgb(255 255 255 / .1);
  font-size: .82rem;
}

/* ---------- Botones flotantes ---------- */
.fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .75rem;
  translate: 0 var(--fab-offset, 0px);
  transition: translate .5s var(--ease-out);
  animation: fade-up .8s 1.5s var(--ease-out) both;
}
.fab__btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 12px 28px -8px rgb(20 42 44 / .45);
  transition: transform .45s var(--ease-spring), box-shadow .4s;
}
.fab__btn .icon { width: 26px; height: 26px; }
.fab__btn:hover { transform: scale(1.07); }
.fab__btn--call { background: var(--c-accent); }
.fab__btn--wa { background: var(--c-wa); }
/* Pulso con transform/opacity: se anima en el compositor, sin repintar en el hilo principal */
.fab__btn--wa::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 50%;
  background: var(--c-wa);
  opacity: 0;
  animation: wa-pulse 3s 3s var(--ease-out) infinite;
}
.fab__label {
  position: absolute;
  top: 50%;
  right: calc(100% + .75rem);
  padding: .5rem .9rem;
  border-radius: var(--r-pill);
  background: var(--c-surface);
  box-shadow: var(--shadow);
  color: var(--c-ink);
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  translate: 8px -50%;
  pointer-events: none;
  transition: opacity .3s, translate .45s var(--ease-out);
}
@media (hover: hover) {
  .fab__btn--wa:hover .fab__label { opacity: 1; translate: 0 -50%; }
}
.fab__btn--wa:focus-visible .fab__label { opacity: 1; translate: 0 -50%; }
@media (min-width: 768px) {
  .fab__btn--call { display: none; }
}

/* ---------- Banner de cookies ---------- */
.cookie {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 60;
  padding: 1.25rem;
  border: 1px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--c-surface); /* opaco: sin backdrop-filter, que se repinta en cada frame de la transición */
  box-shadow: var(--shadow-lg);
  color: var(--c-ink-soft);
  font-size: .88rem;
  line-height: 1.55;
  opacity: 0;
  translate: 0 calc(100% + 24px);
  transition: translate .6s var(--ease-out), opacity .4s;
}
.cookie.is-visible { opacity: 1; translate: none; }
.cookie__title { margin-bottom: .35rem; color: var(--c-ink); font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }
.cookie a { color: var(--c-accent); font-weight: 700; }
.cookie__actions { display: flex; gap: .5rem; margin-top: 1rem; }
.cookie__actions .btn { flex: 1; }
/* En escritorio: barra compacta centrada que no tapa los CTA del hero ni el botón de WhatsApp */
@media (min-width: 768px) {
  .cookie {
    left: 50%;
    right: auto;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: min(800px, 100% - 190px);
    padding: .9rem 1rem .9rem 1.5rem;
    border-radius: var(--r);
    translate: -50% calc(100% + 24px);
  }
  .cookie.is-visible { translate: -50% 0; }
  .cookie__title { margin-bottom: .1rem; font-size: 1rem; }
  .cookie__text p:last-child { font-size: .84rem; line-height: 1.45; }
  .cookie__actions { flex: none; margin-top: 0; }
  .cookie__actions .btn { flex: none; }
}

/* ---------- Animaciones al hacer scroll ---------- */
.js [data-reveal] {
  --rd: calc(var(--stagger, 0) * 90ms);
  opacity: 0;
  translate: 0 32px;
  transition-property: opacity, translate, scale, transform, box-shadow, border-color, background-color;
  transition-duration: 1s, 1.1s, 1.1s, .6s, .6s, .4s, .4s;
  transition-timing-function: var(--ease-out);
  transition-delay: var(--rd), var(--rd), var(--rd), 0s, 0s, 0s, 0s;
}
.js [data-reveal="scale"] { translate: 0 20px; scale: .965; }
.js [data-reveal].is-visible { opacity: 1; translate: none; scale: none; }

/* ---------- Páginas legales y auxiliares ---------- */
.page-simple .site-header { background: rgb(251 248 243 / .9); box-shadow: 0 1px 0 rgb(20 42 44 / .06); }
.legal { padding: calc(var(--header-h) + clamp(2.5rem, 2rem + 3vw, 4.5rem)) 0 clamp(4rem, 3rem + 4vw, 6rem); }
.legal__inner { max-width: 780px; }
.legal h1 { margin-bottom: 1rem; font-size: var(--step-4); }
.legal h2 { margin: 2.75rem 0 .85rem; font-size: var(--step-2); }
.legal h3 { margin: 1.75rem 0 .5rem; font-size: var(--step-1); }
.legal p,
.legal li { margin-bottom: .85rem; color: var(--c-ink-soft); }
.legal ul { padding-left: 1.25rem; }
.legal a { color: var(--c-accent); font-weight: 700; }
.legal__updated { color: var(--c-ink-muted); font-size: .9rem; }
.link-btn { color: var(--c-accent); font-weight: 700; text-decoration: underline; text-underline-offset: .22em; }
.flag {
  display: inline-block;
  padding: .1rem .5rem;
  border-radius: 6px;
  background: var(--c-accent-2-soft);
  color: #6B3F22;
  font-size: .8em;
  font-weight: 800;
  letter-spacing: .03em;
}
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; border: 1px solid var(--c-line); border-radius: var(--r); }
.legal table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .9rem; }
.legal th,
.legal td { padding: .8rem 1rem; border-bottom: 1px solid var(--c-line); text-align: left; vertical-align: top; color: var(--c-ink-soft); }
.legal th { background: var(--c-bg-alt); color: var(--c-ink); font-weight: 800; }
.legal tr:last-child td { border-bottom: 0; }

.simple-hero {
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: calc(var(--header-h) + 2rem) var(--gutter) 3rem;
  text-align: center;
}
.simple-hero__inner { display: grid; justify-items: center; gap: 1.25rem; max-width: 560px; }
.simple-hero h1 { font-size: var(--step-4); }
.simple-hero p { color: var(--c-ink-soft); font-size: var(--step-1); }
.simple-hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: .5rem; }

/* ---------- Keyframes ---------- */
@keyframes word-up { to { transform: none; } }
@keyframes fade-up { to { opacity: 1; transform: none; } }
@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes float {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, -8px, 0); }
}
@keyframes pulse {
  0% { opacity: .8; transform: scale(.8); }
  100% { opacity: 0; transform: scale(1.8); }
}
@keyframes wa-pulse {
  0% { opacity: .45; transform: scale(1); }
  70%, 100% { opacity: 0; transform: scale(1.55); }
}
@keyframes ring {
  0% { box-shadow: 0 0 0 0 rgb(139 178 59 / .6); }
  100% { box-shadow: 0 0 0 12px rgb(139 178 59 / 0); }
}
@keyframes scroll-dot {
  0% { opacity: 0; translate: -50% 0; }
  30% { opacity: 1; }
  100% { opacity: 0; translate: -50% 14px; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; translate: none; scale: none; }
  .hero__title .w > span,
  .load-in { animation: none; opacity: 1; transform: none; }
  .fab__btn--wa::before,
  .map__pin::after,
  .is-open .status-dot::after,
  .hero__scroll span { animation: none; }
  .js .steps:not(.is-visible)::after { scale: 1 1; }
  .js [data-reveal]:not(.is-visible) .icon-draw { stroke-dashoffset: 0; }
}
