/* Parlea · sitio público (página principal y páginas legales) */
:root {
  --bg: #F7F6F2; --panel: #FFFFFF; --panel2: #EFEDE7; --line: #DEDAD0; --line2: #C9C4B8;
  --text: #15171A; --text2: #33373D; --muted: #5C6168;
  --dr: #2563C9; --lep: #B4570F; --int: #5B46C9; --accent: #15171A; --on-accent: #FFFFFF;
  --num-bg: rgba(91, 70, 201, 0.12); --shadow: 0 1px 2px rgba(20, 20, 20, 0.05), 0 8px 28px rgba(20, 20, 20, 0.06);
  --font: 'Atkinson Hyperlegible', 'Segoe UI', system-ui, sans-serif;
  --brand: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E1114; --panel: #151A1F; --panel2: #1C232A; --line: #29323B; --line2: #3A444F;
    --text: #ECEFF2; --text2: #C9D1D9; --muted: #A3AEB9;
    --dr: #7AA7FF; --lep: #F2A65A; --int: #A99BFF; --accent: #ECEFF2; --on-accent: #0E1114;
    --num-bg: rgba(169, 155, 255, 0.16); --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E1114; --panel: #151A1F; --panel2: #1C232A; --line: #29323B; --line2: #3A444F;
  --text: #ECEFF2; --text2: #C9D1D9; --muted: #A3AEB9;
  --dr: #7AA7FF; --lep: #F2A65A; --int: #A99BFF; --accent: #ECEFF2; --on-accent: #0E1114;
  --num-bg: rgba(169, 155, 255, 0.16); --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 28px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, svg { display: block; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }

/* idioma: solo se ve el bloque del idioma elegido */
html[data-lang="en"] [lang="es"], html[data-lang="es"] [lang="en"] { display: none !important; }

/* barra superior */
.nav { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 18px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--brand); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 18px; margin-left: 12px; font-size: 15px; }
.nav-links a { text-decoration: none; color: var(--text2); }
.nav-links a:hover { color: var(--text); }
.grow { flex: 1; }
.tools { display: flex; align-items: center; gap: 8px; }
.chipbtn { min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chipbtn:hover { border-color: var(--line2); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--text2); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }

/* portada */
.hero { padding: 72px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { font-family: var(--brand); letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.05; font-weight: 800; margin-top: 14px; }
h2 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.12; font-weight: 800; }
h3 { font-size: 19px; font-weight: 700; }
.lead { font-size: 19px; color: var(--text2); margin: 18px 0 0; max-width: 560px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 12px; }
.c-dr { color: var(--dr); } .c-lep { color: var(--lep); } .c-int { color: var(--int); }

/* maqueta de la app */
.mock { border-radius: 18px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); overflow: hidden; }
.mock-top { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.mock-top .dot { width: 8px; height: 8px; border-radius: 50%; background: #E5484D; }
.mock-cols { display: grid; grid-template-columns: 1.15fr 1fr; }
.mock-col { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mock-col + .mock-col { border-left: 1px solid var(--line); background: var(--panel2); }
.m-who { font-size: 10.5px; font-weight: 700; letter-spacing: 0.07em; }
.m-text { margin: 2px 0 0; font-size: 15.5px; line-height: 1.4; }
.m-tr { margin: 3px 0 0; font-size: 13px; color: var(--muted); }

/* secciones */
section.block { padding: 72px 0; }
section.block.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.head { max-width: 680px; margin-bottom: 36px; }
.head p { color: var(--text2); margin: 12px 0 0; font-size: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.feat { padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg); }
.alt .feat { background: var(--bg); }
.feat .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--panel2); margin-bottom: 14px; color: var(--text2); }
.feat p { margin: 8px 0 0; color: var(--text2); font-size: 16px; }

.privacy { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.plist li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.plist b { display: block; margin-bottom: 2px; }
.plist span { color: var(--text2); font-size: 16px; }
.check { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel2); color: var(--int); }

.note { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); margin-top: 28px; }

/* precios */
.toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); margin-bottom: 26px; }
.toggle button { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.toggle button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: var(--shadow); }
.save { font-size: 12px; color: var(--int); margin-left: 4px; }
.prices { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; max-width: 860px; }
.plan { padding: 28px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 14px; }
.plan.pro { border: 2px solid var(--accent); }
.price { font-family: var(--brand); font-weight: 800; font-size: 46px; letter-spacing: -0.03em; line-height: 1; }
.price small { font-family: var(--font); font-size: 16px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; font-size: 16px; color: var(--text2); }
.plan li::before { content: '✓'; color: var(--int); font-weight: 700; margin-right: 10px; }
.plan .btn { margin-top: auto; }
.tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--panel2); color: var(--text2); }

