/* Bauhinia · Estudio de fisioterapia — muestra del plan Pro de TaKata Studio.
   Un solo sistema: tokens por tema en html[data-tema], todo lo demás los usa. */

@font-face { font-family: "Onest"; src: url("../fuentes/onest.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fuentes/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fuentes/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url("../fuentes/bricolage.woff2") format("woff2"); font-weight: 400 700; font-stretch: 75% 100%; font-display: swap; }

/* ---------- Temas ---------- */
:root,
html[data-tema="agua"] {
  --body: #33474A; --band-body: #DCEBE9;
  --bg: #F4F7F6; --surface: #E4ECEA; --card: #FFFFFF; --band: #0B4F55;
  --ink: #10272A; --muted: #4B5F61; --line: rgba(16, 39, 42, .1);
  --accent: #0B5C63; --accent-hover: #084A50; --on-accent: #FFFFFF;
  --band-ink: #F2F7F6; --band-muted: #BFD6D3; --tint: #D3E6E3;
  --f-display: "Onest", system-ui, sans-serif; --display-weight: 500; --display-track: -0.03em; --display-style: normal;
  --r-lg: 16px; --r-md: 10px; --r-btn: 10px;
}
html[data-tema="arcilla"] {
  --body: #4E3B2F; --band-body: #F8E3D8;
  --h3: 26px;
  --bg: #F8F2EC; --surface: #EEE2D5; --card: #FFFCF8; --band: #7E3220;
  --ink: #2A1D17; --muted: #66503F; --line: rgba(42, 29, 23, .11);
  --accent: #9C3F25; --accent-hover: #82331D; --on-accent: #FFFFFF;
  --band-ink: #FFF6EF; --band-muted: #F0C9B8; --tint: #F2D9CB;
  --f-display: "Instrument Serif", Georgia, serif; --display-weight: 400; --display-track: -0.015em; --display-style: normal;
  --r-lg: 6px; --r-md: 4px; --r-btn: 4px;
}
html[data-tema="cobalto"] {
  --body: #3A4160; --band-body: #E4EAFD;
  --bg: #FFFFFF; --surface: #EEF1F8; --card: #FFFFFF; --band: #1B3FB8;
  --ink: #0D1222; --muted: #4D5470; --line: rgba(13, 18, 34, .11);
  --accent: #1F45C8; --accent-hover: #1838A6; --on-accent: #FFFFFF;
  --band-ink: #FFFFFF; --band-muted: #C9D4FA; --tint: #DCE3FA;
  --f-display: "Bricolage Grotesque", system-ui, sans-serif; --display-weight: 600; --display-track: -0.035em; --display-stretch: 88%; --display-style: normal;
  --r-lg: 4px; --r-md: 4px; --r-btn: 4px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Onest", system-ui, -apple-system, sans-serif; font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background-color .45s cubic-bezier(.22, 1, .36, 1), color .45s cubic-bezier(.22, 1, .36, 1);
}
img { display: block; max-width: 100%; height: auto; }
svg.flecha { width: 18px; height: 18px; flex: none; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch, 100%); letter-spacing: var(--display-track); line-height: 1.06; text-wrap: balance; }
.cifra, .datos strong, .hechos strong, .ficha__datos dd, .filas .precio, .principios strong, .marca__nombre, .pasos li::before, .persona__inicial { font-stretch: var(--display-stretch, 100%); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.horario dd, .tarjeta__pie .muted { font-variant-numeric: tabular-nums; }
h1 { font-size: clamp(40px, 3.4vw + 26px, 72px); }
h2 { font-size: clamp(30px, 1.9vw + 22px, 48px); }
h3 { font-size: var(--h3, 22px); line-height: 1.2; letter-spacing: -0.01em; }
html[data-tema="arcilla"] h1 { font-size: clamp(46px, 3.8vw + 30px, 84px); line-height: 1; }
html[data-tema="arcilla"] h2 { font-size: clamp(36px, 2.2vw + 26px, 58px); line-height: 1.02; }
h1 em, h2 em { font-style: normal; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--tint); color: var(--ink); }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 640px) { .wrap { padding: 0 48px; } }
@media (min-width: 1024px) { .wrap { padding: 0 80px; } }

.skip-link { position: absolute; left: 24px; top: -60px; background: var(--card); color: var(--ink); padding: 10px 16px; border-radius: var(--r-md); z-index: 50; text-decoration: none; font-weight: 500; }
.skip-link:focus { top: 12px; }

