/* ==========================================================================
   OZONOCELL — sistema de diseño
   Semántico: los estilos se aplican a header/nav/main/section/article/footer.
   Sin div de envoltura. Grid + Flexbox. Tipografía fluida. Modo oscuro por tokens.
   ========================================================================== */

:root {
  /* color — paleta clínica fría con acento "ozono" (tomado del logotipo) */
  --ink: #0b1d33;
  --ink-2: #102a4a;
  --ozone: #1fa8dc;
  --ozone-deep: #0a6d9a;
  --cobalt: #0f56c9;
  --paper: #f4f8fb;
  --surface: #ffffff;
  --surface-2: #e9f1f7;
  --line: #d5e2ec;
  --text: #14283d;
  --muted: #4f6478;
  --wa: #15803d;
  --on-ink: #e9f1f8;
  --on-ink-muted: #a9bdd1;
  --shadow: 0 1px 2px rgb(11 29 51 / .06), 0 12px 32px -12px rgb(11 29 51 / .18);

  /* tipografía fluida */
  --font-display: "Sora", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
  --fs-0: clamp(0.9rem, 0.85rem + 0.2vw, 1rem);
  --fs-1: clamp(1.05rem, 1rem + 0.3vw, 1.2rem);
  --fs-2: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  --fs-3: clamp(1.6rem, 1.3rem + 1.4vw, 2.4rem);
  --fs-4: clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem);
  --fs-5: clamp(2.6rem, 1.8rem + 4.4vw, 5rem);

  /* ritmo */
  --space: clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --section: clamp(3.5rem, 2.5rem + 5vw, 7rem);
  --wrap: 74rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --header-h: 4.5rem;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #061426;
    --ink-2: #0b1d33;
    --ozone: #31b8e8;
    --ozone-deep: #1fa8dc;
    --cobalt: #6ea8ff;
    --paper: #0a1828;
    --surface: #10223a;
    --surface-2: #162c48;
    --line: #24405f;
    --text: #e6eff7;
    --muted: #9fb4c9;
    --on-ink: #e9f1f8;
    --on-ink-muted: #a9bdd1;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #061426;
  --ink-2: #0b1d33;
  --ozone: #31b8e8;
  --ozone-deep: #1fa8dc;
  --cobalt: #6ea8ff;
  --paper: #0a1828;
  --surface: #10223a;
  --surface-2: #162c48;
  --line: #24405f;
  --text: #e6eff7;
  --muted: #9fb4c9;
  --on-ink: #e9f1f8;
  --on-ink-muted: #a9bdd1;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 12px 32px -12px rgb(0 0 0 / .6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-1);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: var(--header-h);
}
img, svg, video { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-5); font-weight: 800; }
h2 { font-size: var(--fs-4); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; }
h3 { font-size: var(--fs-2); font-weight: 700; }
h4 { font-size: var(--fs-1); font-weight: 700; }
p { margin: 0; max-width: 65ch; }
p + p { margin-top: 0.9em; }
a { color: var(--cobalt); text-underline-offset: 0.15em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ozone); outline-offset: 3px; border-radius: 4px;
}
ul, ol { margin: 0; padding-left: 1.2em; }
strong { font-weight: 600; }
hgroup { display: grid; gap: 0.75rem; }
hgroup > p:first-child, .eyebrow {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ozone-deep);
}
hgroup > p:first-child::before, .eyebrow::before {
  content: ""; display: inline-block; width: 1.6em; height: 2px; vertical-align: middle; margin-right: 0.6em; background: var(--ozone);
}
hgroup > p:last-child:not(:first-child) { font-size: var(--fs-2); color: var(--muted); line-height: 1.35; font-weight: 400; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.7rem 1.35rem;
  font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; letter-spacing: 0.01em;
  border-radius: 999px; border: 2px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ozone); color: #07202e; box-shadow: 0 10px 24px -10px rgb(31 168 220 / .7); }
