/* ══════════════════════════════════════════════════════════════════════════
   SEREYA — hoja de estilos única
   BEM: block__element--modifier · estados .is-* (los alterna el JS)
   Los hooks .js-* NUNCA se estilizan.

   TABLA DE CONTENIDOS
   01 · Tokens (:root)
   02 · Reset y base
   03 · Accesibilidad
   04 · Tipografía y layout
   05 · Botones
   06 · Encabezado y navegación
   07 · Hero
   08 · Destacados
   09 · Servicios
   10 · Equipo
   11 · Reseñas
   12 · Agenda y formulario
   13 · Pie de página
   14 · Revelado (fail-safe)
   15 · Páginas legales (.page-legal)
   16 · Utilidades
   17 · Impresión
   ══════════════════════════════════════════════════════════════════════════ */


/* ══ 01 · TOKENS ═════════════════════════════════════════════════════════ */

:root {
  /* Marca — rosa palo / ladrillo, derivados en oklch() */
  --brand:        oklch(0.601 0.117 17.1);
  --brand-deep:   oklch(0.541 0.117 15.6);
  --brand-soft:   oklch(0.795 0.075 14.7);
  --brick:        oklch(0.477 0.107 15.8);
  --glow:         oklch(0.505 0.119 269.7);

  /* Superficies */
  --bg:           oklch(0.960 0.011 54.5);
  --surface:      oklch(0.974 0.008 56.3);
  --surface-deep: oklch(0.926 0.019 29.6);
  --ink:          oklch(0.235 0.030 5.1);
  --hero:         oklch(0.214 0.027 7.3);

  /* Escala semántica de texto */
  --text-clear:   var(--ink);
  --text-mid:     oklch(0.412 0.035 5.4);
  --text-faint:   oklch(0.560 0.040 9.8);
  --text-invert:  oklch(0.960 0.011 54.5);

  /* Líneas */
  --line:         color-mix(in oklch, var(--ink) 10%, transparent);
  --line-strong:  color-mix(in oklch, var(--ink) 20%, transparent);

  /* Tipografía — self-hosted, fallback encadenado */
  --font-sans:    "Karla", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Marcellus", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-serif:   "Cormorant Garamond", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono:    ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  /* Escala tipográfica fluida */
  --text-xs:   clamp(0.75rem, 0.72rem + 0.15vw, 0.82rem);
  --text-sm:   clamp(0.875rem, 0.85rem + 0.15vw, 0.95rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --text-lg:   clamp(1.13rem, 1.05rem + 0.4vw, 1.35rem);
  --text-xl:   clamp(1.35rem, 1.2rem + 0.8vw, 1.85rem);
  --text-2xl:  clamp(1.7rem, 1.4rem + 1.5vw, 2.6rem);
  --text-3xl:  clamp(2.1rem, 1.55rem + 2.4vw, 3.5rem);

  /* Ritmo y medida */
  --radius:     18px;
  --radius-sm:  12px;
  --radius-lg:  26px;
  --radius-pill: 999px;
  --pad-x:      clamp(1.25rem, 5vw, 3.5rem);
  --maxw:       1240px;
  --measure:    68ch;
  --gap:        clamp(1rem, 2.5vw, 2rem);
  --section-y:  clamp(3.75rem, 8vw, 5rem);
  --header-h:   122px;

  /* Sombras por rol */
  --shadow-soft: 0 1px 2px color-mix(in oklch, var(--ink) 6%, transparent);
  --shadow-base: 0 10px 26px color-mix(in oklch, var(--ink) 12%, transparent);
  --shadow-deep: 0 30px 60px color-mix(in oklch, var(--hero) 45%, transparent);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@font-face {
  font-family: "Karla";
  src: url("/assets/fonts/karla-variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Marcellus";
  src: url("/assets/fonts/marcellus-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("/assets/fonts/cormorant-garamond-400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}


/* ══ 02 · RESET Y BASE ═══════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

#inicio, #servicios, #equipo, #agenda {
  scroll-margin-top: 6.5rem;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text-clear);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: var(--text-3xl); }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-underline-offset: 0.18em; }

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

ul, ol { margin: 0 0 1em; padding-left: 1.25rem; }

address { font-style: normal; }

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


/* ══ 03 · ACCESIBILIDAD ══════════════════════════════════════════════════ */

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -100%;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--text-invert);
  text-decoration: none;
}
.skip-link:focus-visible { top: 0.5rem; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 4px;
}


/* ══ 04 · TIPOGRAFÍA Y LAYOUT ════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

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

.kicker {
  margin: 0 0 0.75rem;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand-soft);
}

.lede {
  max-width: var(--measure);
  font-size: var(--text-lg);
  color: var(--text-mid);
}

.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}
.grid > * { min-width: 0; }


/* ══ 05 · BOTONES ════════════════════════════════════════════════════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 44px;
  padding: 0.75rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--brand);
  color: var(--text-invert);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { background: var(--brand-deep); }
.btn:active { transform: translateY(1px); }

.btn__icon { width: 1.15em; height: 1.15em; flex: none; }

.btn--lg { padding: 1.05rem 1.9rem; font-size: 1rem; }

.btn--ghost {
  background: transparent;
  border-color: color-mix(in oklch, var(--text-invert) 40%, transparent);
  color: var(--text-invert);
}
.btn--ghost:hover {
  background: color-mix(in oklch, var(--text-invert) 10%, transparent);
  border-color: var(--text-invert);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  align-items: center;
}


/* ══ 06 · ENCABEZADO Y NAVEGACIÓN ════════════════════════════════════════ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--hero);
  color: var(--text-invert);
  transition: box-shadow 0.2s var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-soft); }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  min-height: var(--header-h);
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 1.5rem var(--pad-x);
}

.brand { text-decoration: none; flex: none; }
.brand__logo {
  width: auto;
  height: 74px;
}
.brand__logo--footer { height: 64px; }

.brand__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid color-mix(in oklch, var(--text-invert) 35%, transparent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav-toggle__box {
  position: relative;
  display: block;
  width: 20px; height: 14px;
}
.nav-toggle__box span {
  position: absolute;
  left: 0;
  width: 100%; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle__box span:nth-child(1) { top: 0; }
.nav-toggle__box span:nth-child(2) { top: 6px; }
.nav-toggle__box span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__box span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__list {
  display: flex;
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  font-weight: 400;
  color: color-mix(in oklch, var(--text-invert) 85%, transparent);
  text-decoration: none;
}
.nav__link:hover { color: var(--brand-soft); }

.nav__phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid color-mix(in oklch, var(--text-invert) 40%, transparent);
  color: var(--text-invert);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav__phone:hover {
  border-color: var(--text-invert);
  background: color-mix(in oklch, var(--text-invert) 10%, transparent);
}
.nav__phone-icon { width: 17px; height: 17px; }

@media (min-width: 861px) {
  .nav { display: flex; align-items: center; gap: 1.75rem; }
  .nav-toggle { display: none; }
}

@media (max-width: 860px) {
  .site-header__inner { min-height: 88px; padding-block: 0.85rem; }
  .brand__logo { height: 56px; }

  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    display: grid;
    gap: 0.5rem;
    padding: 1rem var(--pad-x) 1.5rem;
    background: var(--hero);
    border-bottom: 1px solid color-mix(in oklch, var(--text-invert) 12%, transparent);
    box-shadow: var(--shadow-base);
  }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link { min-height: 48px; font-size: var(--text-base); }
  .nav__cta { justify-self: start; }

  body.nav-ready .nav { display: none; }
  body.nav-ready .nav.is-open { display: grid; }
}


/* ══ 07 · HERO ═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: linear-gradient(160deg, oklch(0.214 0.027 7.3) 0%, oklch(0.248 0.039 6.9) 55%, oklch(0.217 0.028 335.1) 100%);
  color: var(--text-invert);
}

.hero__glow {
  position: absolute;
  right: -120px;
  top: -80px;
  z-index: 0;
  width: 560px;
  height: 560px;
  background: radial-gradient(circle, color-mix(in oklch, var(--glow) 35%, transparent) 0%, transparent 70%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 3.25rem;
  align-items: center;
  padding-block: 3.5rem 4.5rem;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-block;
  margin: 0 0 1.6rem;
  padding: 0.5rem 1.15rem;
  border: 1px solid color-mix(in oklch, var(--brand) 70%, transparent);
  border-radius: var(--radius-pill);
  color: var(--brand-soft);
  font-size: 0.8125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero__title { margin: 0 0 1.25rem; }

.hero__lede {
  max-width: 470px;
  margin: 0 0 2.1rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: color-mix(in oklch, var(--text-invert) 75%, transparent);
}

.hero__address {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  color: color-mix(in oklch, var(--text-invert) 50%, transparent);
}

.hero__media { position: relative; width: 100%; }

.carousel {
  position: relative;
  width: 100%;
}

.carousel__viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-deep);
  aspect-ratio: 560 / 520;
}

.carousel__slide {
  display: none;
  margin: 0;
}
.carousel__slide.is-active { display: block; }
.carousel--hero .carousel__slide {
  position: absolute;
  inset: 0;
}

.carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel--hero .carousel__slide:nth-child(1) img { object-position: center 20%; }
.carousel--hero .carousel__slide:nth-child(2) img { object-position: center top; }
.carousel--hero .carousel__slide:nth-child(3) img { object-position: center 25%; }
.carousel--hero .carousel__slide:nth-child(4) img { object-position: center 30%; }

.carousel__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in oklch, var(--hero) 55%, transparent);
  color: var(--text-invert);
  cursor: pointer;
  transform: translateY(-50%);
}
.carousel__btn svg { width: 20px; height: 20px; }
.carousel__btn--prev { left: 14px; }
.carousel__btn--next { right: 14px; }

.carousel__dots {
  position: absolute;
  left: 0; right: 0;
  bottom: 16px;
  z-index: 2;
  display: none;
  justify-content: center;
  gap: 8px;
}

.carousel__dot {
  width: 9px; height: 9px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: color-mix(in oklch, var(--text-invert) 45%, transparent);
  cursor: pointer;
  transition: width 0.3s var(--ease), background-color 0.3s var(--ease);
}
.carousel__dot[aria-current="true"] {
  width: 26px;
  background: var(--text-invert);
}

body.carousel-ready .carousel__btn,
body.carousel-ready .carousel__dots { display: flex; }

@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.25rem;
    padding-block: 2rem 3rem;
  }
  .hero__glow { width: 360px; height: 360px; right: -80px; top: -60px; }
}


/* ══ 08 · DESTACADOS ═════════════════════════════════════════════════════ */

.highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: var(--maxw);
  margin-inline: auto;
  background: var(--bg);
}

.highlights__item {
  padding: 2rem 2.5rem;
  border-right: 1px solid var(--line);
}
.highlights__item:last-child { border-right: 0; }

.highlights__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brick);
}

