/* ==========================================================================
   Stonebridge English - public-fx.css
   Chrome del sitio público (header, footer, barras de conversión, cookies, modal) + sistema de animación de la home:
   constelación, titular ES/EN, burbujas, marquesina, tilt/magnético, "el puente" y micro-animaciones de formularios.
   Regla: solo se animan transform y opacity (los pocos casos SVG están comentados). prefers-reduced-motion = estático.
   ========================================================================== */

/* ---- Utilidades nuevas ------------------------------------------------------------ */
.btn--lg { min-height: 56px; padding: 0 32px; font-size: 1.0625rem; }
.linklike { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-weight: 600; color: var(--blue); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: var(--navy); }
.on-dark .linklike, .site-footer .linklike { color: var(--sky); }
.link--light { color: var(--sky); }
.lvl-chip { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: var(--pill); font: 700 .8125rem/1 var(--font-h); color: #fff; text-decoration: none; }
.lvl-chip:hover { color: #fff; filter: brightness(1.1); }
.lvl-chip.lvl--a1 { color: var(--night); }

/* ==========================================================================
   Header, navegación y progreso
   ========================================================================== */
.site-header { overflow: visible; }
.site-header__in { gap: 12px; }
.brand--light { color: #fff; }
.brand--light:hover { color: #fff; }
.brand--light .muted { color: var(--muted-dark); }
.site-header__bar { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; overflow: hidden; pointer-events: none; }
.site-header__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--gold)); transform: scaleX(0); transform-origin: left; will-change: transform; }
.site-header__level { margin-left: auto; }
.site-header__level[hidden] { display: none; }
@media (max-width: 479px) { .site-header__level { display: none; } }
.nav-toggle { margin-left: 0; }

/* El menú de escritorio aparece desde 1080 px (8 enlaces + botón); por debajo, hamburguesa */
@media (min-width: 900px) and (max-width: 1079px) {
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav.is-open { display: block; }
}
@media (min-width: 1080px) {
  .nav { display: block; margin-left: auto; }
  .nav-toggle { display: none; }
  .site-header__level { margin-left: 0; }
}
.nav__link { position: relative; }
.nav__link .nav__caret { width: 1em; height: 1em; margin-left: 4px; transition: transform .2s; }
.nav__has-sub { position: relative; }
.nav__sub { display: none; }
.nav__sub a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9375rem; }
.nav__sub a:hover { background: var(--mist); color: var(--navy); }
.nav__sub-all a { font-weight: 600; color: var(--blue); }
@media (min-width: 1080px) {
  .nav__sub { display: block; position: absolute; left: 0; top: 100%; min-width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-h); padding: 8px;
    opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s; z-index: 120; }
  .nav__has-sub:hover .nav__sub, .nav__has-sub:focus-within .nav__sub { opacity: 1; visibility: visible; transform: none; }
  .nav__has-sub:hover .nav__caret, .nav__has-sub:focus-within .nav__caret { transform: rotate(180deg); }
}
@media (max-width: 1079px) {
  .nav.is-open { max-height: calc(100vh - var(--hdr)); overflow-y: auto; }
  .nav.is-open .nav__sub { display: block; padding: 0 0 6px 14px; }
  .nav.is-open .nav__sub a { min-height: 44px; }
  .nav.is-open .nav__caret { display: none; }
  .nav.is-open .nav__cta-item { margin-top: 8px; }
  .nav.is-open .nav__link--cta { justify-content: center; min-height: 48px; }
}
/* Un CTA rojo por pantalla: cuando el CTA principal de la página está a la vista, el del header se "apaga" */
.nav__link--cta { transition: background .2s, color .2s, box-shadow .2s; }
.has-primary-cta .nav__link--cta { background: transparent; color: var(--navy); box-shadow: inset 0 0 0 2px var(--navy); }
.has-primary-cta .nav__link--cta:hover { background: var(--navy); color: #fff; }

/* ==========================================================================
   Barra móvil (Test / WhatsApp), botón flotante de WhatsApp, cookies, modal
   ========================================================================== */
.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: flex; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(24, 35, 92, .1); transform: translateY(0); transition: transform .3s ease; }
.mbar__btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: var(--pill); font: 600 .9375rem/1 var(--font-b); text-decoration: none; }
.mbar__btn--test { background: var(--red); color: #fff; }
.mbar__btn--wa { background: #fff; color: #0F5A3F; border: 2px solid #1E7F5C; }
.has-primary-cta .mbar { transform: translateY(110%); }
.has-primary-cta .mbar__btn--test { box-shadow: none; }
.cookie-open .mbar, .modal-open .mbar { display: none; }
@media (min-width: 900px) { .mbar { display: none; } }
@media (max-width: 899px) { body:not([data-lite]) { padding-bottom: 68px; } .wa-float { display: none !important; } }

.wa-float { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: inline-flex; align-items: center; gap: 0; height: 56px; min-width: 56px; padding: 0 16px; border-radius: var(--pill);
  background: #1E7F5C; color: #fff; text-decoration: none; box-shadow: 0 10px 28px rgba(24, 35, 92, .3); font: 600 .9375rem/1 var(--font-b); overflow: hidden; transition: background .2s, box-shadow .2s; }
.wa-float .ic { width: 26px; height: 26px; }
.wa-float__label { max-width: 0; opacity: 0; white-space: nowrap; transition: max-width .3s ease, opacity .25s ease, margin .3s ease; }
.wa-float:hover, .wa-float:focus-visible, .wa-float.is-pulse { background: #14563E; color: #fff; }
.wa-float:hover .wa-float__label, .wa-float:focus-visible .wa-float__label, .wa-float.is-pulse .wa-float__label { max-width: 240px; opacity: 1; margin-left: 10px; }
.wa-float.is-pulse { animation: waPulse 1.2s ease-out 2; }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(30, 127, 92, .55), 0 10px 28px rgba(24, 35, 92, .3); } 100% { box-shadow: 0 0 0 20px rgba(30, 127, 92, 0), 0 10px 28px rgba(24, 35, 92, .3); } }
.cookie-open .wa-float { bottom: 200px; }

.cookie { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 150; max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: 0 20px 50px rgba(24, 35, 92, .28); padding: 18px 18px 16px; animation: cookieIn .35s ease both; }
.cookie[hidden] { display: none; }
@keyframes cookieIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.cookie__title { display: flex; align-items: center; gap: 8px; font: 700 1rem/1.2 var(--font-h); color: var(--navy); margin: 0 0 6px; }
.cookie__title .ic { color: var(--green); }
.cookie__text { font-size: .875rem; color: var(--slate); margin: 0 0 12px; }
.cookie__custom { display: grid; gap: 10px; margin: 0 0 14px; padding: 12px; background: var(--mist); border-radius: var(--r); font-size: .875rem; }
.cookie__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie__actions .btn { flex: 1 1 auto; }
@media (min-width: 900px) { .cookie { left: 20px; right: auto; bottom: 20px; } .cookie-open .wa-float { bottom: 20px; } }

body.modal-open { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(6, 20, 40, .66); animation: fadeIn .2s ease both; overflow-y: auto; }
.modal__card { position: relative; width: 100%; max-width: 480px; background: #fff; border-radius: var(--r-lg); padding: 28px 24px 22px; box-shadow: 0 30px 70px rgba(4, 18, 40, .5); animation: modalIn .28s cubic-bezier(.2, .8, .3, 1) both; }
.modal__card h2 { font-size: 1.5rem; }
.modal__x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--mist); color: var(--navy); cursor: pointer; display: grid; place-items: center; }
.modal__x:hover { background: var(--navy); color: #fff; }
.modal__skip { text-align: center; margin: 14px 0 0; font-size: .875rem; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer__grid--4 { display: grid; gap: 28px; }
@media (min-width: 640px) { .site-footer__grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .site-footer__grid--4 { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 40px; } }
.site-footer strong { color: #fff; font-family: var(--font-h); display: block; margin-bottom: 10px; }
.site-footer ul li { margin-bottom: 2px; }
.site-footer ul a, .site-footer .linklike { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; text-decoration: none; }
.site-footer ul a:hover { text-decoration: underline; }
.site-footer__nap { font-style: normal; display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.site-footer__nap .ic { margin-top: 3px; color: var(--gold); }
.site-footer__social { display: flex; gap: 8px; margin-top: 14px; }
.site-footer__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); color: #fff; }
.site-footer__social a:hover { background: #fff; color: var(--navy); }
.site-footer__bottom { display: grid; gap: 8px; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer__legal a, .site-footer__legal .linklike { color: var(--sky); font-weight: 500; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.site-footer__legal a:hover, .site-footer__legal .linklike:hover { text-decoration: underline; color: #fff; }

/* ==========================================================================
   Hero: constelación, titular ES/EN, burbujas
   ========================================================================== */
.hero--home { background: linear-gradient(165deg, var(--night) 0%, #1F2C70 60%, var(--navy) 100%); }
.hero--home::before { z-index: 0; }
.hero__fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__fx canvas { display: block; width: 100%; height: 100%; }
.hero__arch { position: absolute; left: 0; bottom: -1px; width: 100%; height: 56px; z-index: 1; display: block; }
.hero--home { padding-bottom: 56px; }
@media (min-width: 900px) { .hero__arch { height: 80px; } .hero--home { padding-bottom: 80px; } }
.hero__greet { margin: -8px 0 16px; font-weight: 600; color: var(--gold); }
.hero__greet[hidden] { display: none; }
.hero h1 em { font-style: normal; color: var(--gold); }

/* Titular ES/EN: capas apiladas en la misma celda; el alto lo fija la más alta (sin saltos de layout) */
.swap { display: grid; }
.swap > * { grid-area: 1 / 1; margin: 0; }
.swap__es, .swap__en { font: 700 clamp(2rem, 5.6vw + .6rem, 3.25rem)/1.12 var(--font-h); letter-spacing: -.01em; max-width: 16ch; color: #fff; }
.swap__en { color: #fff; pointer-events: none; }
.swap .w { display: inline-block; transition: opacity .5s ease, transform .5s ease; transition-delay: calc(var(--i) * 55ms); }
.swap__en .w { opacity: 0; transform: translateY(45%); }
.swap[data-lang="en"] .swap__es .w { opacity: 0; transform: translateY(-45%); }
.swap[data-lang="en"] .swap__en .w { opacity: 1; transform: none; }
.swap em { font-style: normal; color: var(--gold); }
.js-off .swap__en { display: none; }

/* Tarjeta de clase: burbujas que se escriben solas */
.class-card { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease, box-shadow .25s ease; will-change: transform; }
.class-card.is-tilting { transition: transform .06s linear; }
.chat-stage { min-height: 250px; }
.chat-stage .bubble, .chat-stage .fix { transition: opacity .35s ease, transform .35s ease; }
.chat-stage .is-hidden { opacity: 0; transform: translateY(10px); }
.chat-stage.is-reset .bubble, .chat-stage.is-reset .fix { opacity: 0; transform: translateY(-6px); }
.bubble__t { position: relative; }
.bubble__t .ghost { visibility: hidden; }
.bubble__t .typed { position: absolute; left: 14px; right: 14px; top: 10px; }
.bubble--me .bubble__t .typed { color: #fff; }
.bubble__t.is-typing::after { content: ""; position: absolute; left: 14px; top: 50%; width: 30px; height: 6px; margin-top: -3px; border-radius: 6px;
  background: radial-gradient(circle 3px at 3px 3px, var(--slate) 98%, transparent) 0 0 / 10px 6px repeat-x; animation: dots 1s steps(3) infinite; }
.bubble--me .bubble__t.is-typing::after { background-image: radial-gradient(circle 3px at 3px 3px, #fff 98%, transparent); }
@keyframes dots { 0% { opacity: .3; } 50% { opacity: 1; } 100% { opacity: .3; } }
.chat-stage .fix.is-in { animation: popIn .4s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }

/* ==========================================================================
   Marquesina de beneficios (transform puro; se pausa al pasar el mouse o enfocar)
   ========================================================================== */
.marquee { background: var(--night); color: #DDE0F5; overflow: hidden; border-top: 1px solid rgba(255, 255, 255, .06); }
.marquee__track { display: flex; width: max-content; animation: marquee 42s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; flex: none; }
.marquee__list li { display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; font: 500 .9375rem/1 var(--font-b); white-space: nowrap; }
.marquee__list .ic { color: var(--gold); width: 1em; height: 1em; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================================
   Tilt 3D y botones magnéticos
   ========================================================================== */
[data-tilt].card, .card[data-tilt], .embed__card[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease, box-shadow .25s ease; will-change: transform; position: relative; }
[data-tilt].is-tilting { transition: transform .06s linear; }
.card--hover[data-tilt]:hover { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-2px); }
.card[data-tilt]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .25s;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(140, 194, 255, .22), transparent 60%); }
.card[data-tilt].is-tilting::after { opacity: 1; }
[data-magnetic] { transition: transform .25s cubic-bezier(.2, .8, .3, 1), background .18s, box-shadow .18s; will-change: transform; }

/* Tarjetas con reveal + tilt: al terminar la entrada conservan el tilt y responden sin el retraso escalonado */
.sb-js .reveal.is-in[data-tilt] { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease, box-shadow .25s ease, opacity .6s ease; transition-delay: 0s; }
.sb-js .reveal.is-in[data-tilt].is-tilting { transition: transform .06s linear, opacity .6s ease; }

/* Reveal escalonado: ya definido en public.css (.reveal + --d). Se refuerza el texto que entra por palabras en títulos de sección. */
.sb-js .sec__head.reveal .eyebrow::before { transform-origin: left; transition: transform .6s ease .1s; transform: scaleX(0); }
.sb-js .sec__head.reveal.is-in .eyebrow::before { transform: scaleX(1); }

/* ==========================================================================
   Micro-compromiso: la primera pregunta
   ========================================================================== */
.embed__bar i { transform-origin: left; transform: scaleX(.07); width: 100%; transition: transform .6s cubic-bezier(.2, .8, .3, 1); }
.opt.is-picked { border-color: var(--blue); background: #ECEEFB; color: var(--navy); animation: pickPop .35s ease; }
.opt.is-picked .opt__k { background: var(--blue); color: #fff; }
@keyframes pickPop { 50% { transform: scale(1.02); } }
.embed__card [data-q1-continue] { margin-top: 12px; }
.is-nudge { animation: nudge .7s ease 2; }
@keyframes nudge { 50% { transform: translateY(-3px); } }

/* ==========================================================================
   El puente (niveles A1 → C2 ligados al scroll)
   ========================================================================== */
.puente-sec { background: radial-gradient(900px 500px at 15% 0%, rgba(143, 141, 190, .28), transparent 60%), linear-gradient(180deg, var(--night), #111A48); color: #fff; position: relative; }
.puente-sec h2, .puente-sec h3 { color: #fff; }
.puente-sec .eyebrow { color: #FF8A90; }
.puente-sec .lead { color: var(--muted-dark); }
.puente-sticky { padding: 48px 0 40px; }
.puente-sec .sec__head { margin-bottom: 18px; }
.puente { position: relative; margin: 0 auto; }
.puente__svg { display: none; }
.puente__line { position: absolute; left: 27px; top: 28px; bottom: 28px; width: 3px; background: rgba(255, 255, 255, .16); border-radius: 3px; overflow: hidden; }
.puente__line i { display: block; width: 100%; height: 100%; background: linear-gradient(180deg, var(--sky), var(--gold)); transform-origin: top; transform: scaleY(0); will-change: transform; }
.puente__stones { position: relative; margin: 0; padding: 0; list-style: none; }
.stone { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding-bottom: 26px; }
.stone:last-child { padding-bottom: 0; }
.stone__btn { position: relative; z-index: 1; width: 56px; height: 56px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .38); background: var(--night); color: rgba(255, 255, 255, .8); cursor: pointer;
  display: grid; place-items: center; transition: transform .3s cubic-bezier(.2, 1.4, .4, 1), background .3s, border-color .3s, color .3s, box-shadow .3s; }
.stone__code { font: 700 1rem/1 var(--font-h); }
.stone__btn:hover { transform: scale(1.08); border-color: #fff; }
.stone__name, .stone__you { display: none; }
.stone__detail { padding-top: 4px; opacity: .5; transition: opacity .4s; }
.stone__detail h3 { display: flex; align-items: center; gap: 10px; font-size: 1.125rem; margin-bottom: 6px; }
.stone__can { color: #DDE0F5; margin: 0 0 10px; }
.stone__actions { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; margin: 10px 0 0; }
.stone__actions .link { color: var(--sky); }
.puente-sec .pill { background: rgba(255, 255, 255, .1); color: #fff; }
.puente-sec .pill .ic { color: var(--gold); }
.lvl-meta { display: flex; flex-wrap: wrap; gap: 8px; }
/* estado encendido (también sin JS: todo aparece encendido) */
.stone.is-lit .stone__btn, html:not(.sb-js) .stone__btn { background: #fff; color: var(--night); border-color: var(--ring, var(--gold)); box-shadow: 0 0 0 5px rgba(245, 185, 66, .16), 0 0 26px rgba(245, 185, 66, .35); }
.stone.is-lit .stone__detail, html:not(.sb-js) .stone__detail { opacity: 1; }
.stone.is-current .stone__btn { transform: scale(1.14); box-shadow: 0 0 0 7px rgba(245, 185, 66, .22), 0 0 34px rgba(245, 185, 66, .55); animation: stonePulse 2.4s ease-in-out infinite; }
@keyframes stonePulse { 50% { box-shadow: 0 0 0 12px rgba(245, 185, 66, 0), 0 0 34px rgba(245, 185, 66, .55); } }
.stone__btn--a1 { --ring: #8CC2FF; } .stone__btn--a2 { --ring: #5B9BF0; } .stone__btn--b1 { --ring: #4CC9A0; }
.stone__btn--b2 { --ring: #7FB2FF; } .stone__btn--c1 { --ring: #FF7B88; } .stone__btn--c2 { --ring: #F5B942; }
.stone.is-you .stone__btn { outline: 3px dashed var(--gold); outline-offset: 5px; }
.puente__panel, .puente__progress { max-width: 1100px; margin-inline: auto; }
.puente__panel { display: none; }
.puente__progress { margin-top: 26px; }
.puente__meter { height: 8px; background: rgba(255, 255, 255, .16); border-radius: var(--pill); overflow: hidden; }
.puente__meter i { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--gold)); transform-origin: left; transform: scaleX(0); will-change: transform; }
.puente__text { margin: 10px 0 12px; font-size: .9375rem; color: var(--muted-dark); }
.puente__cta { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin: 0; }

/* Escritorio: el puente SVG con las piedras posicionadas sobre la cubierta */
@media (min-width: 900px) {
  .puente { aspect-ratio: 1200 / 380; max-width: 1100px; }
  .puente__svg { display: block; position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .puente__line { display: none; }
  .puente__stones { position: absolute; inset: 0; }
  .stone { position: absolute; left: var(--x); top: var(--y); display: block; padding: 0; transform: translate(-50%, -50%); }
  .stone__detail { display: none; }
  .stone__name { display: block; position: absolute; left: 50%; bottom: 72px; transform: translateX(-50%); white-space: nowrap; font: 600 .8125rem/1 var(--font-b); letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .7); transition: color .3s; }
  .stone.is-lit .stone__name { color: var(--gold); }
  .stone__you { display: none; position: absolute; left: 50%; top: 68px; transform: translateX(-50%); white-space: nowrap; background: var(--gold); color: var(--night); font: 700 .6875rem/1 var(--font-b); padding: 5px 9px; border-radius: var(--pill); }
  .stone.is-you .stone__you { display: block; }
  .stone__btn { width: 60px; height: 60px; }
  .puente__panel { display: block; margin-top: 8px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--r-lg); padding: 18px 24px; min-height: 124px; }
  .puente__panel .stone__detail { display: block; opacity: 1; padding: 0; }
  .puente__panel.is-swap .stone__detail { animation: panelIn .35s ease both; }
  .puente__progress { display: grid; grid-template-columns: 1fr auto; column-gap: 24px; align-items: center; margin-top: 18px; }
  .puente__meter { grid-column: 1 / -1; }
  .puente__text { margin: 10px 0 0; }
  .puente__cta { margin: 10px 0 0; justify-content: flex-end; }
  .puente-sec[data-mode="pinned"] .puente-sticky { position: sticky; top: var(--hdr); display: flex; align-items: center; padding: 20px 0; }
  .puente-sec[data-mode="pinned"] .puente-sticky > .wrap { width: 100%; }
  /* En modo fijo todo el bloque debe caber en el viewport: el puente se encoge según el alto disponible */
  .puente-sec[data-mode="pinned"] .puente { max-width: min(1100px, calc((100vh - 520px) * 3.158)); }
  .puente-sec[data-mode="pinned"] .sec__head { margin-bottom: 10px; }
}
@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* SVG del puente: capas apagada / encendida, agua y estrellas (transform/opacity; la máscara luminosa es un clipPath) */
.puente__stars circle { fill: #fff; opacity: .6; animation: twinkle 3.6s ease-in-out infinite; }
.puente__stars circle:nth-child(2n) { animation-delay: 1.2s; } .puente__stars circle:nth-child(3n) { animation-delay: 2.1s; }
@keyframes twinkle { 50% { opacity: .15; } }
.puente__water { fill: rgba(143, 141, 190, .22); }
.puente__water--b { fill: rgba(140, 194, 255, .14); }
.puente__water--a { animation: drift 9s linear infinite; }
.puente__water--b { animation: drift 13s linear infinite reverse; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(80px); } }
.puente__ghost path.puente__piers { fill: rgba(255, 255, 255, .1); }
.puente__ghost .puente__ramp, .puente__ghost .puente__deck-ghost { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 6; stroke-linecap: round; }
.puente__lit .puente__piers { fill: rgba(245, 185, 66, .32); }
.puente__lit .puente__ramp, .puente__lit .puente__deck { fill: none; stroke: #F5B942; stroke-width: 6; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(245, 185, 66, .7)); }
.puente__halo { fill: rgba(245, 185, 66, .28); animation: haloPulse 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes haloPulse { 50% { transform: scale(1.5); opacity: .3; } }

/* ==========================================================================
   Formularios: micro-animaciones
   ========================================================================== */
.field { position: relative; }
.input, .select, .textarea { transition: border-color .15s, box-shadow .15s, background .15s; }
.field.is-valid .input, .field.is-valid .select, .field.is-valid .textarea { border-color: var(--green); padding-right: 42px; }
.field.is-valid::after { content: ""; position: absolute; right: 14px; bottom: 15px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
  animation: popIn .3s cubic-bezier(.2, 1.4, .4, 1) both; pointer-events: none; }
.field:has(.field__hint).is-valid::after { bottom: 34px; }
.field--error .input, .field--error .select, .field--error .textarea { border-color: var(--red); }
.field__error { animation: errIn .25s ease both; }
@keyframes errIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.form.is-shake, .final__form.is-shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ""; position: absolute; width: 22px; height: 22px; border: 3px solid rgba(24, 35, 92, .25); border-top-color: var(--night); border-radius: 50%; animation: spin .7s linear infinite; }
.btn--red.is-loading::after { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.form.is-sent, .final__form.is-sent { animation: sentPulse .6s ease; }
@keyframes sentPulse { 40% { transform: scale(1.012); } }
.form-status--ok { animation: popIn .35s ease both; }

/* Audio (vocabulario) */
.vocab-audio.is-playing { background: var(--navy); color: #fff; border-color: var(--navy); animation: audioWave 1.2s ease; }
@keyframes audioWave { 0% { box-shadow: 0 0 0 0 rgba(143, 141, 190, .5); } 100% { box-shadow: 0 0 0 16px rgba(143, 141, 190, 0); } }

/* Etiqueta demo dentro de la franja de precios y el CTA final */
.price-strip__slots small { color: var(--muted-dark); }
.final__slots { display: flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 10px 14px; background: rgba(255, 255, 255, .08); border-radius: var(--r); font-size: .9375rem; }
.final__slots .ic { color: var(--gold); }
.final__slots strong { color: #fff; }
.final .tag-ex, .price-strip .tag-ex, .puente-sec .tag-ex, .hero .tag-ex, .marquee .tag-ex { background: var(--gold); color: var(--night); border-color: var(--gold); }


/* ==========================================================================
   Juego de emparejar (vocabulario)
   ========================================================================== */
.match__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 18px; }
.match__board { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.match__col { display: grid; gap: 10px; padding: 0; list-style: none; align-content: start; }
.match__card { width: 100%; min-height: 56px; padding: 10px 14px; border: 2px solid var(--line); border-radius: var(--r); background: #fff; color: var(--navy); font: 600 1rem/1.25 var(--font-b); cursor: pointer;
  transition: transform .2s, border-color .2s, background .2s, color .2s, opacity .3s; }
.match__card:hover { border-color: var(--blue); transform: translateY(-1px); }
.match__card.is-picked { border-color: var(--blue); background: #ECEEFB; transform: scale(1.03); }
.match__card.is-matched { border-color: var(--green); background: #E7F5EE; color: #0F5A3F; opacity: .75; animation: popIn .35s cubic-bezier(.2, 1.4, .4, 1); }
.match__card.is-wrong { border-color: var(--red); background: var(--danger-bg); animation: shake .4s ease; }
.match__msg { text-align: center; min-height: 1.6em; margin: 16px 0 0; color: var(--slate); font-weight: 500; }
.match__msg.is-win { color: #0F5A3F; font-weight: 700; }
.match__msg.is-miss { color: var(--danger-fg); }
@media (prefers-reduced-motion: reduce) { .match__card, .match__card.is-matched, .match__card.is-wrong { animation: none; transition: none; } }

/* ==========================================================================
   Movimiento reducido: sin animaciones ni transformaciones decorativas
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; flex-wrap: wrap; width: auto; }
  .marquee__list[aria-hidden], .marquee__track > .marquee__list:nth-child(2) { display: none; }
  .swap .w { transition: none; }
  .class-card, [data-tilt], [data-magnetic] { transform: none !important; }
  .stone.is-current .stone__btn, .puente__halo, .puente__stars circle, .puente__water, .wa-float.is-pulse, .cookie, .modal, .modal__card { animation: none !important; }
  .chat-stage .bubble, .chat-stage .fix { transition: none; }
  .puente__line i, .puente__meter i, .site-header__bar i { transition: none; }
}
@media print { .cookie, .mbar, .modal, .marquee, .hero__fx { display: none !important; } }

/* Formularios que solo funcionan con JavaScript (AJAX + token perezoso): sin JS se ocultan y queda el enlace al formulario completo */
html:not(.sb-js) form[data-sb-ajax] { display: none; }

/* Objetivos táctiles >= 44 px en móvil y etiquetas largas que envuelven en lugar de desbordar */
.tag-ex { max-width: 100%; white-space: normal; text-align: left; }
.btn--sm { min-height: 44px; }
.pcard__go { min-height: 44px; }
@media (max-width: 899px) {
  .brand, .site-footer ul a, .site-footer .linklike, .site-footer__legal a, .site-footer__legal .linklike, .crumbs__item a, .link { min-height: 44px; }
  .site-footer ul a { display: flex; }
  .stone__actions .linklike { min-height: 44px; }
}
a.lvl { position: relative; }
a.lvl::after { content: ""; position: absolute; inset: -10px -4px; }
img.post__img--photo { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
