/*
 * Landing de medual.app. Marca v2.0.
 *
 * Los valores salen de tokens.css (lo GENERA design/brand/build.py; nunca se
 * edita a mano). Reglas de design/brand/guidelines.md: lino de fondo, eucalipto
 * para la acción, coral para el paciente (nunca aviso), Instrument Sans en
 * 400/500 sin bold, Instrument Serif italic una sola vez (el acento del hero).
 * /install sigue con styles.css.
 *
 * Las ilustraciones del producto (.stage) se dibujan a un tamaño fijo en px
 * (--dw × --dh) y script.js las escala enteras al ancho disponible.
 */

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 500;
  src: url(fonts/instrument-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 400 500;
  src: url(fonts/instrument-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/instrument-serif-latin-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/instrument-serif-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ base */

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (min-width: 720px) { html { scroll-padding-top: 92px; } }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--text-body--line-height);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

h1, h2, h3, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
b { font-weight: 500; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-eyebrow);
  line-height: var(--text-eyebrow--line-height);
  letter-spacing: var(--text-eyebrow--letter-spacing);
  font-weight: var(--text-eyebrow--font-weight);
  text-transform: uppercase;
  color: var(--accent);
}

.h-display {
  font-weight: 400;
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.h-section {
  font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.sub { font-size: clamp(16px, 1.5vw, 18px); line-height: 1.55; color: var(--text-muted); max-width: 620px; text-wrap: pretty; }
.tone { color: var(--accent); }
.sep { margin: 0 .2em; }

.sec-head { display: grid; gap: 18px; max-width: 860px; }
.sec-head.center { justify-items: center; text-align: center; margin: 0 auto; }

/* La cabeza del médico (salvia) y la del paciente (coral), como en el logo. */
.head { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.head-doc { background: var(--brand-400); }
.head-pat { background: var(--coral-400); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-calm), border-color var(--duration-fast) var(--ease-calm), color var(--duration-fast) var(--ease-calm), transform var(--duration-fast) var(--ease-calm), box-shadow var(--duration-base) var(--ease-calm);
}
.btn:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; white-space: normal; text-align: center; padding-left: 16px; padding-right: 16px; }

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 8px 22px rgba(47, 106, 88, .22); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface); border-color: var(--brand-300); }

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(250, 248, 244, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(18px);
  backdrop-filter: saturate(1.4) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-base) var(--ease-calm), box-shadow var(--duration-base) var(--ease-calm);
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: 0 8px 24px -16px rgba(34, 48, 43, .25); }

.header-row { display: flex; align-items: center; gap: 24px; height: 68px; }
@media (min-width: 720px) { .header-row { height: 84px; } }
.logo { display: block; line-height: 0; flex: none; }
.logo img { height: 26px; width: auto; }
@media (min-width: 720px) { .logo img { height: 32px; } }

.nav { display: none; gap: 34px; margin: 0 auto; }
.nav a { color: var(--neutral-700); text-decoration: none; font-size: 15.5px; transition: color var(--duration-fast) var(--ease-calm); }
.nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-cta { display: none; }
@media (min-width: 720px) { .header-actions .btn { min-height: 46px; padding: 0 20px; font-size: 15px; } }

@media (min-width: 720px) { .header-cta { display: inline-flex; } }

/* Language switcher: the two codes in one pill, the active one filled. Codes
   and not flags: a flag is a country, and both languages are spoken in many. */
.lang { display: none; align-items: center; gap: 2px; padding: 3px; flex: none; border: 1px solid var(--border-strong); border-radius: var(--radius-pill); }
.js .lang { display: inline-flex; }
.lang button {
  height: 30px;
  min-width: 32px;
  padding: 0 7px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: .06em;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-calm), color var(--duration-fast) var(--ease-calm);
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--brand-100); color: var(--brand-800); }
.lang button:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
@media (min-width: 720px) { .lang button { height: 38px; min-width: 42px; padding: 0 10px; font-size: 13px; } }
/* Logo, switcher and "Iniciar sesión" share a 360px phone: everything a bit
   tighter so the button keeps its gutter. */
@media (max-width: 399px) {
  .header-row { gap: 12px; }
  .logo img { height: 22px; }
  .header-actions { gap: 8px; }
  .header-actions .btn-sm { padding: 0 13px; }
}
@media (max-width: 339px) {
  .header-row { gap: 10px; }
  .lang button { min-width: 28px; padding: 0 5px; }
}

/* English is applied by i18n.js: until then the page waits, so Spanish never
   flashes first (the inline script in <head> sets it, with a 3 s way out). */
.i18n-pending body { visibility: hidden; }
@media (min-width: 1040px) {
  .nav { display: flex; }
  .header-actions { margin-left: 0; }
}

/* ------------------------------------------------------------------ hero */

.hero { position: relative; overflow: hidden; padding: 48px 0 40px; }

.hero-ripples {
  position: absolute;
  width: 1200px;
  height: 1200px;
  left: 50%;
  top: 180px;
  transform: translateX(-50%);
  pointer-events: none;
}
.hero-ripples circle {
  fill: none;
  stroke: var(--ripple);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.hero-copy { position: relative; display: grid; justify-items: center; text-align: center; gap: 22px; }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 13px;
  color: var(--text-muted);
}
.kicker-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-500); }
.kicker-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--brand-400); opacity: 0; }

.hero h1 {
  font-weight: 400;
  font-size: clamp(44px, 7.2vw, 88px);
  line-height: .98;
  letter-spacing: -0.045em;
  max-width: 940px;
  text-wrap: balance;
}
.hero h1 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.lead { font-size: clamp(17px, 1.7vw, 20px); line-height: 1.5; color: var(--text-muted); max-width: 560px; text-wrap: balance; }
/* Side by side while they fit; once they wrap, each one fills its line so the
   two stacked buttons are the same width. */
