/* =============================================================================
   SOMA — Landing (rediseño 2026-05-28)
   Paleta y tokens ESPEJADOS del design system real del frontend
   (frontend/src/index.css + tailwind.config.js). Estética plana del producto:
   sin glassmorphism, tarjetas estilo PortalWidget (rounded-2xl, transparentes,
   sin sombra ni hover gris), ícono en cuadrado de color. Accesible (WCAG AA),
   prefers-reduced-motion respetado. Sin claims de dispositivo médico (R039).
   ========================================================================== */

/* ---------- Tokens (valores reales del frontend) ---------- */
:root {
    /* Primario — cian (var(--primary)=primary-600) */
    --primary-50: #e0f7fa;
    --primary-100: #b2ebf2;
    --primary-500: #00a3bd;
    --primary-600: #007280;
    --primary-700: #006b7d;
    --primary: #007280;
    --primary-hover: #006b7d;

    /* Secundario — índigo */
    --secondary-50: #e8eaf6;
    --secondary-500: #3f51b5;
    --secondary-700: #303f9f;

    /* Neutrales (tema claro) */
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;

    /* Texto */
    --text-primary: #171717;
    --text-secondary: #404040;
    --text-tertiary: #525252;
    --text-on-primary: #ffffff;

    /* Superficies */
    --bg-app: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-secondary: #f5f5f5;
    --border: #d4d4d4;
    --chat-user-bubble: #e2e8f0;   /* burbuja de tu mensaje (slate-200, como la app) */

    /* Semánticos */
    --success: #15803d;
    --danger: #b91c1c;

    /* Radios (del design system) */
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-2xl: 2rem;

    --maxw: 1080px;
    --pad-section: 6rem;
    --t: .2s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
    font-family: var(--app-font, 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif);
    color: var(--text-secondary);
    background: var(--bg-surface);
    line-height: 1.6;
    font-size: 1.0625rem;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
/* line-height >= 1.25: la caja de fuente de Inter (content-box ~1.225x el font-size en headings)
   superaba el line-box con 1.15 y los ascendentes/tildes se recortaban arriba dentro de
   contenedores con overflow:hidden (.hero) y en WebView Android. No bajar de 1.25. */
h1, h2, h3 { color: var(--text-primary); line-height: 1.25; letter-spacing: -0.02em; font-weight: 700; }

:focus-visible { outline: 3px solid var(--primary-500); outline-offset: 3px; border-radius: 6px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: var(--pad-section) 0; }
.section--soft { background: var(--bg-app); }

.section-head { max-width: 640px; margin: 0 auto 3.25rem; text-align: center; }
.section-head h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); margin-bottom: .9rem; }
.section-head p { color: var(--text-tertiary); font-size: 1.125rem; }

.eyebrow {
    display: inline-block; font-size: .8125rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
    color: var(--primary-600); background: var(--primary-50);
    padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1.25rem;
}

