/* Sonrisa Austral — sistema visual "Austral" editorial: fiordo, glaciar, nieve, lenga. Mobile-first.
   Tipografías self-hosted (SIL OFL 1.1, Google Fonts): Young Serif (títulos) + Hanken Grotesk (cuerpo). */
@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/young-serif-latin.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("/assets/fonts/hanken-grotesk-latin.woff2") format("woff2"); }
:root {
  --fiordo: #123a44;
  --glaciar: #2b7673;
  --glaciar-claro: #7cc3bf;
  --hielo: #e9f1ef;
  --nieve: #f8f6f1;      /* papel cálido */
  --papel: #fffefb;
  --lenga: #b8642c;      /* acento cálido, detalles */
  --texto: #1d2b30;
  --texto-2: #4a5d63;
  --borde: #d9dfda;
  --linea: #1d2b30;
  --cta: #17694a;
  --cta-hover: #0f5639;
  --radio: 4px;
  --f-titulo: "Young Serif", Georgia, "Times New Roman", serif;
  --f-cuerpo: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--nieve); color: var(--texto); font: 400 1.0625rem/1.65 var(--f-cuerpo); font-feature-settings: "ss01"; overflow-x: hidden; }
img, svg, iframe { max-width: 100%; display: block; }
a { color: var(--glaciar); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--fiordo); }
:focus-visible { outline: 3px solid var(--lenga); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 400; color: var(--fiordo); line-height: 1.15; text-wrap: balance; letter-spacing: -.005em; margin: 0 0 .6em; }
h1 { font-size: clamp(1.65rem, 1.3rem + 1.6vw, 2.45rem); max-width: 22ch; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 2rem); max-width: 26ch; }
h3 { font-size: 1.2rem; }
.center h1, .center h2 { margin-left: auto; margin-right: auto; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 780px; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--fiordo); color: #fff; padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 600 .78rem/1 var(--f-cuerpo); letter-spacing: .16em; text-transform: uppercase; color: var(--texto-2); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--lenga); flex: none; }
.center .eyebrow { justify-content: center; }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--texto-2); max-width: 56ch; }
.micro { font-size: .9rem; color: var(--texto-2); margin-top: 12px; }
.ico { width: 1.25em; height: 1.25em; flex: none; }

/* Botones: rectos y sobrios; el verde queda reservado a WhatsApp */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; min-height: 48px; padding: .8em 1.35em; border-radius: var(--radio); font: 600 1rem/1.2 var(--f-cuerpo); text-decoration: none; border: 1.5px solid transparent; transition: background .2s, color .2s; }
.btn-cta { background: var(--cta); color: #fff; }
.btn-cta:hover { background: var(--cta-hover); color: #fff; }
.btn-ghost { border-color: var(--fiordo); color: var(--fiordo); background: transparent; }
.btn-ghost:hover { background: var(--fiordo); color: #fff; }
.btn-lg { font-size: 1.05rem; padding: .95em 1.5em; }
.btn-sm { min-height: 40px; padding: .5em 1em; font-size: .92rem; }
.link-arrow { font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(248, 246, 241, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--borde); }
.header-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fiordo); font: 400 1.2rem/1 var(--f-titulo); margin-right: auto; }
.brand b { font-weight: 400; color: var(--glaciar); }
.site-header nav { position: relative; }
.menu-btn { min-height: 44px; padding: 0 14px; border: 1px solid var(--fiordo); border-radius: var(--radio); background: transparent; color: var(--fiordo); font: 600 .95rem var(--f-cuerpo); cursor: pointer; }
#menu { display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 210px; list-style: none; margin: 0; padding: 6px; background: var(--papel); border: 1px solid var(--fiordo); }
#menu.open { display: block; }
#menu a { display: block; padding: 12px 14px; text-decoration: none; color: var(--fiordo); font-weight: 500; }
#menu a:hover, #menu a[aria-current="page"] { background: var(--hielo); }
.hide-sm { display: none; }

/* Hero: texto + slot de ilustración */
.hero { padding: 36px 0 48px; border-bottom: 1px solid var(--borde); }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0; }
.center-row { justify-content: center; }
.hero-facts { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--borde); display: grid; gap: 6px; font-size: .92rem; color: var(--texto-2); }
.hero-facts li { padding-left: 18px; position: relative; }
.hero-facts li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 1.5px; background: var(--lenga); }
.hero-svc { padding: 28px 0 44px; }
.hero-svc .btn-lg { margin-top: 8px; }
.crumbs { font-size: .88rem; color: var(--texto-2); padding-top: 14px; padding-bottom: 0; }
.crumbs a { text-decoration: none; }