.hero-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; width: fit-content; max-width: 100%; }
.hero-ctas .btn { flex: 1 1 auto; }

.hero-stage { margin-top: 64px; }

/* ------------------------------------------------- ilustraciones (.stage) */

.stage {
  --dw: 1120;
  --dh: 680;
  position: relative;
  width: 100%;
  aspect-ratio: var(--dw) / var(--dh);
}
.stage .mock {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--dw) * 1px);
  height: calc(var(--dh) * 1px);
  transform: scale(var(--s, .5));
  transform-origin: 0 0;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
  color: var(--text);
}
.mock b { font-weight: 500; }
.mock small { display: block; color: var(--text-muted); }

.av {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 11.5px;
  font-weight: 500;
  flex: none;
}
.av.lg { width: 52px; height: 52px; font-size: 16px; }
.av-mg { background: var(--coral-100); color: var(--coral-700); }
.av-jp { background: var(--brand-100); color: var(--brand-800); }
.av-lr { background: var(--surface-warm); color: var(--neutral-700); }
.av-pr { background: var(--brand-700); color: var(--on-accent); }

.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 500; white-space: nowrap; }
.chip-danger { background: var(--danger-soft); color: var(--danger-text); }
.chip-warn { background: var(--warning-soft); color: var(--warning-text); }
.chip-ok { background: var(--success-soft); color: var(--success-text); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-h > span { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.card-h small { font-size: 11.5px; color: var(--text-faint); }
.card-h small.link { color: var(--accent); }
.count { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--danger-soft); color: var(--danger-text); font-size: 10.5px; }

.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: var(--neutral-100); stroke-width: 1; }
.chart .consult { stroke: var(--neutral-300); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .area { fill: var(--brand-50); stroke: none; }
.chart .line { stroke: var(--brand-600); stroke-width: 2.4; }
.chart .pts circle { fill: var(--surface); stroke: var(--brand-600); stroke-width: 2; }
.chart .pt-new { fill: var(--coral-400); stroke: var(--surface); stroke-width: 2.5; }
.chart-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-faint); margin-top: 6px; }

/* Ventana del consultorio */
.win {
  position: absolute;
  left: 0;
  top: 16px;
  width: 920px;
  height: 620px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 40px 80px -24px rgba(34, 48, 43, .22), 0 12px 28px rgba(34, 48, 43, .06);
  overflow: hidden;
}
.win-bar { position: relative; height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 16px; border-bottom: 1px solid var(--border); background: var(--bg); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--neutral-200); }
.win-bar .url { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--text-faint); padding: 4px 40px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); }
.win-body { display: grid; grid-template-columns: 196px 1fr; grid-template-rows: 580px; height: 580px; }

.side { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 20px 12px; border-right: 1px solid var(--border); background: var(--bg); }
.side-logo { height: 18px; width: auto; margin: 0 10px 22px; }
.nav-i { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 11px; border-radius: 11px; font-size: 13.5px; color: var(--text-muted); }
.nav-i svg { width: 18px; height: 18px; }
.nav-i.on { background: var(--brand-50); color: var(--brand-800); }
.badge { margin-left: auto; min-width: 20px; height: 18px; display: grid; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--brand-700); color: var(--on-accent); font-size: 10.5px; }
.side-me { position: absolute; left: 12px; right: 12px; bottom: 16px; display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.side-me b { font-size: 12.5px; display: block; }
.side-me small { font-size: 11px; }

.dash { padding: 22px 24px; display: grid; gap: 16px; align-content: start; overflow: hidden; }
.dash-head { display: flex; align-items: center; justify-content: space-between; }
.hello { font-size: 24px; letter-spacing: -0.025em; }
.today { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }
.dash-grid .evo { grid-column: 1 / -1; }

.act { position: relative; display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.act-t b { display: block; font-size: 13px; }
.act-t small { font-size: 11.5px; margin-top: 1px; }
.mini-btn { font-size: 11.5px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text); }
.act-done { position: absolute; right: 0; top: 50%; translate: 0 -50%; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--success-soft); color: var(--success-text); font-size: 11.5px; font-weight: 500; opacity: 0; }
.act-done svg { width: 13px; height: 13px; stroke-width: 2.2; }

.turn { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.t-time { font-size: 13px; font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }

.toast {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 12px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px -10px rgba(34, 48, 43, .28);
  opacity: 0;
}
.toast b { font-size: 13px; display: block; }
.toast small { font-size: 12px; }
.toast-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--coral-50); color: var(--coral-700); }
.toast-ic svg { width: 18px; height: 18px; }