.skip-link { position: absolute; left: -999px; top: .5rem; z-index: 200; background: var(--text-primary); color: #fff; padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { left: .5rem; }

/* ---------- Botones (calcan los del app) ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font: inherit; font-weight: 600; font-size: 1rem;
    padding: .85rem 1.5rem; border-radius: var(--radius-md);
    border: 1.5px solid transparent; cursor: pointer;
    transition: background var(--t), border-color var(--t), color var(--t);
    white-space: nowrap;
}
.btn--primary { background: var(--primary); color: var(--text-on-primary); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--secondary { background: var(--bg-surface); color: var(--text-primary); border-color: var(--border); }
.btn--secondary:hover { border-color: var(--primary); color: var(--primary-600); }
.btn--lg { padding: 1.05rem 2rem; font-size: 1.0625rem; }

/* ---------- Navbar (plano, sin glass) ---------- */
/* Navbar fundido con el fondo: sin línea estática; la separación aparece como sombra suave solo al bajar (.navbar--scrolled). */
.navbar { position: sticky; top: 0; z-index: 100; background: var(--bg-surface); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; color: var(--text-primary); font-size: 1.2rem; letter-spacing: -.02em; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.nav-actions { display: flex; align-items: center; gap: .75rem; }

.lang-select {
    font: inherit; font-size: .9rem; color: var(--text-secondary);
    border: 1.5px solid var(--border); border-radius: var(--radius-md);
    padding: .5rem 1.8rem .5rem .7rem; background: var(--bg-surface); cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%23525252' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .55rem center;
}
.lang-select:hover { border-color: var(--primary); }

/* ---------- Navbar refinado (links + idioma + compacta al scroll) ---------- */
.navbar .container { transition: height var(--t); }
.brand img { transition: width var(--t), height var(--t); }
.navbar--scrolled { box-shadow: 0 6px 22px rgba(0, 0, 0, .30); }
.navbar--scrolled .container { height: 58px; }
.navbar--scrolled .brand img { width: 30px; height: 30px; }

.nav-menu { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; list-style: none; gap: 1.6rem; align-items: center; }
.nav-links a { color: var(--text-secondary); font-weight: 500; font-size: .95rem; transition: color var(--t); }
.nav-links a:hover { color: var(--primary-600); }

/* Selector de idioma refinado (globo + píldora) */
.lang-switch { display: inline-flex; align-items: center; gap: .3rem; border: 1.5px solid var(--border); border-radius: 999px; padding: .35rem .5rem .35rem .7rem; transition: border-color var(--t); }
.lang-switch:hover { border-color: var(--primary); }
.lang-switch > svg { color: var(--text-tertiary); flex-shrink: 0; }
.lang-switch select { border: none; background: transparent; font: inherit; font-size: .9rem; color: var(--text-secondary); cursor: pointer; appearance: none; padding-right: 1.1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2364748b' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right center; }
.lang-switch select:focus-visible { outline: none; }

/* Hamburguesa */
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: .55rem; z-index: 130; }
.nav-burger span { width: 24px; height: 2.5px; background: var(--text-primary); border-radius: 2px; transition: transform .25s ease, opacity .2s ease; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

@media (max-width: 860px) {
    .nav-burger { display: flex; }
    .nav-menu { position: fixed; inset: 0 0 0 auto; width: min(82vw, 320px); background: var(--bg-surface); border-left: 1px solid var(--border); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 1.25rem; padding: 5.5rem 1.5rem 2rem; transform: translateX(100%); transition: transform .3s ease; box-shadow: var(--shadow-lg); }
    .nav-menu.open { transform: none; }
    .nav-links { flex-direction: column; align-items: stretch; gap: 0; }
    .nav-links a { padding: .85rem .25rem; border-bottom: 1px solid var(--border); }
    .nav-actions { flex-direction: column; align-items: stretch; gap: .85rem; margin-top: 1rem; }
    .nav-actions .btn { width: 100%; }
    .lang-switch { justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(3.5rem, 8vw, 6.5rem) 0 5rem; text-align: center; }
.hero-orb { display: block; width: 76px; height: 76px; margin: 0 auto 1.5rem; object-fit: contain; }
.hero h1 { font-size: clamp(2.25rem, 6vw, 4rem); max-width: 18ch; margin: 0 auto 1.25rem; }
.hero h1 .accent { color: var(--primary-600); }
.hero .lede { font-size: clamp(1.0625rem, 2vw, 1.3rem); color: var(--text-tertiary); max-width: 56ch; margin: 0 auto 2.25rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.hero-note { margin-top: 1.5rem; font-size: .9rem; color: var(--text-tertiary); display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: center; }
.hero-note span { display: inline-flex; align-items: center; gap: .4rem; }
.hero-note svg { color: var(--primary-600); flex-shrink: 0; }

/* ---------- Grids ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Tarjeta canónica (estilo PortalWidget: rounded-2xl, plana) ---------- */
.card { border-radius: var(--radius-2xl); padding: 1.75rem; }
.card .ico {
    width: 58px; height: 58px; border-radius: 19px;
    display: grid; place-items: center; margin-bottom: 1.1rem;
    background: var(--primary-100); color: var(--primary-600);
    position: relative;
}
/* Anillo sutil que despega el ícono del fondo plano sin caer en sombra genérica. */
.card .ico::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid var(--primary-500); opacity: .18; }
.card .ico svg { width: 27px; height: 27px; }
.card .ico.is-secondary { background: var(--secondary-50); color: var(--secondary-500); }
.card .ico.is-secondary::after { border-color: var(--secondary-500); }

/* Sección "Problema": título a un lado (pegajoso), vivencias en columna al otro con ícono al costado. */
.problem-split { display: grid; grid-template-columns: .82fr 1.18fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.section-head--left { text-align: left; max-width: none; margin: 0; position: sticky; top: 96px; }
.problem-cards { display: flex; flex-direction: column; gap: 1.1rem; }
.problem-cards .card { display: grid; grid-template-columns: auto 1fr; column-gap: 1.2rem; row-gap: .25rem; align-items: start; padding: 1.4rem 1.5rem; }
.problem-cards .ico { grid-column: 1; grid-row: 1 / 3; margin-bottom: 0; }
@media (max-width: 860px) {
    .problem-split { grid-template-columns: 1fr; gap: 2rem; }
    .section-head--left { position: static; text-align: center; max-width: 560px; margin: 0 auto; }
}
.card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem; }
.card p { color: var(--text-tertiary); font-size: 1rem; }

/* ---------- Dos caminos ---------- */
.paths { gap: 1.75rem; }
.path { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 2.5rem; display: flex; flex-direction: column; }
.path .tag { font-size: .8125rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--secondary-500); margin-bottom: .6rem; }
.path h3 { font-size: 1.5rem; margin-bottom: 1.25rem; }
.path ul { list-style: none; margin-bottom: 2rem; flex: 1; }
.path li { display: flex; gap: .7rem; padding: .5rem 0; color: var(--text-secondary); }
.path li svg { color: var(--primary-600); flex-shrink: 0; margin-top: .25rem; }
.path .btn { align-self: flex-start; }

/* ---------- Confianza ---------- */
.trust-grid { gap: 1.25rem; }
.trust-item { display: flex; align-items: center; gap: .9rem; padding: 1.5rem; border-radius: var(--radius-2xl); }
.trust-item .ico { width: 48px; height: 48px; border-radius: var(--radius-2xl); display: grid; place-items: center; flex-shrink: 0; background: var(--primary-100); color: var(--primary-600); }
.trust-item strong { color: var(--text-primary); display: block; font-size: 1rem; font-weight: 700; }
.trust-item span { color: var(--text-tertiary); font-size: .9rem; }
.disclaimer { margin-top: 2.5rem; text-align: center; color: var(--text-tertiary); font-size: .9rem; max-width: 60ch; margin-left: auto; margin-right: auto; }

/* ---------- CTA final (plano, primario sólido) ---------- */
.cta-final { text-align: center; }
.cta-orb { display: block; object-fit: contain; }

/* CTA final — «los dos lados del puente»: panel blanco calmo, sin bloques de color
   (mismo lenguaje que la sección .path; el índigo solo en la etiqueta, como .path .tag).
   Solo index.html; el CTA del profesional sigue con .panel. */
.cta-final .cta-panel { max-width: 800px; margin: 0 auto; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem); box-shadow: 0 18px 50px rgba(15, 23, 42, .06); }
.cta-final .cta-panel .cta-orb { width: 64px; height: 64px; margin: 0 auto 1.1rem; }
.cta-final .cta-panel h2 { color: var(--text-primary); font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: .55rem; }
.cta-final .cta-panel .cta-lede { color: var(--text-tertiary); font-size: 1.1rem; margin-bottom: 2.25rem; }
.cta-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 0; text-align: left; }
.cta-side { display: flex; flex-direction: column; padding: 0 1.75rem; }
.cta-side + .cta-side { border-left: 1px solid var(--border); }
.cta-side .cta-side-tag { font-size: .8125rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; margin-bottom: .5rem; }
.cta-side--user .cta-side-tag { color: var(--primary-600); }
.cta-side--pro .cta-side-tag { color: var(--secondary-500); }
.cta-side .cta-side-line { color: var(--text-secondary); font-size: 1rem; margin: 0 0 1.25rem; flex: 1; }
.cta-side .btn { align-self: stretch; }
.cta-final .cta-panel .btn--primary { background: var(--primary); color: var(--text-on-primary); }
.cta-final .cta-panel .btn--primary:hover { background: var(--primary-hover); }
.cta-final .cta-note { margin-top: 1.75rem; color: var(--text-tertiary); font-size: .875rem; }
@media (max-width: 620px) {
  .cta-sides { grid-template-columns: 1fr; gap: 1.75rem; }
  .cta-side { padding: 0; }
  .cta-side + .cta-side { border-left: 0; border-top: 1px solid var(--border); padding-top: 1.75rem; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--border); padding: 3.5rem 0 2.5rem; background: var(--bg-app); }
.footer-top { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: space-between; align-items: flex-start; margin-bottom: 2.5rem; }
.footer .brand { margin-bottom: .75rem; }
.footer-tagline { color: var(--text-tertiary); max-width: 34ch; font-size: .95rem; }
.footer-links { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.footer-col h4 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-primary); margin-bottom: .9rem; }
.footer-col a, .footer-col p { display: block; color: var(--text-tertiary); font-size: .95rem; padding: .25rem 0; transition: color var(--t); }
.footer-col a:hover { color: var(--primary-600); }
.footer-nevialis { display: flex; align-items: center; justify-content: center; gap: .5rem; padding-bottom: 1.5rem; color: var(--text-tertiary); font-size: .9rem; }
.footer-nevialis img { width: 40px; height: 40px; object-fit: contain; }
.footer-nevialis strong { color: var(--text-secondary); font-weight: 700; }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.75rem; text-align: center; color: var(--text-tertiary); font-size: .875rem; }
.footer-bottom .heart { color: var(--danger); }

