/* ===== Paleta Pedacinho da Canastra (do design system) ===== */
:root {
  --grad:      linear-gradient(90deg, #C4862F 0%, #C0953E 50%, #7A3A12 100%);
  --orange:    #7A3A12;            /* ação principal — doce de leite */
  --body-bg:   #EFE2C8;            /* nata */
  --dark:      #3E2817;            /* chocolate */
  --text-gray: #5C3D24;            /* rapadura */
  --card-bg:   #F7EEDC;            /* nata clara */
  --gold:      #C0953E;            /* fio de ouro */
  --queijo:    #E2A84D;            /* casca do queijo */
  --green:     #55663B;            /* verde da serra */
  --wood:      #6B4A2E;            /* madeira */
  --border:    #C8B692;            /* palha */
  --cream:     #FBF6EA;            /* coalhada — texto sobre fundo escuro */
  --display:   "Fraunces", Georgia, serif;
  --maxw:      880px;
  --radius:    18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: "Alegreya Sans", system-ui, sans-serif;
  font-weight: 400;
  background: var(--body-bg);
  color: var(--dark);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

::selection { background: var(--queijo); color: var(--dark); }

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============================================================
   HERO — seção inteira, background cobre tudo, com parallax
   ============================================================ */
.hero {
  position: relative;
  width: 100%;
  flex-shrink: 0;                 /* não encolher como flex-item do body */
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  /* padding inferior extra: reserva a área que os cards vão "comer",
     mantendo o slogan e o indicador de scroll 100% visíveis */
  padding: 54px 24px 90px;
  overflow: hidden;
  isolation: isolate;
}

/* camada de background separada para o parallax */
.hero__bg {
  position: absolute;
  inset: -10% 0 -10% 0;           /* folga vertical para o parallax não mostrar borda */
  z-index: -1;
  background:
    url("../assets/fundo-hero.png") center / cover no-repeat,
    #EFE2C8;
  will-change: transform;         /* parallax controlado via JS (js/main.js) */
}

.hero__inner { position: relative; }

.hero__logo {
  width: 190px;
  max-width: 55%;
  height: auto;
  margin: 0 auto 20px;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(62, 40, 23, .25));
}

.hero__title {
  color: var(--text-gray);
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.9rem, 7.5vw, 2.75rem);
  line-height: 1.2;
  text-wrap: balance;             /* linhas equilibradas quando quebra sozinho */
  border-top: 2px solid var(--gold);
  display: inline-block;
  padding-top: 16px;
}

/* ===== Indicador de scroll animado ===== */
.scroll-hint {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  animation: hintFade 3s ease-in-out infinite;
}
.scroll-hint__mouse {
  width: 24px;
  height: 38px;
  border: 2px solid rgba(62, 40, 23, .65);
  border-radius: 14px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-hint__wheel {
  width: 3px;
  height: 7px;
  border-radius: 3px;
  background: var(--orange);
  animation: wheelMove 1.6s ease-in-out infinite;
}
.scroll-hint__arrow {
  width: 10px;
  height: 10px;
  border-right: 2px solid rgba(62, 40, 23, .65);
  border-bottom: 2px solid rgba(62, 40, 23, .65);
  transform: rotate(45deg);
  animation: arrowBob 1.6s ease-in-out infinite;
}
@keyframes wheelMove {
  0%   { transform: translateY(0);    opacity: 1; }
  70%  { transform: translateY(10px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 0; }
}
@keyframes arrowBob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: .5; }
  50%      { transform: rotate(45deg) translate(3px, 3px); opacity: 1; }
}
@keyframes hintFade {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}

/* ===== Estrutura do corpo ===== */
.page {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  flex: 1 0 auto;
}

/* ============================================================
   CARDS — sobem para dentro da hero (margin negativo)
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 20px 10px;
  margin-top: -40px;             /* pega só um pouco da hero */
  position: relative;
  z-index: 2;
}
.card {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(62, 40, 23, .22);
  transition: transform .35s cubic-bezier(.22,1,.36,1),
              box-shadow .35s cubic-bezier(.22,1,.36,1);
  line-height: 0;
  will-change: transform;
}
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .55s cubic-bezier(.22,1,.36,1);
}
/* hover — especificidade alta para vencer .reveal.is-visible { transform: none } */
.card.is-visible:hover,
.card:hover {
  transform: translateY(-6px) scale(1.015);
  box-shadow: 0 22px 46px rgba(62, 40, 23, .30);
  /* garante a transição rápida do hover, mesmo com a regra .reveal */
  transition: transform .35s cubic-bezier(.22,1,.36,1),
              box-shadow .35s cubic-bezier(.22,1,.36,1);
}
.card:hover img { transform: scale(1.06); }   /* leve zoom na imagem */
.card.is-visible:active,
.card:active { transform: translateY(-2px) scale(1.005); }

