/* Animações das imagens das sessões 2 e 3 — um gesto por imagem (aprovado no lab.html) */
:root { --ez: cubic-bezier(0.22, 1, 0.36, 1); }
.problem .media, .feat .media { container-type: inline-size; }
.media > .fx, .media .fx-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media svg.fx-ov { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.problem .media { background: #f6f8f5; }

.draw { fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; }
.play .draw { transition: stroke-dashoffset var(--dur, 2s) var(--ez) var(--del, 0s); stroke-dashoffset: 0; }
.pop { opacity: 0; transform: scale(.4); transform-box: fill-box; transform-origin: center; }
.play .pop { transition: opacity .4s var(--del, 0s), transform .7s cubic-bezier(.34, 1.56, .64, 1) var(--del, 0s); opacity: 1; transform: none; }

/* 1 · bússola: agulha em SVG (a física fica no images.js) */

/* 2 · caderno: levitação */
.fx-float { position: absolute; inset: 0; }
.fx-float img { animation: fl 5s ease-in-out infinite; }
.fx-shadow { position: absolute; left: 33%; right: 33%; bottom: 4%; height: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 60, 40, .25), transparent); animation: fs 5s ease-in-out infinite; }
@keyframes fl { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes fs { 0%, 100% { transform: scale(1); } 50% { transform: scale(.8); opacity: .6; } }

/* 3 · altímetro: visor ao vivo */
@font-face { font-family: "DSEG7"; src: url("../../vendor/DSEG7Classic-BoldItalic.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "DSEG7i"; src: url("../../vendor/DSEG7Classic-Italic.woff2") format("woff2"); font-display: swap; }
.fx-lcd { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; image-rendering: -webkit-optimize-contrast; }
.fx-lcd.blink { animation: blink .18s steps(2) 3; }
@keyframes blink { 50% { opacity: .15; } }
.fx-backlight { position: absolute; left: 30%; top: 36%; width: 30%; height: 36%; border-radius: 50%; background: radial-gradient(closest-side, rgba(200, 255, 150, .5), transparent); mix-blend-mode: multiply; opacity: 0; }
.play .fx-backlight { animation: backlight 3s ease-out .4s both; }
@keyframes backlight { 0% { opacity: 0; } 15% { opacity: .8; } 100% { opacity: 0; } }   /* acende e apaga: o visor termina nítido */

/* 4 · mapa: pousa e traça uma rota curta */
.fx-land { position: absolute; inset: 0; transform: translateY(-9%) scale(1.03); opacity: 0; }
.play .fx-land { transition: transform 1.3s var(--ez), opacity .6s ease; transform: none; opacity: 1; }
.fx-land-sh { position: absolute; left: 30%; right: 30%; bottom: 2%; height: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 60, 40, .25), transparent); opacity: 0; transform: scale(.6); }
.play .fx-land-sh { transition: opacity 1.2s ease .3s, transform 1.3s var(--ez); opacity: 1; transform: none; }

/* mapa: lanterna percorre as curvas de nível e para no destino */
.fx-lamp { position: absolute; inset: 0; -webkit-mask-size: cover; mask-size: cover; mix-blend-mode: multiply; pointer-events: none;
  background: radial-gradient(90px circle at var(--lx, 30%) var(--ly, 80%), rgba(120, 190, 60, .55), transparent 70%); opacity: 0; }
.play .fx-lamp { animation: lamp 3.2s ease 1s both; }
@keyframes lamp { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: .9; } }
.fx-pin { position: absolute; left: 58%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #2f6112; opacity: 0; transform: scale(0); }
.fx-pin::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid #2f6112; opacity: 0; }
.play .fx-pin { transition: opacity .3s 4.1s, transform .6s cubic-bezier(.34, 1.56, .64, 1) 4.1s; opacity: 1; transform: scale(1); }
.play .fx-pin::after { animation: pinring 1.4s cubic-bezier(0.22, 1, 0.36, 1) 4.5s 2; }
@keyframes pinring { from { opacity: .8; transform: scale(.5); } to { opacity: 0; transform: scale(2.4); } }

/* 5 · foco da lente */
.fx-focus { filter: blur(10px) saturate(.6); transform: scale(1.1); }
.play .fx-focus { transition: filter 1.2s var(--ez), transform 1.6s var(--ez); filter: none; transform: none; }
/* 6 · aproximação que assenta */
.fx-settle { transform: scale(1.14); }
.play .fx-settle { transition: transform 2.6s var(--ez); transform: none; }
/* 7 · exposição */
.fx-expose { filter: brightness(1.9) saturate(.3) contrast(.8); }
.play .fx-expose { transition: filter 1.8s var(--ez); filter: none; }
/* 8 · cortina */
.fx-rise { clip-path: inset(100% 0 0 0); transform: scale(1.08); }
.play .fx-rise { transition: clip-path 1.4s var(--ez), transform 2.2s var(--ez); clip-path: inset(0 0 0 0); transform: none; }
.media:has(.fx-rise) { background: #0d1d07; }

@media (prefers-reduced-motion: reduce) {
  .fx-float img, .fx-shadow { animation: none; }
  .fx-land, .fx-land-sh, .fx-focus, .fx-settle, .fx-expose, .fx-rise, .draw, .pop { transition: none !important; transform: none !important; filter: none !important; clip-path: none !important; opacity: 1 !important; stroke-dashoffset: 0 !important; }
}

/* sessão 2: os três problemas (sem direção, genérico, sem acompanhamento) ficam em preto e branco;
   só o 4º card, "Sua jornada com direção", tem cor */
.problem:nth-child(-n+3) .media { filter: grayscale(1); }
.problem .media:has(.fx-lcd) { background: #fff; }   /* mesmo branco da foto do altímetro: o deslize não mostra borda */
