/* =========================================================
   Sodiê Doces Registro — Landing Page
   Mobile-first (base 375px). Regras de desktop entram depois
   via media query min-width: 992px.
========================================================= */

:root {
  /* Paleta oficial (brandbook Sodiê, fev/2022) */
  --marrom: #5B3523;
  --marrom-escuro: #472316;
  --creme: #FDE1C6;
  --creme-escuro: #F3D2A4;
  --terra: #A34B26;
  --terra-escura: #723516;
  --amarelo: #FECF53;
  --amarelo-escuro: #F7A940;
  --branco: #FFFFFF;
  --whatsapp: #25D366; /* exclusivo dos CTAs de WhatsApp */

  /* Tipografia */
  --fonte-script: 'Alex Brush', cursive;
  --fonte-titulo: 'Baloo 2', sans-serif;
  --fonte-corpo: 'Nunito Sans', sans-serif;
  --fonte-legenda: 'Barlow Condensed', sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--fonte-corpo);
  color: var(--marrom-escuro);
  background: var(--branco);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

.section-title {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--marrom);
  text-align: center;
  margin: 0;
}

/* ---------------------------------------------------------
   Componentes compartilhados (identidade da marca)
--------------------------------------------------------- */

/* Eyebrow em "selo" — linguagem do brandbook (pág. 32) */
.section-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin: 0 auto 1.75rem;
}

.eyebrow {
  display: inline-block;
  font-family: var(--fonte-legenda);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terra);
  background: var(--creme);
  padding: 0.3em 1em;
  border-radius: 999px;
}

/* Divisão orgânica entre seções (aresta de confeitaria) */
.wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  line-height: 0;
  pointer-events: none;
  z-index: 3;
}

.wave svg {
  display: block;
  width: 100%;
  height: 42px;
}

.wave--branco path { fill: var(--branco); }
.wave--creme path { fill: var(--creme); }
.wave--marrom path { fill: var(--marrom); }
.wave--marrom-escuro path { fill: var(--marrom-escuro); }

/* Textura "fio de chocolate" (brandbook pág. 28) — fundo de seções escuras */
.thread-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  color: var(--creme);
  opacity: 0.1;
  pointer-events: none;
}

.thread-bg svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Textura "delícias" (adesivo da marca) — fundo discreto das seções brancas */
.texture-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("../assets/img/textura/delicias.jpg");
  background-repeat: repeat;
  background-size: 620px auto;
  opacity: 0.1;
  pointer-events: none;
}

/* Movimento — reveal ao rolar.
   Só esconde quando o JS ativa (.js-reveal no <html>); sem JS, tudo aparece normalmente. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------
   Botões
--------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: var(--fonte-titulo);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.9em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.97); }

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--branco);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
}

.btn--whatsapp:hover { opacity: 0.92; }

.btn--outline {
  background: transparent;
  color: var(--marrom);
  border-color: var(--marrom);
}

.btn--outline:hover { background: rgba(91, 53, 35, 0.06); }

.btn__icon-whatsapp {
  width: 1.3em;
  height: 1.3em;
  flex-shrink: 0;
}

/* ---------------------------------------------------------
   1. HERO
--------------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--branco) 0%, var(--creme) 100%);
  padding: 2rem 1.25rem 4.5rem;
}

.hero__inner {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero__logo {
  width: 200px;
  height: auto;
  margin-bottom: 1.5rem;
}

/* Carrossel do banner principal */
.hero__carousel {
  width: 100%;
  max-width: 320px;
  margin-bottom: 1.75rem;
}

.hero__carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  border-radius: 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hero__carousel-track::-webkit-scrollbar { display: none; }

.hero__carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  aspect-ratio: 4 / 3;
}

.hero__carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.hero__carousel-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--creme-escuro);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.hero__carousel-dots .dot.is-active {
  background: var(--terra);
  opacity: 1;
  transform: scale(1.2);
}

.hero__title {
  font-family: var(--fonte-titulo);
  font-weight: 800;
  font-size: 2rem;
  line-height: 1.15;
  color: var(--marrom);
  margin: 0 0 2.4rem;
}

/* "Registro!" com destaque script + flourish desenhado à mão (brandbook pág. 26/30) */
.hero__title-accent {
  position: relative;
  display: inline-block;
  font-family: var(--fonte-script);
  font-weight: 400;
  font-size: 2.7rem;
  line-height: 0.9;
  color: var(--terra);
  padding: 0 0.1em;
}

.hero__flourish {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -0.55em;
  width: 105%;
  height: 0.5em;
  color: var(--amarelo-escuro);
  overflow: visible;
}