.highlights__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-mid);
}

@media (max-width: 800px) {
  .highlights { grid-template-columns: minmax(0, 1fr); }
  .highlights__item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1.5rem var(--pad-x);
  }
  .highlights__item:last-child { border-bottom: 0; }
}


/* ══ 09 · SERVICIOS ══════════════════════════════════════════════════════ */

.services { background: var(--surface-deep); }

.services__title { margin: 0 0 2.6rem; }

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.375rem;
}

.service {
  min-width: 0;
  padding: 1.9rem 1.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  transition: box-shadow 0.2s var(--ease);
}
.service:hover { box-shadow: var(--shadow-base); }
/* Con 7 servicios, la última tarjeta ocupa la fila completa para no quedar huérfana. */
.service:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
.service:last-child:nth-child(3n + 1) .service__text { max-width: 62ch; }

.service__num {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  color: var(--brand);
}

.service__title {
  margin: 0 0 0.5rem;
  font-size: 1.375rem;
}

.service__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-mid);
}

.services__more {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.25rem;
  padding: 1.75rem 2.1rem;
  border-radius: var(--radius);
  background: var(--surface);
}

.services__more-title {
  margin: 0 0 0.25rem;
  font-size: 1.375rem;
}

.services__more-text {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-mid);
}

@media (max-width: 860px) {
  .services__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 861px) and (max-width: 1040px) {
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service:last-child:nth-child(3n + 1) { grid-column: auto; }
  .service:last-child:nth-child(odd) { grid-column: 1 / -1; }
}