.muted { color: var(--muted); }
.label { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.measure { max-width: 60ch; }
.lead { font-size: clamp(18px, .2vw + 17px, 20px); line-height: 1.55; color: var(--ink); }

/* ---------- Botones y enlaces ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px; border-radius: var(--r-btn);
  font: 500 16px/1 "Onest", system-ui, sans-serif; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap;
  transition: transform .16s cubic-bezier(.22, 1, .36, 1), background-color .16s cubic-bezier(.22, 1, .36, 1), border-color .16s cubic-bezier(.22, 1, .36, 1), color .16s cubic-bezier(.22, 1, .36, 1);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--line); border-color: color-mix(in srgb, var(--ink) 22%, transparent); }
.btn--secondary:hover { border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform .16s cubic-bezier(.22, 1, .36, 1); }
.btn:hover svg.flecha { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 639px) { .btn-row .btn { width: 100%; } }

.link { color: var(--accent); font-weight: 500; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .16s cubic-bezier(.22, 1, .36, 1); padding-bottom: 2px; }
.link:hover { background-size: 100% 1.5px; }

/* ---------- Encabezado ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 72px; background: var(--bg); border-bottom: 1px solid var(--line); transition: background-color .45s cubic-bezier(.22, 1, .36, 1); }
.nav .wrap { height: 100%; display: flex; align-items: center; gap: 32px; }
.marca { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.marca svg { width: 34px; height: 34px; color: var(--accent); flex: none; }
.marca__texto { display: flex; flex-direction: column; line-height: 1; }
.marca__nombre { font-family: var(--f-display); font-weight: var(--display-weight); font-size: 20px; }
html[data-tema="arcilla"] .marca__nombre { font-size: 26px; }
.marca__giro { font-size: 13px; color: var(--muted); margin-top: 4px; letter-spacing: .01em; }
.nav__links { display: none; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-size: 15px; font-weight: 500; color: var(--ink); padding: 8px 0; position: relative; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .16s cubic-bezier(.22, 1, .36, 1); }
.nav__links a:hover::after, .nav__links a[aria-current="page"]::after { transform: scaleX(1); }
.nav__cta { display: none; }
.nav__toggle { width: 48px; height: 48px; display: inline-grid; place-items: center; background: transparent; border: 1px solid color-mix(in srgb, var(--ink) 22%, transparent); border-radius: var(--r-btn); color: var(--ink); cursor: pointer; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .16s cubic-bezier(.22, 1, .36, 1), opacity .16s cubic-bezier(.22, 1, .36, 1); }
.nav__toggle span::before, .nav__toggle span::after { content: ""; position: absolute; left: 0; }
.nav__toggle span::before { top: -6px; } .nav__toggle span::after { top: 6px; }
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
@media (min-width: 640px) { .nav__cta { display: inline-flex; } }
@media (min-width: 1024px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
}
@media (max-width: 639px) { .nav { height: 64px; } .marca svg { width: 30px; height: 30px; } .marca__nombre { font-size: 20px; } }

.hoja { position: fixed; inset: 64px 0 0 0; z-index: 19; background: var(--bg); padding: 16px 24px 120px; display: none; flex-direction: column; overflow-y: auto; }
@media (min-width: 640px) { .hoja { inset: 72px 0 0 0; padding: 24px 48px 120px; } }
.hoja.abierta { display: flex; animation: hoja .16s cubic-bezier(.22, 1, .36, 1) both; }
@keyframes hoja { from { opacity: 0; transform: translateY(-8px); } }
.hoja a.hoja__link { display: flex; align-items: center; justify-content: space-between; min-height: 64px; border-bottom: 1px solid var(--line); text-decoration: none; font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 28px; }
.hoja a.hoja__link[aria-current="page"] { color: var(--accent); }
.hoja a.hoja__link svg { width: 22px; height: 22px; color: var(--muted); }
.hoja .btn { margin-top: 24px; width: 100%; }
.hoja__pie { margin-top: 32px; font-size: 15px; color: var(--muted); line-height: 1.7; }

/* ---------- Secciones ---------- */
main { display: block; }
.seccion { padding-block: clamp(56px, 8vw, 112px); }
.seccion--alt { background: var(--surface); }
.seccion--banda { background: var(--band); color: var(--band-ink); }
.cabeza { display: grid; gap: 16px; margin-bottom: 48px; }
.cabeza p { max-width: 58ch; font-size: 18px; color: var(--muted); }
@media (min-width: 1024px) { .cabeza--fila { grid-template-columns: 1fr 1fr; align-items: end; gap: 48px; } .cabeza--fila p { justify-self: end; } }
@media (max-width: 639px) { .cabeza { margin-bottom: 32px; } }

/* ---------- Héroe ---------- */
.heroe { padding: calc(72px + 56px) 0 72px; }
.heroe .wrap { display: grid; gap: 40px; align-items: center; }
.heroe__texto { display: grid; gap: 24px; align-content: start; }
.heroe__aviso { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); }
.heroe__aviso::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.heroe .lead { max-width: 34em; color: var(--muted); }
.heroe .btn-row { margin-top: 8px; }
.datos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; margin: 16px 0 0; padding: 24px 0 0; border-top: 1px solid var(--line); list-style: none; }
.datos li { display: grid; gap: 2px; }
.datos strong { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 24px; line-height: 1.1; }
html[data-tema="arcilla"] .datos strong { font-size: 30px; }
.datos span { font-size: 14px; line-height: 1.4; color: var(--muted); }
@media (max-width: 639px) { .heroe .datos { display: none; } .heroe .lead { font-size: 17px; } }
.heroe__foto { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); }
.heroe__foto img, .heroe__foto > svg { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) {
  .heroe { padding: calc(72px + 64px) 0 clamp(56px, 8vw, 112px); }
  .heroe .wrap { grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: start; }
  .heroe h1 { font-size: clamp(48px, 2.6vw + 26px, 68px); }
  .heroe__foto { aspect-ratio: 4 / 5; width: 100%; }
}
@media (max-width: 639px) { .heroe { padding: calc(64px + 40px) 0 56px; } .heroe .wrap { gap: 32px; } .heroe__foto { aspect-ratio: 5 / 4; } }

