/* 04-tema-efeitos.css — Fundo animado, ticker, micro-interações, FAQ.
   Os arquivos css/ são carregados em ordem numérica pelo index.html: a ordem importa (cascata). */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* ---------- Atmosfera: fundo animado ---------- */
.hero {
  overflow: hidden;
  overflow: clip; /* clip não vira contêiner de rolagem: mantém o sticky do carrinho no mock */
}
.bg-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
  will-change: transform;
}
.blob-1 {
  width: 480px;
  height: 480px;
  top: -160px;
  right: -80px;
  background: radial-gradient(circle, rgba(31, 107, 67, 0.35), transparent 65%);
  animation: drift1 26s ease-in-out infinite alternate;
}
.blob-2 {
  width: 380px;
  height: 380px;
  bottom: -140px;
  left: -100px;
  background: radial-gradient(circle, rgba(61, 98, 172, 0.28), transparent 65%);
  animation: drift2 22s ease-in-out infinite alternate;
}
.blob-3 {
  width: 260px;
  height: 260px;
  top: 38%;
  left: 42%;
  background: radial-gradient(circle, rgba(80, 160, 48, 0.22), transparent 65%);
  animation: drift3 30s ease-in-out infinite alternate;
}
@keyframes drift1 {
  to {
    transform: translate(-70px, 60px) scale(1.15);
  }
}
@keyframes drift2 {
  to {
    transform: translate(80px, -50px) scale(1.1);
  }
}
@keyframes drift3 {
  to {
    transform: translate(-60px, -70px) scale(0.92);
  }
}

.hero-grid {
  z-index: 1;
}

/* rede animada do topo (js/hero-rede.js): mais fraca atrás do texto, à esquerda,
   e some nas bordas de cima e de baixo */
.hero-rede {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -webkit-mask-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.55) 35%, #000 60%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 85%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.55) 35%, #000 60%),
    linear-gradient(180deg, transparent 0%, #000 12%, #000 85%, transparent 100%);
  mask-composite: intersect;
}
@media (max-width: 960px) {
  /* no celular o texto ocupa a largura toda: a rede fica mais fraca por igual */
  .hero-rede {
    opacity: 0.55;
  }
}

/* listras do kraft em movimento lento */
.features::before {
  background-size: 200% 200%;
  animation: stripes 80s linear infinite;
}
@keyframes stripes {
  to {
    background-position: 400px 400px;
  }
}

/* brilho pulsante no CTA */
.cta-card::before {
  animation: glow 7s ease-in-out infinite alternate;
}
@keyframes glow {
  from {
    opacity: 0.7;
    transform: scale(1);
  }
  to {
    opacity: 1;
    transform: scale(1.25);
  }
}

/* ---------- Caminhão viajante (estrada sinuosa) ---------- */
.truck-lane {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}
/* conteúdo das seções acima da estrada/caminhão; fundos das seções abaixo */
section > .container,
section > .supplier-rail,
footer > .container {
  position: relative;
  z-index: 1;
}
.truck-lane path {
  fill: none;
  stroke: var(--line-strong);
  stroke-width: 2;
  stroke-dasharray: 9 10;
  opacity: 0.5;
}
.truck-rider {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  pointer-events: none;
  color: var(--accent);
  will-change: transform;
}
.truck-rider.flip .horn-bubble {
  left: auto;
  right: calc(100% + 4px);
  transform-origin: right center;
}
.truck-rider.flip .horn-bubble::after {
  right: auto;
  left: 100%;
  border-right-color: transparent;
  border-left-color: var(--heading);
}
.truck-rot {
  display: block;
  will-change: transform;
}
.truck {
  display: block;
  overflow: visible;
}
.truck .beam {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.road-store {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -50%);
}
.road-store svg {
  display: block;
  margin: 0 auto 0.3rem;
  color: var(--chip-text);
}
.road-store small {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  color: var(--ink-soft);
}
.truck .wheel {
  transform-box: fill-box;
  transform-origin: center;
  animation: spin 0.8s linear infinite;
  animation-play-state: paused;
}
.truck-rider.moving .wheel {
  animation-play-state: running;
}
.truck .smoke {
  opacity: 0;
}
.truck-rider.moving .smoke {
  animation: puff 1.4s ease-out infinite;
}
.truck-rider.moving .smoke:nth-of-type(2) {
  animation-delay: 0.7s;
}
@keyframes puff {
  0% {
    opacity: 0.5;
    transform: translate(0, 0) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(-10px, -12px) scale(1.4);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.truck-rider.honk .truck {
  animation: honk 0.55s ease;
}
@keyframes honk {
  25% {
    transform: rotate(-6deg) scale(1.07);
  }
  55% {
    transform: rotate(5deg);
  }
  80% {
    transform: rotate(-2deg);
  }
}
.horn-bubble {
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%) scale(0);
  transform-origin: left center;
  background: var(--heading);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: 10px;
  white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.2, 1.6, 0.4, 1);
  pointer-events: none;
  z-index: 6;
}
.horn-bubble::after {
  content: '';
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: var(--heading);
}
.truck-rider.honk .horn-bubble {
  transform: translateY(-50%) scale(1);
}
@media (max-width: 900px) {
  .truck-lane,
  .truck-rider,
  .road-store {
    display: none;
  }
}