/* ══ 10 · EQUIPO ═════════════════════════════════════════════════════════ */

.team {
  background: var(--hero);
  color: var(--text-invert);
}

.team__intro { text-align: center; margin-bottom: 3rem; }
.team__intro .kicker { color: var(--brand-soft); }
.team__title { margin: 0; }

.team__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.375rem;
}

.doctor { display: flex; flex-direction: column; gap: 0.875rem; min-width: 0; }

.doctor__photo {
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: center 15%;
  border-radius: 20px;
}

.doctor__name { margin: 0; font-size: 1.25rem; }
.doctor__role {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: color-mix(in oklch, var(--text-invert) 55%, transparent);
}

@media (max-width: 1040px) {
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .team__grid { grid-template-columns: minmax(0, 1fr); }
  .doctor__photo { height: 380px; }
}


/* ══ 11 · RESEÑAS ════════════════════════════════════════════════════════ */

.reviews {
  position: relative;
  background: var(--brand);
  color: var(--surface);
  text-align: center;
  padding-block: 4.5rem;
}

.reviews__stars {
  margin: 0 0 1.25rem;
  letter-spacing: 4px;
  opacity: 0.9;
}

.reviews .carousel__viewport {
  display: grid;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.reviews .carousel__slide {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0;
  padding-inline: 5rem;
  visibility: hidden;
}
.reviews .carousel__slide.is-active { visibility: visible; }

.reviews__quote {
  max-width: 740px;
  margin: 0 auto 1.1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.35rem, 1.1rem + 1.1vw, 2rem);
  font-weight: 400;
  line-height: 1.4;
}