.btn-primary:hover { background: var(--ozone-deep); color: #fff; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn-ghost:hover { background: rgb(31 168 220 / .12); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #116632; color: #fff; }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }

/* ---------- header / nav ---------- */
body > header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
body > header > nav {
  inline-size: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
  min-height: var(--header-h);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space);
}
body > header > nav > a:first-child { display: inline-flex; align-items: center; }
body > header > nav > a:first-child img { height: 2.4rem; width: auto; }
body > header > nav > ul {
  list-style: none; padding: 0; margin: 0; display: flex; gap: clamp(0.4rem, 1.4vw, 1.4rem); justify-content: center; flex-wrap: nowrap; white-space: nowrap;
}
body > header > nav > ul a {
  font-family: var(--font-display); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--text); text-decoration: none; padding: 0.5rem 0.2rem; display: inline-block; border-bottom: 2px solid transparent;
}
body > header > nav > ul a:hover, body > header > nav > ul a[aria-current="page"] { border-bottom-color: var(--ozone); }
body > header > nav > ul a[hreflang] { color: var(--muted); }
body > header > nav > menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.5rem; align-items: center; }
body > header > nav > menu .btn { min-height: 2.6rem; padding: 0.4rem 0.95rem; font-size: 0.85rem; white-space: nowrap; }
body > header > nav > button { display: none; }

