/* =====================================================================
   eTarget — camada de animação (preloader, cursor, carrossel, menu…)
   Complementa styles.css. Requer as libs em assets/vendor/.
   ===================================================================== */

/* reveal por TRANSIÇÃO de CSS (fluido, roda na GPU). O JS só adiciona .is-in. */
html.js-anim [data-reveal],
html.js-anim [data-reveal-item] {
  opacity: 0; transform: translateY(34px);
  transition: opacity .8s cubic-bezier(.22, 1, .36, 1), transform .8s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, transform;
}
html.js-anim [data-reveal].is-in,
html.js-anim [data-reveal-group].is-in [data-reveal-item] { opacity: 1; transform: none; }
/* cascata suave dentro dos grupos (números, passos) */
[data-reveal-group].is-in [data-reveal-item]:nth-child(2) { transition-delay: .13s; }
[data-reveal-group].is-in [data-reveal-item]:nth-child(3) { transition-delay: .26s; }
[data-reveal-group].is-in [data-reveal-item]:nth-child(4) { transition-delay: .39s; }

/* o título do hero é quebrado em letras pelo SplitText; o degradê ("clip: text")
   não sobrevive a isso e some. Aqui o trecho dourado usa cor sólida. */
.hero__titulo .ouro {
  background: none;
  -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--ouro); -webkit-text-fill-color: var(--ouro);
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--preto); display: grid; place-items: center;
}
.preloader__logo { width: clamp(170px, 42vw, 280px); height: auto; display: block; }
/* enquanto carrega, trava o scroll */
body:not(.pronto) { overflow: hidden; }

/* ---------- Indicador de scroll (direita) ---------- */
.scroll-ind {
  position: fixed; right: 24px; bottom: 40px; z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  color: var(--texto-fraco); transition: opacity .4s ease;
}
.scroll-ind.escondido { opacity: 0; pointer-events: none; }
.scroll-ind__txt { writing-mode: vertical-rl; text-transform: uppercase; letter-spacing: 3px; font-size: 11px; }
.scroll-ind__linha { width: 1px; height: 54px; background: rgba(255,255,255,.15); position: relative; overflow: hidden; }
.scroll-ind__linha::after {
  content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 40%;
  background: linear-gradient(var(--ouro), transparent); animation: scrollDot 1.8s ease-in-out infinite;
}
@keyframes scrollDot { 0% { transform: translateY(-100%); } 100% { transform: translateY(160%); } }
@media (max-width: 767px) { .scroll-ind { display: none; } }

/* ---------- Menu hambúrguer / overlay ---------- */
.nav-toggle {
  display: none; width: 44px; height: 44px; background: none; border: none; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 6px; padding: 0;
}
.nav-toggle span {
  display: block; height: 2px; width: 24px; margin: 0 auto; background: var(--texto);
  transition: transform .3s ease, opacity .3s ease;
}
.menu-aberto .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-aberto .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-aberto .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.nav-overlay {
  position: fixed; inset: 0; z-index: 9990;
  background: rgba(10,10,10,.98); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s ease;
}
.menu-aberto .nav-overlay { opacity: 1; visibility: visible; }
.nav-overlay nav { display: flex; flex-direction: column; gap: 26px; text-align: center; }
.nav-overlay a { font-size: 30px; font-weight: 700; color: var(--texto); }
.nav-overlay a:hover { color: var(--ouro); }

/* mostra hambúrguer e esconde nav horizontal abaixo de 1024px */
@media (max-width: 1023px) {
  .header .nav { display: none; }
  .nav-toggle { display: flex; }
}
@media (min-width: 1024px) {
  .header .nav { display: flex; }
  .nav-overlay { display: none; }
}