/* preguntas */
.faq { max-width: 800px; display: grid; gap: 10px; }
.faq details { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 0 20px; }
.faq summary { cursor: pointer; padding: 18px 0; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0 0 18px; color: var(--text2); }

/* pie */
footer { padding: 40px 0 56px; border-top: 1px solid var(--line); font-size: 15px; }
footer .wrap { display: flex; gap: 24px 40px; flex-wrap: wrap; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--text2); }

/* páginas legales */
.legal { max-width: 780px; padding: 56px 20px 72px; margin: 0 auto; }
.legal h1 { font-size: clamp(32px, 4vw, 44px); }
.legal .updated { color: var(--muted); margin-top: 10px; }
.legal h2 { font-size: 22px; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--text2); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .box { padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); margin: 22px 0; }

:focus-visible { outline: 2px solid var(--int); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 920px) {
  .hero { padding-top: 44px; }
  .hero .wrap, .privacy { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .grid3 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .nav-links { display: none; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .grid3, .prices { grid-template-columns: minmax(0, 1fr); }
  .mock-cols { grid-template-columns: minmax(0, 1fr); }
  .mock-col + .mock-col { border-left: 0; border-top: 1px solid var(--line); }
  section.block { padding: 52px 0; }
  .nav .btn.sm.hide-sm { display: none; }
}

/* ---------- v2: demostración en vivo y ventana flotante ---------- */
.aud { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--text2); padding: 6px 14px 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); }
.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots i { width: 4px; border-radius: 2px; background: var(--dr); height: 9px; }
.dots i:nth-child(2) { background: var(--lep); height: 15px; }
.dots i:nth-child(3) { background: var(--int); height: 11px; }

