/** Route CSS — home (carregado só na rota correspondente) */

/* Hero LCP: next/image object-fit — alinhado ao antigo background-position */
.hero-cover-lcp {
  object-position: 46% top;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Mobile — hero ocupa só 1 viewport abaixo do header; corta excesso inferior da foto */
@media (max-width: 767px) {
  .hero-lcp-section {
    height: calc(100svh - var(--top-offset, 72px));
    max-height: calc(100svh - var(--top-offset, 72px));
    min-height: 0;
  }

  .hero-lcp-section picture {
    overflow: hidden;
  }

  .hero-cover-lcp {
    object-position: 46% 8%;
    transform: none;
  }

  .hero-lcp-bg-paint {
    background-position: 46% 8%;
    background-size: cover;
  }
}
.home-hero-brand-mark {
  margin-bottom: 0.75rem;
}

@media (max-width: 767px) {
  .home-hero-brand-mark {
    margin-bottom: 0.5rem;
  }
}

/* Hero OWN YOUR PATH — 1 linha no desktop; quebra fluida no mobile */
.home-hero-own-path {
  font-family: var(--font-bebas), ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(2.875rem, 9.25vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.015em;
  white-space: normal;
  text-wrap: balance;
  color: #ffffff;
  -webkit-text-stroke: 8px #0d1b2a;
  paint-order: stroke fill;
  text-shadow:
    0 0 0 #0d1b2a,
    3px 0 0 #0d1b2a,
    -3px 0 0 #0d1b2a,
    0 3px 0 #0d1b2a,
    0 -3px 0 #0d1b2a;
  margin: 0 0 1.25rem 0;
}

/* Hero LCP — pintura imediata via background + picture nativo (sem blur do next/image). */
.hero-lcp-section picture img {
  display: block;
}

@media (max-width: 767px) {
  .home-hero-own-path {
    font-size: clamp(1.75rem, 14.5vw, 4.5rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
    white-space: normal;
    text-wrap: balance;
    -webkit-text-stroke: 2px #0d1b2a;
    paint-order: stroke fill;
    text-shadow: none;
    margin-bottom: 1rem;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .hero-cover-lcp {
    object-position: 42% center;
  }
}

/** Abaixo da dobra — menos trabalho de layout/paint no caminho crítico (FCP/INP). */
#diferenciais,
#produto,
.home-cv-section {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}
/* ——— Mobile-first: animações leves (menos JS que framer-motion) + content-visibility ——— */
.home-destaques-grid {
  row-gap: clamp(2.5rem, 10vw, 4rem);
  column-gap: clamp(1rem, 3vw, 1.5rem);
}
@media (min-width: 640px) {
  .home-destaques-grid {
    row-gap: clamp(3rem, 8vw, 5rem);
    column-gap: clamp(1.25rem, 2.5vw, 1.5rem);
  }
}
@media (min-width: 1024px) {
  .home-destaques-grid {
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    row-gap: 2.5rem;
    column-gap: 1.5rem;
  }
}
@media (min-width: 1280px) {
  .home-destaques-grid {
    flex-wrap: nowrap;
    row-gap: 0;
  }
}

/* Destaques — ritmo editorial (assimétrico), não grelha de marketplace */
.home-destaques-section {
  padding-top: clamp(4rem, 12vw, 7rem);
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
}

.home-destaques-section__inner {
  display: flex;
  flex-direction: column;
}

.home-destaques-heading-wrap {
  max-width: min(100%, 28rem);
}

.home-destaques-editorial {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.home-destaques-editorial__item {
  width: fit-content;
  max-width: 100%;
}

.home-destaques-editorial__item--lead {
  align-self: flex-start;
}

.home-destaques-editorial__item--trail {
  align-self: flex-end;
  margin-top: clamp(3.5rem, 12vw, 7rem);
  max-width: min(100%, 38rem);
}

@media (min-width: 768px) {
  .home-destaques-editorial__item--lead {
    max-width: min(92%, 36rem);
    padding-left: clamp(0rem, 2vw, 1.5rem);
  }

  .home-destaques-editorial__item--trail {
    max-width: min(72%, 30rem);
    margin-right: clamp(0rem, 4vw, 3rem);
  }
}

@keyframes home-hero-enter-kf {
  from {
    opacity: 0;
    transform: translate3d(0, var(--p-reveal-distance), 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.home-hero-enter {
  animation: home-hero-enter-kf var(--p-duration-reveal) var(--p-ease-out) both;
}

/** Legado — home Etapa 4 usa só `.home-hero-enter`; evitar cascata por secção. */
@keyframes home-section-fade-kf {
  from {
    opacity: 0;
    transform: translate3d(0, var(--p-reveal-distance, 12px), 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.home-section-fade-in {
  animation: home-section-fade-kf var(--p-duration-reveal, 480ms) var(--p-ease-out, ease-out) both;
}

.testimonial-card-fade {
  animation: home-section-fade-kf 0.48s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .home-hero-enter,
  .home-section-fade-in,
  .testimonial-card-fade {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    animation-delay: 0s !important;
  }
}

.home-hero-cta-wrap {
  touch-action: manipulation;
}

/* Hero — Ver lançamento: borda azul estável (sem halo branco no hover) */
a.home-hero-launch-btn,
a.home-hero-launch-btn:hover,
a.home-hero-launch-btn:focus,
a.home-hero-launch-btn:focus-visible,
a.home-hero-launch-btn:active {
  box-sizing: border-box;
  border: 2px solid var(--p-brand, #0d1b2a) !important;
  background-color: #ffffff !important;
  color: #0d1b2a !important;
  outline: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  gap: 0.5rem;
}

.home-hero-launch-btn-label {
  user-select: none;
  -webkit-user-select: none;
}

.home-hero-launch-btn-symbol {
  width: auto;
  height: 1.75rem;
  margin-left: 0.125rem;
  transform: translateY(1px);
  transition: transform var(--p-duration-base, 250ms) var(--p-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

@media (min-width: 640px) {
  a.home-hero-launch-btn {
    gap: 0.625rem;
  }

  .home-hero-launch-btn-symbol {
    height: 2rem;
    margin-left: 0.25rem;
    transform: translateY(2px);
  }
}

a.home-hero-launch-btn {
  transition:
    transform var(--p-duration-base, 250ms) var(--p-ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
    opacity var(--p-duration-base, 250ms) var(--p-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

a.home-hero-launch-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px) scale(1.01);
}

a.home-hero-launch-btn:hover .home-hero-launch-btn-symbol {
  transform: translateY(1px) translateX(2px) scale(1.01);
}

@media (min-width: 640px) {
  a.home-hero-launch-btn:hover .home-hero-launch-btn-symbol {
    transform: translateY(2px) translateX(2px) scale(1.01);
  }
}

a.home-hero-launch-btn:active {
  opacity: 0.88;
  transform: translateY(0) scale(1);
}

a.home-hero-launch-btn:active .home-hero-launch-btn-symbol {
  transform: translateY(1px) translateX(0) scale(1);
}

@media (min-width: 640px) {
  a.home-hero-launch-btn:active .home-hero-launch-btn-symbol {
    transform: translateY(2px) translateX(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  a.home-hero-launch-btn {
    transition: opacity var(--p-duration-base, 250ms) var(--p-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
  }

  a.home-hero-launch-btn:hover,
  a.home-hero-launch-btn:active {
    transform: none;
  }

  a.home-hero-launch-btn:hover .home-hero-launch-btn-symbol,
  a.home-hero-launch-btn:active .home-hero-launch-btn-symbol {
    transform: translateY(1px);
  }

  @media (min-width: 640px) {
    a.home-hero-launch-btn:hover .home-hero-launch-btn-symbol,
    a.home-hero-launch-btn:active .home-hero-launch-btn-symbol {
      transform: translateY(2px);
    }
  }

  .home-hero-launch-btn-symbol {
    transition: none;
  }
}

.home-cv-section {
  content-visibility: auto;
  contain-intrinsic-size: 1px 520px;
}

/* Diferenciais mobile — bloco de copy colado ao conteúdo (sem reserva de altura fixa) */
.diferencial-copy-slot {
  min-height: 0;
}

.diferencial-copy-title-slot {
  min-height: 0;
  text-align: center;
}

.diferencial-copy-body-slot {
  /* Reserva 2 linhas — slide 1 alinha verticalmente com Conforto Real / Identidade */
  min-height: calc(2 * 1.375 * clamp(0.8125rem, 3.2vw, 1rem));
  text-align: center;
}

/* Diferenciais mobile — 1 viewport (copy + foto + dots), sem scroll interno */
@media (max-width: 767px) {
  .home-diferenciais-mobile {
    height: calc(100svh - var(--top-offset, 72px));
    max-height: calc(100svh - var(--top-offset, 72px));
    overflow: hidden;
  }

  .home-diferenciais-mobile .diferenciais-carousel-root {
    height: 100%;
    min-height: 0;
  }

  .home-diferenciais-mobile .diferencial-copy-slot {
    flex-shrink: 0;
    padding-top: 0.75rem;
  }

  .home-diferenciais-mobile .diferencial-copy-body-slot {
    min-height: calc(2 * 1.25 * clamp(0.75rem, 3vw, 0.875rem));
  }

  /* Shell SSR — foto directa no flex column da viewport */
  .home-diferenciais-mobile > .diferenciais-carousel-root[aria-hidden] > .diferencial-photo-frame {
    aspect-ratio: unset;
    flex: 1 1 0;
    min-height: 0;
    height: auto;
  }

  /* Carrossel Embla — foto dentro do slide precisa de cadeia flex própria */
  .home-diferenciais-mobile .diferenciais-carousel-root[role='region'] article {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
  }

  .home-diferenciais-mobile .diferenciais-carousel-root[role='region'] .diferencial-photo-frame {
    aspect-ratio: unset;
    flex: 1 1 0;
    min-height: 0;
    width: 100%;
    height: auto;
  }
}

/* Diferenciais mobile — Ken Burns no slide ativo; foto visível imediatamente (sem fade-in). */
.diferencial-slide-image {
  cursor: default;
  opacity: 1;
  transform: scale(1);
  transition: transform 8s var(--p-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
  will-change: transform;
}

.diferencial-slide-image.is-loaded {
  opacity: 1;
}

.diferencial-slide-image.is-active {
  transform: scale(1.03);
}

@keyframes diferencial-copy-in {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.diferencial-slide-copy-enter {
  animation: diferencial-copy-in 300ms var(--p-ease-out, cubic-bezier(0.22, 1, 0.36, 1)) both;
}

/* Diferenciais mobile — indicadores com progresso (4s, pausa fora da viewport). */
.diferencial-carousel-dots {
  gap: 8px;
}

.diferencial-carousel-dot {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: var(--p-radius-sm, 4px);
  cursor: pointer;
  transition: width 250ms var(--p-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.diferencial-carousel-dot.is-active {
  width: 32px;
}

.diferencial-carousel-dot-track {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-color: rgba(13, 27, 42, 0.16);
}

.diferencial-carousel-dot.is-active .diferencial-carousel-dot-track {
  background-color: rgba(13, 27, 42, 0.1);
}

.diferencial-carousel-dot-fill {
  position: absolute;
  inset: 0;
  width: 0;
  border-radius: inherit;
  background-color: #0d1b2a;
  animation: diferencial-dot-fill var(--diferencial-dot-duration, 4s) linear forwards;
  will-change: width;
}

.diferencial-carousel-dot-fill.is-static {
  width: 0;
  animation: none;
}

.diferencial-carousel-dot.is-paused .diferencial-carousel-dot-fill {
  animation-play-state: paused;
}

@keyframes diferencial-dot-fill {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .diferencial-slide-image,
  .diferencial-slide-image.is-active,
  .diferencial-slide-image.is-loaded {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .diferencial-slide-copy-enter {
    animation: none !important;
  }

  .diferencial-carousel-dot {
    transition: none !important;
  }

  .diferencial-carousel-dot-fill {
    animation: none !important;
    width: 100% !important;
  }
}

/* Scroll reveal — estado inicial antes de entrar no viewport */
.reveal-pending {
  opacity: 0;
  transform: translate3d(0, var(--p-reveal-distance, 12px), 0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal-pending {
    opacity: 1;
    transform: none;
  }
}

@keyframes destaques-shop-arrow-kf {
  0% {
    transform: translateY(0);
    opacity: 0.35;
  }
  100% {
    transform: translateY(4px);
    opacity: 0.8;
  }
}

.destaques-shop-arrow {
  animation: destaques-shop-arrow-kf 700ms var(--p-ease-in-out, cubic-bezier(0.45, 0, 0.55, 1)) infinite alternate;
}

.destaques-shop-arrow-icon {
  width: 1.5rem;
  height: 1.5rem;
}

@media (min-width: 640px) {
  .destaques-shop-arrow-icon {
    width: 1.75rem;
    height: 1.75rem;
  }
}

@media (max-width: 639px) {
  @keyframes destaques-shop-arrow-kf {
    0% {
      transform: translateY(0);
      opacity: 0.35;
    }
    100% {
      transform: translateY(8px);
      opacity: 0.8;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .destaques-shop-arrow {
    animation: none;
    opacity: 0.7;
    transform: none;
  }
}

/* Mantém CTA da hero sem micro movimento de escala */
.no-cta-scale,
.no-cta-scale:hover,
.no-cta-scale:active {
  transform: none !important;
}

/* Home: newsletter — botão texto editorial (sem fundo) */
button.newsletter-submit-btn,
button.newsletter-submit-btn:hover,
button.newsletter-submit-btn:focus,
button.newsletter-submit-btn:focus-visible,
button.newsletter-submit-btn:active {
  background-color: transparent !important;
  color: #0d1b2a !important;
  box-shadow: none !important;
}

/* Home: newsletter — Inscrever-se como link (sem caixa) */
button.newsletter-link-btn,
button.newsletter-link-btn:hover,
button.newsletter-link-btn:focus,
button.newsletter-link-btn:focus-visible,
button.newsletter-link-btn:active {
  background-color: transparent !important;
  background: transparent !important;
  color: #0d1b2a !important;
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
}

a.destaques-shop-bridge-btn,
a.destaques-shop-bridge-btn:hover,
a.destaques-shop-bridge-btn:focus,
a.destaques-shop-bridge-btn:focus-visible,
a.destaques-shop-bridge-btn:active {
  background-color: var(--p-brand, #0d1b2a) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: none !important;
  line-height: 1 !important;
}

@media (max-width: 767px) {
  a.destaques-shop-bridge-btn,
  a.destaques-shop-bridge-btn:hover,
  a.destaques-shop-bridge-btn:focus,
  a.destaques-shop-bridge-btn:focus-visible,
  a.destaques-shop-bridge-btn:active {
    padding: 0 3.5rem !important;
    min-height: 36px !important;
    height: 36px !important;
    font-size: 1.125rem !important;
  }
}

@media (min-width: 768px) {
  a.destaques-shop-bridge-btn,
  a.destaques-shop-bridge-btn:hover,
  a.destaques-shop-bridge-btn:focus,
  a.destaques-shop-bridge-btn:focus-visible,
  a.destaques-shop-bridge-btn:active {
    padding: 0 4rem !important;
    min-height: 36px !important;
    height: 36px !important;
    font-size: 1.375rem !important;
    line-height: 1 !important;
  }
}

@media (min-width: 1024px) {
  a.destaques-shop-bridge-btn,
  a.destaques-shop-bridge-btn:hover,
  a.destaques-shop-bridge-btn:focus,
  a.destaques-shop-bridge-btn:focus-visible,
  a.destaques-shop-bridge-btn:active {
    padding: 0 4.5rem !important;
    min-height: 36px !important;
    height: 36px !important;
    font-size: 1.5rem !important;
  }
}

/* Destaques home — Comprar compacto alinhado ao preço */
button.product-card-comprar-btn,
button.product-card-comprar-btn:hover,
button.product-card-comprar-btn:focus,
button.product-card-comprar-btn:focus-visible,
button.product-card-comprar-btn:active,
a.product-card-comprar-btn,
a.product-card-comprar-btn:hover,
a.product-card-comprar-btn:focus,
a.product-card-comprar-btn:focus-visible,
a.product-card-comprar-btn:active {
  padding: 0.375rem 0.75rem !important;
  min-height: 27px !important;
  line-height: 1 !important;
  transform-origin: center center;
}

button.product-card-comprar-btn.product-card-comprar-btn--featured,
button.product-card-comprar-btn.product-card-comprar-btn--featured:hover,
button.product-card-comprar-btn.product-card-comprar-btn--featured:focus,
button.product-card-comprar-btn.product-card-comprar-btn--featured:focus-visible,
button.product-card-comprar-btn.product-card-comprar-btn--featured:active,
a.product-card-comprar-btn.product-card-comprar-btn--featured,
a.product-card-comprar-btn.product-card-comprar-btn--featured:hover,
a.product-card-comprar-btn.product-card-comprar-btn--featured:focus,
a.product-card-comprar-btn.product-card-comprar-btn--featured:focus-visible,
a.product-card-comprar-btn.product-card-comprar-btn--featured:active {
  padding: 0.3125rem 0.875rem !important;
  min-height: 1.625rem !important;
  line-height: 1 !important;
}

button.product-card-comprar-btn.product-card-comprar-btn--featured:active {
  padding: 0.3125rem 0.875rem !important;
  min-height: 1.625rem !important;
}

@media (max-width: 767px) {
  button.product-card-comprar-btn,
  a.product-card-comprar-btn,
  button.product-card-comprar-btn.product-card-comprar-btn--featured,
  a.product-card-comprar-btn.product-card-comprar-btn--featured {
    min-height: 2.75rem !important;
    min-width: 2.75rem !important;
  }

  button.product-card-comprar-btn.product-card-comprar-btn--featured:active,
  a.product-card-comprar-btn.product-card-comprar-btn--featured:active {
    min-height: 2.75rem !important;
  }
}