/* ---------- Ticker de cotação ---------- */
.ticker {
  overflow: hidden;
  background: var(--surface);
  border-block: 1px solid var(--line);
  position: relative;
  z-index: 1;
}
.ticker-track {
  display: flex;
  gap: 2.8rem;
  width: max-content;
  padding: 0.62rem 0;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-soft);
  white-space: nowrap;
  animation: tick 36s linear infinite;
}
.ticker:hover .ticker-track {
  animation-play-state: paused;
}
@keyframes tick {
  to {
    transform: translateX(-50%);
  }
}
.ticker-track b {
  color: var(--heading);
  font-weight: 600;
}
.ticker-track .tk-up {
  color: var(--red);
}
.ticker-track .tk-down {
  color: var(--green-700);
}

/* ---------- Micro-interações ---------- */
.btn svg {
  transition: transform 0.18s ease;
}
.btn:hover svg {
  transform: translateX(3px);
}
.step:hover .step-icon {
  animation: wiggle 0.45s ease;
}
.feat:hover .feat-icon {
  animation: wiggle 0.45s ease;
}
@keyframes wiggle {
  25% {
    transform: rotate(-8deg);
  }
  70% {
    transform: rotate(6deg);
  }
}
.aud:hover .aud-icon {
  animation: hop 0.4s ease;
}
@keyframes hop {
  40% {
    transform: translateY(-7px) scale(1.12);
  }
}

@keyframes shine {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

/* ---------- Sublinhado desenhado à mão ---------- */
.hl {
  position: relative;
  display: inline-block;
}
.hl svg {
  position: absolute;
  left: -2%;
  bottom: -12px;
  width: 104%;
  height: 14px;
  overflow: visible;
}
.hl svg path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawline 0.9s ease 0.7s forwards;
}
@keyframes drawline {
  to {
    stroke-dashoffset: 0;
  }
}

/* ---------- Textura de grão ---------- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- WhatsApp flutuante ---------- */
.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px -8px rgba(37, 211, 102, 0.65);
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.wa-float.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.wa-float.show:hover {
  transform: translateY(-3px);
}
.wa-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: waPulse 2.2s ease-out infinite;
}
@keyframes waPulse {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 760px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq-item[open] {
  border-color: var(--line-strong);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  font-weight: 600;
  font-size: 0.97rem;
  color: var(--heading);
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--kicker);
  flex: none;
  transition: transform 0.25s ease;
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item .faq-body {
  padding: 0 1.3rem 1.2rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
  animation: faqIn 0.25s ease;
}
@keyframes faqIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* ---------- Carimbo CONFERIDO ---------- */
.feed {
  position: relative;
}

@keyframes stampIn {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-12deg) scale(1);
  }
}
@keyframes stampOut {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-12deg) scale(0.96);
  }
}
