/* =========================================================
   BEM FOFINHO — Bolos e Sobremesas
   CSS vanilla, mobile-first, com custom properties
   ========================================================= */

:root {
  /* Paleta da marca */
  --color-menta: #AEDAD3;
  --color-chocolate: #5A3825;
  --color-creme: #FBF7F1;
  --color-terracota: #C97B4A;
  --color-teal: #2F7E7C;

  /* Papéis semânticos */
  --color-bg: var(--color-creme);
  --color-text: var(--color-chocolate);
  --color-text-muted: #7a5c46;
  --color-link: var(--color-teal);
  --color-border: rgba(90, 56, 37, 0.12);

  /* Tipografia */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito", system-ui, sans-serif;

  --fs-h1: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  --fs-h2: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
  --fs-h3: clamp(1.15rem, 1.05rem + 0.4vw, 1.5rem);
  --fs-body: 1rem;
  --fs-caption: 0.75rem;

  /* Espaçamento e forma */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --shadow-soft: 0 12px 30px -12px rgba(90, 56, 37, 0.25);
  --shadow-soft-lg: 0 20px 45px -18px rgba(90, 56, 37, 0.3);

  --container-width: 1160px;
  --nav-height: 76px;

  /* Padrão geométrico de corações/losangos (SVG inline, tile 80x80) */
  --pattern-on-creme:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M18 12c0-3-3.5-3-3.5 0.5 0 3 3.5 6 3.5 6s3.5-3 3.5-6C21.5 9 18 9 18 12z' fill='%235A3825' fill-opacity='0.10'/%3E%3Crect x='52' y='10' width='9' height='9' fill='%23C97B4A' fill-opacity='0.10' transform='rotate(45 56.5 14.5)'/%3E%3Cpath d='M60 46c0-3-3.5-3-3.5 0.5 0 3 3.5 6 3.5 6s3.5-3 3.5-6c0-3.5-3.5-3.5-3.5-0.5z' fill='%232F7E7C' fill-opacity='0.10'/%3E%3Crect x='10' y='50' width='9' height='9' fill='%235A3825' fill-opacity='0.08' transform='rotate(45 14.5 54.5)'/%3E%3C/svg%3E");
  --pattern-on-dark:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M18 12c0-3-3.5-3-3.5 0.5 0 3 3.5 6 3.5 6s3.5-3 3.5-6C21.5 9 18 9 18 12z' fill='%23AEDAD3' fill-opacity='0.12'/%3E%3Crect x='52' y='10' width='9' height='9' fill='%23C97B4A' fill-opacity='0.14' transform='rotate(45 56.5 14.5)'/%3E%3Cpath d='M60 46c0-3-3.5-3-3.5 0.5 0 3 3.5 6 3.5 6s3.5-3 3.5-6c0-3.5-3.5-3.5-3.5-0.5z' fill='%23FBF7F1' fill-opacity='0.10'/%3E%3Crect x='10' y='50' width='9' height='9' fill='%23AEDAD3' fill-opacity='0.10' transform='rotate(45 14.5 54.5)'/%3E%3C/svg%3E");
}

/* ---------- Reset básico ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-chocolate);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

a { color: var(--color-link); }

ul { list-style: none; margin: 0; padding: 0; }

button { font-family: inherit; cursor: pointer; }

/* Foco visível para acessibilidade */
a:focus-visible,
button:focus-visible,
.gallery-item:focus-visible {
  outline: 3px solid var(--color-teal);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section--narrow { max-width: 760px; }

@media (min-width: 768px) {
  .container { padding-inline: 2rem; }
}

/* ---------- Utilitários de texto ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: var(--fs-caption);
  color: var(--color-teal);
  margin-bottom: 0.6em;
}
.eyebrow--center { text-align: center; }

.section__title { font-size: var(--fs-h2); }
.section__title--center { text-align: center; }
.section__title--light { color: var(--color-creme); }

.section__text { color: var(--color-text-muted); max-width: 640px; }
.section__text--center { margin-inline: auto; text-align: center; }
.section__text--light { color: rgba(251, 247, 241, 0.85); }

.text-link {
  color: var(--color-teal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--color-chocolate);
  color: var(--color-creme);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover { background: #4a2c1c; box-shadow: var(--shadow-soft-lg); }

.btn--outline {
  background: transparent;
  color: var(--color-chocolate);
  border-color: var(--color-chocolate);
}
.btn--outline:hover { background: var(--color-chocolate); color: var(--color-creme); }

.btn--on-dark { color: var(--color-creme); border-color: var(--color-creme); }
.btn--on-dark:hover { background: var(--color-creme); color: var(--color-chocolate); }

.btn--lg { font-size: 1.05rem; padding: 1em 2em; }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(251, 247, 241, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.navbar__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--color-chocolate);
  flex-shrink: 0;
}

.navbar__logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-soft);
}

.navbar__brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.navbar__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 0;
}
.navbar__toggle span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--color-chocolate);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.navbar__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.navbar__nav {
  position: fixed;
  inset-inline: 0;
  top: var(--nav-height);
  background: var(--color-creme);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.5rem 1.25rem 2rem;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.navbar__nav.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.navbar__links {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-weight: 700;
}
.navbar__links a {
  text-decoration: none;
  color: var(--color-chocolate);
}
.navbar__links a.is-active { color: var(--color-terracota); }

.navbar__cta { align-self: flex-start; }

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

  .navbar__nav {
    position: static;
    flex-direction: row;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    gap: 2rem;
  }

  .navbar__links {
    flex-direction: row;
    gap: 1.75rem;
  }

  .navbar__cta { align-self: center; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block-start: calc(var(--nav-height) + 2.5rem);
  padding-block-end: 3rem;
  background: linear-gradient(180deg, #fff 0%, var(--color-creme) 60%);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

.hero__title {
  font-size: var(--fs-h1);
  font-weight: 700;
}

.hero__subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 46ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.75rem;
}

.hero__media { display: flex; justify-content: center; }

.pattern-strip {
  height: 28px;
  background-image: var(--pattern-on-creme);
  background-repeat: repeat;
  background-color: var(--color-menta);
}
.pattern-strip--footer { background-image: var(--pattern-on-dark); background-color: transparent; }

@media (min-width: 860px) {
  .hero__inner {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* ---------- Placeholders de imagem ---------- */
.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  color: var(--color-chocolate);
  background: linear-gradient(135deg, var(--color-menta), #d9efeb);
  border: 2px dashed rgba(90, 56, 37, 0.25);
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 1rem;
}

.img-placeholder--hero {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-soft-lg);
}