/* Celular */
.phone {
  position: absolute;
  width: 290px;
  height: 580px;
  border-radius: 46px;
  border: 10px solid #1C2622;
  background: var(--bg);
  overflow: hidden;
  box-shadow: 0 40px 70px -20px rgba(34, 48, 43, .35), 0 8px 18px rgba(34, 48, 43, .08);
}
.ph-status { height: 36px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; font-size: 12px; font-weight: 500; }
.ph-notch { width: 82px; height: 22px; border-radius: 999px; background: #1C2622; }
.ph-bat { width: 22px; height: 11px; border: 1.5px solid var(--text); border-radius: 3px; position: relative; }
.ph-bat::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: var(--text); border-radius: 1px; }
.ph-screen { position: absolute; top: 36px; left: 0; right: 0; bottom: 0; padding: 8px 14px 0; }
.ph-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ph-head small { font-size: 11px; }
.ph-head b { font-size: 21px; font-weight: 400; letter-spacing: -0.02em; display: block; }
.ph-title { font-size: 21px; letter-spacing: -0.02em; margin: 4px 0 2px; }
.ph-label { font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); margin: 14px 2px 7px; }
.ph-card { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; padding: 11px; margin-bottom: 7px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.ph-card b { font-size: 13px; display: block; }
.ph-card small { font-size: 11.5px; }
.ph-card.pend { background: var(--brand-50); border-color: var(--brand-200); }
.ph-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.ph-card.pend .ph-ic { background: var(--surface); }
.ph-ic svg { width: 18px; height: 18px; }
.chev { width: 16px; height: 16px; color: var(--text-faint); }
.time-pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 11px; font-weight: 500; }
.time-pill svg { width: 12px; height: 12px; }
.ph-tabs { position: absolute; left: 0; right: 0; bottom: 0; height: 62px; display: flex; justify-content: space-around; align-items: center; border-top: 1px solid var(--border); background: var(--surface); }
.ph-tabs span { display: grid; justify-items: center; gap: 3px; font-size: 10px; color: var(--text-faint); }
.ph-tabs svg { width: 20px; height: 20px; }
.ph-tabs .on { color: var(--brand-700); }

.push {
  position: absolute;
  top: 40px;
  left: 8px;
  right: 8px;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px -8px rgba(34, 48, 43, .3);
  opacity: 0;
  transform: translateY(-130%);
}
.push-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-700); display: grid; place-items: center; }
.push-ic img { width: 20px; height: 20px; }
.push b { font-size: 12.5px; display: block; }
.push small { font-size: 12px; color: var(--text); }
.push em { font-style: normal; font-size: 10.5px; color: var(--text-faint); align-self: start; }

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  gap: 4px;
  padding: 20px 16px 22px;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow: 0 -16px 40px -12px rgba(34, 48, 43, .28);
  transform: translateY(105%);
}
.sheet b { font-size: 15px; }
.sheet small { font-size: 12px; }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; margin: 12px 0 14px; }
.scale i { aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: var(--neutral-100); font-style: normal; font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.sheet-btn { position: relative; display: grid; place-items: center; height: 42px; border-radius: 999px; background: var(--brand-700); color: var(--on-accent); font-size: 13.5px; font-weight: 500; }
.sheet-btn > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; }
.sheet-btn svg { width: 15px; height: 15px; stroke-width: 2.2; }
.lbl-b { opacity: 0; }

/* Hero: la composición */
.hero-stage .hero-phone { left: 810px; top: 60px; height: 600px; }

@media (max-width: 699px) {
  .hero-stage { --dw: 620; --dh: 660; margin-top: 44px; }
  .hero-stage .mock { overflow: hidden; }
  .hero-stage .hero-phone { left: 318px; top: 46px; }
  .hero-stage .win { left: 0; }
}

/* --------------------------------------------------------------- desafío */

.section { position: relative; padding: 96px 0; }
@media (min-width: 960px) { .section { padding: 132px 0; } }

.challenge { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.challenge .container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }

.between {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 230px;
  align-items: center;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 28px;
  background: var(--bg);
  border: 1px solid var(--border);
}
.bt-node { display: grid; gap: 2px; position: relative; }
.bt-node .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--brand-700); box-shadow: 0 0 0 6px var(--brand-100); margin-bottom: 12px; }
.bt-node b { font-size: 15px; }
.bt-node small { font-size: 13px; color: var(--text-muted); }
.bt-events { position: relative; height: 190px; }
.bt-line { position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--neutral-300); }
.ev {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px -8px rgba(34, 48, 43, .18);
  font-size: 13.5px;
  white-space: nowrap;
}
.ev svg { width: 16px; height: 16px; color: var(--coral-500); }
.ev::after { content: ""; position: absolute; left: 22px; width: 1.5px; height: 30px; background: var(--neutral-300); }
.ev1, .ev3 { top: 14px; }
.ev2, .ev4 { bottom: 14px; }
.ev1::after, .ev3::after { top: 100%; }
.ev2::after, .ev4::after { bottom: 100%; }
.ev1 { left: 0; }
.ev2 { left: 20%; }
.ev3 { left: 42%; }
.ev4 { left: 60%; }
.bt-end { justify-items: start; }
.say { display: inline-block; margin-top: 10px; padding: 8px 12px; font-size: 13px; border-radius: 14px; }
.say.q { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.say.a { justify-self: end; margin-top: 6px; background: var(--coral-50); border-bottom-right-radius: 4px; }

@media (max-width: 899px) {
  .between { grid-template-columns: 1fr; gap: 16px; padding: 24px 22px; }
  .bt-events { height: auto; display: grid; gap: 10px; padding: 6px 0 6px 28px; }
  .bt-line { top: 0; bottom: 0; left: 8px; right: auto; border-top: 0; border-left: 2px dashed var(--neutral-300); }
  .ev { position: relative; inset: auto; justify-self: start; }
  .ev::after { display: none; }
  .bt-node { grid-template-columns: 26px 1fr; column-gap: 12px; }
  .bt-node .dot { grid-row: span 2; margin: 2px 0 0; }
  .say { grid-column: 2; justify-self: start; }
  .say.a { justify-self: start; }
}

.pains { display: grid; gap: 20px; }
.pain-col { padding: 30px 28px 32px; border-radius: 28px; background: var(--bg); border: 1px solid var(--border); display: grid; gap: 22px; align-content: start; }
.pain-col h3 { display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 15px; }
.pain-col ul { display: grid; gap: 20px; }
.pain-col li { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 16px; align-items: start; font-size: 14.5px; color: var(--text-muted); line-height: 1.5; }
.pain-col li b { display: block; color: var(--text); font-size: 16px; margin-bottom: 2px; }
.pain-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.pain-col:last-child .pain-ic { background: var(--coral-50); color: var(--coral-700); }
.pain-ic svg { width: 22px; height: 22px; }
@media (min-width: 820px) { .pains { grid-template-columns: 1fr 1fr; } }

/* -------------------------------------------------------------- solución */

.solution .container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }

.promises { display: grid; gap: 16px; }
.promise {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 26px 64px 28px 26px;
  border-radius: 24px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid transparent;
  transition: transform var(--duration-base) var(--ease-calm), box-shadow var(--duration-base) var(--ease-calm);
}
.promise:hover { transform: translateY(-3px); box-shadow: var(--shadow-float); }
.promise.doc { background: var(--brand-50); border-color: var(--brand-100); }
.promise.pat { background: var(--coral-50); border-color: var(--coral-100); }
.promise .who { display: flex; align-items: center; gap: 8px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-800); }
.promise.pat .who { color: var(--coral-700); }
.p-txt { font-size: clamp(21px, 2.2vw, 26px); line-height: 1.2; letter-spacing: -0.02em; }
.p-arrow { position: absolute; right: 24px; bottom: 28px; width: 22px; height: 22px; color: var(--text-muted); transition: transform var(--duration-base) var(--ease-calm); }
.promise:hover .p-arrow { transform: translateX(4px); }
@media (min-width: 760px) { .promises { grid-template-columns: 1fr 1fr; } }

.feature-block { display: grid; gap: 40px; align-items: center; margin-top: 72px; scroll-margin-top: 90px; }
.fb-copy { display: grid; gap: 18px; align-content: start; }
.fb-sub { color: var(--text-muted); font-size: 16px; line-height: 1.55; max-width: 520px; }
.free { margin-left: 4px; padding: 3px 9px; border-radius: 999px; background: var(--coral-50); color: var(--coral-700); letter-spacing: .08em; }
.features { display: grid; gap: 18px 24px; margin-top: 10px; }
.features li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; font-size: 14px; color: var(--text-muted); line-height: 1.45; }
.features svg { width: 20px; height: 20px; color: var(--brand-700); margin-top: 1px; }
.features b { display: block; color: var(--text); font-size: 15px; }
@media (min-width: 560px) { .features { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) {
  .feature-block { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 72px; margin-top: 112px; }
  .feature-block.flip .stage { order: -1; }
}

/* Ficha del paciente (médico) */
.doc-stage { --dw: 540; --dh: 600; }
.rec {
  position: absolute;
  left: 0;
  top: 0;
  width: 500px;
  padding: 22px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 36px 70px -26px rgba(34, 48, 43, .25);
}
.rec-head { display: flex; align-items: center; gap: 14px; }
.rec-head b { font-size: 18px; display: block; letter-spacing: -0.01em; }
.rec-head small { font-size: 12.5px; }
.tags { margin-left: auto; display: flex; gap: 6px; }
.tag-s { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: var(--neutral-100); color: var(--text-muted); }
.rec-tabs { display: flex; gap: 4px; margin: 18px 0 14px; border-bottom: 1px solid var(--border); }
.rec-tabs span { font-size: 12.5px; padding: 8px 10px 10px; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.rec-tabs .on { color: var(--text); border-bottom-color: var(--brand-700); }
.rec .card-h { margin-bottom: 10px; }
.rec-card { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.rec-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.rec-card.q { display: grid; gap: 8px; }
.rec-card.q small { font-size: 12px; }
.q-val { display: flex; align-items: center; gap: 10px; }
.q-val b { font-size: 28px; font-weight: 400; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.q-val .ok { color: var(--brand-700); }
.q-val svg { width: 18px; height: 18px; color: var(--text-faint); }
.rec-card.q .chip { justify-self: start; }
.bar { display: block; height: 6px; border-radius: 6px; background: var(--neutral-100); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: 6px; background: var(--brand-500); }

.ai-note {
  position: absolute;
  left: 190px;
  top: 428px;
  width: 346px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--brand-200);
  box-shadow: 0 28px 60px -18px rgba(34, 48, 43, .32);
}
.ai-note-h { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.ai-note-h img { width: 28px; height: 28px; }
.ai-note-h b { font-size: 13.5px; }
.ai-tag { white-space: nowrap; margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 11px; font-weight: 500; }
.ai-tag svg { width: 12px; height: 12px; }
.ai-note p { font-size: 13px; line-height: 1.5; color: var(--text-muted); }

/* Celulares del paciente */
.pat-stage { --dw: 580; --dh: 640; }
.pat-stage .pa { left: 0; top: 56px; }
.pat-stage .pb { left: 270px; top: 0; }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 4px 0 12px; border-bottom: 1px solid var(--border); }
.chat-h b { font-size: 13.5px; display: block; }
.chat-h small { font-size: 11.5px; }
.msgs { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; }
.day { align-self: center; font-size: 11px; color: var(--text-faint); margin-bottom: 4px; }
.msg { max-width: 84%; padding: 10px 13px; border-radius: 18px; font-size: 12.5px; line-height: 1.45; }
.msg.out { align-self: flex-end; background: var(--brand-700); color: var(--on-accent); border-bottom-right-radius: 5px; }
.msg.in { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg.file { display: grid; grid-template-columns: 34px 1fr; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; }
.msg.file .ph-ic { background: rgba(255, 255, 255, .16); color: var(--on-accent); }
.msg.file b { display: block; font-size: 12.5px; }
.msg.file small { font-size: 11px; color: var(--brand-200); }
.composer { position: absolute; left: 12px; right: 12px; bottom: 14px; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 12.5px; color: var(--text-faint); }
.send { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-700); color: var(--on-accent); }
.send svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------ tecnología */

.tech { background: var(--brand-900); color: var(--neutral-50); overflow: hidden; }
.tech .eyebrow { color: var(--brand-300); }
.tech .sub { color: var(--brand-200); }
.tech .container { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }

.tech-grid2 { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1000px) { .tech-grid2 { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; } }

/* El diagrama: Dua en el centro, las herramientas alrededor, médico y paciente
   a los lados, y todo dentro del perímetro de servidores propios. */
.hub {
  position: relative;
  width: 100%;
  max-width: 600px;
  justify-self: center;
  aspect-ratio: 1;
  border-radius: 32px;
  background: radial-gradient(70% 70% at 50% 50%, rgba(120, 173, 147, .1), transparent 70%), rgba(255, 255, 255, .02);
  border: 1px solid rgba(255, 255, 255, .08);
}
.hub-svg { position: absolute; inset: 4%; width: 92%; height: 92%; overflow: visible; stroke: none; }
.hub-tag {
  position: absolute;
  top: 16px;
  left: 18px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--brand-300);
}
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-400); box-shadow: 0 0 0 3px rgba(120, 173, 147, .25); }
.ring-perim { fill: none; stroke: rgba(169, 203, 185, .35); stroke-width: 1; stroke-dasharray: 2 6; }
.perim-text { transform-origin: 280px 280px; }
.perim-text text { font: 400 10px var(--font-sans); letter-spacing: .12em; fill: var(--brand-300); opacity: .7; }
.ring { fill: none; stroke: rgba(255, 255, 255, .12); stroke-width: 1; }
.ring.faint { stroke: rgba(255, 255, 255, .07); }
.spokes use { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 1; }
.spokes .link-pat { stroke: rgba(242, 160, 133, .45); stroke-dasharray: 3 5; }
.spokes .link-doc { stroke: rgba(169, 203, 185, .5); stroke-dasharray: 3 5; }
.sp-c { fill: var(--coral-300); filter: drop-shadow(0 0 4px rgba(242, 160, 133, .9)); }
.sp-s { fill: var(--brand-300); filter: drop-shadow(0 0 4px rgba(169, 203, 185, .9)); }