/* ============================================================
   CARROSSEL — vitrine de produtos
   ============================================================ */
.vitrine { padding: 34px 0 10px; }

.vitrine__cabecalho {
  padding: 0 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}
.vitrine__rotulo {
  color: var(--green);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.vitrine__titulo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.1;
  margin-top: 4px;
}

.vitrine__setas { display: flex; gap: 8px; }
.vitrine__setas button {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1.5px solid var(--wood);
  background: transparent;
  color: var(--wood);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color .15s ease, color .15s ease;
}
.vitrine__setas button:hover { background: var(--wood); color: var(--cream); }
.vitrine__setas svg { width: 16px; height: 16px; }

.trilho {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 20px 12px;
  scrollbar-width: none;
}
.trilho::-webkit-scrollbar { display: none; }

.slide {
  flex: none;
  width: calc((100% - 32px) / 3);   /* 3 slides visíveis (32px = 2 gaps) */
  scroll-snap-align: center;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card-bg);
}
.slide__foto {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;            /* foto quadrada, sem moldura */
  height: auto;
  object-fit: cover;
}
.slide__legenda {
  padding: 12px 16px 16px;
  font-size: .9375rem;
  line-height: 1.45;
  color: var(--dark);
}

.pontos {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}
.pontos button {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: background-color .15s ease, transform .15s ease;
}
.pontos button[aria-current="true"] {
  background: var(--orange);
  transform: scale(1.25);
}

/* ===== CTA final ===== */
.cta {
  text-align: center;
  padding: 40px 24px 46px;
}
.cta__title {
  color: var(--text-gray);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  line-height: 1.2;
  margin-bottom: 22px;
}
.cta__btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  padding: 15px 46px;
  border-radius: 999px;
  box-shadow: 0 8px 20px rgba(122, 58, 18, .35);
  transition: transform .3s cubic-bezier(.22,1,.36,1),
              box-shadow .3s cubic-bezier(.22,1,.36,1),
              filter .3s ease;
  will-change: transform;
}
.cta__btn.is-visible:hover,
.cta__btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 30px rgba(122, 58, 18, .45);
  filter: brightness(1.06);
  transition: transform .3s cubic-bezier(.22,1,.36,1),
              box-shadow .3s cubic-bezier(.22,1,.36,1),
              filter .3s ease;
}
.cta__btn.is-visible:active,
.cta__btn:active { transform: translateY(-1px) scale(1.01); }

/* silhueta leve da serra antes do rodapé */
.serra-rodape {
  display: block;
  flex-shrink: 0;
  width: 100%;
  height: 46px;
  color: rgba(85, 102, 59, .3);   /* verde da serra, bem suave */
}

/* ===== Rodapé (faixa gradiente) ===== */
.footer {
  flex-shrink: 0;
  background: var(--grad);
  text-align: center;
  padding: 14px 20px;
}
.footer small { color: #fff; font-weight: 500; font-size: .8rem; letter-spacing: 0; }

/* ============================================================
   ANIMAÇÕES DE ENTRADA (reveal on scroll, com stagger)
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.22,1,.36,1),
              transform .7s cubic-bezier(.22,1,.36,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* stagger entre os cards */
.cards .card:nth-child(1).reveal { transition-delay: .05s; }
.cards .card:nth-child(2).reveal { transition-delay: .15s; }
.cards .card:nth-child(3).reveal { transition-delay: .25s; }
.cards .card:nth-child(4).reveal { transition-delay: .35s; }
.cta__btn.reveal { transition-delay: .1s; }

/* respeita quem prefere menos movimento */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg { transform: none !important; }
  .scroll-hint,
  .scroll-hint__wheel,
  .scroll-hint__arrow { animation: none; }
  .card, .card img, .cta__btn { transition: none; }
  .card:hover, .cta__btn:hover { transform: none; }
  .card:hover img { transform: none; }
}

/* ===== Responsivo (celular) ===== */
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; margin-top: -35px; }
  .hero { padding-bottom: 100px; }
  .hero__logo { width: 210px; max-width: 62%; }   /* logo maior no celular */
  .hero__bg {
    background:
      url("../assets/fundo-hero-mobile.png") center / cover no-repeat,
      #EFE2C8;
  }
  .slide { width: 84vw; }          /* no celular, 1 slide por vez */
}
