/* Instituto de Oftalmología y Glaucoma Vásquez
   Sistema: niebla fría + azul de marca (#005EA5 del logo) + puntos de campo visual en cian.
   Tipos: Newsreader (titulares) / Figtree (texto). Base 8 px. */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin.woff2") format("woff2");
  font-weight: 300 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

:root {
  --mist: #EEF3F6;
  --paper: #FFFFFF;
  --ink: #0D2A44;
  --ink-soft: #46607A;
  --blue: #005EA5;
  --blue-press: #004B85;
  --cyan: #00AAD5;
  --night: #0A2238;
  --night-ink: #DCE8F1;
  --line: #D3DEE7;
  --wa: #0E7A43;
  --danger: #A3261B;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1vw, 1.875rem);
  --step-3: clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
  --step-4: clamp(2.375rem, 1.4rem + 4vw, 4.25rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 3rem + 5vw, 7.5rem);
  --radius-s: 10px;
  --radius-l: 22px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; line-height: 1.12; text-wrap: balance; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.015em; }
h3, h4 { font-family: var(--sans); font-weight: 650; letter-spacing: -0.005em; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.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; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--radius-s); }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--ink-soft); }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.narrow { max-width: 640px; }
.page-title { font-size: var(--step-3); margin-bottom: 16px; }
.fine { font-size: var(--step--1); color: var(--ink-soft); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px;
  border-radius: 999px; border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn .ico { width: 20px; height: 20px; flex: none; }
.btn-lg { min-height: 56px; padding: 14px 26px; font-size: 1.0625rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-press); }
.btn-ghost { background: transparent; color: var(--ink); border-color: #A9BBCB; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(238, 243, 246, .86);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-row { display: flex; align-items: center; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-right: auto; min-height: 48px; }
.brand img { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.brand-text span { font-size: .8125rem; color: var(--ink-soft); }
.nav ul { display: flex; gap: 4px; }
.nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; color: var(--ink); text-decoration: none; font-weight: 500; border-radius: 8px; }
.nav a:not(.btn):hover { color: var(--blue); }
.nav-cta-mobile { display: none; }
.menu-toggle { display: none; }

/* Hero */
.hero { padding-block: clamp(2rem, 1rem + 4vw, 5rem) var(--section); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.hero-kicker { font-weight: 600; color: var(--blue); margin-bottom: 20px; }
.hero h1 { font-size: var(--step-4); font-weight: 400; line-height: 1.03; letter-spacing: -0.025em; max-width: 13ch; margin-bottom: 28px; }
.lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); max-width: 36em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 36px 40px; }
.proof { display: grid; gap: 10px; padding-top: 28px; border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--ink-soft); max-width: 34em; }
.proof li { display: flex; gap: 12px; align-items: baseline; }
.proof li::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); transform: translateY(-1px); }