/* Slot de ilustración (Beta las entrega en /assets/img/ilustraciones/) */
.hero-slot { margin: 0; position: relative; }
.hero-slot img, .hs-ph { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 999px 999px var(--radio) var(--radio); }
.hs-ph { display: flex; align-items: flex-end; justify-content: center; padding: 22px; background:
  repeating-radial-gradient(ellipse 140% 90% at 50% 120%, transparent 0 22px, rgba(43,118,115,.16) 22px 23px),
  linear-gradient(180deg, #edf3f1 0%, #dce9e6 100%); border: 1px solid var(--borde); }
.hs-ph span { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--texto-2); background: var(--nieve); padding: 6px 10px; }
.hero-svc .hero-slot img, .hero-svc .hs-ph { aspect-ratio: 5 / 4; }
/* El atributo height="1402" ganaba al aspect-ratio y estiraba el arco: alto automático y tope */
.hero-slot img { display: block; height: auto; width: auto; max-width: 100%; max-height: min(72vh, 620px); margin-inline: auto; object-fit: contain; }
.hero-svc .hero-slot img { max-height: min(46vh, 420px); }
@media (max-width: 899px) { .hero-svc .hero-slot img { max-height: 230px; } .hero-slot img { max-height: 420px; } }
.split .hero-slot img { max-height: none; width: 100%; }

/* Secciones */
.section { padding: 56px 0; }
.band-soft { background: var(--hielo); }
.split { display: grid; gap: 32px; align-items: start; }
.panel { background: var(--papel); border-top: 3px solid var(--fiordo); padding: 24px 0 8px; background: none; }
.panel h2 { font-size: 1.45rem; }
.checks { list-style: none; padding: 0; margin: 0 0 22px; }
.checks li { position: relative; padding: 12px 0 12px 34px; border-bottom: 1px solid var(--borde); }
.checks li:first-child { border-top: 1px solid var(--borde); }
.checks li::before { content: ""; position: absolute; left: 4px; top: 1.15em; width: 14px; height: 8px; border-left: 2px solid var(--glaciar); border-bottom: 2px solid var(--glaciar); transform: rotate(-45deg); }
.row-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; }

/* Ruta del tratamiento (antes píldoras): línea de tiempo vertical */
.pill-stack { counter-reset: etapa; display: grid; padding: 8px 0 8px 28px; border-left: 2px solid var(--fiordo); }
.pill-stack span { counter-increment: etapa; position: relative; display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--borde); color: var(--fiordo); font: 400 clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem)/1.1 var(--f-titulo); }
.pill-stack span::before { content: "0" counter(etapa); font: 600 .8rem var(--f-cuerpo); letter-spacing: .1em; color: var(--lenga); min-width: 2em; }
.pill-stack span::after { content: ""; position: absolute; left: -35px; top: 50%; width: 12px; height: 12px; border-radius: 50%; background: var(--nieve); border: 2px solid var(--fiordo); transform: translateY(-50%); }
.pill-stack span:last-child::after { background: var(--lenga); border-color: var(--lenga); }