.img-placeholder--gallery {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  font-size: 2.5rem;
  border-style: solid;
  border-width: 1px;
}

.img-placeholder--lightbox {
  width: min(70vw, 360px);
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  font-size: 4rem;
  margin-inline: auto;
}

/* ---------- Seções genéricas ---------- */
.section {
  padding-block: 4rem;
}
.section--menta { background: var(--color-menta); }
.section--dark {
  background: var(--color-chocolate);
  color: var(--color-creme);
  padding-block-end: 0;
  position: relative;
}

/* ---------- Cards do cardápio ---------- */
.menu-grid {
  display: grid;
  gap: 1.5rem;
  margin-top: 2.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--color-creme);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft-lg);
}

.card__icon { font-size: 2.25rem; margin-bottom: 0.75rem; }
.card__title { font-size: var(--fs-h3); margin-bottom: 0.4em; }
.card__text { color: var(--color-text-muted); flex-grow: 1; }
.card__link {
  font-weight: 800;
  text-decoration: none;
  color: var(--color-terracota);
  margin-top: 0.75rem;
}
.card__link:hover { text-decoration: underline; }

/* ---------- Galeria ---------- */
.gallery-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-item {
  padding: 0;
  border: none;
  background: none;
  border-radius: var(--radius-md);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(90, 56, 37, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none; }

.lightbox__content { text-align: center; }
.lightbox__caption { color: var(--color-creme); margin-top: 1rem; font-weight: 700; }

.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: transparent;
  border: none;
  color: var(--color-creme);
  font-size: 2.5rem;
  line-height: 1;
}

/* ---------- Passo a passo ---------- */
.steps {
  margin-top: 2.5rem;
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
  text-align: center;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(3, 1fr); text-align: left; }
}

.step__number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-terracota);
  color: var(--color-creme);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.step__title { font-size: var(--fs-h3); }
.step__text { color: var(--color-text-muted); }

/* ---------- Formas de pagamento ---------- */
.payment-methods {
  margin-top: 3rem;
  text-align: center;
}
.payment-methods__label {
  font-weight: 800;
  margin-bottom: 0.75rem;
}
.payment-methods__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.payment-tag {
  background: var(--color-creme);
  color: var(--color-chocolate);
  font-weight: 800;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
}

.cta-block { text-align: center; margin-top: 2.5rem; }

/* ---------- Lojas ---------- */
.stores-grid {
  margin-top: 2.5rem;
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .stores-grid { grid-template-columns: repeat(2, 1fr); }
}

.store-card {
  background: var(--color-menta);
  border-radius: var(--radius-md);
  padding: 1.75rem;
}
.store-card__title { font-size: var(--fs-h3); }
.store-card__text { margin-bottom: 0.5em; }

.map-placeholder {
  margin-top: 2rem;
  aspect-ratio: 16 / 7;
  border-radius: var(--radius-md);
  background: repeating-linear-gradient(45deg, #eee6da, #eee6da 12px, #f5efe5 12px, #f5efe5 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-text-muted);
  border: 2px dashed rgba(90, 56, 37, 0.25);
  text-align: center;
  padding: 1rem;
}

/* ---------- Contato / Rodapé ---------- */
.contact__inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-block: 4rem 3rem;
}
.contact__logo {
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer__bottom {
  text-align: center;
  font-size: var(--fs-caption);
  color: rgba(251, 247, 241, 0.7);
  padding-block: 1.5rem;
}

/* ---------- Botão flutuante do WhatsApp ---------- */
.whatsapp-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 150;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft-lg);
  transition: transform 0.2s ease;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* ---------- Animações de entrada (IntersectionObserver) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .whatsapp-float:hover { transform: none; }
}
