/* =====================================================================
   Scroll tipo simmmply:
   1) secciones de colores que suben por encima de la anterior (esquinas redondas)
   2) frase que se enciende palabra a palabra   3) titulares que suben al entrar
   4) pie fijo que se descubre debajo al final   (el scroll suave va en scroll.js)
   ===================================================================== */
html { scroll-behavior: auto !important; }
:root { --st-r: 36px; --c-white: #FFFFFF; --c-lav: #EEEBFF; --c-lime: #EEF8CC; --c-pink: #FCE8F3; --c-ink: #1B1A23; --rf-h: 76svh; }
@media (max-width: 919px) { :root { --st-r: 28px; --rf-h: 64svh; } }

/* ---------- 1. Secciones apiladas ---------- */
main { position: relative; z-index: 1; margin-bottom: var(--rf-h); }
.sc-ground { display: none; }
main > .section, main > .final { position: relative; z-index: 2; margin: calc(var(--st-r) * -1) 0 0; border-radius: var(--st-r) var(--st-r) 0 0; background: var(--sec, var(--c-white)); }
main > .section:first-of-type { margin-top: calc(var(--st-r) * -1); }
.statement { --sec: var(--c-white); }
.voices-sec { --sec: var(--c-lav); }
main > .section.problem { --sec: var(--c-ink); background: var(--sec); color: #fff; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; margin: calc(var(--st-r) * -1) 0 0; border-radius: var(--st-r) var(--st-r) 0 0; }
#como { --sec: var(--c-white); }
#confirmar { --sec: var(--c-lime); }
#huecos { --sec: var(--c-white); }
#prueba { --sec: #F3F2F8; }
#precio { --sec: var(--c-pink); }
#precio + .section { --sec: var(--c-white); }
main > .final { --sec: var(--c-lav); padding-top: 72px; border-radius: var(--st-r); box-shadow: 0 30px 60px -30px rgba(40, 30, 90, .35); }
main > .section { padding-top: calc(96px + var(--st-r) * .4); }
@media (max-width: 919px) { main > .section { padding-top: calc(56px + var(--st-r) * .4); } }
.sink { will-change: transform; }

/* Secciones oscuras: textos claros */
.problem h2 { color: #fff; }
.problem .mark { background: none; color: var(--lime); padding: 0; }
.problem > .wrap > p, .problem .fine, .problem .note { color: rgba(255, 255, 255, .7); }
.problem .card { background: #fff; }
/* Ninguna sección deja ver el pie de detrás: todas opacas */
main > .section, main > .final { backdrop-filter: none; -webkit-backdrop-filter: none; }
.problem .card { color: var(--ink); }
.statement + .voices-sec .spot-tag, #confirmar .spot-tag { background: #fff; }

/* ---------- 2. La frase que se enciende ---------- */
.statement { padding-bottom: 120px; }
.st-text { margin: 0 auto; max-width: 22ch; text-align: center; font-weight: 800; font-size: clamp(32px, 4.7vw, 66px); line-height: 1.12; letter-spacing: -.022em; color: var(--ink); }
.st-text .sw { opacity: .16; transition: opacity .18s linear; }
.st-ic { display: inline-grid; place-items: center; width: .92em; height: .92em; margin: 0 .04em; border-radius: .26em; vertical-align: -.12em; background: linear-gradient(160deg, #8B7BFF, #5B46F5); box-shadow: 0 .18em .36em -.18em #5B46F5; transform: rotate(-6deg); }
.st-ic.i2 { background: linear-gradient(160deg, #3DD37A, #149A4C); box-shadow: 0 .18em .36em -.18em #149A4C; transform: rotate(5deg); }
.st-ic.i3 { background: var(--lime); box-shadow: 0 .18em .36em -.18em #7FA81A; transform: rotate(-3deg); }
.st-ic svg { width: 62%; height: 62%; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.st-ic.i3 svg { stroke: var(--ink); }
@media (max-width: 919px) { .statement { padding-bottom: 80px; } .st-text { max-width: 16ch; } }

/* ---------- 3. Titulares que suben palabra a palabra ---------- */
.sr-on .rw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .14em; margin-bottom: -.14em; }
.sr-on .rw > span { display: inline-block; transform: translateY(108%); transition: transform .9s cubic-bezier(.16, .84, .24, 1); transition-delay: var(--d, 0s); }
.sr-on .in .rw > span { transform: none; }

/* ---------- 4. Pie que se descubre debajo ---------- */
.reveal-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 0; height: var(--rf-h); display: flex; padding: 0; overflow: hidden; background: var(--lime); color: var(--ink); }
.rf-in { width: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: clamp(16px, 3.4vh, 40px); padding-bottom: 28px;
  transform: translateY(calc((1 - var(--rf, 1)) * 28%)); opacity: calc(.3 + var(--rf, 1) * .7); }
.rf-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.rf-q { margin: 0; font-weight: 800; font-size: clamp(34px, 5vw, 72px); letter-spacing: -.025em; line-height: 1; }
.reveal-foot .btn-primary { background: var(--ink); color: #fff; box-shadow: 0 16px 30px -16px rgba(0, 0, 0, .6); }
.rf-marquee { overflow: hidden; }
.rf-track { display: flex; width: max-content; animation: rfMarq 38s linear infinite; }
.rf-track span { font-weight: 800; font-size: clamp(96px, 21vw, 330px); line-height: .82; letter-spacing: -.045em; padding-right: .22em; white-space: nowrap; }
.rf-track i { font-style: normal; color: #5B46F5; }
@keyframes rfMarq { to { transform: translateX(-50%); } }
.reveal-foot .foot-in { color: rgba(30, 31, 36, .72); }
.reveal-foot .foot-brand .wordmark { color: var(--ink); }
.reveal-foot .wm-dot { color: #5B46F5; }
.reveal-foot a:hover { color: var(--ink); }
@media (max-width: 919px) {
  .rf-in { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .rf-top { flex-direction: column; align-items: flex-start; }
  .reveal-foot .foot-in { flex-direction: column; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .rf-track { animation: none; }
  .st-text .sw { opacity: 1; }
  .sr-on .rw > span { transform: none; transition: none; }
}

/* Sin la tarjeta final, el FAQ cierra la página: esquinas redondas abajo para que se vea el pie al descubrirse */
main > .section:last-of-type { border-radius: var(--st-r); box-shadow: 0 30px 60px -30px rgba(40, 30, 90, .35); padding-bottom: 88px; }
