/* SIMAPTIS · estilos MOBILE FIRST: la base es celular; los @media (min-width) agregan para pantallas mayores. */

/* ===== Fuentes autoalojadas (Inter, SIL OFL 1.1) ===== */
@font-face { font-family: "Inter"; src: url("fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ===== Tokens (manual de marca SIMAPTIS) ===== */
:root {
  --navy: #0A1628;
  --teal: #00C2B3;
  --teal-ink: #00786F;
  --teal-tint: #E6F8F6;
  --surface: #F4F7F9;
  --ink: #0A1628;
  --ink-soft: #44526A;
  --line: #D6DEE6;
  --radius: 10px;
  --wrap: 1120px;
  --nav-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --step-0: 1rem;
  --step-1: 1.125rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem);
  --section: clamp(3rem, 8vw, 6rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--step-0); line-height: 1.6; color: var(--ink); background: #fff; overflow-wrap: break-word; }
img, svg, iframe { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: var(--step-3); max-width: 20ch; }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }
p { margin: 0 0 1em; max-width: 64ch; }
a { color: var(--teal-ink); }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.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: 1rem; top: -4rem; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: var(--radius); }
.skip:focus { top: 1rem; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.section-intro { color: var(--ink-soft); font-size: var(--step-1); margin-bottom: 2rem; }
.hint { font-size: .9375rem; color: var(--ink-soft); margin-top: .75rem; }

/* ===== Botones (área táctil mínima 48px) ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.4rem; border: 2px solid transparent; border-radius: var(--radius); font: 600 1rem/1.2 var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s; }
.btn--primary { background: var(--teal); color: var(--navy); }
.btn--primary:hover { background: #00AFA1; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--lg { min-height: 54px; padding-inline: 1.8rem; font-size: 1.0625rem; }
.btn--wa { background: var(--navy); color: #fff; width: 100%; }
.btn--wa:hover { background: #1B2B45; }
.btn--wa svg { width: 22px; height: 22px; }

/* ===== Navegación (base: menú hamburguesa) ===== */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); }
.nav__inner { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); gap: .5rem; }
.nav__brand img { height: 34px; width: auto; }
.nav__toggle { display: grid; place-items: center; width: 48px; height: 48px; background: none; border: 0; cursor: pointer; }
.nav__toggle-bar, .nav__toggle-bar::before, .nav__toggle-bar::after { content: ""; display: block; width: 24px; height: 2.5px; background: var(--navy); border-radius: 2px; position: relative; }
.nav__toggle-bar::before { position: absolute; top: -7px; }
.nav__toggle-bar::after { position: absolute; top: 7px; }
.nav__menu { display: none; position: absolute; inset: var(--nav-h) 0 auto 0; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem; box-shadow: 0 12px 24px rgba(10,22,40,.08); }
.nav__menu.is-open { display: flex; }
.nav__menu a { color: var(--navy); text-decoration: none; font-weight: 600; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.nav__menu .btn { margin-top: 1rem; }
.nav__menu .lang { border-bottom: 0; }
.lang { font-weight: 600; font-size: .9375rem; }

/* ===== Hero ===== */
.hero { padding: 2.5rem 0 var(--section); background: linear-gradient(180deg, #fff 0%, var(--surface) 100%); }
.hero__grid { display: grid; gap: 2.5rem; }
.eyebrow { font-size: 1rem; font-weight: 600; color: var(--teal-ink); margin-bottom: .75rem; }
.lead { font-size: var(--step-1); color: var(--ink-soft); }
.hero__actions { display: grid; gap: .75rem; margin-top: 1.5rem; }

.demo { margin: 0; background: #fff; border: 2px solid var(--navy); border-radius: 14px; padding: 1rem; }
.demo__head { display: flex; align-items: center; gap: .8rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.demo__avatar { width: 52px; height: 52px; flex: none; }
.demo__name { font-weight: 700; margin: 0; }
.demo__topic { margin: 0; font-size: .9375rem; color: var(--ink-soft); }
.demo__chat { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .7rem; align-content: start; }
.msg { max-width: 90%; padding: .7rem .9rem; font-size: .9375rem; line-height: 1.45; }
.msg--avatar { background: var(--teal-tint); justify-self: start; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }
.msg--user { background: var(--navy); color: #fff; justify-self: end; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.msg--eval { max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 0 0; border-top: 1px dashed var(--line); }
.eval__title { font-size: .875rem; font-weight: 600; color: var(--ink-soft); width: 100%; }
.chip { font-size: .8125rem; font-weight: 600; padding: .3rem .7rem; border: 1.5px solid var(--teal); border-radius: 999px; color: var(--navy); }
.js-anim .msg { opacity: 0; transform: translateY(6px); transition: opacity .35s ease, transform .35s ease; }
.js-anim .msg.is-in { opacity: 1; transform: none; }

/* ===== Avatares (base: foto a la izquierda, texto a la derecha) ===== */
.avatars { padding: var(--section) 0; }
.avatars__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; }
.avatar { display: grid; grid-template-columns: 96px 1fr; column-gap: 1rem; align-items: center; }
.avatar__img { width: 96px; height: 96px; grid-row: span 2; }
.avatar h3 { margin: 0 0 .35rem; }
.avatar h3 span { display: block; font-weight: 400; color: var(--ink-soft); font-size: .9375rem; }
.tag { display: inline-block; justify-self: start; font-size: .8125rem; font-weight: 600; padding: .2rem .6rem; border-radius: 6px; margin: 0; }
.tag--patient { background: var(--teal-tint); color: var(--teal-ink); }
.tag--pro { background: var(--navy); color: #fff; }
.quote { grid-column: 1 / -1; margin: 1rem 0 0; padding: .9rem 1rem; background: var(--surface); font-size: .9375rem; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px)); }

/* ===== Cómo funciona (base: pasos en columna, flechas hacia abajo) ===== */
.steps { padding: var(--section) 0; background: var(--navy); color: #fff; }
.steps h2 { margin-bottom: 2rem; }
.steps__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.step__num { display: grid; place-items: center; width: 48px; height: 42px; margin-bottom: .9rem; background: var(--teal); color: var(--navy); font-weight: 700; font-size: 1.125rem; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.step p { color: #C7D1DE; margin-bottom: 0; }
.step__arrow { color: var(--teal); width: 40px; transform: rotate(90deg); margin-left: 4px; }

/* ===== Quiénes somos ===== */
.team { padding: var(--section) 0; }
.team__intro { margin-bottom: 2.5rem; }
.team__intro .section-intro { margin-bottom: 1rem; }
.team__intro p:not(.section-intro) { color: var(--ink-soft); }
.team__list { display: grid; gap: 2.5rem; }
.person { display: grid; gap: 1rem; }
.person__mark { display: grid; place-items: center; width: 72px; height: 62px; background: var(--navy); color: var(--teal); font-weight: 700; font-size: 1.25rem; clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.person h3 { margin-bottom: .2rem; }
.person__role { color: var(--teal-ink); font-weight: 600; margin-bottom: .8rem; }
.person__bio--pending { color: var(--ink-soft); font-style: italic; }
.btn-li { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 10px; background: #0A66C2; color: #fff; transition: background-color .15s; }
.btn-li:hover { background: #004182; }

/* ===== Simulaciones ===== */
.sims { padding: var(--section) 0; background: var(--teal-tint); }
.sims__grid { display: grid; gap: 2rem; }
.sims__claim { font-size: var(--step-1); font-weight: 600; }
.sims .btn { margin-top: .5rem; width: 100%; }
.sims__examples { background: #fff; padding: 1.5rem; border-radius: 14px; }
.hexlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.hexlist li { padding-left: 2rem; position: relative; }
.hexlist li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 14px; background: var(--teal); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.hexlist strong { display: block; }

/* ===== Contacto ===== */
.contact { padding: var(--section) 0; }
.contact__grid { display: grid; gap: 2rem; }
.form-embed { background: var(--surface); border-radius: 14px; padding: .35rem; }
.form-embed iframe { width: 100%; height: 1450px; border: 0; background: #fff; border-radius: 10px; }
.form-embed .hint { margin: .75rem .5rem .25rem; }

/* ===== Footer ===== */
.footer { border-top: 1px solid var(--line); padding: 2rem 0 6rem; }
.footer__inner { display: grid; gap: 1rem; justify-items: start; }
.footer img { height: 32px; width: auto; }
.footer p { margin: 0; color: var(--ink-soft); font-size: .9375rem; }

/* ===== WhatsApp flotante ===== */
.wa-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: #25D366; color: #fff; box-shadow: 0 4px 14px rgba(10,22,40,.25); }
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { background: #1EBE5B; }

/* ===== Modal ===== */
.modal { border: 0; border-radius: 14px; padding: 1.75rem; width: min(92vw, 420px); color: var(--ink); }
.modal::backdrop { background: rgba(10,22,40,.55); }
.modal h2 { font-size: var(--step-1); }
.modal .btn { width: 100%; }

/* ===== Páginas simples (404) ===== */
.simple { min-height: 100vh; display: grid; align-content: center; justify-items: start; gap: 1rem; padding: 3rem 0; }
.simple img { height: 36px; width: auto; margin-bottom: 1.5rem; }

/* ========== ≥ 600px: celulares grandes y tablets verticales ========== */
@media (min-width: 600px) {
  .hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; }
  .btn--wa, .sims .btn, .modal .btn { width: auto; }
  .avatar { grid-template-columns: 140px 1fr; column-gap: 1.5rem; }
  .avatar__img { width: 140px; height: 140px; }
  .person { grid-template-columns: 88px 1fr; gap: 1.25rem; align-items: start; }
  .person__mark { width: 88px; height: 76px; font-size: 1.5rem; }
  .form-embed iframe { height: 1300px; }
  .footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .demo { padding: 1.25rem; }
  .msg { font-size: 1rem; max-width: 85%; }
}

/* ========== ≥ 900px: tablets horizontales y escritorio ========== */
@media (min-width: 900px) {
  :root { --nav-h: 72px; --step-0: 1.0625rem; --step-1: 1.25rem; }
  .nav__brand img { height: 40px; }
  .nav__toggle { display: none; }
  .nav__menu { display: flex; position: static; flex-direction: row; align-items: center; gap: 1.75rem; padding: 0; border: 0; box-shadow: none; background: transparent; }
  .nav__menu a { padding: .5rem 0; border-bottom: 2px solid transparent; }
  .nav__menu a:hover, .nav__menu a[aria-current="true"] { border-bottom-color: var(--teal); }
  .nav__menu .btn { margin-top: 0; }
  .hero { padding-top: clamp(3rem, 6vw, 5.5rem); }
  .hero__grid { grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
  .demo__chat { min-height: 280px; }
  .avatars__list { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
  .avatar { display: block; }
  .avatar__img { width: 180px; height: 180px; margin-bottom: 1.25rem; }
  .avatar h3 span { display: inline; margin-left: .35rem; }
  .tag { margin-bottom: 1rem; }
  .quote { font-size: 1rem; }
  .steps__list { grid-template-columns: 1fr auto 1fr auto 1fr; gap: 1.25rem; align-items: start; }
  .step__arrow { transform: none; width: 48px; padding-top: 10px; margin: 0; }
  .team__list { grid-template-columns: 1fr 1fr; gap: 3rem; }
  .sims__grid { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
  .sims__examples { padding: 2rem; }
  .contact__grid { grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
  .form-embed iframe { height: 1250px; }
  .wa-float { right: 1.25rem; bottom: 1.25rem; width: 58px; height: 58px; }
}

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

/* ===== Frases de avatares: entre comillas y en cursiva ===== */
.quote { font-style: italic; quotes: "\201C" "\201D"; }
.quote::before { content: open-quote; }
.quote::after { content: close-quote; }

/* ===== Botón Ingresar del menú (enlace con estilo de botón) ===== */
.nav__menu a.btn, .nav__menu a.btn:hover { padding: .7rem 1.4rem; border: 2px solid transparent; color: var(--navy); }