.hub-node, .hub-user, .hub-core { position: absolute; left: calc(4% + var(--x, 50%) * .92); top: calc(4% + var(--y, 50%) * .92); transform: translate(-50%, -50%); }
.hub-node {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 12px;
  background: #1F4639;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
  font-size: 13px;
  white-space: nowrap;
}
.hub-node svg { width: 15px; height: 15px; color: var(--brand-300); }
.hub-user { display: grid; justify-items: center; gap: 6px; font-size: 12.5px; color: var(--brand-100); }
.hub-user .head { width: 16px; height: 16px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .06); }
.hub-core { display: grid; justify-items: center; gap: 8px; }
.hub-core img { position: relative; z-index: 1; width: 76px; height: 76px; border-radius: 50%; box-shadow: 0 0 40px rgba(242, 160, 133, .55); }
.hub-core::before, .hub-core::after { content: ""; position: absolute; left: 50%; top: 38px; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 1px solid rgba(242, 160, 133, .6); opacity: 0; }
.hub-core b { font-size: 15px; letter-spacing: -0.01em; }
@media (max-width: 520px) {
  .hub { border-radius: 24px; }
  .hub-node { padding: 6px 9px; font-size: 11px; gap: 5px; border-radius: 10px; }
  .hub-node svg { width: 12px; height: 12px; }
  .hub-user { font-size: 11px; }
  .hub-core img { width: 56px; height: 56px; }
  .hub-core::before, .hub-core::after { top: 28px; width: 56px; height: 56px; margin: -28px 0 0 -28px; }
  .perim-text text { font-size: 12px; letter-spacing: .04em; }
  .hub-tag { display: none; }
}

.pillars { display: grid; }
.pillars li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.pillars li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.pl-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); color: var(--brand-300); }
.pillars li:first-child .pl-ic { background: rgba(242, 160, 133, .14); border-color: rgba(242, 160, 133, .35); color: var(--coral-300); }
.pl-ic svg { width: 21px; height: 21px; }
.pl-k { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-300); margin-bottom: 6px; }
.pillars h3 { font-weight: 400; font-size: 21px; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 6px; }
.pillars p:last-child { font-size: 14.5px; color: var(--brand-200); line-height: 1.55; text-wrap: pretty; }

/* -------------------------------------------------------------- nosotros */

.about .container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
.purpose { font-weight: 400; font-size: clamp(28px, 3.8vw, 46px); line-height: 1.14; letter-spacing: -0.032em; max-width: 1000px; text-wrap: balance; }