.reviews__author {
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.reviews .carousel__btn {
  border: 1.5px solid color-mix(in oklch, var(--surface) 50%, transparent);
  background: transparent;
  color: var(--surface);
}
.reviews .carousel__btn:hover { background: color-mix(in oklch, var(--surface) 15%, transparent); }
.reviews .carousel__btn--prev { left: 36px; }
.reviews .carousel__btn--next { right: 36px; }

.reviews .carousel__dots {
  position: static;
  margin-top: 1.6rem;
}
.reviews .carousel__dot {
  background: color-mix(in oklch, var(--surface) 45%, transparent);
}
.reviews .carousel__dot[aria-current="true"] { background: var(--surface); }

@media (max-width: 800px) {
  .reviews { padding-block: 3.5rem; }
  .reviews .carousel__slide { padding-inline: 0; }
  .reviews .carousel__btn { display: none; }
  body.carousel-ready .reviews .carousel__btn { display: none; }
}


/* ══ 12 · AGENDA Y FORMULARIO ════════════════════════════════════════════ */

.agenda { background: var(--bg); }

.agenda__title { margin: 0 0 1rem; }
.agenda__lede {
  max-width: 620px;
  margin: 0 0 2.5rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-mid);
}

.agenda__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: start;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
.contact-card:hover { border-color: var(--brand); }

.contact-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  flex: none;
  border-radius: 50%;
  background: var(--surface-deep);
  color: var(--brick);
}
.contact-card__icon svg { width: 19px; height: 19px; }

.contact-card__label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.contact-card__value {
  display: block;
  margin-top: 2px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brick);
}
.contact-card__value--small {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}

.socials {
  display: flex;
  gap: 0.75rem;
}

.socials__link {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  min-height: 44px;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--brick);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
.socials__link:hover { border-color: var(--brand); }
.socials__link svg { width: 19px; height: 19px; }
.socials__domain {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--text-faint);
}

.map {
  width: 100%;
  height: 230px;
  margin-top: 1.75rem;
  border: 0;
  border-radius: var(--radius);
}

.map-note {
  margin: 0.6rem 0 0;
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.booking {
  padding: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}

.booking__fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.field__label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
}

