/* ==========================================================================
   Neuropsic Clinik — Propuesta de rediseño
   Tokens · base · componentes · secciones · páginas
   ========================================================================== */

:root {
  /* Color */
  --ink: #12264F;          /* azul tinta: superficies oscuras, títulos */
  --ink-deep: #0B1A3A;
  --blue: #1F4FA8;         /* azul de los muros del consultorio */
  --wine: #7A1F24;         /* vino: acciones */
  --wine-hover: #922A30;
  --gold: #B8913A;         /* oro del sello: solo filetes y detalles */
  --gold-soft: #D9C08A;
  --mist: #EEF1F6;         /* fondo de página */
  --paper: #FFFFFF;
  --text: #1B2233;
  --muted: #56607A;
  --line: #D5DBE6;
  --line-dark: rgba(255, 255, 255, .16);

  /* Tipografía */
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif; /* títulos y frases destacadas */
  --serif-text: var(--serif);
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;

  --fs-body: 1.0625rem;
  --fs-small: .9rem;
  --fs-lead: clamp(1.25rem, 1.05rem + .8vw, 1.6rem);
  --fs-h3: clamp(1.35rem, 1.15rem + .7vw, 1.75rem);
  --fs-h2: clamp(2rem, 1.4rem + 2.4vw, 3.4rem);
  --fs-h1: clamp(2.6rem, 1.4rem + 5vw, 5.6rem);

  /* Espaciado y layout */
  --wrap: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section: clamp(4.5rem, 9vw, 8.5rem);
  --radius-sm: 4px;
  --radius: 10px;
  --header-h: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--text);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.1; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.2; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