.hero__flourish use {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: draw-flourish 1.4s ease 0.4s forwards;
}

@keyframes draw-flourish {
  to { stroke-dashoffset: 0; }
}

.hero__subtitle {
  font-size: 1.05rem;
  color: var(--marrom-escuro);
  margin: 0 0 1.75rem;
  max-width: 34ch;
}

@media (prefers-reduced-motion: reduce) {
  .hero__flourish use { animation: none; stroke-dashoffset: 0; }
}

.hero__ctas {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  width: 100%;
  max-width: 320px;
}

/* ---------------------------------------------------------
   2. DIFERENCIAIS — carrossel estilo "stories" do Instagram
--------------------------------------------------------- */
.diferenciais {
  position: relative;
  background: var(--branco);
  padding: 2.75rem 0 2.5rem;
}

.diferenciais .section-head { padding: 0 1.25rem; }

/* Conteúdo acima da textura de fundo */
.diferenciais > .section-head,
.diferenciais > .diferenciais__row {
  position: relative;
  z-index: 1;
}

.galeria > .section-head,
.galeria > .galeria__grid,
.galeria > .galeria__hashtag {
  position: relative;
  z-index: 1;
}

.diferenciais__row {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.25rem 1.25rem 0.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.diferenciais__row::-webkit-scrollbar { display: none; }

.story-avatar {
  flex: 0 0 auto;
  width: 122px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
  scroll-snap-align: start;
}

.story-avatar__ring {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  padding: 3px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amarelo), var(--terra) 55%, var(--marrom-escuro));
  box-shadow: 0 6px 16px -6px rgba(163, 75, 38, 0.45);
}

.story-avatar__inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--branco);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.story-avatar__inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.story-avatar p {
  margin: 0;
  font-family: var(--fonte-titulo);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
  color: var(--marrom);
}

/* ---------------------------------------------------------
   3. GALERIA
--------------------------------------------------------- */
.galeria {
  position: relative;
  background: var(--branco);
  padding: 1rem 1.25rem 4.5rem;
}

.galeria__grid {
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.galeria__item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--creme);
}

.galeria__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.galeria__item p {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.6rem 0.5rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--branco);
  text-align: center;
  background: linear-gradient(0deg, rgba(71, 35, 22, 0.85) 0%, rgba(71, 35, 22, 0) 100%);
}

.galeria__hashtag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  margin: 1.9rem 0 0;
}

.galeria__coracao {
  width: 130px;
  height: auto;
  margin-bottom: 0.1rem;
}

/* Letra caixa oficial "#MomentoSodiê" (arte da marca) */
.galeria__momento {
  width: min(270px, 74%);
  height: auto;
}

/* ---------------------------------------------------------
   4. CTA INTERMEDIÁRIO
--------------------------------------------------------- */
.cta-mid {
  position: relative;
  background: var(--marrom);
  padding: 4rem 1.25rem 4.5rem;
  text-align: center;
  overflow: hidden;
}

.cta-mid__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-mid__title {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--branco);
  margin: 0;
}

.cta-mid__title em {
  font-family: var(--fonte-script);
  font-style: normal;
  font-weight: 400;
  font-size: 2.4rem;
  color: var(--amarelo);
  margin-left: 0.1em;
}

/* ---------------------------------------------------------
   5. PROVA SOCIAL
--------------------------------------------------------- */
.prova-social {
  position: relative;
  background: var(--creme);
  padding: 3.5rem 1.25rem 4.5rem;
  text-align: center;
}

.prova-social__content {
  max-width: 34ch;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.prova-social__text {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--marrom-escuro);
}

.prova-social__text strong { color: var(--marrom); }

.prova-social__script {
  margin: 0;
  font-family: var(--fonte-script);
  font-size: 2rem;
  line-height: 1;
  color: var(--terra);
}

/* ---------------------------------------------------------
   6. LOCALIZAÇÃO
--------------------------------------------------------- */
.localizacao {
  position: relative;
  background: var(--branco);
  padding: 3rem 1.25rem 4.5rem;
}

.localizacao__mapa {
  max-width: 480px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.localizacao__mapa iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------------------------------------------------------
   7. CTA FINAL
--------------------------------------------------------- */
.cta-final {
  position: relative;
  background: var(--marrom-escuro);
  padding: 4rem 1.25rem 3.5rem;
  text-align: center;
  overflow: hidden;
}

.cta-final__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.cta-final__logo { width: 160px; }

.cta-final__title {
  font-family: var(--fonte-titulo);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--branco);
  margin: 0;
  max-width: 26ch;
}

/* ---------------------------------------------------------
   8. RODAPÉ
--------------------------------------------------------- */
.rodape {
  background: var(--marrom-escuro);
  padding: 2.5rem 1.25rem 2rem;
}