.why { margin-top: 24px; display: grid; gap: 24px; }
.why li { display: grid; gap: 6px; padding-top: 18px; border-top: 1px solid var(--border-strong); }
.why b { font-size: 15.5px; }
.why span { font-size: 14px; color: var(--text-muted); line-height: 1.5; text-wrap: pretty; }
@media (min-width: 640px) { .why { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .why { grid-template-columns: repeat(4, 1fr); } }

.team { margin-top: 56px; display: grid; gap: 32px; padding: 32px 24px; border-radius: 32px; background: var(--surface); border: 1px solid var(--border); }
.team-intro { display: grid; gap: 14px; max-width: 640px; }
.team-intro p:last-child { color: var(--text-muted); font-size: 16px; line-height: 1.55; text-wrap: pretty; }

.founders { display: grid; gap: 16px; }
.founder {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: 20px;
  row-gap: 4px;
  padding: 24px;
  border-radius: 24px;
  background: var(--bg);
}
.founder img { grid-row: 1 / span 3; width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.founder h3 { font-weight: 500; font-size: 18px; line-height: 1.3; letter-spacing: -0.01em; }
.founder .role { font-size: 14px; color: var(--accent); }
.founder .role b { color: var(--text); margin-right: 6px; }
.founder .role b::after { content: "·"; margin-left: 6px; color: var(--text-faint); font-weight: 400; }
.founder ul { display: grid; gap: 6px; margin-top: 12px; }
.founder li { position: relative; padding-left: 16px; font-size: 14px; color: var(--text-muted); line-height: 1.45; }
.founder li::before { content: ""; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-300); }

@media (min-width: 900px) {
  .team { padding: 44px; gap: 36px; }
  .founders { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .founder .role b { display: block; margin: 0; }
  .founder .role b::after { display: none; }
  .founder { grid-template-columns: 64px minmax(0, 1fr); column-gap: 16px; padding: 20px; }
  .founder img { width: 64px; height: 64px; grid-row: 1 / span 2; }
  .founder ul { grid-column: 1 / -1; }
}

/* ----------------------------------------------------------------- planes */

.pricing { background: var(--surface); border-top: 1px solid var(--border); overflow: hidden; }
.pricing .container { display: grid; grid-template-columns: minmax(0, 1fr); gap: 56px; }

.plans { display: grid; gap: 20px; width: 100%; max-width: 1000px; margin: 0 auto; align-items: stretch; }
.plan { position: relative; display: grid; gap: 14px; align-content: start; padding: 34px 30px; border-radius: 30px; border: 1px solid var(--border); background: var(--bg); overflow: hidden; }
.plan-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.plan h3 { font-weight: 400; font-size: 24px; letter-spacing: -0.02em; }
.plan-desc { color: var(--text-muted); font-size: 15px; margin-top: -6px; }
.price { display: flex; align-items: flex-end; gap: 12px; margin-top: 18px; }
.amount { font-size: clamp(54px, 6vw, 72px); line-height: .9; letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.amount.sm { font-size: clamp(42px, 4.6vw, 54px); letter-spacing: -0.04em; }
.per { display: grid; gap: 2px; font-size: 14px; color: var(--text-muted); padding-bottom: 4px; }
.list { font-size: 15px; text-decoration: line-through; }
.price-note { font-size: 14px; color: var(--text-muted); }
.plan .btn { margin: 10px 0 12px; }
.incl { display: grid; gap: 12px; padding-top: 22px; border-top: 1px solid var(--border); }
.incl li { display: flex; align-items: center; gap: 11px; font-size: 15px; }
.incl svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); stroke-width: 2.2; flex: none; }

/* Medual Pro: la tarjeta protagonista */
.plan.pro {
  color: var(--neutral-50);
  border: 0;
  background: radial-gradient(120% 90% at 100% 0%, var(--brand-700) 0%, var(--brand-800) 48%, var(--brand-900) 100%);
  box-shadow: 0 40px 80px -30px rgba(23, 58, 49, .6);
}
.plan.pro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-radial-gradient(circle at 105% -5%, transparent 0 38px, rgba(255, 255, 255, .06) 38px 39px);
  -webkit-mask-image: radial-gradient(80% 70% at 100% 0%, #000, transparent 75%);
  mask-image: radial-gradient(80% 70% at 100% 0%, #000, transparent 75%);
}
.plan.pro::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(120deg, rgba(242, 160, 133, .7), rgba(255, 255, 255, .08) 35%, rgba(255, 255, 255, .08) 65%, rgba(169, 203, 185, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.plan.pro > * { position: relative; z-index: 1; }
.plan.pro .plan-desc, .plan.pro .price-note, .plan.pro .per { color: var(--brand-200); }
.plan.pro .list { color: var(--brand-300); }
.launch { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(242, 160, 133, .16); border: 1px solid rgba(242, 160, 133, .5); color: var(--coral-200); font-size: 12px; font-weight: 500; }
.save { justify-self: start; display: inline-flex; align-items: center; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--brand-100); font-size: 12.5px; }
.btn-light { background: var(--neutral-50); color: var(--brand-800); }
.btn-light:hover { background: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, .25); }
.plan.pro .incl { border-top-color: rgba(255, 255, 255, .12); }
.plan.pro .incl svg { background: rgba(169, 203, 185, .18); color: var(--brand-200); }
@media (min-width: 640px) { .plan.pro .incl { grid-template-columns: 1fr 1fr; } }
@media (min-width: 860px) {
  .plans { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .plan { padding: 40px 38px; }
}

.access { display: grid; gap: 36px; padding: 32px 24px; border-radius: 32px; background: var(--bg); border: 1px solid var(--border); scroll-margin-top: 90px; }
.access-copy { display: grid; gap: 18px; align-content: start; }
.access-copy .eyebrow { color: var(--coral-700); }
.access-lead { color: var(--text-muted); font-size: 16px; line-height: 1.55; }
.perks { display: grid; gap: 10px; }
.perks li { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 12px; padding: 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); font-size: 13.5px; color: var(--text-muted); line-height: 1.4; }
.perks b { display: block; color: var(--text); font-size: 15px; }
.pk-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); }
.pk-ic svg { width: 20px; height: 20px; }
.perks .perk-main { background: var(--brand-800); border-color: var(--brand-800); color: var(--brand-200); }
.perks .perk-main b { color: var(--neutral-50); font-size: 17px; }
.perks .perk-main .pk-ic { background: rgba(242, 160, 133, .18); color: var(--coral-300); }
@media (min-width: 560px) {
  .perks { grid-template-columns: 1fr 1fr; }
  .perks .perk-main { grid-column: 1 / -1; }
}
.access-copy .note { font-size: 14px; color: var(--text-muted); }
@media (min-width: 960px) {
  .access { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 56px; padding: 48px; align-items: center; }
}

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 28px 22px; box-shadow: var(--shadow-float); }
#waitlist-form { display: grid; gap: 14px; }
.form-title { font-weight: 400; font-size: 24px; letter-spacing: -0.02em; margin-bottom: 4px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--text-muted); }
.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color var(--duration-fast) var(--ease-calm), box-shadow var(--duration-fast) var(--ease-calm);
}
.field input:hover { border-color: var(--neutral-400); }
.field input:focus { outline: none; border-color: var(--focus); box-shadow: var(--shadow-focus); }
.field input.invalid { border-color: var(--danger-line); }
.field input.invalid:focus { border-color: var(--danger-solid); box-shadow: 0 0 0 3px var(--danger-soft); }
.field-error, .form-error { font-size: 13px; color: var(--danger-text); }
.form-error { text-align: center; }
#waitlist-form .btn { margin-top: 6px; }
#waitlist-form .btn:disabled { opacity: .6; cursor: default; }
.microcopy { text-align: center; font-size: 13px; color: var(--text-faint); }
.success-state { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 40px 8px; }
.success-check { width: 56px; height: 56px; border-radius: 50%; background: var(--brand-100); display: grid; place-items: center; margin-bottom: 6px; }
.success-check svg { width: 26px; height: 26px; color: var(--brand-700); stroke-width: 2; }
.success-title { font-size: 22px; letter-spacing: -0.02em; }
.success-sub { color: var(--text-muted); }
@media (min-width: 960px) { .form-card { padding: 34px 30px; } }