/* El retrato ocupa el punto de fijación del campo visual: los puntos lo rodean. */
.hero-visual { position: relative; aspect-ratio: 1; width: 100%; max-width: 560px; justify-self: end; }
.hero-visual .field-hero { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-visual picture { position: absolute; left: 50%; top: 50%; width: 40%; transform: translate(-50%, -50%); }
.portrait {
  width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 50% 8%;
  border-radius: 50%;
  background: #E6EBEE;
  border: 6px solid var(--paper);
  box-shadow: 0 30px 60px -30px rgba(13, 42, 68, .5);
}

/* Campo visual (SVG generado por JS) */
.field .dot { transition: fill .35s ease, opacity .35s ease, r .35s ease; }
.field-hero .dot { fill: var(--cyan); opacity: 0; }
.field-hero.is-lit .dot { opacity: var(--o, .5); transition: opacity .5s ease var(--d, 0s); }
.field-hero .ring { fill: none; stroke: #C5D4DF; stroke-width: .35; }
.field-hero .blind { display: none; }

/* Secciones */
.section { padding-block: var(--section); }
.section.paper { background: var(--paper); }
.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head h2 { font-size: var(--step-3); margin-bottom: 16px; }
.section-head p { font-size: var(--step-1); color: var(--ink-soft); }

/* Triage */
.triage { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: start; }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 20px 12px 16px;
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
  font-weight: 500; line-height: 1.3; cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.chip span::before {
  content: ""; flex: none; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid #9DB0C1; background: var(--paper) center / 12px no-repeat;
  transition: background-color .2s ease, border-color .2s ease;
}
.chip:hover span { border-color: #A9BBCB; }
.chip input:checked + span { border-color: var(--blue); background: #E3EEF8; }
.chip input:checked + span::before {
  border-color: var(--blue); background-color: var(--blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.chip input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 3px; }

.triage-result {
  position: sticky; top: calc(var(--header-h) + 24px);
  background: var(--paper); border-radius: var(--radius-l); padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  display: grid; gap: 20px;
}
.result-title { font-family: var(--serif); font-size: var(--step-2); line-height: 1.2; margin-bottom: 8px; }
.result-list { display: grid; gap: 12px; }
.result-list li { padding-left: 18px; border-left: 3px solid var(--cyan); }
.result-list strong { display: block; }
.result-list span { color: var(--ink-soft); font-size: .9375rem; }
.urgent { font-size: var(--step--1); color: var(--ink-soft); padding-top: 18px; border-top: 1px solid var(--line); }
.urgent strong { color: var(--danger); font-weight: 600; }

/* Simulador (sección oscura) */
.night { background: var(--night); color: var(--night-ink); }
.night h2 { color: #fff; font-size: var(--step-3); margin-bottom: 24px; max-width: 14ch; }
.night p { color: #B7C9D8; }
.night .fine { color: #8FA6BA; margin-top: 32px; max-width: 34em; }
.sim-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.sim-copy > p { max-width: 34em; }
.sim-control { margin-top: 32px; padding: 24px; border-radius: var(--radius-l); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.sim-control label { display: block; font-weight: 600; color: #fff; margin-bottom: 12px; }
.sim-scale { display: flex; justify-content: space-between; font-size: .8125rem; color: #8FA6BA; margin-top: 6px; }
.stage-text { margin: 16px 0 0; color: #fff !important; min-height: 3.2em; }
input[type="range"] { width: 100%; height: 48px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--cyan) var(--p, 0%), rgba(255,255,255,.18) var(--p, 0%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255,255,255,.18); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--cyan); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 6px rgba(0,170,213,.3); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 6px rgba(0,170,213,.3); }
.sim-visual { position: relative; }
.field-sim { width: 100%; max-width: 520px; margin-inline: auto; }
.field-sim .axis { stroke: rgba(255,255,255,.16); stroke-width: .4; }
.field-sim .ring { fill: none; stroke: rgba(255,255,255,.1); stroke-width: .4; }
.field-sim .dot { fill: var(--cyan); }
.field-sim .dot.is-lost { fill: #24384C; }
.field-sim .blind { fill: #24384C; }

/* Tratamientos */
.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end;
  background: var(--paper); border-radius: var(--radius-l); padding: clamp(1.75rem, 4vw, 3.25rem);
  border-top: 4px solid var(--blue);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.feature h3 { font-family: var(--serif); font-weight: 500; font-size: var(--step-3); margin-bottom: 16px; }
.feature p { max-width: 40em; color: var(--ink-soft); }
.tick { display: grid; gap: 8px; margin-top: 20px; }
.tick li { display: flex; gap: 12px; }
.tick li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.6l4.5-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }

.conditions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); }
.conditions li { padding-block: 28px; border-top: 1px solid var(--line); }
.conditions h3 { font-size: var(--step-1); margin-bottom: 8px; }
.conditions .symptom { display: block; font-family: var(--serif); font-weight: 400; font-size: var(--step-2); color: var(--ink); margin-bottom: 6px; letter-spacing: -0.01em; }
.conditions h3 { color: var(--blue); }
.conditions p { color: var(--ink-soft); max-width: 34em; }

/* Pasos */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-top: 72px; }
.steps li::before {
  content: counter(step); position: absolute; top: 0; left: 0;
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%;
  background: var(--mist); color: var(--blue); font: 500 1.5rem/1 var(--serif);
}
.steps li::after { content: ""; position: absolute; top: 24px; left: 64px; right: -16px; height: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: var(--step-1); margin-bottom: 10px; }
.steps p { color: var(--ink-soft); }

/* La doctora */
.doc-grid {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  grid-template-areas: "photo intro" "photo timeline";
  column-gap: clamp(2rem, 6vw, 5.5rem); row-gap: 48px; align-items: start;
}
.doc-photo { grid-area: photo; margin: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.doc-photo img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: var(--radius-l); background: #E6EBEE; }
.doc-intro { grid-area: intro; }
.timeline { grid-area: timeline; }
.doc-intro h2 { font-size: var(--step-3); margin-bottom: 16px; }
.doc-role { font-size: var(--step-1); color: var(--blue); font-weight: 500; }
.doc-intro p:not(.doc-role) { max-width: 36em; }
.timeline { position: relative; display: grid; gap: 24px; padding-left: 32px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -32px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--mist); border: 2px solid var(--blue); }
.timeline li:nth-child(3)::before { background: var(--blue); }
.timeline h3 { font-size: 1.0625rem; margin-bottom: 2px; }
.timeline p { color: var(--ink-soft); font-size: .9375rem; }

.community { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-block: clamp(3rem, 6vw, 5rem); border-block: 1px solid var(--line); }
.community li { padding: 24px 24px 24px 0; color: var(--ink-soft); font-size: .9375rem; line-height: 1.5; }
.community li + li { padding-left: 24px; border-left: 1px solid var(--line); }
.community strong { display: block; color: var(--ink); font-family: var(--serif); font-weight: 500; font-size: var(--step-1); margin-bottom: 6px; }
.team-title { font-family: var(--serif); font-weight: 500; font-size: var(--step-2); margin-bottom: 24px; }
.team { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.team li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: end; background: var(--paper); border-radius: var(--radius-l); padding: 20px 24px 0 20px; overflow: hidden; }
.team img { width: 112px; height: 150px; object-fit: cover; object-position: top; }
.team div { padding-bottom: 20px; }
.team h4 { font-size: 1.0625rem; margin-bottom: 6px; }
.team p { color: var(--ink-soft); font-size: .9375rem; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 6rem); }
.faq-grid h2 { font-size: var(--step-3); }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; gap: 24px; align-items: center;
  min-height: 64px; padding-block: 18px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 14px; height: 14px; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg) translateY(-4px); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-4px); }
.faq details p { color: var(--ink-soft); padding-bottom: 24px; max-width: 40em; }

/* Contacto */
.contact-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.contact-info h2 { font-size: var(--step-3); margin-bottom: 16px; }
.contact-info > p { font-size: var(--step-1); color: var(--ink-soft); }
.contact-list { display: grid; gap: 20px; margin: 32px 0; }
.contact-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.contact-list dt { font-weight: 600; }
.contact-list dd { margin: 0; color: var(--ink-soft); }
.contact-list a { font-weight: 600; display: inline-flex; min-height: 44px; margin-block: -8px; align-items: center; overflow-wrap: anywhere; }

.form { background: var(--paper); border-radius: var(--radius-l); padding: clamp(1.5rem, 4vw, 2.75rem); display: grid; gap: 20px; border: 1px solid var(--line); }
.form h3 { font-family: var(--serif); font-weight: 500; font-size: var(--step-2); }
.field-row { display: grid; gap: 8px; }
.field-row label { font-weight: 600; font-size: .9375rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.form input, .form select, .form textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  font: 400 1rem/1.4 var(--sans); color: var(--ink);
  background: var(--mist); border: 1.5px solid transparent; border-radius: var(--radius-s);
  transition: border-color .2s ease, background-color .2s ease;
}
.form select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='m1 1.5 5 5 5-5' fill='none' stroke='%2346607A' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; background-size: 12px; padding-right: 44px; }
.form textarea { resize: vertical; min-height: 96px; }
.form input:hover, .form select:hover, .form textarea:hover { border-color: var(--line); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--blue); background-color: var(--paper); }
.form [aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: .875rem; margin: 0; }

/* Footer */
.site-footer { background: var(--night); color: #9FB3C4; padding-block: 56px 48px; font-size: .9375rem; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; }
.footer-brand { font-family: var(--serif); font-size: var(--step-1); color: #fff; margin-bottom: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; justify-content: flex-end; align-content: start; }
.footer-links a { color: #DCE8F1; text-decoration: none; display: inline-flex; min-height: 48px; align-items: center; }
.footer-links a:hover { text-decoration: underline; }
.footer-legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8125rem; }

/* Acciones flotantes */
.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 12px 30px -10px rgba(10, 34, 56, .55);
  transition: transform .2s ease;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { transform: scale(1.06); }
.action-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav a:not(.btn) { padding: 0 8px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
  .steps li:nth-child(2)::after { display: none; }
  .community { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .community li:nth-child(3) { padding-left: 0; border-left: 0; }
  .community li:nth-child(n+3) { border-top: 1px solid var(--line); }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .header-cta { display: none; }
  .menu-toggle {
    display: grid; place-items: center; width: 48px; height: 48px; margin-right: -8px;
    background: none; border: 0; border-radius: 12px; color: var(--ink); cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .2s ease; }
  .bars { position: relative; }
  .bars::before, .bars::after { content: ""; position: absolute; left: 0; }
  .bars::before { top: -7px; }
  .bars::after { top: 7px; }
  .menu-toggle[aria-expanded="true"] .bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }

  .nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49;
    background: var(--mist); padding: 16px var(--gutter) 40px;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
    overflow-y: auto;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .2s ease; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-bottom: 1px solid var(--line); }
  .nav a:not(.btn) { width: 100%; min-height: 64px; padding: 0; font-family: var(--serif); font-size: 1.75rem; font-weight: 400; }
  .nav .nav-cta-mobile { display: block; border: 0; padding-top: 24px; }
  .nav-cta-mobile .btn { width: 100%; min-height: 56px; }
  body.menu-open { overflow: hidden; }

  .hero-grid, .sim-grid, .doc-grid, .faq-grid, .contact-grid, .triage { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 240px; justify-self: center; order: -1; margin-top: -8px; }
  .hero-visual picture { width: 46%; }
  .doc-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "photo" "intro" "timeline"; }
  .doc-photo { position: static; max-width: 360px; }
  .hero h1 { max-width: 15ch; }
  .triage-result { position: static; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .sim-visual { order: -1; max-width: 420px; width: 100%; margin-inline: auto; }
  .team { grid-template-columns: minmax(0, 1fr); }

  .wa-float { display: none; }
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .action-bar .btn { min-height: 52px; }
  .action-bar .btn-ghost { background: var(--paper); }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (max-width: 600px) {
  .hero { padding-top: 16px; }
  .hero h1 { font-size: clamp(2.25rem, 9.6vw, 2.75rem); margin-bottom: 20px; }
  .hero-kicker { margin-bottom: 12px; }
  .lead { font-size: 1.0625rem; }
  .cta-row { flex-direction: column; margin-block: 28px 32px; }
  .cta-row .btn { width: 100%; }
  .chips { gap: 8px; }
  .chip, .chip span { width: 100%; }
  .conditions { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .steps li { padding: 0 0 32px 72px; min-height: 48px; }
  .steps li::after { display: block; top: 56px; bottom: 8px; left: 23px; right: auto; width: 1px; height: auto; }
  .steps li:nth-child(2)::after { display: block; }
  .steps li:last-child { padding-bottom: 0; }
  .community { grid-template-columns: minmax(0, 1fr); }
  .community li, .community li + li { padding: 20px 0; border-left: 0; }
  .community li + li { border-top: 1px solid var(--line); }
  .team li { grid-template-columns: 88px minmax(0, 1fr); padding: 16px 16px 0; gap: 16px; }
  .team img { width: 88px; height: 118px; }
  .contact-list div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-links { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation: none !important; }
}

@media print {
  .site-header, .action-bar, .wa-float { display: none; }
}

/* Equipamiento: la foto real del instituto abre la sección como umbral. */
.section.equip { padding-top: 0; }
.equip-photo { margin: 0 0 clamp(3rem, 6vw, 5rem); }
.equip-photo img { width: 100%; height: clamp(180px, 26vw, 380px); object-fit: cover; object-position: 50% 45%; }
.forum {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center;
  background: var(--night); color: #B7C9D8; border-radius: var(--radius-l); padding: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.forum-tag { color: var(--cyan); font-weight: 600; margin-bottom: 8px; }
.forum h3 { font-family: var(--serif); font-weight: 500; font-size: var(--step-3); color: #fff; margin-bottom: 14px; }
.forum p:not(.forum-tag) { max-width: 38em; }
.forum-facts { display: grid; gap: 0; }
.forum-facts li { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); font-size: .9375rem; }
.forum-facts li:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.forum-facts strong { display: block; color: #fff; font-weight: 600; }
.equip-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem) clamp(2rem, 5vw, 4.5rem); }
.equip-group h3 { font-family: var(--serif); font-weight: 500; font-size: var(--step-2); padding-bottom: 14px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.devices { margin: 0; }
.devices div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.devices dt { font-weight: 650; font-size: 1.0625rem; margin-bottom: 4px; }
.devices dt span { font-weight: 500; font-size: .875rem; color: var(--blue); margin-left: 6px; }
.devices dd { margin: 0; color: var(--ink-soft); font-size: .9688rem; max-width: 36em; }
.equip-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: clamp(2rem, 4vw, 3rem); }
.equip-cta span { color: var(--ink-soft); font-size: var(--step--1); max-width: 34em; }
@media (max-width: 960px) {
  .forum, .equip-groups { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .equip-photo img { height: 170px; object-position: 62% 50%; }
  .equip-cta .btn { width: 100%; }
}
