/* E1 · la bolsa — la escena animada del héroe de La Semana Lista (SVG + CSS + Web Animations, sin librerías).
   Va con animacion/e1-bolsa.js. Lo que dice este CSS es el cuadro final: así queda en la versión básica, con «menos movimiento»
   y sin JavaScript. Solo los 8 colores de la marca y sus transparencias. */
.e1 { position: relative; margin: 30px 0 0; }
.e1-lienzo { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--borde); background: var(--crema-calida); box-shadow: var(--sombra); }
.e1-lienzo > svg { display: block; width: 100%; height: auto; }
/* Mientras el JS no ha puesto el cuadro de arranque, la escena no se ve (si el JS no llega, aparece el cuadro final a los 3 s) */
.js .e1:not(.e1-listo) .e1-lienzo > svg, .js .e1:not(.e1-listo) .e1-pasos { opacity: 0; animation: e1-sin-js 0s 3s forwards; }
@keyframes e1-sin-js { to { opacity: 1; } }

.e1 .ln { fill: none; stroke: var(--tinta); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.e1 .pl, .e1 .pl.ln { fill: var(--tarjeta); }
.e1 .pf { fill: rgba(250, 248, 245, .2); stroke: var(--tinta); stroke-width: 1.7; }
.e1 .tr { fill: var(--terracota); }
.e1 .zp { fill: none; stroke: var(--verde); stroke-linecap: round; }
.e1 .z2 { stroke-width: 2.2; }
.e1 .ci { fill: var(--crema-calida); stroke: var(--borde); stroke-width: .9; }
.e1 .e1-mango { stroke-width: 4.5; }
.e1 .e1-cazo { stroke-width: 2; }
.e1-suelo { stroke: var(--borde); stroke-width: 1.4; stroke-linecap: round; }
.e1-sombra { fill: rgba(32, 24, 19, .09); }
.e1-manija { fill: var(--verde); }
.e1-copo { stroke-width: 1.3; opacity: .7; }
.e1-hondo { fill: rgba(40, 72, 53, .1); }
.e1-escarcha { stroke-width: 1.1; opacity: .6; }
.e1-panel { stroke: var(--tinta); stroke-width: 1.8; }
.e1-labio { stroke: var(--borde); stroke-width: 1.2; }
.e1-arroz { fill: var(--crema); }
.e1-grano { stroke: rgba(107, 95, 87, .45); stroke-width: 1.6; stroke-linecap: round; }
.e1-frijol { fill: rgba(107, 95, 87, .6); }
.e1-grano-f { fill: rgba(32, 24, 19, .3); }
.e1-desmechada { fill: rgba(215, 100, 66, .4); }
.e1-hebra { fill: none; stroke: rgba(107, 95, 87, .6); stroke-width: 1.4; stroke-linecap: round; }
.e1-caldo { fill: rgba(215, 100, 66, .8); }
.e1-caldo-plano { fill: rgba(215, 100, 66, .66); }
.e1-trozo { fill: rgba(107, 95, 87, .55); }
.e1-garabato { fill: none; stroke: rgba(32, 24, 19, .6); stroke-width: 1.1; stroke-linecap: round; }
.e1-pollo { fill: var(--crema-calida); stroke: rgba(32, 24, 19, .5); stroke-width: 1.2; }
.e1-hueso-b { stroke: rgba(32, 24, 19, .5); stroke-width: 5.4; stroke-linecap: round; }
.e1-hueso { stroke: var(--tarjeta); stroke-width: 3.2; stroke-linecap: round; }
.e1-nudo { fill: var(--tarjeta); stroke: rgba(32, 24, 19, .5); stroke-width: 1; }
.e1-tomate { fill: var(--terracota); stroke: rgba(32, 24, 19, .3); stroke-width: 1; }
.e1-cebolla { fill: none; stroke: var(--tarjeta); stroke-width: 2; stroke-linecap: round; }
.e1-hoja { fill: var(--verde); }
.e1-hueco { fill: rgba(250, 248, 245, .92); stroke: rgba(32, 24, 19, .35); stroke-width: 1.2; stroke-dasharray: 3 3; }
.e1-burbuja { fill: none; stroke: rgba(32, 24, 19, .22); stroke-width: 1.1; }
.e1-costura { fill: none; stroke: rgba(32, 24, 19, .16); stroke-width: 1; }
.e1-brillo { fill: none; stroke: rgba(250, 248, 245, .75); stroke-width: 3.5; stroke-linecap: round; }
.e1-abierto { stroke-width: 1.5; stroke-opacity: .55; }
.e1-cierre { stroke-width: 3.4; stroke-dasharray: 1 1.1; stroke-dashoffset: 0; }
.e1-cursor, .e1-tinta { fill: var(--tinta); }
.e1-verde { fill: var(--verde); }
.e1-soplo { fill: none; stroke: rgba(32, 24, 19, .55); stroke-width: 1.8; stroke-linecap: round; }
.e1-trazo { fill: none; stroke: var(--tinta); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1.1; stroke-dashoffset: 0; }
/* Plana: el canto de la bolsa (su grosor) se ve grueso al acostarla y se vuelve una línea al aplanarla */
.e1-canto { fill: rgba(215, 100, 66, .6); stroke: var(--tinta); stroke-width: 1.7; }
.e1-canto-brillo { fill: none; stroke: rgba(250, 248, 245, .7); stroke-width: 3; stroke-linecap: round; }
.e1-domo { fill: rgba(250, 248, 245, .3); }
.e1-sale { fill: var(--tarjeta); stroke: rgba(32, 24, 19, .45); stroke-width: 1.2; }

/* Orígenes de giro y escala; el cuadro final de lo que se mueve */
#e1-chorro, #e1-canto { transform-box: fill-box; transform-origin: 50% 0; }
#e1-aire { transform-box: fill-box; transform-origin: 100% 0; }
#e1-plano { transform-box: fill-box; transform-origin: 50% 50%; }
#e1-cinta { transform-box: fill-box; transform-origin: 0 50%; }
#e1-bolsa { transform: translate(168px, 172px) scale(.56); }
#e1-cajon, #e1-frente { transform: translateY(22px); }
#e1-cursor { transform: translateX(166px); }
#e1-cucharon, #e1-chorro, #e1-pie, #e1-aire, #e1-soplo, #e1-zip-abierto, #e1-pluma, #e1-canto, #e1-domo, .e1-sale, .e1-mesa > * { opacity: 0; }

/* Los tres pasos, arriba de la escena */
.e1-pasos { position: absolute; z-index: 2; top: 12px; left: 12px; right: 12px; margin: 0; padding: 0; list-style: none; display: flex;
            flex-wrap: wrap; gap: 5px; pointer-events: none; }
.e1-pasos li { display: inline-flex; align-items: center; gap: 6px; background: var(--tarjeta); border: 1px solid var(--borde); border-radius: 999px;
               padding: 3px 9px 3px 3px; font: 600 10px/1 Inter, sans-serif; letter-spacing: .09em; text-transform: uppercase;
               box-shadow: 0 1px 2px rgba(32, 24, 19, .06); }
.e1-pasos b { position: relative; width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--borde); flex-shrink: 0; }
.e1-pasos i { position: absolute; inset: -1.5px; border-radius: 50%; background: var(--verde) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23F7F4ED' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }

/* El celular, siempre a la vista, al lado de la escena */
.e1-tel { position: absolute; right: -6px; bottom: -34px; }
.e1-tel .iphone { --ancho: 112px; animation: flotar 6s ease-in-out infinite; }
.e1-pausa .e1-tel .iphone { animation-play-state: paused; }
.e1-quieta .e1-tel .iphone { animation: none; }

.e1-otra { position: absolute; left: 0; top: calc(100% + 12px); display: none; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 2px;
           font: 500 13px/1 Inter, sans-serif; color: var(--secundario); cursor: pointer; }
.e1-otra svg { width: 14px; height: 14px; }
.e1-otra:hover { color: var(--tinta); }
.e1-listo .e1-otra { display: inline-flex; }
.e1-corriendo .e1-otra { pointer-events: none; }

@media (min-width: 900px) {
  .e1 { margin: 0; }
  .e1-pasos { top: 16px; left: 16px; gap: 8px; }
  .e1-pasos li { font-size: 11.5px; letter-spacing: .12em; padding: 5px 12px 5px 5px; gap: 8px; }
  .e1-pasos b { width: 18px; height: 18px; }
  .e1-tel { right: -34px; bottom: -48px; }
  .e1-tel .iphone { --ancho: 170px; }
}
