/* Escaneo, resultado y animaciones de entrada (variante 4) */

/* ---------- Popup de escaneo ---------- */
body.escaneando { overflow: hidden; }
.escaner[hidden] { display: none; }
.escaner {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: rgba(0, 40, 24, .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .3s ease;
}
.escaner.abierto { opacity: 1; }
.escaner-caja {
  position: relative; width: min(520px, 100%); margin-top: 36px; padding: 34px clamp(18px, 4vw, 32px) 26px; text-align: center;
  background: var(--crema); color: #111; border: 3px solid #111; border-radius: 44px; box-shadow: 10px 10px 0 #111;
  transform: translateY(26px) scale(.92) rotate(-1.5deg); transition: transform .45s cubic-bezier(.2, 1.5, .4, 1);
}
.escaner.abierto .escaner-caja { transform: none; }
.escaner-hojita { position: absolute; top: -66px; right: 18px; width: 92px; transform: rotate(8deg); transform-origin: 50% 90%; animation: saluda 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .15)); }
.escaner-hojita .pupila { animation: mira 2.6s ease-in-out infinite; }
@keyframes mira { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-3px); } 70% { transform: translateX(3px); } }
.escaner-etiqueta { margin: 0; font-weight: 800; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--verde); }
.escaner-etiqueta::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: puntos 1.2s steps(4) infinite; }
@keyframes puntos { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75%, 100% { content: "..."; } }
.escaner-dominio { margin: .1em 0 .8em; font-weight: 800; text-transform: uppercase; font-size: clamp(1.4rem, 5vw, 2rem); line-height: 1.1; overflow-wrap: anywhere; }

