/* ── Motion graphics: «El café excepcional también se decide en tu cocina» ─────────────────────────────────────
   Recorrido animado de la finca a la taza, con cifras reales de Málico. Respeta el sistema de diseño: tinta, miel
   y óxido; Young Serif para títulos; sombras duras; bordes de 2 px; radio de 2 px en botones. Con «reducir movimiento»
   no hay animación ni avance automático (se navega con las estaciones). */
.mov { margin: 56px 0 0; display: grid; gap: 28px; }

/* Ruta: línea con la gota y siete estaciones */
.mov-ruta { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); align-items: start; padding-top: 6px; }
.mov-linea { position: absolute; left: calc(100% / 14); right: calc(100% / 14); top: 36px; height: 2px; background: rgba(246, 239, 231, 0.3); }
.mov-progreso { position: absolute; left: 0; top: 0; height: 2px; width: calc(var(--i, 0) / 6 * 100%); background: var(--honey); transition: width 0.9s cubic-bezier(0.65, 0, 0.35, 1); }
.mov-gota {
  position: absolute; top: -9px; left: calc(var(--i, 0) / 6 * 100%); width: 20px; height: 20px; margin-left: -10px;
  background: var(--honey); border: 2px solid var(--ink); border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 0 0 4px rgba(224, 168, 58, 0.25); transition: left 0.9s cubic-bezier(0.65, 0, 0.35, 1);
}
.mov-est {
  position: relative; display: grid; justify-items: center; gap: 10px; padding: 0 2px 14px; min-height: 44px; background: none; border: 0; border-radius: 0;
  color: var(--on-ink); cursor: pointer; font: inherit; text-align: center; box-shadow: none;
}
.mov-est:hover { background: none; color: var(--on-ink); }
.mov-est .nodo {
  position: relative; z-index: 1; width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--on-ink); background: var(--ink); color: var(--on-ink);
  display: grid; place-items: center; transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.mov-est .nodo svg { width: 26px; height: 26px; }
/* Logo de Málico dentro del nodo «Aquí entra Málico»: toma el color del nodo (blanco, miel o tinta según su estado). */
.mov-est .nodo .logo-nodo { display: block; height: 62%; aspect-ratio: 860 / 1145; background: currentColor; -webkit-mask: url(/assets/logo-mucilago-grueso.svg) center / contain no-repeat; mask: url(/assets/logo-mucilago-grueso.svg) center / contain no-repeat; }
.mov-est strong { font: 400 clamp(15px, 1.7vw, 21px)/1.1 var(--f-display); }
.mov-est.hecha .nodo { border-color: var(--honey); color: var(--honey); }
.mov-est.activa .nodo { transform: scale(1.18); background: var(--honey); border-color: var(--honey); color: var(--ink); box-shadow: 4px 4px 0 var(--accent); }
.mov-est.mio .nodo { border-color: var(--honey); }
.mov-est.mio.activa .nodo::after { content: ""; position: absolute; inset: -10px; border: 2px solid var(--honey); border-radius: 50%; animation: mov-halo 1.8s ease-out infinite; }
.mov-aqui { position: absolute; top: -22px; left: 50%; transform: translateX(-50%); font: 700 11px var(--f-data); letter-spacing: 0.12em; text-transform: uppercase; color: var(--honey); white-space: nowrap; }
.mov-est:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
/* Barra de tiempo bajo la estación activa: al terminar pasa a la siguiente (animationend) */
.mov-est::after { content: ""; position: absolute; left: 14%; right: 14%; bottom: 4px; height: 3px; background: transparent; }
.mov-est.activa::after { background: var(--honey); transform-origin: left; animation: mov-tiempo var(--dur, 7s) linear forwards; }
.mov:hover .mov-est.activa::after, .mov:focus-within .mov-est.activa::after, .mov.pausada .mov-est.activa::after, .mov.fuera .mov-est.activa::after { animation-play-state: paused; }