/* Cabecera de página interior */
.portada { padding: calc(72px + 72px) 0 64px; }
.portada .wrap { display: grid; gap: 20px; }
.portada .lead { color: var(--muted); max-width: 40em; }
@media (min-width: 1024px) { .portada { padding: calc(72px + 96px) 0 80px; } }
@media (max-width: 639px) { .portada { padding: calc(64px + 48px) 0 48px; } }
.migas { font-size: 14px; color: var(--muted); }
.migas a { color: var(--muted); text-decoration: none; }
.migas a:hover { color: var(--ink); }

/* Entrada del héroe, una sola vez */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] > * { animation: entra .45s cubic-bezier(.22, 1, .36, 1) both; }
  [data-enter] > *:nth-child(2) { animation-delay: 0.05s; }
  [data-enter] > *:nth-child(3) { animation-delay: 0.10s; }
  [data-enter] > *:nth-child(4) { animation-delay: 0.15s; }
  [data-enter] > *:nth-child(5) { animation-delay: 0.20s; }
  [data-enter] > *:nth-child(6) { animation-delay: 0.25s; }
  .heroe__foto[data-enter-foto] { animation: revela .7s cubic-bezier(.22, 1, .36, 1) .1s both; }
}
@keyframes entra { from { opacity: 0; transform: translateY(10px); } }
@keyframes revela { from { opacity: 0; clip-path: inset(8% 0 0 0 round var(--r-lg)); } to { opacity: 1; clip-path: inset(0 0 0 0 round var(--r-lg)); } }