/* luz de tres voces alrededor de la demostración */
.hero .mock { box-shadow: -36px -24px 80px -20px color-mix(in srgb, var(--dr) 32%, transparent), 40px -30px 80px -20px color-mix(in srgb, var(--lep) 28%, transparent), 0 46px 90px -24px color-mix(in srgb, var(--int) 34%, transparent), var(--shadow); }
.mock { position: relative; }
.mock-top .grow { flex: 1; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: #E5484D; box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.5); animation: rec 2s infinite; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(229, 72, 77, 0); } 100% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); } }
.wave { display: inline-flex; align-items: center; gap: 3px; height: 16px; --wc: var(--dr); }
.wave i { width: 3px; height: 4px; border-radius: 2px; background: var(--wc); transition: background 0.3s; }
.wave.on i { animation: wave 0.9s ease-in-out infinite; }
.wave.on i:nth-child(2) { animation-delay: -0.6s; } .wave.on i:nth-child(3) { animation-delay: -0.3s; } .wave.on i:nth-child(4) { animation-delay: -0.75s; } .wave.on i:nth-child(5) { animation-delay: -0.15s; }
@keyframes wave { 0%, 100% { height: 4px; } 50% { height: 15px; } }

.mock-cols { height: 330px; }
.mock-col { justify-content: flex-end; overflow: hidden; }
.mline { transition: opacity 0.5s ease, transform 0.5s ease; }
.mline.enter { opacity: 0; transform: translateY(8px); }
.mline.old { opacity: 0.5; }
.mline.gone { opacity: 0; transform: translateY(-8px); }
.w { opacity: 0; transition: opacity 0.18s ease; }
.w.on { opacity: 1; }
/* el subrayado de los términos se dibuja cuando terminan de decirse */
u.t { text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0% 2px no-repeat; padding-bottom: 1px; transition: background-size 0.45s ease; }
u.t.dr { background-image: linear-gradient(color-mix(in srgb, var(--dr) 60%, transparent), color-mix(in srgb, var(--dr) 60%, transparent)); }
u.t.lep { background-image: linear-gradient(color-mix(in srgb, var(--lep) 60%, transparent), color-mix(in srgb, var(--lep) 60%, transparent)); }
u.t.int { background-image: linear-gradient(color-mix(in srgb, var(--int) 60%, transparent), color-mix(in srgb, var(--int) 60%, transparent)); }
u.t.on { background-size: 100% 2px; }
b.n { font-weight: 700; border-radius: 5px; padding: 0 4px; white-space: nowrap; background: transparent; transition: background-color 0.4s ease; }
b.n.on { background: var(--num-bg); }
.m-tr { opacity: 0; transition: opacity 0.5s ease; }
.m-tr.on { opacity: 1; }

/* subtítulos encima de la llamada */
.stage-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.stage { position: relative; padding: 0 0 120px; }
.call { position: relative; border-radius: 18px; background: #101418; color: #E8ECEF; padding: 12px; box-shadow: var(--shadow); }
.call-bar { display: flex; align-items: center; gap: 6px; padding: 2px 4px 12px; font-size: 13px; }
.call-bar span { width: 9px; height: 9px; border-radius: 50%; background: #3A434C; }
.call-bar b { font-weight: 400; color: #9AA5B0; margin-left: 8px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 8px; }
.tile { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 6px; font-size: 13px; color: #B7C0C9; background: #1A2026; outline: 2px solid transparent; outline-offset: -2px; transition: outline-color 0.3s ease; }
.tile.int { position: absolute; width: 19%; aspect-ratio: 4 / 3; right: 20px; top: 44px; z-index: 1; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4); font-size: 11px; }
.tile .avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-family: var(--brand); font-weight: 800; font-size: 18px; color: #fff; }
.tile.int .avatar { width: 32px; height: 32px; font-size: 12px; }
.tile.dr .avatar { background: #2D5BB0; } .tile.lep .avatar { background: #A0521A; } .tile.int .avatar { background: #5543B8; }
.tile.speaking.dr { outline-color: #7AA7FF; } .tile.speaking.lep { outline-color: #F2A65A; } .tile.speaking.int { outline-color: #A99BFF; }
.call-ctrl { display: flex; justify-content: center; gap: 10px; padding-top: 12px; }
.call-ctrl i { width: 34px; height: 34px; border-radius: 50%; background: #262E36; }
.call-ctrl i.end { background: #C93A3F; width: 46px; border-radius: 17px; }
.pipwin { position: absolute; left: -28px; bottom: 0; width: min(74%, 470px); border-radius: 14px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.12); overflow: hidden; }
.pip-top { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.pip-top .grow { flex: 1; }
.pchip { padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel2); color: var(--text2); font-weight: 700; }
.mock-cols.small { height: 168px; }
.mock-cols.small .mock-col { padding: 10px 12px 12px; gap: 8px; }
.mock-cols.small .m-text { font-size: 14px; }

/* precios: el número cambia con una transición corta */
.price[data-show] { animation: pricein 0.35s ease; }
@keyframes pricein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* preguntas: se abren suavemente */
:root { interpolate-size: allow-keywords; }
.faq details::details-content { block-size: 0; overflow: hidden; transition: block-size 0.3s ease, content-visibility 0.3s allow-discrete; }
.faq details[open]::details-content { block-size: auto; }

@media (max-width: 920px) {
  .stage-wrap { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pipwin { left: 0; }
}
@media (max-width: 620px) {
  .mock-cols { height: auto; min-height: 420px; }
  .mock-cols.small { height: auto; min-height: 260px; }
  .stage { padding-bottom: 0; }
  .pipwin { position: relative; left: auto; bottom: auto; width: 94%; margin: -46px 0 0 auto; }
  .tile.int { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- v3: comparación de precios ---------- */
.compare { max-width: 860px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); overflow: hidden; margin-bottom: 30px; }
.cmp-row { display: grid; grid-template-columns: 1.2fr 0.8fr 1.6fr; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 16px; color: var(--text2); align-items: baseline; }
.cmp-row:first-child { border-top: 0; }
.cmp-row.cmp-head { font-size: 14px; color: var(--muted); padding-top: 12px; padding-bottom: 12px; }
.cmp-row.us { color: var(--text); background: color-mix(in srgb, var(--int) 8%, transparent); }
@media (max-width: 620px) { .cmp-row { grid-template-columns: 1fr auto; gap: 4px 12px; } .cmp-row .m { grid-column: 1 / -1; font-size: 15px; } .cmp-row.cmp-head .m { display: none; } }

/* ---------- menú: iniciar sesión y suscribirse ---------- */
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { border-color: var(--line2); }
@media (max-width: 620px) {
  /* en el teléfono: marca, idioma y tema arriba; los dos botones abajo, a lo ancho */
  .nav .wrap { flex-wrap: wrap; row-gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .nav .tools { display: contents; }
  .nav .chipbtn { flex: 0 0 auto; }
  .nav .nav-login, .nav .nav-sub { flex: 1 1 0; }
  .nav .nav-login { border-color: var(--line2); }
}