/* Tratamientos: índice editorial numerado (sin íconos genéricos) */
.cards { counter-reset: trat; list-style: none; padding: 0; margin: 28px 0 0; display: grid; border-top: 1px solid var(--fiordo); }
.card { counter-increment: trat; position: relative; padding: 22px 36px 22px 48px; border-bottom: 1px solid var(--borde); transition: background .2s; }
.card::before { content: counter(trat, decimal-leading-zero); position: absolute; left: 0; top: 26px; font: 600 .8rem var(--f-cuerpo); letter-spacing: .1em; color: var(--lenga); }
.card::after { content: "→"; position: absolute; right: 4px; top: 22px; font-size: 1.2rem; color: var(--glaciar); transition: transform .2s; }
.card:hover { background: rgba(255,255,255,.5); }
.card:hover::after { transform: translateX(4px); }
.card h3 { margin-bottom: .3em; font-size: 1.3rem; }
.card h3 a { color: var(--fiordo); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--texto-2); font-size: .97rem; max-width: 48ch; }
.card-feature h3 { font-size: 1.6rem; }
.card-feature::before { color: var(--fiordo); }

/* Fotos de la clínica (placeholders hasta recibir las reales) */
.gallery { display: grid; gap: 14px; margin-top: 28px; }
.photo-slot { margin: 0; }
.photo-slot img { width: 100%; height: auto; aspect-ratio: var(--ar, 4 / 3); object-fit: cover; border-radius: var(--radio); }
.photo-slot figcaption { font-size: .85rem; color: var(--texto-2); margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--borde); }
.ph { aspect-ratio: var(--ar, 4 / 3); width: 100%; border-radius: var(--radio); display: grid; place-items: center; text-align: center; color: var(--fiordo); font-weight: 600; background: var(--hielo); border: 1px solid var(--borde); }
.ph span { display: grid; justify-items: center; gap: 6px; padding: 12px; font-size: .92rem; }
.ph svg { width: 26px; height: 26px; color: var(--glaciar); }
.ph small { font-weight: 400; font-size: .78rem; color: var(--texto-2); }

/* Pasos: numerales grandes en serif, sin cajas */
.steps { list-style: none; counter-reset: paso; padding: 0; margin: 28px 0 32px; display: grid; gap: 0; }
.steps li { counter-increment: paso; position: relative; padding: 20px 0 20px 64px; border-top: 1px solid var(--fiordo); }
.steps li::before { content: counter(paso); position: absolute; left: 0; top: 10px; font: 400 2.6rem/1 var(--f-titulo); color: var(--glaciar); }
.steps b { display: block; color: var(--fiordo); margin-bottom: 4px; font-size: 1.05rem; }
.steps span { color: var(--texto-2); font-size: .97rem; }

/* FAQ */
.faq { border-top: 1px solid var(--fiordo); }
.faq details { border-bottom: 1px solid var(--borde); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; font-weight: 600; font-size: 1.05rem; color: var(--fiordo); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 1.6rem var(--f-titulo); color: var(--lenga); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 20px; margin: 0; color: var(--texto-2); max-width: 64ch; }

/* Relacionados */
.rel-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; border-top: 1px solid var(--fiordo); }
.rel-card { display: flex; justify-content: space-between; align-items: center; min-height: 60px; padding: 14px 4px; border-bottom: 1px solid var(--borde); text-decoration: none; color: var(--fiordo); font: 400 1.15rem var(--f-titulo); }
.rel-card:hover { color: var(--glaciar); }

/* Mapa y datos */
.map { overflow: hidden; border: 1px solid var(--fiordo); min-height: 300px; background: var(--hielo); }
.map iframe { width: 100%; height: 360px; border: 0; filter: saturate(.75); }
.addr { font: 400 1.25rem/1.35 var(--f-titulo); color: var(--fiordo); margin-bottom: .7em; }
.data { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 0 0 20px; }
.data dt { font-weight: 600; color: var(--fiordo); }
.data dd { margin: 0; }