.container--narrow { max-width: 760px; }

/* ---------- Mockup del producto (app window estilizado) ---------- */
.mockup { max-width: 880px; margin: 0 auto; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); overflow: hidden; box-shadow: 0 18px 50px rgba(15, 23, 42, .08); }
.mockup-bar { display: flex; gap: .5rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--border); background: var(--bg-app); }
.mockup-bar span { width: 11px; height: 11px; border-radius: 999px; background: var(--neutral-300); }
.mockup-body { padding: 1.75rem; }
.mockup-greeting { display: inline-block; background: var(--primary-50); color: var(--primary-600); font-weight: 600; padding: .5rem 1rem; border-radius: 999px; margin-bottom: 1.5rem; }
.mockup-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; }
.mockup-cal { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1rem; }
.mockup-cal-head { font-weight: 700; color: var(--text-primary); margin-bottom: .8rem; }
.mockup-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.mockup-cal-grid i { aspect-ratio: 1; border-radius: 7px; background: var(--bg-app); }
.mockup-cal-grid i.today { background: var(--primary); }
.mockup-cal-grid i.ev { background: var(--primary-100); }
.mockup-widgets { display: flex; flex-direction: column; gap: .9rem; }
.mockup-widget { display: flex; align-items: center; gap: .8rem; }
.mockup-widget .ico { width: 40px; height: 40px; border-radius: var(--radius-lg); display: grid; place-items: center; flex-shrink: 0; background: var(--primary-100); color: var(--primary-600); }
.mockup-widget .ico.is-secondary { background: var(--secondary-50); color: var(--secondary-500); }
.mockup-widget strong { display: block; color: var(--text-primary); font-size: .95rem; }
.mockup-widget span { color: var(--text-tertiary); font-size: .8rem; }