.field__control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
}

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

.booking__submit { width: 100%; margin-top: 0.25rem; }

.booking__legal {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-faint);
  text-align: center;
}
.booking__legal a { color: var(--text-faint); }

@media (max-width: 860px) {
  .agenda__grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .booking { padding: 1.5rem; }
}


/* ══ 13 · PIE DE PÁGINA ══════════════════════════════════════════════════ */

.site-footer {
  padding-block: 2.1rem 1.5rem;
  background: var(--hero);
  color: color-mix(in oklch, var(--text-invert) 82%, transparent);
}

.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--gap);
}

.site-footer__note {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.7;
}

.site-footer__links { margin: 0; padding: 0; list-style: none; }
.site-footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.8125rem;
  color: var(--text-invert);
  opacity: 0.7;
  text-decoration: underline;
}

.nap { font-size: 0.8125rem; }
.nap__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: inherit;
}

.site-footer__legal {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in oklch, var(--text-invert) 15%, transparent);
  font-size: var(--text-xs);
  color: color-mix(in oklch, var(--text-invert) 60%, transparent);
}

@media (max-width: 800px) {
  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}


/* ══ 14 · REVELADO (FAIL-SAFE) ═══════════════════════════════════════════
   El contenido NACE VISIBLE. Solo se oculta para animar si el JS confirmó
   capacidad real (body.anim-ready). Con un rAF muerto o JS caído, nunca
   queda un opacity:0 atascado.
   ══════════════════════════════════════════════════════════════════════════ */

body.anim-ready [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
body.anim-ready [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  body.anim-ready [data-reveal] { opacity: 1; transform: none; }
}


/* ══ 15 · PÁGINAS LEGALES ════════════════════════════════════════════════ */

.page-legal { background: var(--surface); color: var(--ink); }

.page-legal .legal {
  max-width: 78ch;
  margin-inline: auto;
  padding-block: clamp(2.5rem, 7vw, 5rem);
}

.page-legal h1 { font-size: var(--text-2xl); }
.page-legal h2 {
  margin-top: 2.5em;
  font-size: var(--text-xl);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.page-legal h3 { margin-top: 2em; font-size: var(--text-lg); }
.page-legal li { margin-bottom: 0.4em; }

.legal__updated {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--text-faint);
}

.controller-card {
  width: 100%;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  font-size: var(--text-sm);
  text-align: left;
}
.controller-card th,
.controller-card td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.controller-card tr:last-child th,
.controller-card tr:last-child td { border-bottom: 0; }
.controller-card th {
  width: 34%;
  background: var(--surface-deep);
  font-weight: 600;
  color: var(--text-mid);
}

.callout {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line-strong);
  border-left-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--surface-deep);
  font-size: var(--text-sm);
}
.callout__title {
  margin: 0 0 0.35em;
  font-weight: 700;
  font-size: var(--text-sm);
}

.page-legal .site-header { color: var(--text-invert); }
.page-legal .nav__link { color: color-mix(in oklch, var(--text-invert) 85%, transparent); }


/* ══ 16 · UTILIDADES ═════════════════════════════════════════════════════ */

.stack > * + * { margin-top: var(--gap); }
.center { text-align: center; margin-inline: auto; }
.measure { max-width: var(--measure); }
.mono { font-family: var(--font-mono); }


/* ══ 17 · IMPRESIÓN ══════════════════════════════════════════════════════ */

@media print {
  :root { --bg: #fff; --ink: #000; }

  body { background: #fff; color: #000; font-size: 11pt; }

  .site-header,
  .nav,
  .nav-toggle,
  .skip-link,
  .hero__glow,
  .actions,
  .btn,
  .carousel__btn,
  .carousel__dots,
  .site-footer__links { display: none !important; }

  .hero, .team, .reviews, .site-footer { background: #fff !important; color: #000 !important; }

  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }

  .legal, .container { max-width: none; padding: 0; }

  h2, h3 { break-after: avoid; }
  .controller-card, .service, .doctor { break-inside: avoid; }
}
