/* duo.css — seção da home "por fora e por dentro": CSURFACE → BeforeTHEM → UIF.
 *
 * Cena fixa durante a rolagem. O progresso (--p, 0 a 1) vem do duo.js e move
 * três coisas juntas: o fundo sai do navy/roxo do hero da CSURFACE e chega ao
 * preto do BeforeTHEM, o robô branco escurece quadro a quadro, e o texto troca
 * de produto. Sem JS ou com "reduzir movimento", os três blocos aparecem
 * empilhados com a imagem final.
 */
.duo {
  --p: 0;
  position: relative;
  height: 340vh;
  padding: 0;
  background: #04060a;
  color: #e6ebf2;
}
.duo__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; align-items: center; isolation: isolate;
}
/* duas camadas de fundo; a do navy some conforme --p cresce */
.duo__bg, .duo__bg--bt { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.duo__bg {
  background:
    radial-gradient(900px 600px at 78% 40%, rgba(54, 208, 234, 0.16), transparent 65%),
    radial-gradient(800px 600px at 10% 90%, rgba(41, 36, 96, 0.9), transparent 70%),
    linear-gradient(135deg, #060818 0%, #1a1645 60%, #292460 100%);
  opacity: calc(1 - min(1, var(--p) * 2.2));
}
.duo__bg--bt {
  z-index: -3;
  background:
    radial-gradient(700px 520px at 75% 45%, rgba(79, 237, 210, 0.08), transparent 65%),
    #04060a;
}
.duo__grid {
  display: grid; grid-template-columns: 0.95fr 1.05fr; gap: var(--sp-8); align-items: center; width: 100%;
}
.duo__text { position: relative; min-height: 420px; }
.duo__panel {
  position: absolute; inset: 0 0 auto 0;
  opacity: 0; transform: translateY(24px); pointer-events: none;
  transition: opacity .5s cubic-bezier(.22, 1, .36, 1), transform .6s cubic-bezier(.22, 1, .36, 1);
}
.duo__panel.is-on { opacity: 1; transform: none; pointer-events: auto; }
.duo .eyebrow { color: #36d0ea; display: block; }
.duo__panel--bt .eyebrow, .duo__panel--uif .eyebrow { color: #4fedd2; }
.duo h2 { color: #fff; font-size: clamp(2.2rem, 3.6vw + 0.6rem, 3.6rem); line-height: 1.04; letter-spacing: -0.025em; margin-bottom: var(--sp-5); }
.duo h2 em { font-style: normal; color: #36d0ea; }
.duo__panel--bt h2 em { color: #4fedd2; }
.duo__panel--uif h2 em { background: linear-gradient(90deg, #36d0ea, #4fedd2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.duo p { color: #b9c2d3; font-size: var(--fs-md); line-height: var(--lh-relaxed); max-width: 48ch; }
.duo__brand { display: flex; width: max-content; align-items: center; gap: 10px; margin-bottom: var(--sp-4); font-weight: 800; color: #fff; font-size: var(--fs-lg); }
.duo__brand img { height: 22px; width: auto; }
.duo__link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: var(--sp-4);
  padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: var(--fs-sm);
  color: #060818; background: linear-gradient(135deg, #36d0ea, #2bb8d1); text-decoration: none;
}
.duo__panel--bt .duo__link { background: linear-gradient(135deg, #4fedd2, #36d0ea); color: #031210; }
.duo__panel--uif .duo__link { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, 0.25); }
.duo__link:hover { text-decoration: none; filter: brightness(1.08); color: inherit; }
.duo__panel--uif .duo__link:hover { border-color: #4fedd2; color: #fff; }

.duo__media { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 640px; justify-self: end; }
.duo__media canvas, .duo__media img {
  position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover;
  -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
          mask-image: radial-gradient(closest-side, #000 70%, transparent 100%);
}
.duo__media img { transition: opacity .3s; }
/* "lighten" deixa o preto do quadro transparente sobre o navy: some o disco escuro em volta do robô */
.duo__media canvas, .duo__media img { mix-blend-mode: lighten; }
.duo.is-ready .duo__media img { opacity: 0; }

/* linha de varredura que cruza a cena na troca de produto */
.duo__sweep {
  position: absolute; left: 0; right: 0; height: 2px; z-index: 2; pointer-events: none;
  top: var(--sy, -10%); opacity: var(--so, 0); /* calculados no duo.js */
  background: #4fedd2; box-shadow: 0 0 26px 4px rgba(79, 237, 210, 0.55);
}

/* marcos de progresso no rodapé da cena */
.duo__steps {
  position: absolute; left: 0; right: 0; bottom: 28px; z-index: 2;
  display: flex; justify-content: center; gap: 28px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
}
.duo__steps span { color: rgba(255, 255, 255, 0.35); display: inline-flex; align-items: center; gap: 8px; transition: color .3s; }
.duo__steps span::before { content: ""; width: 18px; height: 2px; background: currentColor; }
.duo__steps span.is-on { color: #fff; }
.duo__steps span.is-on:nth-child(1)::before { background: #36d0ea; }
.duo__steps span.is-on:nth-child(2)::before { background: #4fedd2; }
.duo__steps span.is-on:nth-child(3)::before { background: linear-gradient(90deg, #36d0ea, #4fedd2); }

@media (max-width: 900px) {
  .duo { height: 300vh; }
  .duo__grid { grid-template-columns: 1fr; gap: var(--sp-3); }
  .duo__media { order: -1; max-width: min(64vw, 42vh); justify-self: center; }
  .duo__text { min-height: 300px; }
  .duo h2 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
  .duo p { font-size: var(--fs-base); }
  .duo__steps { bottom: 14px; gap: 16px; font-size: 10px; }
}

/* sem animação: os três blocos empilhados, imagem final */
@media (prefers-reduced-motion: reduce) {
  .duo { height: auto; }
  .duo__sticky { position: relative; height: auto; padding-block: var(--sp-12); }
  .duo__bg { opacity: 0; }
  .duo__text { min-height: 0; }
  .duo__panel { position: static; opacity: 1; transform: none; pointer-events: auto; margin-bottom: var(--sp-8); }
  .duo__sweep, .duo__steps, .duo__media canvas { display: none; }
  .duo.is-ready .duo__media img { opacity: 1; }
}
.duo--static { height: auto; }
.duo--static .duo__sticky { position: relative; height: auto; padding-block: var(--sp-12); }
.duo--static .duo__text { min-height: 0; }
.duo--static .duo__panel { position: static; opacity: 1; transform: none; pointer-events: auto; margin-bottom: var(--sp-8); }
.duo--static .duo__sweep, .duo--static .duo__steps { display: none; }