/* ---------- Cómo funciona (pasos) ---------- */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; counter-reset: step; position: relative; }
/* Línea conectora cian → índigo detrás de los números: convierte 3 cards sueltas en un recorrido. */
.steps::before { content: ""; position: absolute; top: 30px; left: 17%; right: 17%; height: 2px; background: linear-gradient(90deg, var(--primary), var(--secondary-500)); opacity: .35; z-index: 0; }
.step { padding: .5rem; position: relative; z-index: 1; text-align: center; }
.step-num { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 999px; background: var(--primary-50); color: var(--primary-600); border: 2px solid var(--primary); font-weight: 700; font-size: 1.3rem; margin-bottom: 1.1rem; box-shadow: 0 0 0 7px var(--bg-surface); }
.step:nth-child(2) .step-num { background: var(--secondary-50); color: var(--secondary-500); border-color: var(--secondary-500); }
.step h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.step p { color: var(--text-tertiary); max-width: 30ch; margin: 0 auto; }

/* ---------- FAQ (accordion nativo) ---------- */
.faq { display: flex; flex-direction: column; gap: .75rem; }
.faq-item { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.faq-item summary { cursor: pointer; list-style: none; padding: 1.15rem 1.4rem; font-weight: 600; color: var(--text-primary); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--primary-600); flex-shrink: 0; transition: transform var(--t); }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 1.4rem 1.2rem; color: var(--text-tertiary); }

