/* section-motion.css: o movimento que costura a home inteira.
 *
 * Cinco peças, todas opcionais: a barra de leitura no topo, os cartões que
 * chegam em sequência e sobem no hover, os ícones que se desenham ao aparecer,
 * o sublinhado que corre embaixo do destaque de cada título e a órbita de
 * marcas (voz e download). O atraso de cada cartão vem de --stagger, que o
 * section-motion.js escreve. Quem pediu menos movimento vê tudo parado e
 * completo, no estado final.
 */

/* A barra de leitura: anda com a rolagem, sem JavaScript. */
@supports (animation-timeline: scroll()) {
  .marketing-home body::before {
    content: "";
    position: fixed;
    inset: 0 0 auto;
    z-index: 60;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-fill), var(--accent));
    transform-origin: 0 50%;
    animation: reading-progress linear both;
    animation-timeline: scroll(root);
  }
}
@keyframes reading-progress { from { scale: 0 1; } to { scale: 1 1; } }

/* Cartões: chegam um depois do outro e respondem ao ponteiro. */
.feature-card, .plain-card, .js .reveal:is(.feature-card, .plain-card) {
  --card-delay: calc(var(--stagger, 0) * 90ms);
  transition:
    opacity .6s cubic-bezier(.16, 1, .3, 1) var(--card-delay),
    transform .6s cubic-bezier(.16, 1, .3, 1) var(--card-delay),
    translate .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s ease, border-color .35s ease;
}
.feature-card:hover, .plain-card:hover {
  translate: 0 -4px;
  border-color: var(--accent-border);
  box-shadow: var(--shadow-window);
}
.feature-card .feature-visual { transition: scale .45s cubic-bezier(.16, 1, .3, 1); }
.feature-card:hover .feature-visual { scale: 1.03; }

/* Ícone de cartão: um selo verde-claro com o traço do Lucide. */
.card-icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  transition: rotate .4s cubic-bezier(.16, 1, .3, 1), scale .4s cubic-bezier(.16, 1, .3, 1);
}
.card-icon svg { width: 20px; height: 20px; stroke-dasharray: 90; stroke-dashoffset: 0; }
.plain-card:hover .card-icon { rotate: -6deg; scale: 1.08; }
.js .reveal:not(.visivel) .card-icon svg { stroke-dashoffset: 90; }
.js .reveal.visivel .card-icon svg { animation: icon-draw 1.2s cubic-bezier(.65, 0, .35, 1) both; animation-delay: calc(var(--stagger, 0) * 90ms + .2s); }
@keyframes icon-draw { from { stroke-dashoffset: 90; } to { stroke-dashoffset: 0; } }

/* O destaque do título ganha um traço que corre por baixo ao aparecer. */
.section-head .highlight, .section-copy .highlight, .baixar .highlight {
  background: linear-gradient(90deg, var(--accent-fill), var(--accent-border)) 0 92% / 100% 2px no-repeat;
}
.js .reveal .highlight { background-size: 0 2px; transition: background-size 1s cubic-bezier(.65, 0, .35, 1) .35s; }
.js .reveal.visivel .highlight { background-size: 100% 2px; }

