/* =============================================================================
   DELÍCIAS DA PUPUNHA — vitrine (mobile first)
   Cores da própria marca: verde do avental, mostarda da blusa, laranja do
   fruto da pupunha e o roxo do açaí. Tipografia: Gloock (títulos) + Figtree.
   ============================================================================= */

:root {
  --mata: #1a2b1c;
  --mata-2: #233a27;
  --mata-3: #142217;
  --acai: #251029;
  --acai-2: #341a3a;
  --creme: #f6ecdc;
  --suave: rgba(246, 236, 220, 0.74);
  --linha: rgba(246, 236, 220, 0.14);
  --linha-forte: rgba(246, 236, 220, 0.42);
  --tinta: #1b140c;
  --pupunha: #f08124;
  --pupunha-claro: #ff9747;
  --mostarda: #e9b24c;
  --lilas: #cfb3e8;
  --doce: #e8bb8e;

  --serif: "Gloock", Georgia, "Times New Roman", serif;
  --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: clamp(1.125rem, 4.6vw, 2.5rem);
  --largura: 1200px;
  --topo-h: 0px;
}

@media (min-width: 960px) {
  :root { --topo-h: 72px; }
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--topo-h);
}

body {
  margin: 0;
  background: var(--mata);
  color: var(--creme);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--pupunha); outline-offset: 3px; }