/* ---------- Conocé a Soma (chat demo) ---------- */
/* Calca la ventana real de Soma (ChatWindowBase + ChatBody del frontend):
   header plano con orbe + "soma" en degradado, mensajes de Soma a ancho
   completo SIN recuadro (flatAssistant), tu mensaje en burbuja gris. */
.soma-chat { max-width: 460px; margin: 0 auto; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; height: 520px; }
.soma-chat-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; background: var(--bg-surface); flex-shrink: 0; }
.soma-avatar { width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0; overflow: hidden; }
.soma-chat-title { margin: 0; font-size: .9rem; font-weight: 700; text-transform: lowercase; letter-spacing: -.01em; background: linear-gradient(90deg, var(--primary-500), var(--primary-600)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.soma-chat-body { flex: 1; overflow-y: auto; padding: .5rem .8rem; display: flex; flex-direction: column; gap: 1rem; }
.soma-msg { font-size: .95rem; line-height: 1.55; opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.soma-msg.show { opacity: 1; transform: none; }
/* Soma: texto plano, ancho completo, sin burbuja */
.soma-msg.from-soma { align-self: stretch; padding: .1rem .25rem; color: var(--text-primary); }
/* Tu mensaje: burbuja gris a la derecha */
.soma-msg.from-user { align-self: flex-end; max-width: 82%; padding: .6rem .85rem; border-radius: var(--radius-lg); background: var(--chat-user-bubble); color: var(--text-primary); }
.soma-typing { align-self: flex-start; display: inline-flex; gap: 5px; padding: .5rem .25rem; }
.soma-typing i { width: 6px; height: 6px; border-radius: 999px; background: var(--primary); opacity: .4; animation: soma-blink 1.2s infinite both; }
.soma-typing i:nth-child(2) { animation-delay: .2s; }
.soma-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes soma-blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
.soma-chat-cta { margin: .5rem .8rem .8rem; }

/* Composición asimétrica: texto a la izquierda, chat real protagonista a la derecha.
   Rompe la monotonía del centrado y pone al frente lo más propio del producto. */
.soma-split { display: grid; grid-template-columns: 1fr 460px; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.soma-split-text { text-align: left; }
.soma-split-text .eyebrow { margin-bottom: 1.25rem; }
.soma-split-text h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); line-height: 1.15; margin-bottom: 1.1rem; }
.soma-split-text > p { color: var(--text-tertiary); font-size: 1.125rem; }
.soma-split-hint { margin-top: 1.25rem; font-size: .95rem; color: var(--primary-600); font-weight: 600; }
.soma-split .soma-chat { margin: 0; max-width: 460px; width: 100%; }
@media (max-width: 900px) {
    .soma-split { grid-template-columns: 1fr; gap: 2.5rem; }
    .soma-split-text { text-align: center; max-width: 560px; margin: 0 auto; }
    .soma-split .soma-chat { margin: 0 auto; }
}


/* ---------- Mockup en perspectiva 3D ---------- */
.mockup { transform: perspective(1800px) rotateX(6deg) rotateY(-11deg) rotate(.6deg); transition: transform .5s ease; transform-style: preserve-3d; }
.mockup:hover { transform: perspective(1800px) rotateX(2deg) rotateY(-3deg); }
.shot3d { max-width: 900px; margin: 0 auto; border-radius: var(--radius-2xl); overflow: hidden; border: 1px solid var(--border); box-shadow: 0 30px 70px rgba(15, 23, 42, .14); transform: perspective(1800px) rotateX(6deg) rotateY(-11deg) rotate(.6deg); transition: transform .5s ease; }
.shot3d:hover { transform: perspective(1800px) rotateX(2deg) rotateY(-3deg); }
.shot3d img { display: block; width: 100%; height: auto; }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.shot-label { text-align: center; margin-top: 1rem; font-weight: 600; color: var(--text-secondary); }

/* ---------- Barra de accesibilidad ---------- */
.a11y-bar { position: fixed; left: 1.25rem; bottom: 1.25rem; z-index: 150; }
.a11y-toggle { width: 52px; height: 52px; border-radius: 999px; border: none; background: var(--primary); color: #fff; cursor: pointer; box-shadow: var(--shadow); display: grid; place-items: center; transition: background var(--t); }
.a11y-toggle:hover { background: var(--primary-hover); }
.a11y-panel { position: absolute; left: 0; bottom: 64px; width: 250px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 1.1rem; }
.a11y-panel h3 { font-size: 1rem; margin-bottom: .9rem; }
.a11y-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; color: var(--text-secondary); font-size: .9rem; }
.a11y-btns { display: flex; gap: .4rem; }
.a11y-btns button { width: 36px; height: 36px; border-radius: 9px; border: 1.5px solid var(--border); background: var(--bg-surface); color: var(--text-primary); font-weight: 700; cursor: pointer; }
.a11y-btns button:hover { border-color: var(--primary); }
.a11y-opt { width: 100%; text-align: left; padding: .65rem .8rem; margin-bottom: .5rem; border: 1.5px solid var(--border); border-radius: 10px; background: var(--bg-surface); color: var(--text-primary); font: inherit; font-size: .9rem; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: border-color var(--t), background var(--t); }
.a11y-opt::after { content: ""; width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--border); }
.a11y-opt[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-50); color: var(--primary-600); }
.a11y-opt[aria-pressed="true"]::after { background: var(--primary); border-color: var(--primary); }
.a11y-reset { width: 100%; padding: .55rem; margin-top: .3rem; border: none; background: transparent; color: var(--text-tertiary); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }

/* Modo: fuente para dislexia */
html.a11y-dyslexia { --app-font: 'Atkinson Hyperlegible', 'Inter', system-ui, sans-serif; }

/* Modo: alto contraste */
html.a11y-contrast {
    --text-primary: #000000; --text-secondary: #000000; --text-tertiary: #1a1a1a;
    --border: #000000; --bg-app: #ffffff; --primary-600: #005a66; --primary: #005a66;
}
html.a11y-contrast .card, html.a11y-contrast .trust-item { border: 1.5px solid #000; }

/* Modo: calma (sin movimiento + estímulos bajos) */
html.a11y-calm *, html.a11y-calm *::before, html.a11y-calm *::after { animation: none !important; transition: none !important; }
html.a11y-calm .reveal { opacity: 1 !important; transform: none !important; }
html.a11y-calm .mockup, html.a11y-calm .shot3d { transform: none; }
/* CTA final: en modo calma el panel blanco ya es de bajo estímulo — sin override. */

/* ---------- Ilustración: contenedores de ícono como formas orgánicas suaves ---------- */
.card .ico, .trust-item .ico, .mockup-widget .ico {
    border-radius: 46% 54% 57% 43% / 53% 46% 54% 47%;
    background: linear-gradient(140deg, var(--primary-50), var(--primary-100));
    color: var(--primary-600);
}
.card .ico.is-secondary, .mockup-widget .ico.is-secondary {
    background: linear-gradient(140deg, var(--secondary-50), rgba(63, 81, 181, .14));
    color: var(--secondary-500);
}
.soma-avatar {
    border-radius: 46% 54% 57% 43% / 53% 46% 54% 47%;
    background: linear-gradient(140deg, var(--primary-50), var(--primary-100));
}
.eyebrow { border-radius: 999px; }
/* Aura suave detrás del héroe (decorativa, baja estimulación) */
.hero { position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: -20% 30% auto auto; width: 460px; height: 460px;
    background: radial-gradient(circle at 30% 30%, var(--primary-50), transparent 70%);
    z-index: -1; pointer-events: none; opacity: .8;
}
.hero::after {
    content: ""; position: absolute; inset: auto auto -30% -10%; width: 420px; height: 420px;
    background: radial-gradient(circle at 60% 60%, var(--secondary-50), transparent 70%);
    z-index: -1; pointer-events: none; opacity: .7;
}

/* ---------- B2B (equipos y centros) ---------- */
.b2b { background: linear-gradient(140deg, var(--primary-50), var(--bg-surface)); border: 1px solid var(--primary-100); border-radius: var(--radius-2xl); padding: 2.75rem; }
.b2b .eyebrow { margin-bottom: 1rem; }
.b2b h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: .9rem; }
.b2b > p { color: var(--text-secondary); font-size: 1.1rem; margin-bottom: 1.5rem; max-width: 52ch; }
.b2b-points { list-style: none; margin-bottom: 2rem; display: flex; flex-direction: column; gap: .6rem; }
.b2b-points li { display: flex; align-items: center; gap: .6rem; color: var(--text-secondary); }
.b2b-points li svg { color: var(--primary-600); flex-shrink: 0; }