/* A órbita: as marcas giram devagar em volta do centro, sempre em pé. */
@property --orbit-turn { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
.logo-orbit {
  --orbit-radius: 168px;
  --orbit-size: calc(var(--orbit-radius) * 2 + 72px);
  position: relative;
  display: block;
  width: var(--orbit-size);
  max-width: 100%;
  aspect-ratio: 1;
  min-height: 0;
  margin-inline: auto;
  animation: orbit-turn 80s linear infinite;
}
.logo-orbit > :is(.glow-tile, .logo-tile) {
  --angle: calc(var(--i, 0) * 360deg / var(--orbit-count, 8) + var(--orbit-turn));
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -32px 0 0 -32px;
  transform: rotate(var(--angle)) translate(var(--orbit-radius)) rotate(calc(-1 * var(--angle)));
}
.logo-orbit > :nth-child(1 of :is(.glow-tile, .logo-tile)) { --i: 0; }
.logo-orbit > :nth-child(2 of :is(.glow-tile, .logo-tile)) { --i: 1; }
.logo-orbit > :nth-child(3 of :is(.glow-tile, .logo-tile)) { --i: 2; }
.logo-orbit > :nth-child(4 of :is(.glow-tile, .logo-tile)) { --i: 3; }
.logo-orbit > :nth-child(5 of :is(.glow-tile, .logo-tile)) { --i: 4; }
.logo-orbit > :nth-child(6 of :is(.glow-tile, .logo-tile)) { --i: 5; }
.logo-orbit > :nth-child(7 of :is(.glow-tile, .logo-tile)) { --i: 6; }
.logo-orbit > :nth-child(8 of :is(.glow-tile, .logo-tile)) { --i: 7; }
.orbit-ring {
  position: absolute;
  inset: 36px;
  border-radius: 50%;
  border: 1px dashed var(--band-border, var(--border-strong));
  pointer-events: none;
}
.orbit-ring.is-inner { inset: 30%; border-style: solid; animation: orbit-breathe 4.8s ease-in-out infinite; }
.logo-orbit > .speaking-pill { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); z-index: 1; }
@keyframes orbit-turn { to { --orbit-turn: 360deg; } }
@keyframes orbit-breathe { 50% { scale: 1.08; opacity: .55; } }

/* O download: a luminária no centro, com as seis redes em volta. */
.download-orbit { --orbit-radius: 128px; --orbit-count: 6; margin-bottom: 8px; }
.download-orbit .logo-tile { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.download-orbit .orbit-ring { inset: 28px; border-color: var(--border-strong); }
.download-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  translate: -50% -50%;
  border-radius: 28px;
  background: linear-gradient(150deg, var(--accent-fill), var(--accent));
  color: var(--surface-raised);
  box-shadow: 0 24px 48px -20px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .35); /* fq-ignore: brilho do ícone do app */
  animation: mark-float 5s ease-in-out infinite;
}
.download-mark svg { width: 48px; height: 48px; }
.download-mark::after {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 36px;
  border: 2px solid var(--accent-fill);
  opacity: 0;
  animation: mark-pulse 2.8s ease-out infinite;
}
@keyframes mark-float { 50% { translate: -50% calc(-50% - 6px); } }
@keyframes mark-pulse { 0% { opacity: .7; scale: .9; } 100% { opacity: 0; scale: 1.35; } }

/* As maquetes inclinam um pouco na direção do ponteiro (section-motion.js). */
.tilt-ready, .js .reveal.visivel.tilt-ready { transition: transform .5s cubic-bezier(.16, 1, .3, 1); transform: perspective(1400px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); }

/* Os rótulos sobre os vídeos ganham uma base escura para ler em cima de cena clara. */
.life-context .context-demo {
  justify-self: start;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(20, 20, 18, .42); /* fq-ignore: véu sobre vídeo, igual nos dois temas */
  backdrop-filter: blur(6px);
}

@media (max-width: 760px) {
  .logo-orbit { --orbit-radius: 124px; }
  .download-orbit { --orbit-radius: 104px; }
  .logo-orbit > .glow-tile { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .download-orbit .logo-tile { width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .download-mark { width: 80px; height: 80px; border-radius: 24px; }
  /* No celular a pílula fica só com a esfera e a onda, para caber dentro da órbita. */
  .logo-orbit > .speaking-pill > span[data-i18n] { display: none; }
  .logo-orbit > .speaking-pill { padding-right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .logo-orbit, .orbit-ring.is-inner, .download-mark, .download-mark::after { animation: none; }
  .js .reveal .card-icon svg { animation: none; stroke-dashoffset: 0; }
  .js .reveal .highlight { transition: none; background-size: 100% 2px; }
  .feature-card, .plain-card, .tilt-ready { transition: none; }
  .tilt-ready { transform: none; }
}
