/* =========================================================
   Portada (30 oct 2026). Va encima de style.css, que comparte con las guías:
   el menú y el pie siguen ahí, iguales en toda la web. Solo se carga en las 11
   portadas. Motivo único: los dos círculos del logo, dos personas en paz.
   ========================================================= */
.portada {
  --m: clamp(18px, 4vw, 48px);
  --ancho: 1180px;
  --suelo2: #0d1426;
  --sec: clamp(88px, 11vw, 160px);
  background: var(--bg);
}
.portada::before { display: none; }
.portada .nav .btn-sm { white-space: nowrap; }
.portada .btn-primary { background: #2a62f2; box-shadow: none; }
.portada .btn-primary:hover { background: var(--brand); box-shadow: none; }
.portada .btn-ghost { background: transparent; backdrop-filter: none; }
.portada .btn { transition: transform .2s, background .2s, border-color .2s; }
.portada .btn:active { transform: scale(.97); }

.p-wrap { width: 100%; max-width: calc(var(--ancho) + 2 * var(--m)); margin-inline: auto; padding-inline: var(--m); }
.p-sec { padding-block: var(--sec); }
#report { overflow: clip; }
#diario .p-dos { margin-top: 40px; }
.p-dos { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.p-dos > * { min-width: 0; }
.p-dos-centro { align-items: center; }
.p-h2 { font-family: "Sora"; font-weight: 800; font-size: clamp(1.75rem, 4vw, 3rem); line-height: 1.06; letter-spacing: -.03em; text-wrap: balance; }
.p-sub { font-size: clamp(1.05rem, 1.5vw, 1.25rem); margin-top: 18px; max-width: 56ch; }
.grad { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; }

/* ---------- Primera pantalla ---------- */
.p-hero {
  position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 24px; align-items: center;
  padding: 128px max(var(--m), calc((100vw - var(--ancho)) / 2)) 72px; min-height: 100svh;
}
.p-hero > * { min-width: 0; }
.p-hero-copy { position: relative; z-index: 1; }
.p-hero .display { font-size: clamp(2.35rem, 6vw, 5.6rem); line-height: 1; letter-spacing: -.04em; }
.p-hero .h1-kicker { color: var(--ink); }
.p-hero .lead { color: var(--ink); max-width: 44ch; margin: 22px 0 28px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
.p-tiendas { display: flex; flex-wrap: wrap; gap: 12px; }
.p-tiendas .store-btn { flex: 0 1 auto; }
.store-btn { box-shadow: none; min-height: 60px; }
.store-btn:hover { box-shadow: none; }
.store-btn svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store-btn small { font-size: .8125rem; opacity: 1; }
.store-btn.ios { background: #fff; color: #0a0f1e; border: 0; }
.os-ios .p-play, .os-ios .p-so-android { order: 2; }
.hero-login { font-size: 1rem; opacity: 1; }
.p-hero-links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 16px; font-weight: 600; }
.p-hero-links a { text-decoration: underline; text-underline-offset: 4px; }
.p-datos { list-style: none; display: flex; gap: clamp(20px, 3vw, 40px); margin-top: 32px; }
.p-datos li { display: flex; flex-direction: column; }
.p-datos b { font-family: "Sora"; font-size: 1.5rem; font-weight: 800; }
.p-datos span { color: var(--muted); font-size: .9375rem; }

/* Los dos círculos del logo, muy grandes, y el móvil de ejemplo delante. */
.p-escena { position: relative; display: grid; place-items: center; }
.p-escena::before, .p-escena::after { content: ""; position: absolute; border-radius: 50%; aspect-ratio: 1; }
.p-escena::before { width: min(84vh, 600px, 54vw); background: var(--brand); inset-inline-end: -14%; top: 50%; translate: 0 -50%; }
.p-escena::after { width: min(40vh, 300px); background: var(--teal); inset-inline-start: 0; bottom: -6%; }
.p-escena .phone { z-index: 1; box-shadow: none; width: min(300px, 100%); }
.p-hero { overflow: clip; }
/* En el móvil dibujado solo cabe lo que importa: el botón va pegado abajo. */
.p-escena .phone-screen { background: #070b16; }

/* ---------- Uso diario ---------- */
.p-lista { list-style: none; display: grid; gap: 28px; }
.p-lista li { position: relative; padding-inline-start: 40px; }
.p-lista li::before, .p-faq summary::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: var(--teal); }
.p-lista li::before { position: absolute; inset-inline-start: 0; top: .25em; }
.p-lista h3 { font-family: "Sora"; font-size: 1.25rem; margin-bottom: 4px; }
.p-cierre-sitio { display: grid; gap: 24px; justify-items: start; position: sticky; top: 120px; }
.p-cierre { position: relative; width: 100%; display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 3vw, 36px); border-radius: 22px; background: var(--suelo2); }
.p-ejemplo { position: absolute; top: 14px; inset-inline-end: 14px; font-size: .8125rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.14); }
.p-cierre-t { font-family: "Sora"; font-size: 1.3rem; padding-inline-end: 84px; }
.p-cierre-total { color: var(--muted); }
.p-cuantos { border: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.p-cuantos legend { font-weight: 600; margin-bottom: 8px; }
.p-cuantos label { cursor: pointer; }
.p-cuantos input { position: absolute; opacity: 0; width: 48px; height: 48px; margin: 0; cursor: pointer; }
.p-cuantos span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-family: "Sora"; font-weight: 700; background: rgba(255,255,255,.08); transition: background .2s, transform .2s; }
.p-cuantos label:hover span { background: rgba(255,255,255,.16); }
.p-cuantos input:checked + span { background: var(--brand); color: #fff; }
.p-cuantos input:focus-visible + span { outline: 2px solid #fff; outline-offset: 3px; }
.p-cierre-cada { font-size: 1.1rem; margin-top: 8px; font-variant-numeric: tabular-nums; }
.p-cierre-cada b { display: block; font-family: "Sora"; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.02em; }
.p-cierre-linea { font-variant-numeric: tabular-nums; color: var(--muted); }
.p-cierre-linea b { color: var(--ink); }
.p-cierre-linea[hidden] { display: none; }

/* ---------- Funciones: bandas, sin tarjetas ---------- */
#features.p-sec { padding-bottom: 0; }
.p-bandas { list-style: none; margin-top: 48px; }
.p-bandas li {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px clamp(32px, 6vw, 96px); align-items: center;
  padding: clamp(28px, 4vw, 48px) max(var(--m), calc((100% - var(--ancho)) / 2));
}
.p-bandas li:nth-child(odd) { background: var(--suelo2); }
.p-bandas h3 { font-family: "Sora"; font-weight: 700; font-size: clamp(1.4rem, 2.8vw, 2.25rem); line-height: 1.12; letter-spacing: -.02em; }
.p-bandas p { font-size: 1.0625rem; }

/* ---------- Informe ---------- */
.p-premium { display: inline-block; margin-top: 16px; font-weight: 700; color: #06121a; background: var(--amber); padding: 2px 12px; border-radius: 999px; }
.p-informe { position: relative; display: grid; }
.p-informe::before { content: ""; position: absolute; width: 86%; aspect-ratio: 1; border-radius: 50%; background: var(--teal); inset-inline-end: -8%; top: 50%; translate: 0 -50%; }
.report { position: relative; background: var(--suelo2); border-radius: 22px; }
.rep-head small, .rep-kpis small { font-size: .8125rem; }
.rep-kpis div { background: rgba(255,255,255,.06); }
.ticks { margin-bottom: 32px; }

/* ---------- Opinión ---------- */
.p-opinion { display: grid; grid-template-columns: 5fr 7fr; }
.p-opinion > * { min-width: 0; }
.p-opinion-t { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 8px; padding: clamp(40px, 6vw, 88px) var(--m); padding-inline-start: max(var(--m), calc((100vw - var(--ancho)) / 2)); background: var(--suelo2); }
.p-opinion-t .btn { margin-top: 20px; }
.p-opinion-c { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: clamp(40px, 6vw, 88px) var(--m); padding-inline-end: max(var(--m), calc((100vw - var(--ancho)) / 2)); background: var(--teal); color: #04110f; }
.p-opinion-c .stars { color: #04110f; font-size: 1.1rem; }
.p-opinion-c blockquote { font-family: "Sora"; font-weight: 600; font-size: clamp(1.2rem, 2vw, 1.75rem); line-height: 1.3; letter-spacing: -.01em; max-width: 44ch; }
.p-opinion-c figcaption b { font-family: "Sora"; }

/* ---------- Descarga: campo de color ---------- */
.p-descarga { background: var(--brand); color: #fff; padding-block: var(--sec); }
.p-descarga-grid { grid-template-columns: 1fr 1fr; margin-top: 48px; }
.p-so { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.p-so h3 { font-family: "Sora"; font-size: clamp(1.5rem, 2.6vw, 2.25rem); }
.p-so ol { display: grid; gap: 12px; padding-inline-start: 1.4em; font-size: 1.0625rem; }
.p-so ol li::marker { font-family: "Sora"; font-weight: 800; }
.p-so .store-btn { margin-top: auto; }

/* ---------- Preguntas ---------- */
#faq .p-h2 { position: sticky; top: 120px; }
.p-faq { display: grid; gap: 8px; }
.p-faq details { background: var(--suelo2); border-radius: 16px; padding-inline: 22px; }
.p-faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; font-family: "Sora"; font-weight: 600; font-size: 1.0625rem; padding-block: 20px; }
.p-faq summary::-webkit-details-marker { display: none; }
.p-faq summary::before { flex: none; width: 14px; height: 14px; background: var(--brand2); transition: transform .25s; }
.p-faq details[open] summary::before { transform: scale(1.5); }
.p-faq details p { padding-bottom: 22px; line-height: 1.6; max-width: 62ch; }

/* ---------- Cierre ---------- */
.p-final { position: relative; overflow: clip; padding-block: var(--sec); background: var(--suelo2); }
.p-final::before { content: ""; position: absolute; width: min(70vw, 560px); aspect-ratio: 1; border-radius: 50%; background: var(--brand); inset-inline-end: -8%; top: 50%; translate: 0 -50%; }
.p-final .p-wrap { position: relative; }
.p-final .p-h2, .p-final .p-sub { max-width: 70%; }
.p-final .p-sub { margin-bottom: 28px; }
.portada .footer { border-top: 0; }

/* ---------- Asistente, plano ---------- */
.portada .assistant-fab { background: var(--brand); box-shadow: none; width: 54px; height: 54px; }
.portada .assistant { background: var(--suelo2); backdrop-filter: none; }

/* ---------- Entrada al hacer scroll ---------- */
.reveal { transform: translateY(24px); }
.p-lista .reveal:nth-child(2), .p-bandas .reveal:nth-child(2) { transition-delay: .07s; }
.p-lista .reveal:nth-child(3), .p-bandas .reveal:nth-child(3) { transition-delay: .14s; }
.p-escena::before { animation: p-disco .9s cubic-bezier(.2,.7,.2,1) both; }
.p-escena::after { animation: p-disco .9s .12s cubic-bezier(.2,.7,.2,1) both; }
@keyframes p-disco { from { opacity: 0; scale: .9; } }

/* ---------- Tablet y móvil ---------- */
@media (max-width: 900px) {
  .p-hero { grid-template-columns: 1fr; text-align: start; padding-top: 136px; padding-bottom: 56px; min-height: 0; gap: 56px; }
  .p-dos, .p-descarga-grid, .p-opinion { grid-template-columns: 1fr; }
  .p-cierre-sitio { position: static; }
  #faq .p-h2 { position: static; }
  .p-opinion-t, .p-opinion-c { padding-inline: var(--m); }
  .p-escena { padding-block: 32px; }
  .p-escena::before { width: min(110vw, 620px); inset-inline-end: -24%; }
  .p-escena::after { width: min(50vw, 300px); inset-inline-start: -8%; bottom: -4%; }
  .p-bandas li { grid-template-columns: 1fr; }
  .p-final .p-h2, .p-final .p-sub { max-width: none; }
  .p-final::before { opacity: 0; }
  .p-informe::before { inset-inline-end: -12%; }
}
@media (max-width: 480px) {
  .p-tiendas { flex-direction: column; align-items: stretch; }
  .p-tiendas .store-btn { justify-content: center; }
  .p-datos { gap: 18px; justify-content: space-between; }
  .p-datos b { font-size: 1.3rem; }
  .p-so .store-btn { align-self: stretch; justify-content: center; }
  .rep-chart { gap: 14px; }
  .donut { width: 88px; height: 88px; }
}
/* En el móvil no caben los dos botones de arriba: se queda «Entrar», que debe verse
   siempre; las tiendas ya están debajo, en el primer pantallazo. */
@media (max-width: 640px) {
  .portada .nav .nav-login { display: inline-block; }
  .portada .nav .btn-sm { display: none; }
  .portada .lang-select { max-width: none; }
}
@media (max-width: 540px) {
  .portada .nav .brand span { display: none; }
}
@media (max-width: 360px) {
  .portada .lang-select { max-width: 92px; }
  .portada .nav-actions { gap: 4px; }
  .portada .nav .nav-login { padding-inline: 6px; margin: 0; }
}
@media (max-width: 480px) {
  .portada .assistant-fab { width: 46px; height: 46px; right: 12px; bottom: 12px; font-size: 1.2rem; }
  /* En el primer pantallazo del móvil taparía los enlaces: sale al bajar. */
  html:not(.pasado) .portada .assistant-fab { visibility: hidden; }
  .rep-kpis div { padding: 10px; }
  .rep-kpis b { font-size: 1.05rem; white-space: nowrap; }
  .report { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .p-escena::before, .p-escena::after { animation: none; }
}
[dir="rtl"] .portada .assistant-fab { right: auto; left: 12px; }