.contact { text-align: center; font-size: 15px; color: var(--text-muted); }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--border); padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); }
.footer-grid { display: grid; gap: 24px; }
.footer-brand { display: grid; gap: 10px; }
.footer-brand img { height: 20px; width: auto; }
.footer-brand p { font-size: 14px; color: var(--text-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-links a { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-links svg { width: 18px; height: 18px; }
.footer-legal { font-size: 13px; color: var(--text-faint); }
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1fr auto; align-items: center; }
  .footer-legal { grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--border); }
}

/* ------------------------------------------- botón fijo (sólo celular) */

.mobile-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(to top, var(--bg) 60%, rgba(250, 248, 244, 0));
  transform: translateY(110%);
  transition: transform var(--duration-base) var(--ease-calm);
}
.mobile-cta.is-visible { transform: none; }
.mobile-cta .btn { box-shadow: var(--shadow-float); min-height: 50px; }
@media (min-width: 720px) { .mobile-cta { display: none; } }

/* ------------------------------------------------------------ movimiento */

/*
 * Todo lo que se mueve depende de .js y de que el usuario no pida "reducir
 * movimiento": sin eso, la página está completa y quieta.
 *
 * El hero repite una escena de 12 s: llega el aviso al celular, la paciente
 * registra la cefalea, el consultorio recibe el registro y la acción
 * recomendada se resuelve.
 */