.wrap {
  width: 100%;
  max-width: calc(var(--largura) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.pular {
  position: absolute;
  left: 1rem; top: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--creme);
  color: var(--tinta);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.pular:focus { transform: none; }

/* ------------------------------------------------------------- botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font: 700 1rem/1.15 var(--sans);
  text-align: center;
  text-decoration: none;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.98); }

.btn-pedir { background: var(--pupunha); color: var(--tinta); }

.btn-lg {
  min-height: 58px;
  padding-inline: 2rem;
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.btn-sm { min-height: 42px; padding: 0.5rem 1.15rem; font-size: 0.9375rem; }

.btn-ver {
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  font-size: 0.9375rem;
  color: var(--creme);
  box-shadow: inset 0 0 0 1.5px var(--linha-forte);
}

@media (hover: hover) {
  .btn-pedir:hover { background: var(--pupunha-claro); }
  .btn-ver:hover { box-shadow: inset 0 0 0 1.5px var(--creme); }
}

/* ------------------------------------------------ cabeçalho (desktop) */
.topo { display: none; }

@media (min-width: 960px) {
  .topo {
    display: block;
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(26, 43, 28, 0.92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.25s ease;
  }
  .topo.rolou { border-bottom-color: var(--linha); }
  .topo-in { display: flex; align-items: center; gap: 2.5rem; height: var(--topo-h); }
  .topo-marca { font-family: var(--serif); font-size: 1.5rem; line-height: 1; text-decoration: none; }
  .topo-nav { display: flex; gap: 2rem; margin-left: auto; }
  .topo-nav a { padding: 0.5rem 0; font-weight: 600; color: var(--suave); text-decoration: none; transition: color 0.2s ease; }
  .topo-nav a:hover { color: var(--creme); }
}

/* ---------------------------------------------------------------- hero */
.hero { padding: clamp(1.75rem, 7vw, 3.5rem) 0 clamp(3rem, 9vw, 5.5rem); }

.hero-in { display: grid; gap: 2.25rem; }

.hero-texto {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
  text-align: center;
}

.hero-logo { width: 104px; height: 104px; border-radius: 50%; }

.hero h1 {
  max-width: 12ch;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 10.2vw, 4.9rem);
  line-height: 1.02;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.hero-acoes {
  display: grid;
  justify-items: center;
  gap: 0.25rem;
  width: 100%;
  margin-top: 0.5rem;
}
.hero-acoes .btn { width: 100%; max-width: 360px; }

.hero-link {
  display: inline-block;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--suave);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.hero-link:hover { color: var(--creme); }

.hero-vitrine {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(0.625rem, 3vw, 1.25rem);
  width: 100%;
  max-width: 480px;
  margin-inline: auto;
}

.capsula {
  aspect-ratio: 3 / 5;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mata-2);
}
.capsula:nth-child(2) { margin-bottom: 14%; }
.capsula img { width: 100%; height: 100%; object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
  .capsula { animation: sobe 0.9s cubic-bezier(0.2, 0.75, 0.25, 1) both; }
  .capsula:nth-child(1) { animation-delay: 0.05s; }
  .capsula:nth-child(2) { animation-delay: 0.18s; }
  .capsula:nth-child(3) { animation-delay: 0.31s; }
}

@keyframes sobe {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 960px) {
  .hero { padding-top: 3.5rem; }
  .hero-in {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: 3rem;
  }
  .hero-texto { justify-items: start; gap: 1.5rem; text-align: left; }
  .hero-logo { width: 132px; height: 132px; }
  .hero-acoes {
    grid-auto-flow: column;
    justify-content: start;
    align-items: center;
    gap: 1.25rem;
    width: auto;
  }
  .hero-acoes .btn { width: auto; }
  .hero-vitrine { max-width: 580px; margin-right: 0; }
}

/* ---------------------------------------------------------- categorias */
.categorias { padding-bottom: clamp(3.5rem, 10vw, 7rem); }

.cat-lista { display: grid; gap: 1rem; }

.cat {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 28px;
  background: var(--mata-2);
}

.cat-foto { display: block; aspect-ratio: 16 / 10; overflow: hidden; }
.cat-foto img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cat-corpo {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.35rem 1rem;
  padding: 1.1rem 1.15rem 1.25rem;
}
.cat h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 2.1rem;
  line-height: 1;
  color: var(--tom, var(--creme));
}
.cat p { grid-column: 1 / -1; color: var(--suave); font-size: 0.96875rem; }
.cat .btn { grid-column: 2; grid-row: 1; }

@media (hover: hover) {
  .cat:hover .cat-foto img { transform: scale(1.04); }
}

@media (min-width: 720px) {
  .cat-lista { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
  .cat-foto { aspect-ratio: 4 / 5; }
  .cat-corpo { grid-template-columns: 1fr; padding: 1.25rem 1.35rem 1.5rem; }
  .cat .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 0.6rem; }
}

/* ------------------------------------------------------------ vitrines */
.vitrine { padding: clamp(3.5rem, 10vw, 7rem) 0; }
.vitrine-acai { background: var(--acai); }

.vitrine-topo {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.25rem;
  margin-bottom: clamp(1.5rem, 5vw, 2.5rem);
}
.vitrine-topo p,
.bolos-titulo p { font-size: 1.0625rem; font-weight: 600; color: var(--suave); }

.palavra {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(4.25rem, 21vw, 10rem);
  line-height: 0.85;
  letter-spacing: -0.025em;
  color: var(--tom, var(--creme));
}

/* Trilho: carrossel com arraste no celular, grade no desktop */
.trilho {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 320px);
  gap: 0.875rem;
  padding: 0 var(--gutter) 0.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.trilho::-webkit-scrollbar { display: none; }
.trilho:focus-visible { outline-offset: -3px; }

@media (min-width: 900px) {
  .trilho {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-columns: auto;
    gap: 1.5rem;
    max-width: calc(var(--largura) + 2 * var(--gutter));
    margin-inline: auto;
    overflow: visible;
    scroll-snap-type: none;
  }
}

.produto {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scroll-snap-align: start;
}

.produto-foto {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 22px;
  background: var(--mata-2);
}
.vitrine-acai .produto-foto { background: var(--acai-2); }
.produto-foto img { width: 100%; height: 100%; object-fit: cover; }

.produto-nome {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  max-width: calc(100% - 1.5rem);
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  background: var(--creme);
  color: var(--tinta);
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
}

.produto .btn { width: 100%; }

/* Bolos: um produto em destaque */
.bolos-in { display: grid; gap: clamp(1.5rem, 5vw, 2.5rem); }
.bolos-titulo { display: grid; gap: 0.75rem; }
.produto-destaque { width: 100%; max-width: 400px; }

@media (min-width: 900px) {
  .bolos-in {
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    align-items: center;
    gap: 4rem;
  }
}

/* --------------------------------------------------------- encerramento */
.final {
  padding: clamp(4rem, 12vw, 8rem) 0;
  border-top: 1px solid var(--linha);
  text-align: center;
}
.final-in { display: grid; justify-items: center; gap: 1rem; }
.final h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, 13vw, 6.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.final p { font-size: clamp(1.125rem, 4.2vw, 1.375rem); color: var(--suave); }
.final .btn { width: 100%; max-width: 380px; margin-top: 1rem; }

/* --------------------------------------------------------------- rodapé */
.rodape {
  padding: 2.5rem 0 calc(2rem + 76px + env(safe-area-inset-bottom));
  background: var(--mata-3);
  color: var(--suave);
  font-size: 0.9375rem;
}
.rodape-in { display: grid; justify-items: center; gap: 1rem; text-align: center; }
.rodape img { width: 56px; height: 56px; border-radius: 50%; }
.rodape-nome { color: var(--creme); font-weight: 600; line-height: 1.4; }
.rodape a { text-underline-offset: 4px; }
.rodape a:hover { color: var(--creme); }
.rodape-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
}

@media (min-width: 960px) {
  .rodape { padding-bottom: 2.5rem; }
}

/* ---------------------------------------------------- barra inferior */
.barra {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.625rem;
  padding: 0.625rem var(--gutter) calc(0.625rem + env(safe-area-inset-bottom));
  background: rgba(20, 34, 23, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--linha);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0s linear 0.3s;
}
.barra.visivel {
  transform: none;
  visibility: visible;
  transition: transform 0.3s ease;
}
.barra-ver {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 1.2rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px var(--linha-forte);
  font-weight: 700;
  text-decoration: none;
}

@media (min-width: 960px) {
  .barra { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .barra, .cat-foto img, .btn { transition: none; }
}