/* ---------- Quién está detrás ---------- */
.maker { text-align: center; max-width: 620px; margin: 0 auto; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); padding: 2.75rem 2rem; }
.maker-avatar { width: 84px; height: 84px; border-radius: 999px; margin: 0 auto 1.25rem; display: grid; place-items: center; background: var(--bg-app); border: 1px solid var(--border); overflow: hidden; }
.maker-avatar img { width: 52px; height: 52px; object-fit: contain; }
.maker .eyebrow { margin-bottom: 1rem; }
.maker h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 1.25rem; }
.maker-quote { font-size: 1.15rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 1.5rem; }
.maker-name { margin-bottom: 1.75rem; }
.maker-name strong { display: block; color: var(--text-primary); }
.maker-name span { color: var(--text-tertiary); font-size: .9rem; }
.maker-contact { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Comparativa ---------- */
.compare { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table { width: 100%; min-width: 520px; border-collapse: collapse; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-2xl); overflow: hidden; }
.compare-table th, .compare-table td { padding: 1rem 1.15rem; text-align: left; font-size: .95rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare-table thead th { font-weight: 700; color: var(--text-primary); }
.compare-table thead th.is-soma { color: var(--primary-600); background: var(--primary-50); }
.compare-table tbody th[scope="row"] { font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.compare-table td { color: var(--text-tertiary); }
.compare-table td.is-soma { color: var(--text-primary); font-weight: 600; background: var(--primary-50); position: relative; padding-left: 2.5rem; }
.compare-table td.is-soma::before { content: "✓"; position: absolute; left: 1.1rem; color: var(--primary-600); font-weight: 700; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: none; }

/* ---------- Reveal (suave, opt-out) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    :root { --pad-section: 4rem; }
    .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .paths { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; gap: 2.25rem; }
    .steps::before { display: none; }
    .mockup-grid { grid-template-columns: 1fr; }
    .shots { grid-template-columns: 1fr; gap: 3rem; }
    .mockup { transform: none; }
    .footer-top { flex-direction: column; }
}
@media (max-width: 560px) {
    .grid--3, .grid--4, .grid--2 { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; }
    .hero-cta .btn { width: 100%; }
}

/* ---------- prefers-reduced-motion (incondicional, ISO 14971 R005) ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .reveal { opacity: 1; transform: none; }
    .soma-msg, .soma-proposal { opacity: 1; transform: none; }
    .mockup, .shot3d { transform: none; }
}

/* ---------- Modo oscuro (espeja el tema .dark del frontend) ----------
   Tres estados: por defecto sigue la preferencia del SO (media query); el toggle
   de la barra de accesibilidad fuerza .a11y-dark (oscuro) o .a11y-light (claro),
   que ganan sobre la preferencia del SO. Las variables se repiten en ambos
   selectores a propósito: CSS sin preprocesador no permite compartir el bloque. */
html.a11y-dark {
    --bg-app: #0f172a;          /* Slate 900 */
    --bg-surface: #1e293b;      /* Slate 800 */
    --bg-secondary: #020617;
    --text-primary: #ffffff;
    --text-secondary: #f1f5f9;
    --text-tertiary: #cbd5e1;
    --border: #334155;
    --neutral-100: #334155;
    --neutral-300: #475569;
    --primary-600: #4dd0e1;     /* cian brillante para acentos/íconos sobre fondo oscuro */
    --primary-100: rgba(77, 208, 225, .16);  /* tinte del cuadro de ícono */
    --primary-50: rgba(77, 208, 225, .12);   /* pill eyebrow */
    --secondary-500: #a5b4fc;
    --secondary-50: rgba(165, 180, 252, .15);
    --chat-user-bubble: #334155;   /* slate-700 */
}
@media (prefers-color-scheme: dark) {
    html:not(.a11y-light) {
        --bg-app: #0f172a;
        --bg-surface: #1e293b;
        --bg-secondary: #020617;
        --text-primary: #ffffff;
        --text-secondary: #f1f5f9;
        --text-tertiary: #cbd5e1;
        --border: #334155;
        --neutral-100: #334155;
        --neutral-300: #475569;
        --primary-600: #4dd0e1;
        --primary-100: rgba(77, 208, 225, .16);
        --primary-50: rgba(77, 208, 225, .12);
        --secondary-500: #a5b4fc;
        --secondary-50: rgba(165, 180, 252, .15);
        --chat-user-bubble: #334155;
    }
}
html.a11y-dark .mockup { box-shadow: 0 18px 50px rgba(0, 0, 0, .45); }
@media (prefers-color-scheme: dark) { html:not(.a11y-light) .mockup { box-shadow: 0 18px 50px rgba(0, 0, 0, .45); } }

/* ============================================================================
   Mejoras 2026-06-25 — público objetivo, mockup en hero, CTA fijo móvil
   ========================================================================== */

/* Tira "¿esto es para mí?": nombra el público sin claims clínicos (R039) */
.hero-for { margin: 1.25rem auto 0; max-width: 50ch; font-size: .95rem; color: var(--text-tertiary); }

/* Avatar del chat = orbe REAL de Soma (claro/oscuro, igual que la app) */
.soma-avatar { background: none; padding: 0; overflow: hidden; border-radius: 7px; }
.soma-avatar-img { width: 100%; height: 100%; object-fit: contain; display: block; }
.soma-avatar-dark { display: none; }
@media (prefers-color-scheme: dark) {
    html:not(.a11y-light) .soma-avatar-light { display: none; }
    html:not(.a11y-light) .soma-avatar-dark { display: block; }
}
html.a11y-dark .soma-avatar-light { display: none; }
html.a11y-dark .soma-avatar-dark { display: block; }
html.a11y-light .soma-avatar-light { display: block; }
html.a11y-light .soma-avatar-dark { display: none; }

/* Barra de input (calca la del chat real: superficie plana continua) */
.soma-chat-inputbar { padding: .6rem .8rem .85rem; flex-shrink: 0; }
.soma-chat-form { display: flex; gap: .5rem; }
.soma-chat-form input {
    flex: 1; min-width: 0; font: inherit; font-size: .95rem; min-height: 44px;
    padding: .6rem .9rem; border: 1.5px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-surface); color: var(--text-primary); transition: border-color var(--t);
}
.soma-chat-form input:focus-visible { outline: none; border-color: var(--primary); }
.soma-chat-form input:disabled { opacity: .6; }
.soma-chat-send {
    flex-shrink: 0; width: 44px; min-height: 44px; border: none; border-radius: var(--radius-md);
    background: var(--primary); color: #fff; cursor: pointer; display: grid; place-items: center;
    transition: background var(--t);
}
.soma-chat-send:hover { background: var(--primary-hover); }
.soma-chat-send:disabled { opacity: .55; cursor: default; }

/* CTA fijo en móvil: la puerta de entrada siempre a la vista al hacer scroll.
   Se esconde en desktop (ahí el botón "Entrar" del nav siempre está visible). */
.sticky-cta { display: none; }
@media (max-width: 860px) {
    .sticky-cta {
        display: flex; align-items: center; justify-content: center;
        position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 140;
        padding: .95rem 1.25rem; border-radius: var(--radius-md);
        background: var(--primary); color: var(--text-on-primary);
        font-weight: 600; font-size: 1rem; box-shadow: 0 6px 20px rgba(15, 23, 42, .22);
    }
    /* Sube el botón de accesibilidad para no solaparse con la barra CTA */
    .a11y-bar { bottom: 5.25rem; }
    /* Aire al final para que la barra fija no tape el pie de página */
    body { padding-bottom: 4.5rem; }
}