strong { font-weight: 600; }
::selection { background: var(--ink); color: #fff; }

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

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; color: #fff; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--gutter), 860px); margin-inline: auto; }
.section { padding-block: var(--section); }
.section--paper { background: var(--paper); }
.section--ink { background: var(--ink); color: #DCE3F0; }
.section--ink h2, .section--ink h3 { color: #fff; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Encabezado de sección: título + texto de apoyo, alineado a la izquierda */
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head p { color: var(--muted); font-size: 1.125rem; margin: 0; }
.section--ink .section-head p { color: #AEB9CF; }
.section-head--center { margin-inline: auto; text-align: center; }

/* Filete dorado corto: marca el inicio de un bloque de contenido */
.rule { width: 56px; height: 1px; background: var(--gold); border: 0; margin: 0 0 1.75rem; }
.section-head--center .rule { margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--wine); --btn-fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .85rem 1.6rem;
  font: 600 1rem/1 var(--sans); letter-spacing: .01em;
  color: var(--btn-fg); background: var(--btn-bg);
  border: 1px solid var(--btn-bg); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { --btn-bg: var(--wine-hover); color: #fff; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { --btn-bg: var(--ink); color: #fff; }
.btn--light { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255, 255, 255, .6); }
.btn--light:hover { --btn-bg: #fff; color: var(--ink); border-color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.link-more { font-weight: 600; color: var(--blue); text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.link-more:hover { color: var(--wine); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  height: var(--header-h);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease), height .3s var(--ease);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 2rem; }
.site-header {
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; flex: none; text-decoration: none; }
.brand img { height: 48px; width: auto; }
.site-header.is-solid { box-shadow: 0 10px 30px -18px rgba(18, 38, 79, .35); }

.nav { margin-left: auto; }
.nav__list { display: flex; align-items: center; gap: .25rem; }
.nav__link {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .6rem .8rem; border-radius: var(--radius-sm);
  font: 500 .97rem/1 var(--sans); color: var(--ink); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--wine); }
.nav__link[aria-current="page"] { box-shadow: inset 0 -1px 0 var(--gold); }
.nav__link svg { width: 14px; height: 14px; transition: transform .2s; }

.has-sub { position: relative; }
.subnav {
  position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0;
  min-width: 270px; padding: .6rem;
  background: #fff; border-radius: var(--radius); box-shadow: 0 18px 50px -12px rgba(18, 38, 79, .35);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.subnav::before { content: ""; position: absolute; inset: -12px 0 auto; height: 12px; }
.has-sub.is-open .subnav, .has-sub:hover .subnav, .has-sub:focus-within .subnav { opacity: 1; visibility: visible; transform: none; }
.has-sub.is-open > .nav__link svg { transform: rotate(180deg); }
.subnav a { display: block; padding: .7rem .9rem; border-radius: 6px; color: var(--ink); text-decoration: none; line-height: 1.3; }
.subnav a small { display: block; color: var(--muted); font-size: .82rem; margin-top: .15rem; }
.subnav a:hover, .subnav a[aria-current="page"] { background: var(--mist); color: var(--wine); }

.header-cta { flex: none; min-height: 44px; padding: .7rem 1.2rem; font-size: .95rem; }
.menu-toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); cursor: pointer; align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
  display: block; width: 22px; height: 1.5px; background: currentColor; position: relative; transition: transform .25s var(--ease), background-color .2s;
}
.menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
.menu-toggle span::before { top: -7px; }
.menu-toggle span::after { top: 7px; }
.is-open .menu-toggle span { background: transparent; }
.is-open .menu-toggle span::before { transform: translateY(7px) rotate(45deg); }
.is-open .menu-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
  .menu-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .nav {
    position: fixed; inset: var(--header-h) 0 0; margin: 0;
    background: #fff; padding: 1.5rem var(--gutter) 3rem; overflow-y: auto;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .is-open .nav { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__list > li { border-bottom: 1px solid var(--line); }
  .site-header .nav__link { color: var(--ink); width: 100%; justify-content: space-between; padding: 1.1rem 0; font-size: 1.15rem; font-family: var(--serif); }
  .nav__link[aria-current="page"] { box-shadow: none; color: var(--wine); }
  .subnav { position: static; translate: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding: 0 0 1rem; display: none; min-width: 0; }
  .has-sub:hover .subnav { display: none; }
  .has-sub.is-open .subnav { display: block; }
  .nav__mobile-cta { display: flex !important; margin-top: 2rem; }
}
@media (min-width: 1081px) { .nav__mobile-cta { display: none !important; } }

/* ---------- Hero (inicio) ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: min(100svh, 900px);
  display: flex; align-items: flex-end;
  padding: calc(var(--header-h) + 4rem) 0 clamp(3.5rem, 8vw, 6.5rem);
  color: #fff; background: var(--ink-deep);
}
/* La imagen original trae una curva en la base: se recorta dejándola fuera del encuadre */
.hero__media {
  position: absolute; inset: 0 0 -22% 0; z-index: -2;
  background-size: cover; background-position: center top;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 26, 58, .92) 0%, rgba(11, 26, 58, .7) 45%, rgba(11, 26, 58, .25) 100%),
    linear-gradient(0deg, rgba(11, 26, 58, .85) 0%, transparent 45%);
}
.hero__inner { position: relative; }
.hero__kicker { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.75rem; color: var(--gold-soft); font-size: 1rem; }
.hero__kicker img { height: 58px; width: auto; }
.hero h1 { color: #fff; max-width: 13ch; margin-bottom: .35em; font-weight: 400; }
.hero h1 em { font-style: italic; }
.hero__lead { max-width: 38rem; font-size: 1.15rem; color: #C9D3E6; margin-bottom: 0; }

/* Trazo de pulso neuronal: el único movimiento automático del sitio */
.pulse { position: absolute; left: 0; right: 0; bottom: clamp(9rem, 22vw, 15rem); height: 120px; z-index: -1; pointer-events: none; opacity: .9; }
.pulse path { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.pulse .pulse__trail { stroke: rgba(217, 192, 138, .25); stroke-width: 1; }
.js .pulse .pulse__draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 3.2s .5s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Hero de páginas interiores */
.page-hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff; background: var(--ink-deep);
  padding: calc(var(--header-h) + clamp(4rem, 10vw, 8rem)) 0 clamp(3.5rem, 7vw, 5.5rem);
}
.page-hero .hero__media { inset: 0 0 -24% 0; }
.page-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11, 26, 58, .9) 0%, rgba(11, 26, 58, .55) 60%, rgba(11, 26, 58, .3) 100%);
}
.page-hero h1 { color: #fff; font-size: clamp(2.4rem, 1.4rem + 4vw, 4.6rem); font-weight: 400; max-width: 16ch; margin: 0; }
.page-hero h1 span { display: block; font-size: .42em; font-family: var(--sans); font-weight: 500; letter-spacing: .02em; color: var(--gold-soft); margin-top: 1rem; }
.breadcrumb { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; font-size: .9rem; color: #AEB9CF; margin-bottom: 1.5rem; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { color: var(--gold-soft); }
.breadcrumb li + li::before { content: "/"; margin-right: .5rem; color: rgba(255, 255, 255, .35); }

/* ---------- Objetivo (inicio) ---------- */
.mission { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.mission__statement { font-family: var(--serif-text); font-weight: 400; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.95rem); line-height: 1.35; letter-spacing: -.005em; color: var(--ink); margin-bottom: 1.5rem; }
.mission__body { color: var(--muted); max-width: 40rem; }
.mission__figure { position: relative; margin: 0; }
.mission__figure img { position: relative; z-index: 1; width: 100%; max-width: 440px; margin-inline: auto; }
.mission__figure::before {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; top: 18%;
  background: var(--ink); border-radius: 220px 220px 0 0;
}
.mission__figure figcaption {
  position: relative; z-index: 2; margin: -1px 8% 0; padding: 1rem 1.25rem;
  background: var(--wine); color: #fff; font-size: .95rem; line-height: 1.35;
}
.mission__figure figcaption strong { display: block; font-family: var(--serif-text); font-weight: 500; font-size: 1.2rem; }

/* ---------- Conóceme ---------- */
.bio { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.bio__aside { position: sticky; top: calc(var(--header-h) + 2rem); }
.bio__portrait { margin: 0 0 1.5rem; border-radius: var(--radius); overflow: hidden; background: linear-gradient(160deg, #e3e8f1, #c8d1e1); }
.bio__portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.bio__role { font-size: .95rem; color: var(--muted); margin: 0 0 1.5rem; }
.bio h2 { margin-bottom: .35em; }
.bio__intro { font-size: var(--fs-lead); font-family: var(--serif-text); line-height: 1.4; color: var(--ink); margin-bottom: 2.5rem; }
.credentials { border-top: 1px solid var(--line); }
.credential { display: grid; grid-template-columns: 12rem 1fr; gap: 1.5rem; padding: 1.75rem 0; border-bottom: 1px solid var(--line); }
.credential h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: var(--wine); line-height: 1.4; margin: .2rem 0 0; letter-spacing: .01em; }
.credential p:last-child, .credential ul:last-child { margin-bottom: 0; }
.credential li { position: relative; padding-left: 1.1rem; margin-bottom: .55rem; }
.credential li::before { content: ""; position: absolute; left: 0; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.credential .highlight { font-family: var(--serif-text); font-weight: 500; font-size: 1.3rem; line-height: 1.3; color: var(--ink); margin-bottom: .4rem; }

/* ---------- Libro / reconocimientos ---------- */
.feature-book { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.feature-book__img { background: #000; border-radius: var(--radius); padding: clamp(1rem, 3vw, 2rem); }
.feature-book h2 em { font-style: italic; color: var(--gold-soft); }
.feature-book p { color: #C3CDE0; font-size: 1.1rem; }
.membership { margin-top: clamp(3.5rem, 7vw, 6rem); padding-top: clamp(3rem, 6vw, 4.5rem); border-top: 1px solid var(--line-dark); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.membership__img { background: #fff; border-radius: var(--radius); padding: 1rem; }
.membership h2 { font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); }

/* ---------- Servicios (inicio) ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 3vw, 2rem); }
.service {
  display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem); border-top: 3px solid var(--ink);
}
.service--wine { border-top-color: var(--wine); }
.service__icon { width: 72px; height: 72px; object-fit: contain; margin-bottom: 1.5rem; }
.service h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.service p { color: var(--muted); }
.service__list-title { font-weight: 600; color: var(--ink); margin: .5rem 0 1rem; }
.service .btn-row { margin-top: auto; padding-top: 2rem; }

/* Etiquetas de padecimientos: lista en dos columnas con filete */
.conditions { columns: 2; column-gap: 2rem; }
.conditions li { break-inside: avoid; padding: .6rem 0; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: .7rem; }
.conditions li::before { content: ""; flex: none; width: 6px; height: 6px; border: 1px solid var(--gold); transform: rotate(45deg) translateY(-2px); }

/* ---------- Equipo ---------- */
.team-photos { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1rem, 2vw, 1.5rem); }
.team-photos figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.team-photos img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- Valores ---------- */
.values { display: grid; grid-template-columns: repeat(6, 1fr); border-top: 1px solid var(--line-dark); border-left: 1px solid var(--line-dark); }
.value { display: flex; flex-direction: column; align-items: center; gap: 1.1rem; padding: 2.25rem 1rem; border-right: 1px solid var(--line-dark); border-bottom: 1px solid var(--line-dark); text-align: center; }
.value img { width: 64px; height: 64px; object-fit: contain; opacity: .95; }
.value span { font-family: var(--serif); font-size: 1.3rem; color: #fff; }

/* ---------- Galería ---------- */
.gallery { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(120px, 14vw, 190px); gap: clamp(.5rem, 1vw, .85rem); grid-auto-flow: dense; }
.gallery__item { grid-column: span 3; grid-row: span 1; position: relative; overflow: hidden; border-radius: var(--radius-sm); border: 0; padding: 0; background: var(--line); cursor: zoom-in; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item--wide { grid-column: span 6; grid-row: span 2; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--full { grid-column: 1 / -1; grid-row: span 2; }
.gallery__more { margin-top: 1.5rem; }
.gallery[data-collapsed="true"] .gallery__item:nth-child(n+9) { display: none; }

.gallery--small { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 220px; }
.gallery--small .gallery__item { grid-column: span 1; }
.gallery--pair { grid-auto-rows: clamp(260px, 32vw, 440px); }
.is-sticky { position: sticky; top: calc(var(--header-h) + 2rem); }
.gallery--small .gallery__item--wide { grid-column: span 2; grid-row: span 1; }

/* Visor */
.lightbox { position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center; background: rgba(8, 16, 36, .94); padding: 4.5rem 1rem; }
.lightbox.is-open { display: flex; }
.lightbox img { max-height: 100%; max-width: min(1200px, 100%); object-fit: contain; border-radius: var(--radius-sm); }
.lightbox__btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .3); background: rgba(255, 255, 255, .06); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lightbox__btn:hover { background: rgba(255, 255, 255, .16); }
.lightbox__btn svg { width: 22px; height: 22px; }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; translate: 0 -50%; }
.lightbox__next { right: 1rem; top: 50%; translate: 0 -50%; }
.lightbox__count { position: absolute; bottom: 1.25rem; left: 50%; translate: -50% 0; color: #AEB9CF; font-size: .9rem; }

/* ---------- Consultorio: dirección ---------- */
.address-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: clamp(2rem, 4vw, 3rem); padding: 1.75rem 2rem; background: var(--paper); border-radius: var(--radius); border-left: 3px solid var(--gold); }
.address-bar p { margin: 0; font-family: var(--serif-text); font-size: 1.3rem; color: var(--ink); line-height: 1.35; max-width: 36rem; }

/* ---------- Contacto ---------- */
.contact { position: relative; isolation: isolate; overflow: hidden; color: #DCE3F0; background: var(--ink); }
.contact__bg { position: absolute; inset: 0; z-index: -2; background-size: cover; background-position: center; opacity: .22; filter: grayscale(.4); }
.contact::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--ink) 30%, rgba(18, 38, 79, .82)); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 6vw, 6rem); align-items: start; }
.contact__label { color: var(--gold-soft); font-weight: 500; margin-bottom: 1rem; letter-spacing: .02em; }
.contact h2 { color: #fff; }
.contact__lead { font-size: 1.2rem; color: #C3CDE0; }
.contact-list { margin-top: 2.5rem; border-top: 1px solid var(--line-dark); }
.contact-list li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line-dark); }
.contact-list span { color: #8E9BB5; font-size: .92rem; }
.contact-list a { color: #fff; text-decoration: none; }
.contact-list a:hover { color: var(--gold-soft); }

.form { background: var(--paper); color: var(--text); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.75rem); }
.form h3 { margin-bottom: 1.5rem; }
.field { margin-bottom: 1.15rem; }
.field label { display: block; font-size: .92rem; font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.field label small { font-weight: 400; color: var(--muted); }
.field input {
  width: 100%; min-height: 50px; padding: .75rem 1rem; font: inherit; color: var(--text);
  background: var(--mist); border: 1px solid transparent; border-radius: var(--radius-sm);
  transition: border-color .2s, background-color .2s;
}
.field input:hover { border-color: var(--line); }
.field input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(31, 79, 168, .15); }
.field input[aria-invalid="true"] { border-color: var(--wine); }
.field__error { display: none; color: var(--wine); font-size: .85rem; margin-top: .35rem; }
.field input[aria-invalid="true"] + .field__error { display: block; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form .btn { width: 100%; margin-top: .5rem; }
.form__status { margin: 1rem 0 0; font-size: .95rem; min-height: 1.5em; }
.form__status.is-ok { color: #1D6B45; }
.form__status.is-error { color: var(--wine); }
.form__note { font-size: .82rem; color: var(--muted); margin: 1rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-deep); color: #AEB9CF; padding: clamp(4rem, 7vw, 6rem) 0 2rem; font-size: .97rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.4fr; gap: clamp(2rem, 5vw, 4rem); }
.footer-brand__mark { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; text-decoration: none; }
.footer-brand__mark img { height: 56px; width: auto; }
.footer-brand__mark span { font-family: var(--serif); font-size: 1.5rem; line-height: 1.05; color: #fff; }
.footer-brand p { max-width: 24rem; }
.site-footer h3 { font-family: var(--sans); font-size: .95rem; font-weight: 600; color: #fff; margin-bottom: 1.1rem; letter-spacing: .01em; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--gold-soft); }
.footer-list li { margin-bottom: .55rem; }
.footer-list span { color: #7F8CA8; }
.map { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 16 / 10; background: #1a2c55; }
.map iframe { width: 100%; height: 100%; border: 0; filter: grayscale(.25) contrast(1.05); }
.social { display: flex; gap: .6rem; margin-top: 1.5rem; }
.social a { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-dark); color: #fff; }
.social a:hover { background: #fff; color: var(--ink); }
.social svg { width: 19px; height: 19px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.75rem; border-top: 1px solid var(--line-dark); font-size: .86rem; color: #7F8CA8; }
.footer-bottom p { margin: 0; max-width: 46rem; }

/* WhatsApp flotante */
.wa-float {
  position: fixed; right: clamp(1rem, 3vw, 1.75rem); bottom: clamp(1rem, 3vw, 1.75rem); z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #1F8F55; color: #fff; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .45);
  transition: transform .2s var(--ease);
}
.wa-float:hover { transform: scale(1.06); color: #fff; }
.wa-float svg { width: 28px; height: 28px; }

/* ==========================================================================
   Páginas interiores
   ========================================================================== */

/* Bloque de introducción: texto + medio */
.intro { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.intro--top { align-items: start; }
.intro__text > p:first-of-type { font-size: 1.15rem; }
.intro__media { margin: 0; border-radius: var(--radius); overflow: hidden; }
.intro__media img { width: 100%; }

/* Hechos clave (TMS): lista con filete dorado */
.facts { margin-top: 2rem; border-top: 1px solid var(--line); }
.facts li { padding: 1rem 0 1rem 2.25rem; border-bottom: 1px solid var(--line); position: relative; }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 1.25rem; width: 18px; height: 18px; border-radius: 50%;
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D9C08A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.facts strong { color: var(--ink); }

/* Video incrustado bajo demanda */
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video__btn { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; cursor: pointer; background: var(--ink); }
.video__btn img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .3s; }
.video__btn:hover img { opacity: 1; }
.video__play { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 74px; height: 74px; border-radius: 50%; background: var(--wine); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); transition: transform .2s var(--ease); }
.video__btn:hover .video__play { transform: scale(1.08); }
.video__play svg { width: 26px; height: 26px; color: #fff; margin-left: 4px; }

/* Índice clínico: grupos de padecimientos */
.index-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.25rem, 3vw, 2rem); }
.index-group { background: var(--paper); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.75rem); }
.index-group h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; margin-bottom: .5rem; border-bottom: 1px solid var(--ink); }
.index-group h3 small { font-family: var(--sans); font-size: .85rem; font-weight: 500; color: var(--muted); }
.index-group .conditions { columns: 2; }
.index-group--wide { grid-column: 1 / -1; }
.index-group--wide .conditions { columns: 3; }

/* Tratamientos detallados (TMS, psicoterapia) */
.treatments { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.treatment { padding: clamp(1.75rem, 3vw, 2.5rem) clamp(1.25rem, 2.5vw, 2rem) clamp(1.75rem, 3vw, 2.5rem) 0; border-bottom: 1px solid var(--line); }
.treatment:not(:nth-child(3n + 1)) { padding-left: clamp(1.25rem, 2.5vw, 2rem); border-left: 1px solid var(--line); }
.treatment h3 { margin-bottom: .6rem; }
.treatment h3 small { display: block; font-family: var(--sans); font-size: .9rem; color: var(--muted); font-weight: 500; margin-top: .25rem; }
.treatment p { color: var(--muted); margin: 0; }
.treatment p + p { margin-top: .8rem; }

.cta-line { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.cta-line p { margin: 0; font-family: var(--serif-text); line-height: 1.4; font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem); color: var(--ink); max-width: 34rem; line-height: 1.3; }

/* Banda de llamado (psicoterapia) */
.band { background: var(--wine); color: #F5E3E3; padding-block: clamp(4rem, 8vw, 6.5rem); }
.band h2 { color: #fff; max-width: 18ch; margin-bottom: .4em; }
.band p { font-size: 1.2rem; max-width: 38rem; }
.band .wrap { display: grid; grid-template-columns: 1.5fr auto; gap: 2rem; align-items: end; }
.band .btn { --btn-bg: #fff; --btn-fg: var(--wine); }
.band .btn:hover { --btn-bg: var(--mist); color: var(--wine); }

/* Alteraciones (psicoterapia) */
.alterations { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.alterations figure { margin: 0; background: var(--paper); border-radius: var(--radius); padding: 2rem; }
.alterations .conditions { columns: 2; margin-bottom: 2rem; }

/* Técnicas (neuromodulación) */
.techniques { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.25rem, 2.5vw, 2rem); }
.technique { display: flex; flex-direction: column; background: var(--paper); border-radius: var(--radius); overflow: hidden; }
.technique__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink); }
.technique__img img { width: 100%; height: 100%; object-fit: cover; }
.technique__abbr { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--ink); color: var(--gold-soft); font-family: var(--serif); font-size: 4.5rem; font-style: italic; }
.technique__body { padding: clamp(1.5rem, 3vw, 2rem); display: flex; flex-direction: column; flex: 1; }
.technique__body p { color: var(--muted); }
.technique__body .link-more { margin-top: auto; align-self: flex-start; }

.quote-block { margin-top: clamp(2.5rem, 5vw, 4rem); padding: clamp(1.75rem, 4vw, 2.75rem); border-left: 3px solid var(--gold); background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; }
.quote-block p { margin: 0; font-family: var(--serif-text); font-size: clamp(1.25rem, 1.05rem + .7vw, 1.6rem); line-height: 1.4; color: var(--ink); }

/* Pares título / texto (tDCS, CPS) */
.pairs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(2rem, 5vw, 4rem); border-top: 1px solid var(--line); }
.pair { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.pair h3 { font-family: var(--sans); font-size: 1.05rem; font-weight: 600; color: var(--wine); margin-bottom: .35rem; }
.pair p { margin: 0; color: var(--muted); }

/* Indicaciones sobre fondo fotográfico */
.photo-band { position: relative; isolation: isolate; overflow: hidden; color: #fff; padding-block: clamp(4.5rem, 9vw, 7.5rem); background: var(--ink); }
.photo-band .hero__media { inset: 0; opacity: .5; }
.photo-band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 26, 58, .95) 35%, rgba(11, 26, 58, .6)); }
.photo-band h2 { color: #fff; max-width: 20ch; }
.photo-band .conditions { columns: 3; max-width: 52rem; }
.photo-band .conditions li { border-color: var(--line-dark); color: #E3E9F4; }
.photo-band p { color: #C3CDE0; max-width: 42rem; font-size: 1.1rem; }
.photo-band h3 { color: var(--gold-soft); font-family: var(--sans); font-size: 1rem; font-weight: 600; margin: 1.75rem 0 .35rem; }
.photo-band h3 + p { margin-bottom: 0; }

/* Videoteca */
.video-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.5rem); }
.video-grid .video { border-radius: var(--radius-sm); }
.video-grid .video--feature { grid-column: span 2; grid-row: span 2; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .values { grid-template-columns: repeat(3, 1fr); }
  .treatments { grid-template-columns: repeat(2, 1fr); }
  .treatment:not(:nth-child(3n + 1)) { padding-left: 0; border-left: 0; }
  .treatment:nth-child(even) { padding-left: clamp(1.25rem, 2.5vw, 2rem); border-left: 1px solid var(--line); }
  .techniques { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .is-sticky { position: static; }
  .brand img { height: 40px; }
  .mission, .bio, .feature-book, .membership, .contact__grid, .intro, .alterations, .band .wrap { grid-template-columns: 1fr; }
  .bio__aside { position: static; display: grid; grid-template-columns: 140px 1fr; gap: 1.25rem; align-items: center; }
  .bio__portrait { margin: 0; }
  .credential { grid-template-columns: 1fr; gap: .5rem; }
  .services, .index-groups, .pairs, .team-photos { grid-template-columns: 1fr; }
  .index-group--wide .conditions { columns: 2; }
  .gallery { grid-template-columns: repeat(6, 1fr); }
  .gallery__item--wide { grid-column: span 6; }
  .photo-band .conditions { columns: 2; }
  .video-grid { grid-template-columns: 1fr 1fr; }
  .video-grid .video--feature { grid-column: 1 / -1; grid-row: auto; }
  .mission__figure { max-width: 420px; }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .treatments { grid-template-columns: 1fr; }
  .treatment:nth-child(even) { padding-left: 0; border-left: 0; }
  .techniques, .footer-grid, .form-row, .video-grid { grid-template-columns: 1fr; }
  .conditions, .index-group .conditions, .index-group--wide .conditions, .alterations .conditions { columns: 1; }
  .photo-band .conditions { columns: 2; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery__item, .gallery__item--tall { grid-column: span 1; grid-row: span 1; }
  .gallery__item--wide, .gallery__item--full { grid-column: span 2; grid-row: span 1; }
  .gallery[data-collapsed="true"] .gallery__item:nth-child(n+8) { display: none; }
  .contact-list li { grid-template-columns: 1fr; gap: .1rem; }
  .hero__kicker img { height: 46px; }
  .pulse { bottom: 1.25rem; height: 80px; }
  .bio__aside { grid-template-columns: 110px 1fr; }
  .address-bar { padding: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .pulse .pulse__draw { stroke-dashoffset: 0; animation: none; }
}

/* Signo + en títulos */
.plus { font-family: var(--sans); font-weight: 400; color: var(--gold); }