@media (max-width: 900px) {
  body > header > nav > ul {
    display: none; grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 0; padding-block: 0.5rem 1rem; border-top: 1px solid var(--line);
  }
  body > header > nav > ul a { display: block; padding: 0.8rem 0.25rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
  body > header > nav > ul a[aria-current="page"] { border-bottom-color: var(--line); color: var(--ozone-deep); }
  body > header > nav[data-open="true"] > ul { display: flex; }
  body > header > nav > menu { display: none; }
  body > header > nav { grid-template-columns: 1fr auto; }
  body > header > nav > button {
    display: inline-grid; place-items: center; width: 2.8rem; height: 2.8rem; border: 1px solid var(--line); background: var(--surface);
    border-radius: 10px; color: var(--text); cursor: pointer;
  }
  body > header > nav > button svg { width: 1.4rem; height: 1.4rem; }
}

@media (min-width: 901px) and (max-width: 1400px) {
  body > header > nav > menu .btn-ghost { display: none; }
}

/* ---------- secciones ---------- */
main > section, main > article > section {
  padding-block: var(--section);
}
main > section > *:not(.bleed), main > article > section > * {
  inline-size: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto;
}
section > hgroup { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
section > hgroup h2 { max-width: 22ch; }
section.ink { background: var(--ink); color: var(--on-ink); }
section.ink hgroup > p:first-child { color: var(--ozone); }
section.ink hgroup > p:last-child:not(:first-child), section.ink .muted { color: var(--on-ink-muted); }
section.ink a { color: var(--ozone); }
section.surface { background: var(--surface); border-block: 1px solid var(--line); }
.muted { color: var(--muted); }

/* ---------- hero ---------- */
section.hero {
  padding-block: clamp(2.5rem, 5vw, 5rem) 0;
  background:
    radial-gradient(60rem 30rem at 85% -10%, rgb(31 168 220 / .18), transparent 60%),
    linear-gradient(var(--paper), var(--paper));
  overflow: clip;
}
section.hero > article {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto auto; column-gap: clamp(1.5rem, 4vw, 4rem); align-items: end;
}
section.hero > article > hgroup { grid-column: 1; grid-row: 1; align-self: end; }
section.hero > article > menu { grid-column: 1; grid-row: 2; align-self: start; padding-bottom: clamp(2rem, 5vw, 4rem); }
section.hero > article > figure { grid-column: 2; grid-row: 1 / span 2; }
section.hero hgroup { gap: 1rem; }
section.hero h1 { max-width: 12ch; }
section.hero h1 em { font-style: normal; color: var(--ozone-deep); }
section.hero hgroup > p:last-child { max-width: 48ch; font-size: var(--fs-2); }
section.hero > article > div:first-of-type { display: none; }
section.hero menu { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
section.hero figure { margin: 0; position: relative; align-self: end; }
section.hero figure img { width: min(100%, 30rem); margin-inline: auto; filter: drop-shadow(0 24px 40px rgb(11 29 51 / .25)); }
section.hero figure figcaption {
  position: absolute; left: 0; bottom: clamp(1rem, 4vw, 2.5rem);
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
  padding: 0.7rem 0.95rem; font-size: 0.92rem; line-height: 1.3; max-width: 17rem;
}
section.hero figure figcaption strong { display: block; font-family: var(--font-display); font-size: 0.95rem; }
section.hero > ul.proof {
  list-style: none; padding: 0; margin: clamp(2rem, 4vw, 3rem) auto 0; inline-size: min(100% - 2 * var(--gutter), var(--wrap));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line);
}
section.hero > ul.proof li { padding: 1.1rem 1rem 1.4rem 0; border-right: 1px solid var(--line); display: grid; gap: 0.15rem; }
section.hero > ul.proof li:not(:first-child) { padding-left: 1rem; }
section.hero > ul.proof li:last-child { border-right: 0; }
section.hero > ul.proof strong { white-space: nowrap; font-family: var(--font-display); font-size: var(--fs-3); font-weight: 800; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
section.hero > ul.proof span { font-size: 0.92rem; color: var(--muted); }

@media (max-width: 900px) {
  section.hero > article { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  section.hero > article > hgroup { grid-row: 1; }
  section.hero > article > menu { grid-row: 2; padding-bottom: 1.5rem; }
  section.hero > article > figure { grid-column: 1; grid-row: 3; }
  section.hero figure img { width: min(100%, 20rem); }
  section.hero figure figcaption { left: auto; right: 0; bottom: 1rem; max-width: 14rem; }
  section.hero > ul.proof { grid-template-columns: 1fr 1fr; }
  section.hero > ul.proof li:nth-child(2) { border-right: 0; }
  section.hero > ul.proof li:nth-child(n+3) { border-top: 1px solid var(--line); }
  section.hero > ul.proof li:nth-child(3) { padding-left: 0; }
}
@media (max-width: 480px) {
  section.hero menu .btn { flex: 1 1 100%; }
}

/* ---------- padecimientos (grid de tarjetas) ---------- */
ul.conditions { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
ul.conditions li a {
  display: grid; grid-template-rows: auto 1fr auto; gap: 0.6rem; height: 100%;
  padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  color: inherit; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s;
}
ul.conditions li a:hover { border-color: var(--ozone); transform: translateY(-2px); box-shadow: var(--shadow); }
ul.conditions h3 { font-size: 1.15rem; }
ul.conditions p { font-size: 0.98rem; color: var(--muted); }
ul.conditions small { font-family: var(--font-display); font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ozone-deep); }
ul.conditions li.featured a { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
ul.conditions li.featured p { color: var(--on-ink-muted); }
ul.conditions li.featured small { color: var(--ozone); }

/* ---------- proceso (secuencia real: orden importa) ---------- */
ol.process { list-style: none; padding: 0; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
ol.process li { counter-increment: step; display: grid; gap: 0.5rem; padding: 1.4rem 1.25rem; border-radius: var(--radius); background: var(--surface-2); position: relative; }
ol.process li::before {
  content: counter(step, decimal-leading-zero); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-3); line-height: 1; color: var(--ozone); font-variant-numeric: tabular-nums;
}
ol.process h3 { font-size: 1.1rem; }
ol.process p { font-size: 0.98rem; color: var(--muted); }
section.ink ol.process li { background: var(--ink-2); }
section.ink ol.process p { color: var(--on-ink-muted); }
@media (max-width: 900px) { ol.process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { ol.process { grid-template-columns: 1fr; } }

/* ---------- matriz de validación ---------- */
table.matrix { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.matrix caption { caption-side: bottom; text-align: left; font-size: 0.88rem; color: var(--muted); padding-top: 0.8rem; }
table.matrix th, table.matrix td { padding: 0.95rem 1.1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.matrix thead th { font-family: var(--font-display); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
table.matrix thead th:nth-child(2) { color: var(--ozone-deep); }
table.matrix tbody th { font-weight: 600; color: var(--text); width: 28%; }
table.matrix td:nth-child(2) { font-weight: 600; color: var(--ink); background: color-mix(in srgb, var(--ozone) 8%, transparent); }
table.matrix tbody tr:last-child > * { border-bottom: 0; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
ul.stats { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
ul.stats li { display: grid; gap: 0.2rem; padding: 1.25rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
ul.stats strong { white-space: nowrap; font-family: var(--font-display); font-size: var(--fs-3); font-weight: 800; line-height: 1; color: var(--ozone-deep); font-variant-numeric: tabular-nums; }
ul.stats span { font-size: 0.95rem; color: var(--muted); }
@media (max-width: 900px) { ul.stats { grid-template-columns: 1fr 1fr; } }

@media (max-width: 640px) {
  table.matrix { display: flex; flex-direction: column; }
  table.matrix thead, table.matrix tbody, table.matrix tr, table.matrix th, table.matrix td { display: block; }
  table.matrix caption { display: block; order: 99; padding: 0.8rem 1rem 0.4rem; }
  table.matrix thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.matrix tr { border-bottom: 1px solid var(--line); padding: 0.4rem 0; }
  table.matrix tbody th { width: auto; padding: 0.8rem 1rem 0.3rem; font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border: 0; }
  table.matrix td { border: 0; padding: 0.35rem 1rem; display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; }
  table.matrix td::before { content: attr(data-label); font-size: 0.8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
  table.matrix td:nth-child(2) { background: color-mix(in srgb, var(--ozone) 10%, transparent); border-radius: 8px; margin-inline: 0.5rem; }
  table.matrix td:nth-child(2)::before { color: var(--ozone-deep); }
}

/* ---------- doctora ---------- */
section.doctor > article { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); grid-template-rows: auto auto; column-gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
section.doctor > article > figure { grid-column: 1; grid-row: 1 / span 2; }
section.doctor > article > hgroup { grid-column: 2; grid-row: 1; align-self: end; }
section.doctor > article > dl { grid-column: 2; grid-row: 2; align-self: start; }
section.doctor figure { margin: 0; border-radius: var(--radius); overflow: hidden; background: linear-gradient(160deg, var(--surface-2), var(--ozone) 140%); }
section.doctor figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
section.doctor dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.5rem; margin: 1.5rem 0 0; }
section.doctor dt { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ozone-deep); }
section.doctor dd { margin: 0.2rem 0 0; font-weight: 600; }
@media (max-width: 900px) {
  section.doctor > article { grid-template-columns: 1fr; grid-template-rows: auto auto auto; row-gap: 1.5rem; }
  section.doctor > article > figure { grid-column: 1; grid-row: 1; }
  section.doctor > article > hgroup { grid-column: 1; grid-row: 2; }
  section.doctor > article > dl { grid-column: 1; grid-row: 3; }
  section.doctor figure img { aspect-ratio: 4 / 3; }
}

/* ---------- testimonios ---------- */
ul.reviews { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
ul.reviews li { display: grid; grid-template-rows: auto 1fr auto; gap: 0.8rem; padding: 1.4rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
ul.reviews blockquote { margin: 0; font-size: 1.02rem; }
ul.reviews blockquote p { max-width: none; }
ul.reviews footer { font-size: 0.9rem; color: var(--muted); display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; }
ul.reviews footer cite { font-style: normal; font-weight: 600; color: var(--text); }
ul.reviews > li > span { color: #e8a400; letter-spacing: 0.1em; font-size: 0.95rem; }
@media (max-width: 900px) { ul.reviews { grid-template-columns: 1fr; } }
.badge-google {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.9rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.92rem; color: var(--text); text-decoration: none;
}
.badge-google strong { font-family: var(--font-display); }

/* ---------- pacientes EE.UU. ---------- */
section.usa > article { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
section.usa ul { list-style: none; padding: 0; display: grid; gap: 0.7rem; }
section.usa li { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; }
section.usa li p { max-width: none; }
section.usa li::before { content: "✓"; font-weight: 700; color: var(--ozone); font-family: var(--font-display); }
@media (max-width: 900px) { section.usa > article { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
section.faq > details { border-top: 1px solid var(--line); }
section.faq > details:last-of-type { border-bottom: 1px solid var(--line); }
section.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.1rem 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
section.faq summary::-webkit-details-marker { display: none; }
section.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--ozone-deep); flex: none; transition: transform .2s; }
section.faq details[open] summary::after { transform: rotate(45deg); }
section.faq details p { padding-bottom: 1.2rem; color: var(--muted); }

/* ---------- contacto ---------- */
section.contact > article { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
form.lead { display: grid; gap: 0.9rem; padding: clamp(1.25rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
form.lead fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.9rem; grid-template-columns: 1fr 1fr; }
form.lead fieldset > *:only-child, form.lead fieldset > textarea, form.lead fieldset > label.full { grid-column: 1 / -1; }
form.lead legend { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2); margin-bottom: 0.5rem; }
form.lead label { display: grid; gap: 0.35rem; font-size: 0.92rem; font-weight: 600; }
form.lead input, form.lead select, form.lead textarea {
  font: inherit; padding: 0.75rem 0.9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); color: var(--text); min-height: 3rem;
}
form.lead textarea { min-height: 6rem; resize: vertical; }
form.lead small { color: var(--muted); font-size: 0.85rem; }
form.lead button { justify-self: start; }
form.lead output { font-size: 0.92rem; color: var(--muted); }
address { font-style: normal; display: grid; gap: 1rem; }
address dl { margin: 0; display: grid; gap: 0.9rem; }
address dt { font-family: var(--font-display); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ozone-deep); }
address dd { margin: 0.15rem 0 0; }
address dd a { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2); color: var(--text); text-decoration: none; }
address dd a:hover { color: var(--ozone-deep); }
address iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 900px) {
  section.contact > article { grid-template-columns: 1fr; }
  form.lead fieldset { grid-template-columns: 1fr; }
}

/* ---------- página interior (artículo) ---------- */
main > article > header.page-head { background: var(--ink); color: var(--on-ink); padding-block: clamp(2.5rem, 5vw, 4.5rem); }
main > article > header.page-head > * { inline-size: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
main > article > header.page-head nav { font-size: 0.9rem; color: var(--on-ink-muted); margin-bottom: 1rem; }
main > article > header.page-head nav a { color: var(--on-ink-muted); }
main > article > header.page-head hgroup > p:first-child { color: var(--ozone); }
main > article > header.page-head hgroup > p:last-child:not(:first-child) { color: var(--on-ink-muted); max-width: 52ch; }
main > article > header.page-head menu { list-style: none; padding: 0; margin: 1.5rem auto 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }
main > article > section.prose > * { inline-size: min(100% - 2 * var(--gutter), 46rem); max-width: none; }
main > article > section.prose h2 { font-size: var(--fs-3); margin-top: 2.2rem; margin-bottom: 0.8rem; }
main > article > section.prose h2:first-child { margin-top: 0; }
main > article > section.prose h3 { margin-top: 1.6rem; margin-bottom: 0.5rem; }
main > article > section.prose p, main > article > section.prose ul, main > article > section.prose ol { margin-bottom: 1rem; }
main > article > section.prose figure { margin: 1.5rem auto; }
main > article > section.prose figure img { border-radius: var(--radius); width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
main > article > section.prose figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 0.5rem; }
main > article > section.prose aside {
  padding: 1.25rem 1.4rem; border-left: 4px solid var(--ozone); background: var(--surface-2); border-radius: 0 var(--radius) var(--radius) 0; margin: 1.5rem auto;
}
main > article > section.prose aside p { max-width: none; }
main > article > section.prose ul.symptoms { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
main > article > section.prose ul.symptoms li { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; padding: 0.7rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
main > article > section.prose ul.symptoms li::before { content: "•"; color: var(--ozone); font-weight: 800; }
@media (max-width: 600px) { main > article > section.prose ul.symptoms { grid-template-columns: 1fr; } }

/* ---------- CTA final ---------- */
section.cta-final { text-align: center; }
section.cta-final h2 { margin-inline: auto; max-width: 20ch; }
section.cta-final menu { list-style: none; padding: 0; margin: 1.75rem auto 0; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
section.cta-final p { margin-inline: auto; }

/* ---------- footer ---------- */
body > footer { background: var(--ink); color: var(--on-ink); padding-block: clamp(2.5rem, 5vw, 4rem) calc(1.5rem + var(--dock-h, 0px)); font-size: 0.95rem; }
body > footer > * { inline-size: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
body > footer > nav { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgb(255 255 255 / .12); }
body > footer > nav > section { display: grid; gap: 0.7rem; align-content: start; }
body > footer h3 { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ozone); }
body > footer ul { list-style: none; padding: 0; display: grid; gap: 0.45rem; }
body > footer a { color: var(--on-ink); text-decoration: none; }
body > footer a:hover { color: var(--ozone); }
body > footer p { color: var(--on-ink-muted); }
body > footer img { height: 2.4rem; width: auto; }
body > footer > p { padding-top: 1.5rem; font-size: 0.85rem; color: var(--on-ink-muted); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; max-width: none; }
@media (max-width: 900px) { body > footer > nav { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { body > footer > nav { grid-template-columns: 1fr; } }

/* ---------- dock móvil (acciones rápidas) ---------- */
body > nav.dock { display: none; }
@media (max-width: 900px) {
  :root { --dock-h: 4.2rem; }
  body > nav.dock {
    position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 0.5rem; padding: 0.55rem 0.75rem calc(0.55rem + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  body > nav.dock a { min-height: 3rem; font-size: 0.9rem; padding-inline: 0.8rem; }
}

/* ---------- reveal (respeta reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .45s ease, transform .45s ease; }
  html.js [data-reveal].is-in { opacity: 1; transform: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ==========================================================================
   v1.1 — recorrido interactivo, WhatsApp flotante, selector de idioma, logo
   ========================================================================== */

/* ---------- logo (SVG vectorial) ---------- */
body > header > nav > a:first-child { flex: none; min-width: 11.5rem; }
body > header > nav > a:first-child img { width: 11.5rem; height: auto; max-width: none; }
@media (max-width: 1180px) { body > header > nav > a:first-child { min-width: 9.5rem; } body > header > nav > a:first-child img { width: 9.5rem; } }
@media (max-width: 900px) { body > header > nav > a:first-child { min-width: 0; } body > header > nav > a:first-child img { width: min(10.5rem, 48vw); } }
body > footer img { height: auto; width: min(100%, 15rem); }

/* ---------- selector de idioma ---------- */
body > header > nav > a.lang {
  display: inline-flex; align-items: center; gap: 0; padding: 0.2rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  font-family: var(--font-display); font-size: 0.74rem; font-weight: 700; letter-spacing: 0.06em; text-decoration: none; color: var(--muted); line-height: 1;
}
body > header > nav > a.lang span { padding: 0.45rem 0.6rem; border-radius: 999px; }
body > header > nav > a.lang span[aria-current] { background: var(--ink); color: var(--on-ink); }
body > header > nav > a.lang:hover span:not([aria-current]) { color: var(--ozone-deep); }
body > header > nav { grid-template-columns: auto 1fr auto auto; }
@media (max-width: 900px) {
  body > header > nav { grid-template-columns: 1fr auto auto; }
  body > header > nav > a.lang { order: 2; }
  body > header > nav > button { order: 3; }
  body > header > nav > ul { order: 4; }
}
body > aside.lang-hint {
  position: fixed; left: 1.5rem; bottom: calc(var(--dock-h, 0px) + 1rem); z-index: 70;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; max-width: min(92vw, 30rem);
  padding: 0.75rem 1rem; border-radius: 14px; background: var(--ink); color: var(--on-ink); box-shadow: 0 16px 40px -12px rgb(0 0 0 / .5);
  font-size: 0.95rem;
}
body > aside.lang-hint[hidden] { display: none; }
@media (max-width: 900px) { body > aside.lang-hint { left: 0.75rem; right: 0.75rem; max-width: none; } }
body > aside.lang-hint a { color: var(--ozone); font-weight: 700; text-decoration: none; }
body > aside.lang-hint button { background: transparent; border: 1px solid var(--on-ink-muted); color: var(--on-ink); border-radius: 999px; padding: 0.35rem 0.8rem; font: inherit; font-size: 0.85rem; cursor: pointer; }

/* ---------- WhatsApp flotante (escritorio; en móvil lo cubre el dock) ---------- */
body > a.wa-float {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 65;
  display: inline-flex; align-items: center; gap: 0; height: 3.6rem; padding: 0 0.9rem; border-radius: 999px;
  background: var(--wa); color: #fff; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 0.95rem;
  box-shadow: 0 12px 28px -8px rgb(21 128 61 / .7); transition: padding .2s ease, transform .15s ease;
}
body > a.wa-float svg { width: 1.75rem; height: 1.75rem; flex: none; }
body > a.wa-float span { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .25s ease, opacity .2s ease, margin .2s ease; }
body > a.wa-float:hover, body > a.wa-float:focus-visible { transform: translateY(-2px); }
body > a.wa-float:hover span, body > a.wa-float:focus-visible span { max-width: 14rem; opacity: 1; margin-left: 0.6rem; }
@media (prefers-reduced-motion: no-preference) {
  body > a.wa-float::before { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--wa); opacity: 0; animation: wa-pulse 2.6s ease-out infinite; }
  @keyframes wa-pulse { 0% { transform: scale(.9); opacity: .7; } 70% { transform: scale(1.25); opacity: 0; } 100% { opacity: 0; } }
}
@media (max-width: 900px) { body > a.wa-float { display: none; } }

/* ---------- recorrido (proceso como viaje) ---------- */
ol.journey {
  --node: 4.25rem; --track: 3px;
  list-style: none; padding: 0; margin: 0; position: relative; counter-reset: step;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; align-items: start;
}
ol.journey::before, ol.journey::after {
  content: ""; position: absolute; z-index: 0; border-radius: 999px;
  top: calc(var(--node) / 2 - var(--track) / 2); height: var(--track);
  left: calc(12.5% ); right: calc(12.5%);
  background: color-mix(in srgb, var(--on-ink) 18%, transparent);
}
ol.journey::after { right: auto; width: calc(75% * var(--progress, 0)); background: var(--ozone); transition: width .7s cubic-bezier(.2,.7,.2,1); box-shadow: 0 0 12px rgb(31 168 220 / .6); }
ol.journey > li { position: relative; z-index: 1; counter-increment: step; }
ol.journey details { display: block; }
ol.journey details > p, ol.journey details > ul { margin-top: 0.8rem; }
ol.journey summary {
  list-style: none; cursor: pointer; display: grid; justify-items: center; text-align: center; gap: 0.9rem; padding: 0; color: inherit;
}
ol.journey summary::-webkit-details-marker { display: none; }
ol.journey summary > svg {
  width: var(--node); height: var(--node); padding: calc(var(--node) * 0.24); border-radius: 50%; box-sizing: border-box;
  background: var(--ink-2); border: 2px solid color-mix(in srgb, var(--on-ink) 22%, transparent); color: var(--on-ink-muted);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  transition: background .35s ease, border-color .35s ease, color .35s ease, transform .35s ease, box-shadow .35s ease;
}
ol.journey summary > span { display: grid; gap: 0.2rem; }
ol.journey summary > span > small { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ozone); font-variant-numeric: tabular-nums; }
ol.journey summary > span > b { font-family: var(--font-display); font-size: 1.08rem; font-weight: 700; }
ol.journey summary > span > b::after { content: "+"; display: inline-block; margin-left: 0.4em; color: var(--ozone); transition: transform .2s; }
ol.journey details[open] summary > span > b::after { transform: rotate(45deg); }
ol.journey li.is-active summary > svg, ol.journey details[open] summary > svg { background: var(--ozone); border-color: var(--ozone); color: #062233; transform: scale(1.06); box-shadow: 0 0 0 8px rgb(31 168 220 / .16), 0 12px 30px -10px rgb(31 168 220 / .7); }
ol.journey li.is-done summary > svg { border-color: var(--ozone); color: var(--ozone); }
ol.journey details > p, ol.journey details > ul {
  margin: 0; padding: 1rem 1.1rem; border-radius: 12px; background: var(--ink-2); color: var(--on-ink-muted); font-size: 0.97rem; text-align: left; max-width: none;
}
ol.journey details > ul { list-style: none; display: grid; gap: 0.4rem; padding-left: 1.1rem; }
ol.journey details > ul li { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem; }
ol.journey details > ul li::before { content: "→"; color: var(--ozone); font-weight: 700; }
ol.journey details > p + ul { margin-top: -0.3rem; }
@media (prefers-reduced-motion: no-preference) {
  html.js ol.journey > li { opacity: 0; transform: translateY(12px); transition: opacity .5s ease calc(var(--i, 0) * .12s), transform .5s ease calc(var(--i, 0) * .12s); }
  html.js ol.journey.is-in > li { opacity: 1; transform: none; }
  html.js ol.journey summary > svg path, html.js ol.journey summary > svg polyline { stroke-dasharray: 90; stroke-dashoffset: 90; transition: stroke-dashoffset 1s ease calc(.25s + var(--i, 0) * .15s); }
  html.js ol.journey.is-in summary > svg path, html.js ol.journey.is-in summary > svg polyline { stroke-dashoffset: 0; }
}
@media (max-width: 900px) {
  ol.journey { grid-template-columns: 1fr; gap: 0.5rem; }
  ol.journey::before, ol.journey::after { top: calc(var(--node) / 2); bottom: calc(var(--node) / 2); left: calc(var(--node) / 2 - var(--track) / 2); right: auto; height: auto; width: var(--track); }
  ol.journey::after { bottom: auto; height: calc(100% - var(--node)); transform: scaleY(var(--progress, 0)); transform-origin: top; width: var(--track); transition: transform .7s cubic-bezier(.2,.7,.2,1); }
  ol.journey > li { padding-bottom: 1rem; }
  ol.journey summary { grid-template-columns: var(--node) 1fr; column-gap: 1rem; justify-items: start; text-align: left; align-items: center; }
  ol.journey details > p, ol.journey details > ul { margin-left: calc(var(--node) + 1rem); }
}

/* ---------- página interior: datos clave, relacionados, molécula ---------- */
main > article > header.page-head dl.facts { display: grid; grid-template-columns: repeat(3, auto); gap: 1rem 2.5rem; justify-content: start; margin: 1.75rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgb(255 255 255 / .12); }

main > article > header.page-head dl.facts dt { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--on-ink-muted); }
main > article > header.page-head dl.facts dd { margin: 0.15rem 0 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--on-ink); }
main > article > header.page-head dl.facts { grid-template-rows: auto auto; grid-auto-flow: column; }
@media (max-width: 600px) { main > article > header.page-head dl.facts { grid-template-columns: 1fr 1fr; grid-auto-flow: row; grid-template-rows: none; } main > article > header.page-head dl.facts dt:nth-of-type(n+2) { margin-top: 0.5rem; } }
main > article > header.page-head figure { margin: 2rem auto 0; }
main > article > header.page-head figure img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 600px) { main > article > header.page-head figure img { aspect-ratio: 4 / 3; } }
main > article > section.related hgroup { margin-bottom: 1.5rem; }
main > article > section.prose ol.steps-clinic { list-style: none; padding: 0; display: grid; gap: 0.6rem; counter-reset: c; }
main > article > section.prose ol.steps-clinic li { counter-increment: c; display: grid; grid-template-columns: 2.2rem 1fr; gap: 0.6rem; padding: 0.9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
main > article > section.prose ol.steps-clinic li::before { content: counter(c); font-family: var(--font-display); font-weight: 800; color: var(--ozone-deep); font-size: 1.3rem; line-height: 1; }
main > article > section.prose figure.molecule { margin: 1.5rem auto; padding: 1.5rem; background: var(--ink); border-radius: var(--radius); color: var(--on-ink); display: grid; gap: 1rem; justify-items: center; }
main > article > section.prose figure.molecule svg { width: min(100%, 28rem); height: auto; }
main > article > section.prose figure.molecule figcaption { color: var(--on-ink-muted); text-align: center; }
section.faq > details { border-top: 1px solid var(--line); } section.faq > details:last-of-type { border-bottom: 1px solid var(--line); }
section.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1.1rem 0; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
section.faq summary::-webkit-details-marker { display: none; }
section.faq summary::after { content: "+"; font-size: 1.5rem; color: var(--ozone-deep); flex: none; transition: transform .2s; }
section.faq details[open] summary::after { transform: rotate(45deg); }
section.faq details p { padding-bottom: 1.2rem; color: var(--muted); }