.rodape__inner {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.rodape__social {
  display: flex;
  gap: 0.9rem;
}

.rodape__social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--creme);
  color: var(--marrom);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.rodape__social-icon:hover { opacity: 0.85; transform: translateY(-2px); }

.rodape__social-icon[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.rodape__social-icon svg { width: 22px; height: 22px; }

.rodape__info {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--creme);
}

.rodape__info a {
  color: var(--creme);
  text-decoration: underline;
}

.rodape__copy {
  margin: 0;
  font-family: var(--fonte-legenda);
  font-size: 0.85rem;
  color: var(--creme-escuro);
  opacity: 0.8;
}

/* ---------------------------------------------------------
   9. WHATSAPP FLUTUANTE
--------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whatsapp);
  color: var(--branco);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  z-index: 999;
}

.whatsapp-float svg { width: 30px; height: 30px; }

/* =========================================================
   DESKTOP (min-width: 992px)
   Mesma ordem de seções, reorganizada em colunas.
========================================================= */
@media (min-width: 992px) {

  .section-title { font-size: 2.1rem; }
  .eyebrow { font-size: 0.85rem; }
  .wave svg { height: 58px; }

  /* 1. HERO — 2 colunas (texto à esquerda, carrossel à direita) */
  .hero { padding: 3.5rem 2rem 6rem; }

  .hero__inner {
    max-width: 1080px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas:
      "logo  media"
      "title media"
      "sub   media"
      "ctas  media";
    column-gap: 3.5rem;
    row-gap: 0.3rem;
    align-items: center;
    text-align: left;
  }

  .hero__logo { grid-area: logo; margin: 0 0 0.6rem; }
  .hero__carousel {
    grid-area: media;
    width: 100%;
    max-width: 440px;
    margin: 0;
    justify-self: end;
  }
  .hero__title { grid-area: title; font-size: 2.9rem; margin: 0 0 2.6rem; }
  .hero__title-accent { font-size: 3.6rem; }
  .hero__subtitle { grid-area: sub; max-width: 42ch; font-size: 1.15rem; }
  .hero__ctas {
    grid-area: ctas;
    flex-direction: row;
    max-width: none;
    margin-top: 1.4rem;
    gap: 1rem;
  }

  /* 2. DIFERENCIAIS — linha única de 4, centralizada */
  .diferenciais { padding: 4rem 2rem 3.5rem; }
  .diferenciais__row {
    max-width: 1000px;
    margin: 0 auto;
    justify-content: center;
    gap: 2.5rem;
    overflow: visible;
  }
  .story-avatar { width: 168px; }
  .story-avatar__ring { width: 120px; height: 120px; }
  .story-avatar p { font-size: 0.95rem; }

  /* 3. GALERIA — grid de 3 colunas (6 itens = 2 linhas iguais) */
  .galeria { padding: 1.5rem 2rem 6rem; }
  .galeria__grid {
    max-width: 1000px;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
  .galeria__item p { font-size: 1rem; padding: 0.7rem 0.5rem 0.6rem; }
  .galeria__coracao { width: 150px; }
  .galeria__momento { width: 320px; }

  /* 4. CTA INTERMEDIÁRIO */
  .cta-mid { padding: 5.5rem 2rem 6rem; }
  .cta-mid__title { font-size: 2rem; }
  .cta-mid__title em { font-size: 3rem; }

  /* 5. PROVA SOCIAL */
  .prova-social { padding: 5rem 2rem 6rem; }
  .prova-social__content { max-width: 46ch; }
  .prova-social__text { font-size: 1.5rem; }
  .prova-social__script { font-size: 2.6rem; }

  /* 6. LOCALIZAÇÃO — mapa largo, centralizado */
  .localizacao { padding: 4rem 2rem 6rem; }
  .localizacao__mapa { max-width: 940px; aspect-ratio: 16 / 7; }

  /* 7. CTA FINAL */
  .cta-final { padding: 5.5rem 2rem 4.5rem; }
  .cta-final__logo { width: 190px; }
  .cta-final__title { font-size: 1.9rem; }

  /* 8. RODAPÉ — colunas */
  .rodape { padding: 3.5rem 2rem 2.5rem; }
  .rodape__inner {
    max-width: 1080px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    gap: 2.5rem;
  }
  .rodape__info { align-items: flex-start; }

  /* Botão flutuante um pouco maior */
  .whatsapp-float { width: 62px; height: 62px; right: 1.6rem; bottom: 1.6rem; }
  .whatsapp-float svg { width: 34px; height: 34px; }
}