@media (prefers-reduced-motion: no-preference) {
  .js .intro { animation: rise 900ms var(--ease-calm) both; }
  .js .i2 { animation-delay: 80ms; }
  .js .i3 { animation-delay: 180ms; }
  .js .i4 { animation-delay: 280ms; }
  .js .i5 { animation: tilt-in 1400ms var(--ease-calm) 350ms both; transform-origin: 50% 0; }

  .kicker-dot::after { animation: ping 2.8s var(--ease-calm) infinite; }

  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 800ms var(--ease-calm), transform 800ms var(--ease-calm); transition-delay: var(--d, 0ms); }
  .js .reveal.is-in { opacity: 1; transform: none; }

  .js .line.draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
  .js .is-in .line.draw { animation: draw 1800ms var(--ease-calm) 300ms forwards; }
  .js .stage .pts circle { transform-box: fill-box; transform-origin: center; }
  .js .is-in .pts circle { animation: pop 500ms var(--ease-calm) both; }
  .js .is-in .pts circle:nth-child(1) { animation-delay: 700ms; }
  .js .is-in .pts circle:nth-child(2) { animation-delay: 1000ms; }
  .js .is-in .pts circle:nth-child(3) { animation-delay: 1300ms; }
  .js .is-in .pts circle:nth-child(4) { animation-delay: 1600ms; }
  .js .is-in .pts circle:nth-child(5) { animation-delay: 1900ms; }

  /* Escena del hero */
  .js .hero-stage .push { animation: push 12s var(--ease-calm) 1.6s infinite; }
  .js .hero-stage .sheet { animation: sheet 12s var(--ease-calm) 1.6s infinite; }
  .js .hero-stage .scale .pick { animation: pick 12s var(--ease-calm) 1.6s infinite; }
  .js .hero-stage .lbl-a { animation: lbl-a 12s linear 1.6s infinite; }
  .js .hero-stage .lbl-b { animation: lbl-b 12s linear 1.6s infinite; }
  .js .hero-stage .toast { animation: toast 12s var(--ease-calm) 1.6s infinite; }
  .js .hero-stage .pt-new { animation: pt-new 12s var(--ease-calm) 1.6s infinite; transform-box: fill-box; transform-origin: center; }
  .js .hero-stage .act-1 .chip, .js .hero-stage .act-1 .mini-btn { animation: act-out 12s var(--ease-calm) 1.6s infinite; }
  .js .hero-stage .act-done { animation: act-in 12s var(--ease-calm) 1.6s infinite; }

  /* Desafío: lo que pasa entre consultas aparece y se pierde */
  .js .ev { animation: lost 10s var(--ease-calm) infinite both; }
  .js .ev2 { animation-delay: .8s; }
  .js .ev3 { animation-delay: 1.6s; }
  .js .ev4 { animation-delay: 2.4s; }
  .js .say.q { animation: say 10s var(--ease-calm) 4.6s infinite both; }
  .js .say.a { animation: say 10s var(--ease-calm) 5.4s infinite both; }

  /* Ficha: el borrador de Dua se escribe */
  .js .doc-stage .ai-note { opacity: 0; transform: translateY(16px) scale(.98); transition: opacity 700ms var(--ease-calm) 900ms, transform 700ms var(--ease-calm) 900ms; }
  .js .doc-stage.is-in .ai-note { opacity: 1; transform: none; }
  .js .doc-stage .type { clip-path: inset(0 100% 0 0); }
  .js .doc-stage.is-in .type { animation: type 1100ms steps(28) forwards; }
  .js .doc-stage.is-in .t1 { animation-delay: 1500ms; }
  .js .doc-stage.is-in .t2 { animation-delay: 2600ms; }
  .js .doc-stage.is-in .t3 { animation-delay: 3700ms; }

  /* Chat: los mensajes llegan de a uno */
  .js .pat-stage .msg { opacity: 0; transform: translateY(10px) scale(.97); transition: opacity 500ms var(--ease-calm), transform 500ms var(--ease-calm); }
  .js .pat-stage.is-in .msg { opacity: 1; transform: none; }
  .js .pat-stage.is-in .m1 { transition-delay: 600ms; }
  .js .pat-stage.is-in .m2 { transition-delay: 1300ms; }
  .js .pat-stage.is-in .m3 { transition-delay: 2300ms; }
  .js .pat-stage .pa, .js .pat-stage .pb { animation: float 8s ease-in-out infinite; }
  .js .pat-stage .pb { animation-delay: -4s; }

  /* Tecnología: el perímetro gira despacio y Dua late */
  .perim-text { animation: spin 90s linear infinite; }
  .hub-core::before { animation: ring 3s var(--ease-calm) infinite; }
  .hub-core::after { animation: ring 3s var(--ease-calm) 1.5s infinite; }
  .live { animation: blink 2.4s ease-in-out infinite; }
  .plan.pro::after { background-size: 200% 200%; animation: glow 8s ease-in-out infinite; }
}

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

@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes tilt-in { from { opacity: 0; transform: perspective(1800px) rotateX(16deg) translateY(60px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { opacity: .9; transform: scale(.6); } 80%, 100% { opacity: 0; transform: scale(1.8); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }

@keyframes push {
  0%, 3% { opacity: 0; transform: translateY(-130%); }
  6%, 24% { opacity: 1; transform: none; }
  28%, 100% { opacity: 0; transform: translateY(-130%); }
}
@keyframes sheet {
  0%, 25% { transform: translateY(105%); }
  30%, 56% { transform: none; }
  61%, 100% { transform: translateY(105%); }
}
@keyframes pick {
  0%, 36% { background: var(--neutral-100); color: var(--text-muted); transform: none; }
  39%, 58% { background: var(--brand-700); color: var(--on-accent); transform: scale(1.18); }
  62%, 100% { background: var(--neutral-100); color: var(--text-muted); transform: none; }
}
@keyframes lbl-a { 0%, 45% { opacity: 1; } 46%, 100% { opacity: 0; } }
@keyframes lbl-b { 0%, 45% { opacity: 0; } 46%, 58% { opacity: 1; } 60%, 100% { opacity: 0; } }
@keyframes toast {
  0%, 54% { opacity: 0; transform: translateY(14px) scale(.98); }
  58%, 84% { opacity: 1; transform: none; }
  88%, 100% { opacity: 0; transform: translateY(14px) scale(.98); }
}
@keyframes pt-new {
  0%, 56% { opacity: 0; transform: scale(.2); }
  60% { opacity: 1; transform: scale(1.5); }
  64%, 94% { opacity: 1; transform: none; }
  98%, 100% { opacity: 0; transform: scale(.2); }
}
@keyframes act-out { 0%, 62% { opacity: 1; } 65%, 94% { opacity: 0; } 98%, 100% { opacity: 1; } }
@keyframes act-in { 0%, 63% { opacity: 0; transform: translateX(8px); } 67%, 94% { opacity: 1; transform: none; } 98%, 100% { opacity: 0; } }

@keyframes lost {
  0% { opacity: 0; transform: translateY(8px) scale(.96); }
  6%, 42% { opacity: 1; transform: none; filter: none; }
  58%, 90% { opacity: .32; transform: none; filter: grayscale(1) blur(.4px); }
  100% { opacity: 0; filter: grayscale(1) blur(.4px); }
}
@keyframes say { 0% { opacity: 0; transform: translateY(6px); } 6%, 46% { opacity: 1; transform: none; } 54%, 100% { opacity: 0; } }

@keyframes type { to { clip-path: inset(0 0 0 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes glow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes ring { 0% { opacity: .8; transform: scale(1); } 100% { opacity: 0; transform: scale(1.7); } }