.escaner-ventana { background: #fff; border: 3px solid #111; border-radius: 22px; overflow: hidden; text-align: left; margin-bottom: 1.1rem; }
.ventana-barra { display: flex; align-items: center; gap: 6px; padding: 8px 12px; background: #111; color: #fff; font-size: .72rem; }
.ventana-barra i { width: 9px; height: 9px; border-radius: 50%; background: var(--menta); }
.ventana-barra i:nth-child(2) { background: var(--amarillo); }
.ventana-barra i:nth-child(3) { background: var(--rosa); }
.ventana-barra span { margin-left: 8px; flex: 1; min-width: 0; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ventana-cuerpo { position: relative; height: 150px; padding: 16px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, #ece8d6 0%, #f8f5e8 50%, #ece8d6 100%); background-size: 200% 100%; animation: brillo 1.4s linear infinite; }
.sk-titulo { height: 20px; width: 55%; }
.sk-linea { height: 11px; width: 92%; }
.sk-linea.corta { width: 66%; }
.sk-fila { display: flex; gap: 10px; flex: 1; }
.sk-bloque { flex: 1; height: auto; min-height: 36px; }
@keyframes brillo { to { background-position: -200% 0; } }
.escaner-linea { position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--menta); box-shadow: 0 0 18px 6px rgba(5, 254, 146, .65); animation: barrido 1.7s ease-in-out infinite alternate; }
.escaner-linea::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 46px; background: linear-gradient(0deg, rgba(5, 254, 146, .28), transparent); }
@keyframes barrido { from { top: 0; } to { top: calc(100% - 4px); } }

.escaner-pasos { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 8px; text-align: left; font-weight: 700; font-size: .95rem; }
.escaner-pasos li { display: flex; align-items: center; gap: 12px; color: rgba(17, 17, 17, .45); transition: color .3s; }
.punto { position: relative; flex: none; width: 22px; height: 22px; border-radius: 50%; border: 3px solid currentColor; display: grid; place-items: center; }
.escaner-pasos .activo { color: #111; }
.escaner-pasos .activo .punto { border-color: #111 #111 #111 transparent; animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.escaner-pasos .hecho { color: var(--verde); }
.escaner-pasos .hecho .punto { background: var(--verde); border-color: var(--verde); animation: none; }
.escaner-pasos .hecho .punto::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 3px 3px 0; transform: translateY(-1px) rotate(45deg) scale(0); animation: marca .3s .05s cubic-bezier(.2, 1.6, .4, 1) forwards; }
@keyframes marca { to { transform: translateY(-1px) rotate(45deg) scale(1); } }

.escaner-pista { height: 14px; border: 3px solid #111; border-radius: 999px; background: #fff; overflow: hidden; }
.escaner-pista span { display: block; height: 100%; width: 4%; background: repeating-linear-gradient(135deg, var(--verde) 0 10px, #0a9d66 10px 20px); background-size: 28px 28px; border-radius: 999px; transition: width .5s ease-out; animation: franjas 1s linear infinite; }
@keyframes franjas { to { background-position: 28px 0; } }
.escaner-dato { min-height: 3.1em; margin: .9rem 0 .9rem; font-size: .9rem; color: #3a3720; transition: opacity .22s; }
.escaner-dato.cambia { opacity: 0; }

/* ---------- Sección de resultado ---------- */
.resultado[hidden] { display: none; }
.resultado {
  position: relative; z-index: 3; margin-top: -56px; border-radius: 56px 56px 0 0; overflow: hidden;
  background: var(--amarillo); color: #111; --fondo: var(--amarillo); --texto: #111; --suave: #3b3900; --linea: rgba(0, 0, 0, .3);
  --acento: #111; --acento-texto: var(--amarillo); --acento-enlace: #006a44; scroll-margin-top: 0;
  padding: clamp(56px, 7vw, 96px) 0 clamp(56px, 8vw, 104px);
}
.resultado:focus { outline: none; }
.resultado::before, .resultado::after {
  content: ""; position: absolute; pointer-events: none; background: url(/v4/patron-hojas-claro.svg) center / 220px; opacity: .22;
}
.resultado::before { inset: 0; mask-image: linear-gradient(180deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 60%); }
.resultado::after { display: none; }
.resultado > .wrap { position: relative; }

.res-cab { text-align: center; margin-bottom: clamp(28px, 4vw, 48px); }
.res-etiqueta { margin: 0 0 .4rem; font-weight: 800; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.res-dominio { margin: 0 0 1rem; font-size: clamp(2.2rem, 8.4vw, 6rem); line-height: .95; letter-spacing: -.02em; }
.res-dominio span { display: inline-block; padding: .04em .3em .1em; background: #111; color: var(--amarillo); border-radius: .22em; transform: rotate(-1.4deg); box-shadow: .06em .06em 0 var(--menta); }
.res-acciones { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.res-aviso { font-weight: 700; font-size: .9rem; }
.resultado .btn-outline { background: #fff; color: #111; border: 2px solid #111; }

.res-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.res-lado { display: grid; gap: clamp(16px, 2.4vw, 26px); min-width: 0; }

/* Pegatina de la nota */
.res-nota { position: relative; max-width: 460px; width: 100%; margin-inline: auto; transform: rotate(-4deg); }
.res-nota svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(10px 10px 0 #111); }
.nota-letra { font-family: var(--sans); font-weight: 800; fill: #111; letter-spacing: -.04em; }
.nota-pie-res { position: absolute; left: 0; right: 0; bottom: 15%; display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 700; font-size: clamp(.78rem, 1.6vw, .98rem); text-transform: uppercase; letter-spacing: .06em; pointer-events: none; }
.nota-gramos { font-size: clamp(2rem, 5.4vw, 3.4rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; text-transform: none; }
.hoja-vuela { position: absolute; left: 50%; top: 48%; width: 26px; height: 26px; opacity: 0; pointer-events: none; animation: vuela 1.9s cubic-bezier(.2, .7, .3, 1) forwards; }
@keyframes vuela {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0); }
  15% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 140px)) scale(1) rotate(var(--giro)); }
}
.res-nota-vacia { grid-column: 1; padding: 28px; background: #fff; border: 3px solid #111; border-radius: 40px; box-shadow: 8px 8px 0 #111; }
.res-nota-vacia h3 { font-size: 1.4rem; }

/* Tarjetas */
.res-hosting, .res-dato, .res-regla, .res-impacto, .res-cierre {
  background: #fff; border: 3px solid #111; border-radius: 40px; box-shadow: 8px 8px 0 #111; padding: clamp(20px, 3vw, 32px);
}
.res-dato-et { margin: 0 0 .5rem; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #3b3900; }
.res-dato-et.chico { margin-top: 1rem; }
.res-hosting { position: relative; }
.res-hosting h3 { margin: 1.5rem 0 .9rem; font-size: clamp(1.3rem, 2.8vw, 1.9rem); }
.res-hosting.si { background: #b6f7da; }
.res-hosting.no { background: #ffe0b0; }
.estampa {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px; border: 4px solid #111; border-radius: 14px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: clamp(1rem, 2.6vw, 1.4rem); color: #111; background: rgba(255, 255, 255, .55);
  transform: rotate(-4deg);
}
.estampa-hoja { width: 1.3em; height: 1.3em; color: var(--verde); }
.estampa b { display: grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%; background: #111; color: #ffe0b0; font-size: .9em; }
.res-detalles { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 20px; }
.res-detalles dt { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #35452f; }
.res-detalles dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.res-detalles a, .res-docs a, .res-ayuda a { color: #004a2f; font-weight: 800; text-underline-offset: 3px; }
.res-docs { margin: 0; padding-left: 1.2em; font-size: .92rem; }
.res-ayuda { margin: 1rem 0 0; font-size: .92rem; }

.res-datos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 26px); }
.res-dato.azul { background: #cbe8fb; }
.res-dato.lila { background: #dbcaf7; }
.res-cifra { display: block; font-size: clamp(2.2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.res-cifra small { font-size: .42em; font-weight: 800; letter-spacing: 0; }
.res-dato-pie { margin: .7rem 0 0; font-size: .86rem; color: #2c2a12; }
.res-barra { height: 14px; margin-bottom: 8px; border: 3px solid #111; border-radius: 999px; background: #fff; overflow: hidden; }
.res-barra span { display: block; height: 100%; width: var(--ancho); background: #111; border-radius: 999px; transform-origin: left; }

/* Escala de calificación */
.res-regla { margin-top: clamp(20px, 3vw, 34px); }
.regla-pista { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); border: 3px solid #111; border-radius: 18px; margin-bottom: 44px; }
.regla-pista > span:first-child { border-radius: 14px 0 0 14px; }
.regla-pista > span:nth-child(7) { border-radius: 0 14px 14px 0; }
.regla-pista > span { padding: 12px 0; text-align: center; font-weight: 800; font-size: clamp(.9rem, 2.4vw, 1.3rem); opacity: .55; transition: opacity .4s; }
.regla-pista > span + span { border-left: 3px solid #111; }
.regla-pista > span.es-nota { opacity: 1; }
.regla-marca { position: absolute; top: 100%; left: var(--pos); margin-top: 6px; transform: translateX(-50%); display: grid; justify-items: center; }
.regla-marca::before { content: ""; border: 8px solid transparent; border-bottom-color: #111; border-top: 0; }
.regla-marca b { padding: 3px 12px; border-radius: 999px; background: #111; color: var(--amarillo); font-size: .9rem; }

/* Impacto anual */
.res-impacto { margin-top: clamp(20px, 3vw, 34px); background: #fff; }
.res-impacto h3 { font-size: clamp(1.5rem, 3.4vw, 2.4rem); margin-bottom: .7rem; }
.res-impacto .impacto { max-width: none; margin: 0; padding-top: 0; border: 0; }
.res-impacto .impacto-titulo { font-size: clamp(1.05rem, 2.2vw, 1.4rem); font-weight: 600; letter-spacing: 0; margin-bottom: 1.4rem; }
.res-impacto .tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; background: none; border: 0; border-radius: 0; overflow: visible; }
.res-impacto .tarjeta { position: relative; padding: 22px; gap: 8px; border: 3px solid #111; border-radius: 30px; background: #fff; transition: transform .2s cubic-bezier(.2, 1.6, .4, 1), box-shadow .2s; animation: pop .5s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--n, 0) * 60ms); }
.res-impacto .tarjeta:nth-child(1) { --n: 0; background: #b6f7da; }
.res-impacto .tarjeta:nth-child(2) { --n: 1; background: #cbe8fb; }
.res-impacto .tarjeta:nth-child(3) { --n: 2; background: #fff1b8; }
.res-impacto .tarjeta:nth-child(4) { --n: 3; background: #dbcaf7; }
.res-impacto .tarjeta:nth-child(5) { --n: 4; background: #fdf0a6; }
.res-impacto .tarjeta:nth-child(6) { --n: 5; background: #d9fbec; }
.res-impacto .tarjeta:nth-child(7) { --n: 6; background: #ffd9ec; }
.res-impacto .tarjeta:nth-child(8) { --n: 7; background: #ffe0b0; }
.res-impacto .tarjeta:hover { transform: translateY(-5px) rotate(-1deg); box-shadow: 5px 6px 0 #111; }
.res-impacto .tarjeta .icono { color: #111; }
.res-impacto .tarjeta .cifra { font-size: clamp(1.7rem, 3.2vw, 2.3rem); font-weight: 800; letter-spacing: -.03em; }
.res-impacto .tarjeta .etiqueta { color: #2c2a12; font-size: .9rem; }
.res-impacto .nota { color: #3b3900; }
@keyframes pop { from { opacity: 0; transform: scale(.85) translateY(10px); } to { opacity: 1; transform: none; } }

.res-nota-local { margin: 1rem 0 0; font-size: .85rem; font-weight: 600; text-align: center; }
.res-cierre { margin-top: clamp(20px, 3vw, 34px); text-align: center; background: #111; color: #fff; box-shadow: 8px 8px 0 var(--menta); }
.res-cierre h3 { color: var(--amarillo); font-size: clamp(1.4rem, 3.4vw, 2.2rem); }
.res-cierre p { color: rgba(255, 255, 255, .86); }

/* Entrada animada del resultado: solo si hay JS y se permite movimiento */
@media (prefers-reduced-motion: no-preference) {
  .resultado .anim { opacity: 0; }
  .resultado.en-escena .anim { animation: sube .6s cubic-bezier(.2, .9, .3, 1) forwards; animation-delay: calc(var(--i, 0) * 110ms); }
  .resultado.en-escena .res-nota { animation-name: pegar; animation-duration: .85s; animation-timing-function: cubic-bezier(.2, 1.4, .4, 1); }
  .resultado.en-escena .estampa { animation: sella .5s .55s cubic-bezier(.2, 1.7, .4, 1) both; }
  .resultado.en-escena .res-barra span { animation: llena 1.2s .9s cubic-bezier(.2, .9, .3, 1) both; }
  .resultado.en-escena .regla-marca { animation: marcador 1.3s .7s cubic-bezier(.3, 1.4, .5, 1) both; }
  .resultado.en-escena .regla-marca b { animation: rebota 1.6s 1.6s ease-in-out infinite; }
  .res-nota:hover { transform: rotate(1deg) scale(1.02); transition: transform .35s cubic-bezier(.2, 1.6, .4, 1); }
}
@keyframes sube { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }
@keyframes pegar { from { opacity: 0; transform: scale(.35) rotate(-28deg); } to { opacity: 1; transform: rotate(-4deg); } }
@keyframes sella { from { opacity: 0; transform: rotate(-4deg) scale(2.6); } to { opacity: 1; transform: rotate(-4deg) scale(1); } }
@keyframes llena { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes marcador { from { left: 0; opacity: 0; } 20% { opacity: 1; } to { left: var(--pos); } }
@keyframes rebota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

@media (max-width: 860px) {
  .res-grid { grid-template-columns: 1fr; }
  .res-nota { max-width: 340px; }
  .res-datos { grid-template-columns: 1fr; }
  .resultado { margin-top: -40px; border-radius: 40px 40px 0 0; }
}

/* ---------- Animaciones de entrada del resto de la página ---------- */
@media (prefers-reduced-motion: no-preference) {
  .con-reveal .rev { opacity: 0; transform: translateY(30px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .9, .3, 1); transition-delay: var(--rd, 0ms); }
  .con-reveal .rev.visto { opacity: 1; transform: none; }
  /* Después de entrar, las tarjetas responden al cursor */
  .card, .tesela, .donar-card { transition: opacity .7s ease, transform .35s cubic-bezier(.2, 1.6, .4, 1), box-shadow .35s; }
  .con-reveal .card.visto:hover, .con-reveal .tesela.visto:hover { transform: translateY(-6px) rotate(-.8deg); transition-delay: 0ms; }
  .btn { transition: transform .25s cubic-bezier(.2, 1.7, .4, 1), background-color .2s, color .2s; }
  .btn:hover { transform: translateY(-2px) rotate(-1.2deg) scale(1.04); }
  .btn:active { transform: scale(.96); }
  /* El hero entra al cargar la página */
  .tarjeta-hero { animation: entra-hero .8s cubic-bezier(.2, 1.3, .4, 1) both; }
  .par-botones { animation: sube .7s .5s cubic-bezier(.2, .9, .3, 1) both; }
  .mascota { animation: saluda 5s ease-in-out infinite, asoma .7s .35s cubic-bezier(.2, 1.7, .4, 1) backwards; }
  /* La hojita se emociona al escribir */
  .tarjeta-hero:focus-within .mascota { animation-duration: 1.6s, .7s; }
}
@keyframes entra-hero { from { opacity: 0; transform: translateY(40px) scale(.94) rotate(-1.2deg); } to { opacity: 1; transform: none; } }
@keyframes asoma { from { opacity: 0; transform: translateY(40px) rotate(30deg) scale(.5); } }

.res-como { margin: 1.1rem 0 0; text-align: center; font-weight: 700; }
.res-como a { color: #111; text-underline-offset: 4px; }

/* Espaciado entre secciones de la portada */
main .sec.cla, main .sec.crema, main #talleres { padding-block: clamp(48px, 6vw, 88px); }
main .sec.cla + .sec.cla { padding-top: clamp(8px, 1.5vw, 24px); }
main .sec.donar { padding-block: clamp(64px, 8vw, 112px); }
.site-footer { padding-top: clamp(56px, 7vw, 88px); }

/* Áreas táctiles más grandes en pantallas táctiles, sin cambiar el aspecto */
@media (pointer: coarse), (max-width: 700px) {
  .card > a:not(.btn), .cab-marca, .cab-der, .links a, .site-footer address a, .site-footer p a, .hero-interno .volver a, .pildora a { position: relative; }
  .card > a:not(.btn)::before, .cab-marca::before, .cab-der::before, .links a::before, .site-footer p a::before { content: ""; position: absolute; inset: -12px -6px; }
  .pildora a::before { content: ""; position: absolute; inset: -4px -2px; }
}

/* Pantallas bajas (móviles pequeños): el hero y el popup se compactan para que todo quede a la vista */
@media (max-height: 700px) {
  .hero { padding-top: calc(60px + 8px); padding-bottom: 96px; }
  .tarjeta-hero { padding: 16px clamp(14px, 4vw, 28px) 18px; border-radius: 40px; }
  .tarjeta-hero h1 { font-size: clamp(1.45rem, 7vw, 2.2rem); margin-bottom: .35em; }
  .tarjeta-hero .panel-interior { margin-top: .7rem; padding: 12px; border-radius: 28px; }
  .par-botones { margin-top: .8rem; gap: 8px; }
  .par-botones .btn { padding-block: 10px; }
  .barra-menta { display: none; }
  .escaner-ventana { display: none; }
  .escaner-dato { min-height: 0; }
  .escaner-caja { margin-top: 28px; padding-top: 28px; }
}

#calculadora, #equivalencias { scroll-margin-top: 24px; }

/* Entrada animada de la página de método (solo CSS, sin parpadeos) */
@media (prefers-reduced-motion: no-preference) {
  .hero-interno .volver, .hero-interno h1, .hero-interno .lead { animation: sube .75s cubic-bezier(.2, .9, .3, 1) both; }
  .hero-interno h1 { animation-delay: .1s; }
  .hero-interno .lead { animation-delay: .25s; }
  #calculo .tesela { animation: pop .6s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--t, 0) * 90ms + .3s); }
  #calculo .tesela:nth-child(2) { --t: 1; }
  #calculo .tesela:nth-child(3) { --t: 2; }
  #calculo .tesela:nth-child(4) { --t: 3; }
  #calculo .tesela:nth-child(5) { --t: 4; }
  /* Al bajar, cada bloque aparece cuando entra en pantalla (donde el navegador lo permite) */
  @supports (animation-timeline: view()) {
    #calculo .metodo > * { animation: sube linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
  }
}

/* Botón verde llamativo */
.btn-verde { background: var(--menta); color: #003d27; }
.btn-verde:hover { background: #00e47f; color: #003d27; }

/* Hojita reacciona al resultado */
.res-hojita { position: relative; z-index: 2; display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin-top: 16px; }
.res-hojita .hojita-svg { order: 1; display: block; flex: none; width: clamp(78px, 22%, 100px); height: auto; overflow: visible; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .18)); transform-origin: 50% 90%; }
.hojita-globo {
  order: 2; position: relative; margin: 0 0 clamp(34px, 9vw, 48px); padding: 9px 14px; max-width: 200px; text-align: center;
  --fondo-globo: #fff; background: var(--fondo-globo); color: #111; border: 3px solid #111; border-radius: 12px 20px 20px 12px; font-weight: 800; font-size: clamp(.82rem, 1.7vw, .98rem); line-height: 1.2;
  box-shadow: 4px 4px 0 #111;
}
@media (prefers-reduced-motion: no-preference) {
  .resultado .res-hojita { opacity: 0; }
  .resultado.en-escena .res-hojita { animation: hojita-entra .7s 1.1s cubic-bezier(.2, 1.7, .4, 1) forwards; }
  .resultado.en-escena .res-hojita.feliz .hojita-svg { animation: salta 1.1s 1.8s ease-in-out infinite; }
  .resultado.en-escena .res-hojita.neutral .hojita-svg { animation: balanceo 3.2s 1.8s ease-in-out infinite; }
  .resultado.en-escena .res-hojita.triste .hojita-svg { animation: abatida 3.6s 1.8s ease-in-out infinite; }
  .resultado.en-escena .hojita-globo { animation: globo .5s 1.5s cubic-bezier(.2, 1.7, .4, 1) both; transform-origin: 0 80%; }
  .lagrima { animation: gota 2.4s 2s ease-in infinite; }
}
@media (prefers-reduced-motion: reduce) { .res-hojita { opacity: 1; } }
@keyframes hojita-entra { from { opacity: 0; transform: translateY(30px) scale(.5) rotate(20deg); } to { opacity: 1; transform: none; } }
@keyframes salta { 0%, 100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-14px) rotate(-4deg); } }
@keyframes balanceo { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes abatida { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-2deg) translateY(3px); } }
@keyframes globo { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes gota { 0% { transform: translateY(0); opacity: .9; } 70% { transform: translateY(22px); opacity: 0; } 100% { transform: translateY(22px); opacity: 0; } }
@media (max-width: 860px) {
  .hojita-globo { max-width: 170px; }
}


.nota-lienzo { position: relative; }

.nota-gramos small { font-size: .5em; font-weight: 800; margin-left: .12em; letter-spacing: 0; text-transform: none; }

.escaner-caja:focus { outline: none; }

/* Flecha del globo. Un cuadrado girado con dos bordes, cuyo centro cae sobre el borde del globo para que el contorno se una sin cortes */
.hojita-globo::before { content: ""; position: absolute; top: 50%; left: -10px; width: 14px; height: 14px; margin-top: -7px; background: var(--fondo-globo); border-left: 3px solid #111; border-bottom: 3px solid #111; transform: rotate(45deg); }
.res-hojita.triste .hojita-globo { --fondo-globo: #e9f1ff; }

/* Preguntas frecuentes */
.faq-lista { max-width: 860px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item { background: #fff; border: 3px solid #111; border-radius: 28px; box-shadow: 5px 5px 0 #111; transition: background .2s, transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.faq-item:hover { transform: translateY(-2px); }
.faq-item[open] { background: #d9fbec; }
.faq-item summary { position: relative; cursor: pointer; list-style: none; padding: 20px 64px 20px 24px; font-weight: 800; font-size: clamp(1.02rem, 2vw, 1.2rem); line-height: 1.3; border-radius: 25px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 18px; top: 50%; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; background: #111; color: var(--amarillo); display: grid; place-items: center; font-size: 1.5rem; line-height: 1; transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:focus-visible { outline: 3px solid var(--rosa); outline-offset: 2px; }
.faq-resp { padding: 0 24px 22px; }
.faq-resp p { margin: 0 0 .8em; }
.faq-resp ul { margin: 0 0 .8em; padding-left: 1.2em; }
.faq-resp a { font-weight: 700; text-underline-offset: 3px; }
#faq { padding-top: clamp(40px, 6vw, 72px); }
@media (prefers-reduced-motion: no-preference) {
  .faq-item { animation: sube .6s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--q, 0) * 50ms + .2s); }
}
.faq-item:nth-child(1) { --q: 0; }
.faq-item:nth-child(2) { --q: 1; }
.faq-item:nth-child(3) { --q: 2; }
.faq-item:nth-child(4) { --q: 3; }
.faq-item:nth-child(5) { --q: 4; }
.faq-item:nth-child(6) { --q: 5; }
.faq-item:nth-child(7) { --q: 6; }
.faq-item:nth-child(8) { --q: 7; }
.faq-item:nth-child(9) { --q: 8; }
.faq-item:nth-child(10) { --q: 9; }
.faq-item:nth-child(11) { --q: 10; }

/* Texto largo (política de privacidad) */
.prosa { max-width: 760px; margin: 0 auto; }
.prosa .act { font-weight: 700; color: #555; }
.prosa h2 { font-size: clamp(1.25rem, 3vw, 1.7rem); margin: 2.2rem 0 .6rem; }
.prosa ul { padding-left: 1.2em; display: grid; gap: .5rem; margin: 0 0 1em; }
.prosa a { font-weight: 700; text-underline-offset: 3px; }
#privacidad { padding-top: clamp(40px, 6vw, 72px); }
.faq-item:nth-child(12) { --q: 11; }

/* Pie con dos columnas, ahora sin boletín */
@media (min-width: 901px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Marca en el pie */
.pie-logo { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 1rem; text-decoration: none; color: #fff; }
.pie-logo img { display: block; width: 40px; height: 40px; }
.pie-logo span { font-weight: 800; font-size: 1.5rem; letter-spacing: .04em; text-transform: uppercase; }
.pie-marca p { max-width: 46ch; }
.pie-origen { font-weight: 700; }

/* Línea final del pie, centrada y con menos espacio debajo */
.site-footer { padding-bottom: 100px; }
.site-footer .legal { text-align: center; }
.site-footer .legal p { margin: 0; }
.site-footer .legal a { font-weight: 700; text-underline-offset: 3px; }
.site-footer .legal .copyright { margin-top: .35rem; font-size: .8rem; opacity: .85; }

.res-fecha { margin: .7rem 0 1rem; font-weight: 700; font-size: .95rem; }
.res-aviso { flex-basis: 100%; text-align: center; }

/* Blog */
.blog-lista { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.nota { display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; padding: clamp(22px, 3vw, 30px); border: 3px solid #111; border-radius: 32px; box-shadow: 5px 5px 0 #111; color: #111; transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.nota:hover { transform: translateY(-3px) rotate(-.4deg); }
.nota-amarillo { background: #fee202; }
.nota-menta { background: #7dfcc0; }
.nota-rosa { background: #ff8fcd; }
.nota-fecha { margin: 0; font-weight: 700; font-size: .85rem; }
.nota h2 { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.15; }
.nota h2 a { text-decoration: none; color: inherit; }
.nota h2 a::after { content: ""; position: absolute; inset: 0; }
.nota { position: relative; }
.nota p { margin: 0; }
.nota-leer { margin-top: auto; padding-top: .6rem; font-weight: 800; text-underline-offset: 3px; }
.articulo .resumen { margin: 0 0 1.6rem; padding: 18px 22px; border: 3px solid #111; border-radius: 24px; background: #d9fbec; box-shadow: 4px 4px 0 #111; }
.articulo .resumen p { margin: 0; }
.articulo .resumen .resumen-t { margin-bottom: .3rem; font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
.articulo ol { padding-left: 1.3em; display: grid; gap: .5rem; margin: 0 0 1em; }
.articulo .tabla-caja { margin: 0 0 1em; overflow-x: auto; border: 3px solid #111; border-radius: 20px; background: #fff; }
.articulo table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.articulo th, .articulo td { padding: 11px 14px; text-align: left; border-bottom: 2px solid #111; white-space: nowrap; }
.articulo thead th { background: #111; color: #fff; font-size: .8rem; letter-spacing: .04em; }
.articulo tbody tr:last-child th, .articulo tbody tr:last-child td { border-bottom: 0; }
.articulo tbody th { font-weight: 800; }
.articulo .art-faq { margin-top: 1rem; max-width: none; }
.articulo .faq-resp { padding: 0 24px 20px; }
.articulo .faq-resp p { margin: 0; }

/* Botones secundarios del hero: discretos para no competir con el campo */
.par-botones .btn-sec { padding: 9px 22px; font-size: .95rem; background: rgba(255, 255, 255, .12); color: #fff; border: 2px solid rgba(255, 255, 255, .75); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.par-botones .btn-sec:hover { background: #e2ffc2; color: #05201f; border-color: #e2ffc2; }

/* Panel del campo del hero en amarillo fuerte, para que contraste con la tarjeta verde */
.panel-interior.crema { background: var(--amarillo); }
.panel-interior .hint { color: #3d3a00; }

/* Imágenes del blog */
.articulo .portada { margin: 0 0 1.6rem; border: 3px solid #111; border-radius: 28px; overflow: hidden; box-shadow: 5px 5px 0 #111; background: #fff; }
.articulo .portada img { display: block; width: 100%; height: auto; }
.nota-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border: 3px solid #111; border-radius: 22px; background: #fff; }
#blog .post img.miniatura { object-fit: cover; height: auto; background: #fff; }

/* Tarjetas del blog en blanco y toda la tarjeta clicable */
.nota, .nota-amarillo, .nota-menta, .nota-rosa { background: #fff; }
.nota { cursor: pointer; }
.nota:hover { background: #fffdf2; }
#blog .post { position: relative; cursor: pointer; }
#blog .post h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
#blog .post h3 a:hover { text-decoration: none; }
#blog .post:hover h3 a { text-decoration: underline; text-underline-offset: 4px; }

/* Sellos de Verdímetro en el pie */
.pie-sellos { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.2rem; }
.pie-sellos a { display: block; line-height: 0; border-radius: 50%; transition: transform .25s cubic-bezier(.2, 1.7, .4, 1); }
.pie-sellos a:hover { transform: rotate(-4deg) scale(1.05); }
.pie-sellos img { display: block; width: 110px; height: 110px; }