/* CTA final */
.cta-final { background: var(--fiordo); color: #dfeceb; position: relative; overflow: hidden; }
.cta-final::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: var(--glaciar); opacity: .35; clip-path: polygon(0 100%, 0 70%, 14% 30%, 24% 55%, 40% 5%, 55% 50%, 66% 25%, 80% 60%, 100% 20%, 100% 100%); }
.cta-final .wrap { position: relative; z-index: 1; padding-bottom: 30px; }
.cta-final h2 { color: #fff; }
.cta-final .micro { color: #b9d3d1; }
.cta-final .btn-cta { background: #fff; color: var(--cta); }
.cta-final .btn-cta:hover { background: var(--hielo); color: var(--cta-hover); }

/* Footer */
.site-footer { background: #0c2a31; color: #c6dad8; padding: 52px 0 110px; font-size: .95rem; }
.site-footer a { color: #fff; }
.foot-grid { display: grid; gap: 28px; }
.foot-brand { font: 400 1.5rem var(--f-titulo); color: #fff; }
.foot-h { font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.foot-legal { margin-top: 28px; font-size: .82rem; color: #8fb0ad; }

/* WhatsApp flotante */
.wa-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; display: inline-flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 20px 0 16px; border-radius: 999px; background: var(--cta); color: #fff; font-weight: 600; text-decoration: none; box-shadow: 0 8px 20px -10px rgba(15, 86, 57, .6); }
.wa-float:hover { background: var(--cta-hover); color: #fff; }
.wa-float .ico { width: 26px; height: 26px; }

/* Aparición suave (solo con JS y sin reduced-motion) */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js-reveal .reveal.in { opacity: 1; transform: none; }
.js-reveal .hero .reveal:nth-child(2) { transition-delay: .12s; }

@media (min-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .rel-list { grid-template-columns: repeat(2, 1fr); column-gap: 32px; }
  .hero-facts { grid-template-columns: repeat(3, auto); gap: 6px 24px; }
}
@media (min-width: 900px) {
  .hide-sm { display: inline-flex; }
  .menu-btn { display: none; }
  #menu { display: flex; position: static; gap: 4px; padding: 0; background: none; border: 0; min-width: 0; }
  #menu a { padding: 8px 12px; }
  .hero { padding: 64px 0 72px; }
  .hero-grid { grid-template-columns: 1.25fr .85fr; gap: 72px; }
  .hero-svc { padding: 48px 0 60px; }
  .hero-svc .hero-grid { grid-template-columns: 1.3fr .8fr; }
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .gallery { grid-template-columns: 1.4fr 1fr 1fr; grid-auto-rows: auto; }
  .gallery .photo-slot:first-child { grid-row: span 2; }
  .gallery .photo-slot:first-child .ph, .gallery .photo-slot:first-child img { aspect-ratio: auto; height: 100%; min-height: 420px; }
  .gallery-2 { grid-template-columns: repeat(2, 1fr); max-width: 780px; }
  .gallery-2 .photo-slot:first-child { grid-row: auto; }
  .gallery-2 .photo-slot:first-child .ph { min-height: 0; aspect-ratio: var(--ar, 4 / 3); }
  .section { padding: 96px 0; }
  .cards { grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
  .steps { grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .steps li { padding: 72px 0 0; }
  .steps li::before { top: 18px; }
  .rel-list { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 1.2fr 1fr 1.2fr; }
  .site-footer { padding-bottom: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Aviso de cookies (lo inserta assets/js/analytics.js) */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 70; max-width: 560px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; background: var(--papel); color: var(--texto); border: 1px solid var(--borde); border-radius: var(--radio); font-size: .92rem; box-shadow: 0 10px 30px -14px rgba(18, 58, 68, .45); }
.cookie-bar p { margin: 0; flex: 1 1 260px; }
.cookie-btns { display: flex; gap: 8px; }
.cookie-no { background: transparent; color: var(--fiordo); border-color: var(--borde); }