/* ---------- Carrossel de modelos (Swiper) ---------- */
.modelos-swiper { padding-bottom: 56px; }
.modelos-swiper .swiper-slide { height: auto; }
.modelos-swiper {
  --swiper-theme-color: var(--ouro);
  --swiper-navigation-size: 24px;
  --swiper-pagination-bullet-inactive-color: #666;
}
.modelos-swiper .swiper-button-next, .modelos-swiper .swiper-button-prev {
  color: var(--ouro); top: auto; bottom: 4px; width: 34px; height: 34px;
}
.modelos-swiper .swiper-button-prev { left: auto; right: 52px; }
.modelos-swiper .swiper-button-next { right: 8px; }
.modelos-swiper .swiper-pagination { text-align: left; }

.moto-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--preto-2); border: 1px solid var(--borda); border-radius: var(--radius);
  overflow: hidden; transition: transform .3s ease, border-color .3s ease;
}
.moto-card:hover { transform: translateY(-6px); border-color: var(--ouro-escuro); }
.moto-card__img {
  aspect-ratio: 1 / 1; /* moldura igual para todos */
  background-size: contain; background-repeat: no-repeat; background-position: center;
  background-color: #0d0d0d; /* não corta a foto */
}
.moto-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.moto-card__cat {
  align-self: flex-start; font-size: 11px; text-transform: uppercase; letter-spacing: .6px;
  color: var(--ouro); border: 1px solid var(--ouro-escuro); padding: 2px 10px; border-radius: 999px;
}
.moto-card__nome { font-size: 21px; font-weight: 800; }
.moto-card__specs { display: flex; gap: 8px; flex-wrap: wrap; }
.moto-card__specs span {
  font-size: 12px; color: var(--texto-fraco); background: var(--preto-3);
  border: 1px solid var(--borda); padding: 4px 10px; border-radius: 8px;
}
.moto-card__preco { margin-top: auto; padding-top: 10px; }
.moto-card__preco small { display: block; color: var(--texto-fraco); font-size: 12px; }
.moto-card__preco strong { color: var(--ouro); font-size: 22px; }
.moto-card__cta { margin-top: 8px; font-weight: 700; font-size: 14px; }
.moto-card__cta i { font-style: normal; display: inline-block; transition: transform .25s ease; }
.moto-card:hover .moto-card__cta i { transform: translateX(5px); }

/* ---------- container e tipografia fluida ---------- */
.container { max-width: min(100%, 1200px); }
@media (max-width: 1023px) { .container { max-width: min(100%, 767px); } }
body { font-size: clamp(15px, 1.4vw, 17px); }

/* setinha/sublinhado que crescem no hover (links e botões) */
.nav a { position: relative; }
.nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 0;
  background: var(--ouro); transition: width .3s ease;
}
.nav a:hover::after { width: 100%; }

/* seta do hero: leve destaque no hover */
.hero__scroll { transition: color .3s ease, transform .3s ease; }
.hero__scroll:hover { color: var(--ouro); }

/* ---------- refinos de responsividade ---------- */
/* evita rolagem horizontal acidental em telas estreitas */
body { overflow-x: clip; }
/* títulos de seção também fluidos */
.secao__titulo { font-size: clamp(24px, 5vw, 30px); }

/* tablet e menor: respiro vertical menor entre seções */
@media (max-width: 768px) {
  .secao, .video-secao, .passos, .blog { padding: 52px 0; }
  .numeros { padding: 46px 0; }
  .hero { min-height: 84vh; }
}

/* celular: botões empilhados e em largura cheia (melhor toque) */
@media (max-width: 520px) {
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { width: 100%; text-align: center; }
  .cta-final__in { flex-direction: column; align-items: flex-start; gap: 18px; }
  .cta-final__botoes { flex-direction: column; width: 100%; }
  .cta-final__botoes .btn { width: 100%; text-align: center; }
  .modelos-swiper .swiper-button-prev,
  .modelos-swiper .swiper-button-next { display: none; } /* no touch, arrasta */
}

/* respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .scroll-ind { display: none !important; }
  html.js-anim [data-reveal],
  html.js-anim [data-reveal-item] { opacity: 1; transform: none; }
}