/* Escenario: una tarjeta clara con sombra dura, como los teléfonos de «Empieza por aquí» */
.mov-escenario { position: relative; }
.mov-escena {
  display: grid; gap: 28px; padding: 28px 26px; border: 2px solid var(--on-ink); border-radius: 24px; background: var(--surface); color: var(--text);
  box-shadow: 8px 8px 0 var(--accent);
}
.mov-escena[hidden] { display: none; }
.mov-escena.activa > * { animation: mov-entra 0.6s cubic-bezier(0.22, 1, 0.36, 1) both; }
.mov-escena.activa > :nth-child(2) { animation-delay: 0.12s; }
@media (min-width: 900px) { .mov-escena { grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; padding: 36px 40px; } }
.mov-eyebrow { margin: 0 0 8px; font: 700 12px var(--f-data); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }
.mov-escena h3 { margin: 0; font: 400 clamp(32px, 4.4vw, 52px)/1.04 var(--f-display); letter-spacing: -0.015em; color: var(--text); text-transform: none; }
.mov-escena p.mov-p { margin: 14px 0 0; font-size: 18px; line-height: 1.5; max-width: 30em; color: var(--text); }
.mov-escena .enlace-flecha { margin-top: 18px; color: var(--accent-text); }
.mov-vis { display: grid; gap: 14px; align-content: center; min-width: 0; }
.mov-num { font: 400 clamp(56px, 9vw, 104px)/1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.mov-num small { font: 600 14px var(--f-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-left: 8px; }
.mov-leyenda { margin: 0; font-size: 14px; color: var(--muted); }

/* 1 · Finca: medidor de puntaje de 86 a 94 */
.mov-escala { position: relative; height: 22px; border: 2px solid var(--ink); border-radius: 2px; background: var(--surface-2); overflow: hidden; }
.mov-escala::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to right, transparent 0 calc(12.5% - 2px), rgba(59, 42, 32, 0.45) calc(12.5% - 2px) 12.5%); z-index: 1; }
.mov-relleno { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.mov-escena.activa .mov-relleno { animation: mov-llena 1.6s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards; }
.mov-ejes { display: flex; justify-content: space-between; font: 700 12px var(--f-data); color: var(--muted); font-variant-numeric: tabular-nums; }
.mov-estados { display: flex; flex-wrap: wrap; gap: 8px; }
.mov-chip { padding: 6px 12px; border: 2px solid var(--ink); border-radius: 2px; background: var(--surface-2); font: 600 13px var(--f-data); letter-spacing: 0.04em; opacity: 0; }
.mov-escena.activa .mov-chip { animation: mov-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(0.5s + var(--k, 0) * 0.14s); }

/* 2 · Beneficio: tres procesos */
.mov-procesos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mov-proceso { display: grid; justify-items: center; gap: 10px; padding: 18px 8px; border: 2px solid var(--ink); border-radius: 16px; background: var(--surface-2); text-align: center; opacity: 0; }
.mov-proceso svg { width: 40px; height: 40px; color: var(--accent-text); }
.mov-proceso strong { font: 400 22px/1 var(--f-display); }
.mov-escena.activa .mov-proceso { animation: mov-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(0.3s + var(--k, 0) * 0.22s); }

/* 3 · Tueste: del claro al oscuro */
.mov-tueste { position: relative; height: 54px; border: 2px solid var(--ink); border-radius: 2px; background: linear-gradient(to right, #d9a566, #a8682c 40%, #5a3a22 72%, #2c1d14); box-shadow: 4px 4px 0 var(--ink); }
.mov-grano { position: absolute; top: 50%; left: 8%; width: 30px; height: 40px; margin: -20px 0 0 -15px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink); }
.mov-grano::after { content: ""; position: absolute; left: 50%; top: 4px; bottom: 4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 2px; transform: rotate(8deg); }
.mov-escena.activa .mov-grano { animation: mov-tuesta 2.6s cubic-bezier(0.65, 0, 0.35, 1) 0.4s forwards; }
.mov-ejes.tueste { text-transform: uppercase; letter-spacing: 0.08em; }

/* 4 · Aquí entra Málico: tres contadores */
.mov-contadores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mov-contador { padding: 16px 12px; border: 2px solid var(--ink); border-radius: 16px; background: var(--ink); color: var(--on-ink); }
.mov-contador .mov-num { color: var(--honey); font-size: clamp(44px, 6.4vw, 78px); }
.mov-contador b { display: block; margin-top: 6px; font: 600 15px/1.3 var(--f-data); }
.mov-contador > span { display: block; margin-top: 4px; font: 500 13px/1.35 var(--f-data); color: var(--on-ink-soft); }

/* 5 · Tu molino: de los clics de una receta a los del tuyo */
.mov-conv { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.mov-caja { padding: 14px 12px; border: 2px solid var(--ink); border-radius: 16px; background: var(--surface-2); text-align: center; }
.mov-caja.fin { background: var(--ink); color: var(--on-ink); box-shadow: 4px 4px 0 var(--accent); }
.mov-caja .mov-num { font-size: clamp(44px, 6vw, 72px); }
.mov-caja.fin .mov-num { color: var(--honey); }
.mov-caja small { display: block; font: 600 12px/1.3 var(--f-data); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.mov-caja.fin small { color: var(--on-ink-soft); }
.mov-flecha { display: grid; justify-items: center; gap: 2px; font: 700 13px var(--f-data); color: var(--accent-text); }
.mov-flecha svg { width: 34px; height: 34px; }
.mov-escena.activa .mov-flecha svg { animation: mov-empuja 1.1s ease-in-out 0.4s infinite; }
@media (max-width: 520px) { .mov-conv { grid-template-columns: 1fr; } .mov-flecha svg { transform: rotate(90deg); } .mov-escena.activa .mov-flecha svg { animation: none; } }

/* 6 · Tu receta: vertido de 250 g en 3:05 */
.mov-datos { display: grid; grid-template-columns: repeat(4, 1fr); border: 2px solid var(--ink); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.mov-datos div { padding: 8px 10px; border-left: 1.5px solid var(--ink); }
.mov-datos div:first-child { border-left: 0; }
.mov-datos dt { font: 700 10px var(--f-data); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mov-datos dd { margin: 2px 0 0; font: 700 20px var(--f-data); font-variant-numeric: tabular-nums; }
.mov-vierte { position: relative; height: 40px; border: 2px solid var(--ink); border-radius: 2px; background: var(--surface); overflow: hidden; }
.mov-vierte i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }
.mov-escena.activa .mov-vierte i { animation: mov-vierte 4.6s cubic-bezier(0.37, 0, 0.63, 1) 0.4s forwards; }
.mov-vierte u { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); text-decoration: none; }
.mov-vierte u:nth-of-type(1) { left: 18%; } .mov-vierte u:nth-of-type(2) { left: 60%; }
.mov-reloj { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.mov-reloj .mov-num { font-size: clamp(48px, 7vw, 84px); }
.mov-reloj .peso { font: 700 28px var(--f-data); color: var(--accent-text); }

/* 7 · Tu taza: la rueda de sabores */
.mov-taza { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 18px; align-items: center; }
.mov-rueda { position: relative; width: 100%; aspect-ratio: 1; }
.mov-rueda svg { width: 100%; height: 100%; display: block; transform: rotate(-90deg); }
.mov-rueda circle { fill: none; stroke-width: 26; }
.mov-rueda .seg { stroke-dasharray: 0 999; }
.mov-escena.activa .mov-rueda .seg { animation: mov-seg 0.9s cubic-bezier(0.22, 1, 0.36, 1) both; animation-delay: calc(0.2s + var(--k, 0) * 0.12s); }
.mov-rueda .centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.mov-rueda .centro b { font: 400 46px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.mov-rueda .centro > span { font: 700 11px var(--f-data); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.mov-notas { display: flex; flex-wrap: wrap; gap: 8px; }
.mov-notas .mov-chip { background: var(--surface); }
@media (max-width: 560px) { .mov-taza { grid-template-columns: 1fr; justify-items: center; } .mov-notas { justify-self: start; } }

/* Controles */
.mov-control { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.mov-cuenta { font: 700 14px var(--f-data); letter-spacing: 0.08em; font-variant-numeric: tabular-nums; color: var(--on-ink-soft); }
.mov-pausa { cursor: pointer; }
.mov-nota { margin: 0; font-size: 14px; color: var(--on-ink-soft); }

/* Móvil: solo los íconos en la ruta */
@media (max-width: 719px) {
  .mov-est strong { display: none; }
  .mov-est .nodo { width: 40px; height: 40px; }
  .mov-est .nodo svg { width: 20px; height: 20px; }
  .mov-linea { top: 26px; }
  .mov-aqui { display: none; }
  .mov-escena { padding: 22px 18px; }
  .mov-datos { grid-template-columns: repeat(2, 1fr); }
  .mov-datos div:nth-child(3) { border-left: 0; }
  .mov-datos div:nth-child(n+3) { border-top: 1.5px solid var(--ink); }
}

/* Aviso de la página de propuesta */
.propuesta-aviso { background: var(--honey); color: var(--ink); padding: 10px 0; font: 600 14px/1.4 var(--f-data); border-bottom: 2px solid var(--ink); }
.propuesta-aviso strong { letter-spacing: 0.1em; text-transform: uppercase; margin-right: 8px; }

@keyframes mov-tiempo { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes mov-entra { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes mov-pop { from { opacity: 0; transform: scale(0.6) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes mov-halo { from { opacity: 0.9; transform: scale(0.9); } to { opacity: 0; transform: scale(1.5); } }
@keyframes mov-llena { to { width: var(--hasta, 88%); } }
@keyframes mov-tuesta { to { left: 86%; } }
@keyframes mov-vierte { to { width: 100%; } }
@keyframes mov-empuja { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes mov-seg { to { stroke-dasharray: var(--len) 999; } }

/* Sin movimiento: todo en su estado final y sin avance automático */
@media (prefers-reduced-motion: reduce) {
  .mov *, .mov *::before, .mov *::after { animation: none !important; transition: none !important; }
  .mov-chip, .mov-proceso { opacity: 1; }
  .mov-relleno { width: var(--hasta, 88%); }
  .mov-grano { left: 86%; }
  .mov-vierte i { width: 100%; }
  .mov-rueda .seg { stroke-dasharray: var(--len) 999; }
  .mov-est.activa::after { background: var(--honey); }
  .mov-pausa { display: none; }
}