/* ---------- Fotos ---------- */
.foto { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); position: relative; }
.foto img, .foto > svg { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
a:hover .foto img, .foto:hover img, .foto:hover > svg { transform: scale(1.03); }
.foto > svg *, .heroe__foto > svg * { transition: fill .45s cubic-bezier(.22, 1, .36, 1), stroke .45s cubic-bezier(.22, 1, .36, 1); }

/* ---------- Tarjetas de servicio ---------- */
.servicios { display: grid; gap: 16px; grid-template-columns: 1fr; list-style: none; margin: 0; padding: 0; }
@media (min-width: 640px) { .servicios { grid-template-columns: 1fr 1fr; gap: 20px; } }
@media (min-width: 1024px) { .servicios { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.tarjeta { display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; height: 100%; padding: 28px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); transition: transform .16s cubic-bezier(.22, 1, .36, 1), border-color .16s cubic-bezier(.22, 1, .36, 1), box-shadow .16s cubic-bezier(.22, 1, .36, 1); }
.tarjeta:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 55%, transparent); box-shadow: 0 8px 24px rgba(0,0,0,.06); }
.tarjeta__icono { width: 32px; height: 32px; color: var(--muted); display: grid; place-items: center; margin: 0 0 8px -4px; }
.tarjeta__icono svg { width: 28px; height: 28px; stroke-width: 1.5; }
.tarjeta p { color: var(--muted); }
.tarjeta__pie { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; margin-top: 8px; border-top: 1px solid var(--line); font-size: 15px; }
.tarjeta__pie .ir { color: var(--accent); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.tarjeta__pie .ir svg { width: 16px; height: 16px; transition: transform .16s cubic-bezier(.22, 1, .36, 1); }
.tarjeta:hover .ir svg { transform: translateX(3px); }
@media (max-width: 639px) { .tarjeta { padding: 24px; } }

/* ---------- Pasos ---------- */
.dos { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .dos { grid-template-columns: 1fr 1fr; gap: 80px; } .dos--foto-izq > .foto { order: -1; } }
.pasos { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: paso; }
.pasos li { display: grid; grid-template-columns: 56px 1fr; gap: 4px 16px; padding: 24px 0; border-top: 1px solid var(--line); }
.pasos li:last-child { border-bottom: 1px solid var(--line); }
.pasos li::before { counter-increment: paso; content: "0" counter(paso); grid-row: span 2; font-family: var(--f-display); font-weight: var(--display-weight); font-size: 28px; line-height: 1; color: var(--accent); letter-spacing: var(--display-track); }
html[data-tema="arcilla"] .pasos li::before { font-size: 34px; }
.pasos h3 { font-size: 20px; }
html[data-tema="arcilla"] .pasos h3 { font-size: 25px; }
.pasos p { color: var(--muted); }
.dos .foto { aspect-ratio: 4 / 5; }
@media (max-width: 1023px) { .dos .foto { aspect-ratio: 4 / 3; } }

/* ---------- Estudio: fotos en par ---------- */
.par { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .par { grid-template-columns: 1.4fr 1fr; gap: 24px; } }
.par .foto { aspect-ratio: 4 / 3; }
@media (min-width: 768px) { .par .foto:first-child { aspect-ratio: auto; height: 100%; min-height: 420px; } .par .foto:last-child { aspect-ratio: 4 / 5; } }
.hechos { display: grid; gap: 0; grid-template-columns: 1fr; margin-top: 48px; list-style: none; padding: 0; }
@media (min-width: 640px) { .hechos { grid-template-columns: 1fr 1fr; column-gap: 48px; } }
@media (min-width: 1024px) { .hechos { grid-template-columns: repeat(4, 1fr); column-gap: 32px; } }
.hechos li { padding: 20px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.hechos strong { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 22px; line-height: 1.15; }
html[data-tema="arcilla"] .hechos strong { font-size: 27px; }
.hechos span { color: var(--muted); font-size: 16px; }

/* ---------- Equipo ---------- */
.equipo { display: grid; gap: 16px; list-style: none; margin: 0; padding: 0; }
@media (min-width: 768px) { .equipo { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.persona { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px; display: grid; gap: 8px; align-content: start; }
.persona__inicial { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: var(--accent); font-family: var(--f-display); font-weight: var(--display-weight); font-size: 26px; letter-spacing: -0.02em; margin-bottom: 12px; }
html[data-tema="cobalto"] .persona__inicial { border-radius: var(--r-md); }
.persona p { color: var(--muted); }
.persona ul { margin: 8px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.persona li { padding-left: 20px; position: relative; }
.persona li::before { content: ""; position: absolute; left: 0; top: .65em; width: 8px; height: 1.5px; background: var(--accent); }

/* ---------- Banda de cierre ---------- */
.cierre { display: grid; gap: 40px; }
.cierre h2 { font-size: clamp(36px, 3.4vw + 22px, 76px); max-width: 14ch; }
html[data-tema="arcilla"] .cierre h2 { font-size: clamp(42px, 4vw + 26px, 92px); }
.cierre p { color: var(--band-muted); font-size: 18px; max-width: 46ch; }
.seccion--banda .btn--primary { background: var(--band-ink); color: var(--band); }
.seccion--banda .btn--primary:hover { background: color-mix(in srgb, var(--band-ink) 88%, var(--band)); }
.seccion--banda .btn--secondary { color: var(--band-ink); border-color: color-mix(in srgb, var(--band-ink) 45%, transparent); }
.seccion--banda .btn--secondary:hover { border-color: var(--band-ink); }
.cierre__datos { display: grid; gap: 24px; padding-top: 32px; border-top: 1px solid color-mix(in srgb, var(--band-ink) 25%, transparent); }
@media (min-width: 768px) { .cierre__datos { grid-template-columns: repeat(3, 1fr); } }
.cierre__datos div { display: grid; gap: 4px; }
.cierre__datos .label { color: var(--band-muted); }
.cierre__datos p { color: var(--band-ink); font-size: 17px; }
@media (min-width: 1024px) { .cierre { grid-template-columns: 1.3fr 1fr; align-items: end; column-gap: 80px; } .cierre__datos { grid-column: 1 / -1; } }

/* ---------- Pie ---------- */
.pie { padding: 72px 0 48px; border-top: 1px solid var(--line); }
.pie__cols { display: grid; gap: 40px; }
@media (min-width: 768px) { .pie__cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; } }
.pie h3 { font-family: "Onest", system-ui, sans-serif; font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-bottom: 12px; }
.pie ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pie ul a { text-decoration: none; display: inline-block; padding: 4px 0; }
.pie ul a:hover { color: var(--accent); }
.pie address { font-style: normal; line-height: 1.7; }
.pie__marca p { color: var(--muted); margin-top: 16px; max-width: 30ch; }
.pie__legal { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; font-size: 13px; color: var(--muted); }
.pie__legal a { color: var(--muted); }


/* ---------- Página de servicios: fichas ---------- */
.indice { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.indice a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-btn); border: 1px solid var(--line); text-decoration: none; font-size: 15px; font-weight: 500; background: var(--card); transition: border-color .16s cubic-bezier(.22, 1, .36, 1), transform .16s cubic-bezier(.22, 1, .36, 1); }
.indice a:hover { border-color: var(--accent); transform: translateY(-1px); }
.ficha { display: grid; gap: 32px; padding: 64px 0; border-top: 1px solid var(--line); scroll-margin-top: 72px; }
.ficha:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 1024px) { .ficha { grid-template-columns: 5fr 7fr; gap: 80px; padding: 88px 0; } }
.ficha__titulo { display: grid; gap: 16px; align-content: start; }
@media (min-width: 1024px) { .ficha__titulo { position: sticky; top: 112px; } }
.ficha__titulo .tarjeta__icono { margin-bottom: 0; }
.ficha__titulo p { color: var(--muted); font-size: 18px; }
.ficha__cuerpo { display: grid; gap: 32px; }
.ficha__cuerpo h3 { font-size: 18px; font-family: "Onest", system-ui, sans-serif; font-weight: 500; letter-spacing: 0; font-stretch: 100%; margin-bottom: 12px; }
.ficha .foto { aspect-ratio: 16 / 9; }
.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lista li { position: relative; padding-left: 30px; }
.lista li::before { content: ""; position: absolute; left: 0; top: .3em; width: 18px; height: 18px; border-radius: 50%; background: var(--tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }
html[data-modo="oscuro"] .lista li::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.4l2.6 2.6L13 6.6' fill='none' stroke='%23EDF2F0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.ficha__datos { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--card); }
.ficha__datos div { padding: 16px 20px; display: grid; gap: 4px; border-left: 1px solid var(--line); }
.ficha__datos div:first-child { border-left: 0; }
.ficha__datos dt { font-size: 13px; font-weight: 500; color: var(--muted); }
.ficha__datos dd { margin: 0; font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 22px; line-height: 1.15; }
html[data-tema="arcilla"] .ficha__datos dd { font-size: 26px; }
@media (max-width: 639px) { .ficha__datos { grid-template-columns: 1fr; } .ficha__datos div { border-left: 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; } .ficha__datos div:first-child { border-top: 0; } .ficha__datos dd { font-size: 20px; } }
.ficha .btn-row { margin-top: 4px; }

/* ---------- Precios en filas ---------- */
.filas { list-style: none; margin: 0; padding: 0; }
.filas li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.filas li:first-child { border-top: 1px solid var(--line); }
.filas .nombre { font-weight: 500; }
.filas .nombre small { display: block; font-weight: 400; color: var(--muted); font-size: 15px; margin-top: 2px; }
.filas .precio { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 24px; white-space: nowrap; }
html[data-tema="arcilla"] .filas .precio { font-size: 30px; }
.nota { margin-top: 20px; font-size: 15px; color: var(--muted); }

/* ---------- Nosotros ---------- */
.historia { display: grid; gap: 40px; }
@media (min-width: 1024px) { .historia { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }
.historia__texto { display: grid; gap: 20px; font-size: 18px; }
.historia__texto p + p { color: var(--muted); }
.cita { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: clamp(28px, 1.6vw + 20px, 42px); line-height: 1.15; text-wrap: balance; margin: 0; }
html[data-tema="arcilla"] .cita { font-style: italic; font-size: clamp(32px, 2vw + 22px, 52px); }
.principios { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 768px) { .principios { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.principios li { padding: 24px 0 0; border-top: 2px solid var(--ink); display: grid; gap: 12px; align-content: start; }
.principios strong { font-family: var(--f-display); font-weight: var(--display-weight); letter-spacing: var(--display-track); font-size: 24px; line-height: 1.15; }
html[data-tema="arcilla"] .principios strong { font-size: 30px; }
.principios p { color: var(--muted); }

/* ---------- Contacto ---------- */
.contacto { display: grid; gap: 48px; }
@media (min-width: 1024px) { .contacto { grid-template-columns: 7fr 5fr; gap: 80px; align-items: start; } }
.form { display: grid; gap: 20px; padding: 32px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); }
@media (max-width: 639px) { .form { padding: 24px 20px; } }
.form__fila { display: grid; gap: 20px; }
@media (min-width: 640px) { .form__fila { grid-template-columns: 1fr 1fr; } }
.campo { display: grid; gap: 8px; }
.campo label { font-size: 14px; font-weight: 500; }
.campo input, .campo select, .campo textarea {
  width: 100%; min-height: 48px; padding: 12px 16px; font: 400 16px/1.4 "Onest", system-ui, sans-serif; color: var(--ink);
  background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 26%, transparent); border-radius: var(--r-md);
  transition: border-color .16s cubic-bezier(.22, 1, .36, 1), box-shadow .16s cubic-bezier(.22, 1, .36, 1); appearance: none; -webkit-appearance: none;
}
.campo select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23888' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.campo textarea { min-height: 120px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.campo [aria-invalid="true"] { border-color: #C0362C; }
html[data-modo="oscuro"] .campo [aria-invalid="true"] { border-color: #FF8A80; }
.campo__error { font-size: 14px; color: #B3261E; min-height: 0; }
html[data-modo="oscuro"] .campo__error { color: #FF9E95; }
.campo__error:empty { display: none; }
.campo__ayuda { font-size: 14px; color: var(--muted); }
.form .btn { justify-self: start; }
@media (max-width: 639px) { .form .btn { width: 100%; } }
.form__estado { font-size: 15px; color: var(--muted); }
.form__estado.ok { color: var(--ink); padding: 16px; border-radius: var(--r-md); background: var(--tint); }
.form__nota { font-size: 14px; color: var(--muted); }
.lado { display: grid; gap: 32px; }
.bloque { display: grid; gap: 12px; }
.bloque h3 { font-size: 20px; }
.horario { margin: 0; display: grid; }
.horario div { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.horario div:first-child { border-top: 1px solid var(--line); }
.horario dt { font-weight: 500; } .horario dd { margin: 0; color: var(--muted); }
.mapa { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.mapa > svg { display: block; width: 100%; height: auto; }
.mapa__pie { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 16px 20px; background: var(--card); border-top: 1px solid var(--line); }
.mapa__pie p { font-size: 15px; }
.mapa__pie .btn { min-height: 44px; }

/* FAQ abiertas */
.faq { display: grid; gap: 0; }
@media (min-width: 1024px) { .faq { grid-template-columns: 1fr 1fr; column-gap: 64px; } }
.faq div { padding: 24px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.faq dt { font-weight: 500; font-size: 18px; }
.faq dd { margin: 0; color: var(--muted); }

/* ---------- Aviso de muestra (toast) ---------- */
.aviso { position: fixed; z-index: 60; top: 88px; left: 50%; transform: translate(-50%, -12px); width: min(92vw, 460px); padding: 16px 20px; border-radius: var(--r-md); background: var(--ink); color: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.16); display: flex; gap: 12px; align-items: flex-start; opacity: 0; pointer-events: none; transition: opacity .16s cubic-bezier(.22, 1, .36, 1), transform .16s cubic-bezier(.22, 1, .36, 1); font-size: 15px; line-height: 1.5; }
.aviso.visible { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.aviso svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.aviso strong { display: block; font-weight: 500; }
@media (max-width: 639px) { .aviso { top: 76px; } }

/* ---------- Página de enlaces ---------- */
.enlaces-pagina { display: grid; place-items: start center; padding: 56px 20px 140px; background: var(--surface); }
.enlaces { width: 100%; max-width: 440px; display: grid; gap: 12px; text-align: center; }
.enlaces__marca { width: 96px; height: 96px; margin: 0 auto 8px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; color: var(--accent); }
html[data-tema="cobalto"] .enlaces__marca { border-radius: var(--r-md); }
.enlaces__marca svg { width: 56px; height: 56px; }
.enlaces h1 { font-size: 34px; }
html[data-tema="arcilla"] .enlaces h1 { font-size: 44px; }
.enlaces__sub { color: var(--muted); margin-bottom: 16px; }
.enlace { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 20px; border-radius: var(--r-btn); background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 500; text-align: left; transition: transform .16s cubic-bezier(.22, 1, .36, 1), border-color .16s cubic-bezier(.22, 1, .36, 1); }
.enlace:hover { transform: translateY(-2px); border-color: var(--accent); }
.enlace:active { transform: translateY(0) scale(.99); }
.enlace svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.enlace span { flex: 1; }
.enlace .flecha { width: 16px; height: 16px; color: var(--muted); }
.enlace--principal { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.enlace--principal svg, .enlace--principal .flecha { color: var(--on-accent); }
.enlace--principal:hover { background: var(--accent-hover); }
.enlaces__redes { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.enlaces__redes a { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: transform .16s cubic-bezier(.22, 1, .36, 1), border-color .16s cubic-bezier(.22, 1, .36, 1); }
.enlaces__redes a:hover { transform: translateY(-2px); border-color: var(--accent); }
.enlaces__redes svg { width: 20px; height: 20px; }
.enlaces__pie { margin-top: 28px; font-size: 13px; color: var(--muted); line-height: 1.6; }
.enlaces__pie a { color: var(--muted); }
.enlaces__volver { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Ritmo: una sección por pantalla y columnas sobre la cuadrícula de 12 (design-taste-frontend, layout-v4) ---------- */
@media (min-width: 1024px) {
  .heroe .wrap { align-items: center; }
  .heroe .wrap, .dos, .cabeza--fila, .par, .historia, .contacto, .ficha, .cierre { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
  .heroe__texto { grid-column: 1 / span 6; padding-right: 48px; }
  .heroe__foto { grid-column: 7 / -1; }
  .dos { align-items: start; }
  .dos > :first-child { grid-column: 1 / span 6; padding-right: 48px; }
  .dos > :last-child { grid-column: 7 / -1; }
  .dos--foto-izq > .foto { grid-column: 1 / span 6; }
  .cabeza--fila > :first-child { grid-column: 1 / span 6; }
  .cabeza--fila > p { grid-column: 7 / -1; justify-self: start; }
  .par > :first-child { grid-column: 1 / span 7; }
  .par > :last-child { grid-column: 8 / -1; }
  .par .foto:first-child, .par .foto:last-child { height: 380px; min-height: 0; aspect-ratio: auto; }
  .historia > :first-child { grid-column: 1 / span 6; }
  .historia > :last-child { grid-column: 7 / -1; }
  .contacto > :first-child { grid-column: 1 / span 7; }
  .contacto > :last-child { grid-column: 8 / -1; padding-left: 24px; }
  .ficha > :first-child { grid-column: 1 / span 5; padding-right: 48px; }
  .ficha > :last-child { grid-column: 6 / -1; padding-left: 24px; }
  .cierre > :first-child { grid-column: 1 / span 7; }
  .cierre > :nth-child(2) { grid-column: 8 / -1; }
  .cierre__datos { grid-column: 1 / -1; }
  .servicios .tarjeta { padding: 24px; }
  .dos .foto { aspect-ratio: auto; height: 560px; }
}
/* Celular: héroe dentro de la primera pantalla, tarjetas compactas */
@media (max-width: 639px) {
  .heroe { padding: calc(64px + 32px) 0 32px; }
  .heroe .wrap { gap: 24px; }
  .heroe__foto { aspect-ratio: 16 / 10; }
  .heroe h1 { font-size: 38px; }
  .heroe .lead { font-size: 17px; }
  .servicios { gap: 12px; }
  .servicios .tarjeta { padding: 20px; gap: 8px; }
  .servicios .tarjeta p { display: none; }
  .servicios .tarjeta__icono { margin-bottom: 0; }
  .servicios .tarjeta__pie { padding-top: 12px; margin-top: 4px; }
  .persona { padding: 20px; }
  .persona__inicial { width: 48px; height: 48px; font-size: 20px; margin-bottom: 4px; }
  .equipo { gap: 12px; }
}
.persona > div { display: grid; gap: 8px; align-content: start; }
@media (min-width: 1024px) { .par .foto:first-child, .par .foto:last-child { height: 352px; } }
@media (max-width: 639px) {
  .cierre h2 { font-size: 34px; }
  .cierre .btn-row { gap: 8px; }
  .persona { grid-template-columns: 48px 1fr; column-gap: 16px; align-items: start; }
  .persona ul { display: none; }
  .persona__inicial { margin-bottom: 0; }
  #equipo-t + p, .cabeza--fila p { font-size: 17px; }
}
.servicios .tarjeta__icono { margin-bottom: 0; }

/* Texto corrido a 7:1 (design-taste-frontend: lo que la gente lee va en tinta de 7:1 o más) */
.heroe .lead, .portada .lead, .cabeza p, .tarjeta p, .pasos p, .persona p, .hechos span, .ficha__titulo p, .historia__texto p + p, .principios p, .faq dd, .bloque .muted { color: var(--body); }
.cierre p { color: var(--band-body); }
.cierre h2 { font-size: clamp(30px, 1.9vw + 22px, 48px); max-width: 16ch; }
html[data-tema="arcilla"] .cierre h2 { font-size: clamp(36px, 2.2vw + 26px, 58px); }
@media (min-width: 1024px) { .servicios { gap: 20px; } .seccion--alt .cabeza--fila { margin-bottom: 40px; } }
@media (min-width: 1024px) { .seccion--banda .cierre { align-items: end; } }

/* ---------- Modo claro / oscuro (contrato data-modo del BRIEF) ---------- */
html[data-modo="claro"] { color-scheme: only light; }
html[data-modo="oscuro"] { color-scheme: only dark; }
html[data-modo="oscuro"],
html[data-modo="oscuro"][data-tema="agua"] {
  --bg: #10171A; --surface: #162024; --card: #1B272C; --band: #0E3A3E;
  --ink: #EDF2F0; --muted: #A8B7B4; --body: #C6D2CF; --line: rgba(237, 242, 240, .1);
  --accent: #8CD2BF; --accent-hover: #A9E0D1; --on-accent: #0B1A16;
  --band-ink: #EAF5F3; --band-muted: #A9CFCA; --band-body: #D3E7E4; --tint: #233539;
}
html[data-modo="oscuro"][data-tema="arcilla"] {
  --bg: #16110E; --surface: #1F1814; --card: #261E19; --band: #4A2216;
  --ink: #F4EDE7; --muted: #BCAB9D; --body: #DACDC2; --line: rgba(244, 237, 231, .1);
  --accent: #F0A585; --accent-hover: #F5BCA3; --on-accent: #2A140B;
  --band-ink: #FCEEE6; --band-muted: #E3B9A7; --band-body: #F3DACD; --tint: #3A2A21;
}
html[data-modo="oscuro"][data-tema="cobalto"] {
  --bg: #0B0E17; --surface: #121726; --card: #171D2F; --band: #1A2A6B;
  --ink: #EEF0F6; --muted: #A7AEC3; --body: #CACFDE; --line: rgba(238, 240, 246, .1);
  --accent: #8FA8FF; --accent-hover: #AABDFF; --on-accent: #0A1030;
  --band-ink: #F2F4FF; --band-muted: #B9C5F5; --band-body: #DCE2FB; --tint: #222B47;
}
html[data-modo="oscuro"] .aviso { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
html[data-modo="oscuro"] .tarjeta:hover { box-shadow: none; }
html[data-modo="oscuro"] .campo select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23A8B7B4' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); }
/* Las fotos nunca se filtran ni se invierten */
.foto img, .heroe__foto img { filter: none; }

/* ---------- Entrada compuesta del plan Pro: foto + ficha flotante, titular por líneas ---------- */
.heroe__media { position: relative; }
.heroe__ficha { position: absolute; left: 16px; bottom: 16px; width: min(280px, calc(100% - 32px)); padding: 20px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0,0,0,.12); display: grid; gap: 4px; }
.heroe__ficha-titulo { font-size: 14px; font-weight: 500; color: var(--muted); }
.heroe__ficha-cifra { font-family: var(--f-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch, 100%); font-size: 28px; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.heroe__ficha ul { list-style: none; margin: 8px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 4px; font-size: 15px; color: var(--body); }
.heroe__ficha li { padding-left: 20px; position: relative; }
.heroe__ficha li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 2px; background: var(--accent); }
@media (min-width: 1024px) { .heroe__media { grid-column: 7 / -1; } .heroe__ficha { left: -48px; bottom: 40px; } .heroe__foto { grid-column: auto; } }
@media (max-width: 639px) { .heroe__ficha { position: relative; left: auto; bottom: auto; width: auto; margin: -48px 16px 0; } }
html[data-modo="oscuro"] .heroe__ficha { box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.heroe h1 .linea { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.heroe h1 .linea > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .heroe .heroe__texto > h1 { animation: none; }
  .heroe h1 .linea > span { animation: linea .7s cubic-bezier(.22, 1, .36, 1) both; }
  .heroe h1 .linea:nth-child(2) > span { animation-delay: .12s; }
  .heroe__ficha { animation: entra .45s cubic-bezier(.22, 1, .36, 1) .45s both; }
}
@keyframes linea { from { transform: translateY(105%); } }

/* Secciones que aparecen al desplazarse, una sola vez (sólo si hay JS y movimiento permitido) */
@media (prefers-reduced-motion: no-preference) {
  html.anim .revela:not(.visible), html.anim .revela-hijos:not(.visible) > * { opacity: 0; transform: translateY(16px); }
  html.anim .revela, html.anim .revela-hijos > * { transition: opacity .45s cubic-bezier(.22, 1, .36, 1), transform .45s cubic-bezier(.22, 1, .36, 1); }
  html.anim .revela-hijos.visible > *:nth-child(2) { transition-delay: .06s; }
  html.anim .revela-hijos.visible > *:nth-child(3) { transition-delay: .12s; }
  html.anim .revela-hijos.visible > *:nth-child(4) { transition-delay: .18s; }
  html.anim .revela-hijos.visible > *:nth-child(5) { transition-delay: .24s; }
  html.anim .revela-hijos.visible > *:nth-child(6) { transition-delay: .3s; }
  .servicios > li.revela:nth-child(3n+2) { transition-delay: .06s; }
  .servicios > li.revela:nth-child(3n+3) { transition-delay: .12s; }
  /* Tarjetas: el ícono del cuerpo se mueve con el puntero */
  .tarjeta__icono svg { transition: transform .45s cubic-bezier(.22, 1, .36, 1); }
  .tarjeta:hover .tarjeta__icono svg { transform: translateY(-3px) rotate(-6deg); }
  /* Cambio de página suave */
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
  body.saliendo main, body.saliendo .pie { opacity: 0; transition: opacity .16s cubic-bezier(.22, 1, .36, 1); }
  html.anim body.entrando main { animation: entra .45s cubic-bezier(.22, 1, .36, 1) both; }
}
