/* ================================================================
   DOCES DA BIA — STYLESHEET
   ----------------------------------------------------------------
   Sumário:
     1.  Tokens
     2.  Reset & Base
     3.  Utilitários
     4.  Nav (brand + lang + toggle + menu)
     5.  Lang switcher
     6.  Hamburger animado (bars -> X)
     7.  Menu mobile com animação suave
     8.  Hero
     9.  Botões de ação
     10. Sobre
     11. Galeria
     12. Diferenciais
     13. Depoimentos
     14. Contato & Mapa
     15. Rodapé
     16. Animações utilitárias
     17. Responsividade
   ================================================================ */


/* ============ 1. TOKENS ============ */
:root {
  --c-bg:          #faf6f1;
  --c-surface:     #ffffff;
  --c-surface-alt: #f3ece3;
  --c-ink:         #1f1416;
  --c-ink-soft:    #5a4a4d;
  --c-muted:       #8a7a7d;
  --c-line:        #ece2d6;

  --c-primary:     #b8455e;
  --c-primary-d:   #8e2f47;
  --c-accent:      #c9a26a;
  --c-whatsapp:    #128c5e;

  --f-display: 'Fraunces', 'Times New Roman', serif;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --s-1: .25rem;  --s-2: .5rem;  --s-3: .75rem;  --s-4: 1rem;
  --s-5: 1.5rem;  --s-6: 2rem;   --s-7: 3rem;    --s-8: 4rem;  --s-9: 6rem;

  --r-sm: 8px;  --r-md: 14px;  --r-lg: 22px;  --r-full: 999px;

  --sh-sm: 0 1px 3px rgba(31,20,22,.06), 0 1px 2px rgba(31,20,22,.04);
  --sh-md: 0 6px 20px rgba(31,20,22,.08), 0 2px 6px rgba(31,20,22,.04);
  --sh-lg: 0 20px 50px rgba(31,20,22,.12);

  --container: 1100px;
  --container-narrow: 640px;

  --nav-h: 64px;

  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}


/* ============ 2. RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }


/* ============ 3. UTILITÁRIOS ============ */
.icon { width: 1.25em; height: 1.25em; flex: none; }

.eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--s-3);
}

.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--s-9) var(--s-5);
  text-align: center;
}
.section--alt {
  background: var(--c-surface-alt);
  max-width: none;
  border-block: 1px solid var(--c-line);
}
.section--alt > * { max-width: var(--container); margin-inline: auto; }

.section__title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--c-ink);
}
.section__lead {
  max-width: var(--container-narrow);
  margin: var(--s-4) auto 0;
  color: var(--c-ink-soft);
  font-size: 1.05rem;
}


/* ============ 4. NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 241, .85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--c-line); background: rgba(250,246,241,.95); }

.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 var(--s-5);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.nav__brand {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -.01em;
  margin-right: auto;
}


/* ============ 5. LANG SWITCHER (sempre visível) ============ */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
  box-shadow: var(--sh-sm);
}
.lang__btn {
  font-family: var(--f-body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--c-muted);
  padding: 6px 10px;
  border-radius: var(--r-full);
  line-height: 1;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang__btn:hover { color: var(--c-ink); }
.lang__btn.is-active {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(184,69,94,.35);
}
.lang__sep {
  width: 1px; height: 14px;
  background: var(--c-line);
}


/* ============ 6. HAMBURGUER ANIMADO ============ */
.nav__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-sm);
  color: var(--c-ink);
  transition: background .2s var(--ease);
}
.nav__toggle:hover { background: var(--c-surface-alt); }

.nav__toggle-bars {
  position: relative;
  width: 22px;
  height: 16px;
}
.nav__toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .35s var(--ease-out), opacity .2s var(--ease), top .35s var(--ease-out);
}
.nav__toggle-bars span:nth-child(1) { top: 0; }
.nav__toggle-bars span:nth-child(2) { top: 7px; }
.nav__toggle-bars span:nth-child(3) { top: 14px; }

.nav__toggle.is-open .nav__toggle-bars span:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}
.nav__toggle.is-open .nav__toggle-bars span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__toggle.is-open .nav__toggle-bars span:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}


/* ============ 7. MENU MOBILE — animação suave ============ */
.nav__menu {
  display: flex;
  flex-direction: column;
  gap: var(--s-1);
}
.nav__menu a {
  display: block;
  padding: var(--s-3) var(--s-4);
  font-weight: 500;
  font-size: 1rem;
  color: var(--c-ink-soft);
  border-radius: var(--r-sm);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__menu a:hover { color: var(--c-primary); background: var(--c-surface-alt); }
.nav__menu a.is-active { color: var(--c-primary); }


/* ============ 8. HERO ============ */
.hero {
  position: relative;
  text-align: center;
  padding: var(--s-9) var(--s-5) var(--s-8);
  overflow: hidden;
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(184,69,94,.12), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(201,162,106,.18), transparent 55%);
}
.hero__content { position: relative; z-index: 1; max-width: var(--container-narrow); margin: 0 auto; }

.hero__avatar {
  width: 140px; height: 140px;
  margin: 0 auto var(--s-5);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--c-surface);
  box-shadow: var(--sh-md);
}
.hero__avatar img { width: 100%; height: 100%; object-fit: cover; }

.hero__title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 6.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: var(--s-3);
}
.hero__tagline { color: var(--c-primary); font-weight: 500; font-size: 1.05rem; }
.hero__sub { color: var(--c-muted); margin-top: var(--s-2); font-size: .95rem; }

.hero__flags {
  margin-top: var(--s-5);
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-4);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-full);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--c-ink-soft);
}
.hero__flags .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--c-accent); }


/* ============ 9. BOTÕES DE AÇÃO ============ */
.actions {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--s-5) var(--s-8);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.btn {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  color: var(--c-ink);
  text-align: left;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  box-shadow: var(--sh-sm);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: transparent; }
.btn:active { transform: translateY(0); }

.btn__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--c-surface-alt);
  color: var(--c-ink);
  flex: none;
}
.btn__icon .icon { width: 20px; height: 20px; }
.btn__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.btn__label { font-weight: 600; font-size: 1rem; }
.btn__sub { font-size: .82rem; color: var(--c-muted); }
.btn__chev { color: var(--c-muted); transition: transform .2s var(--ease), color .2s var(--ease); }
.btn__chev .icon { width: 18px; height: 18px; }
.btn:hover .btn__chev { transform: translateX(4px); color: var(--c-primary); }

.btn--primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn--primary .btn__icon { background: rgba(255,255,255,.18); color: #fff; }
.btn--primary .btn__sub  { color: rgba(255,255,255,.78); }
.btn--primary .btn__chev { color: rgba(255,255,255,.78); }
.btn--primary:hover { background: var(--c-primary-d); border-color: var(--c-primary-d); }
.btn--primary:hover .btn__chev { color: #fff; }
.btn--whatsapp .btn__icon { background: rgba(18,140,94,.12); color: var(--c-whatsapp); }
.btn--ghost .btn__icon    { background: var(--c-surface-alt); color: var(--c-ink); }


/* ============ 10. SOBRE ============ */
.section--about .section__title { max-width: var(--container-narrow); margin-inline: auto; }


/* ============ 11. GALERIA ============ */
.gallery {
  margin-top: var(--s-6);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.gallery__item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-surface-alt);
  box-shadow: var(--sh-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.gallery__item:hover { transform: translateY(-4px); box-shadow: var(--sh-md); }
.gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  transition: opacity .5s var(--ease), transform .6s var(--ease);
}
.gallery__item img.loaded { opacity: 1; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: var(--s-5) var(--s-4) var(--s-3);
  font-size: .85rem;
  font-weight: 500;
  color: #fff;
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(31,20,22,.7));
}


/* ============ 12. DIFERENCIAIS ============ */
.features {
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  text-align: left;
}
.feature {
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }

.feature__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: var(--r-sm);
  background: var(--c-surface-alt);
  color: var(--c-primary);
  margin-bottom: var(--s-4);
}
.feature__icon .icon { width: 22px; height: 22px; }
.feature h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; margin-bottom: var(--s-2); }
.feature p { color: var(--c-ink-soft); font-size: .95rem; }


/* ============ 13. DEPOIMENTOS ============ */
.testimonials {
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  text-align: left;
}
.testimonial {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-6) var(--s-5) var(--s-5);
}
.testimonial__quote {
  position: absolute;
  top: -14px; left: var(--s-5);
  width: 36px; height: 36px;
  padding: 6px;
  border-radius: var(--r-full);
  background: var(--c-primary);
  color: #fff;
}
.testimonial p {
  font-family: var(--f-display); font-style: italic;
  font-size: 1.05rem; line-height: 1.5;
  color: var(--c-ink); margin-bottom: var(--s-3);
}
.testimonial cite { font-style: normal; font-size: .85rem; color: var(--c-muted); font-weight: 500; }


/* ============ 14. CONTATO & MAPA ============ */
.contact {
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  text-align: left;
}
.contact__info { display: flex; flex-direction: column; gap: var(--s-5); }
.contact__row { display: flex; gap: var(--s-4); align-items: flex-start; }
.contact__row > .icon { width: 22px; height: 22px; color: var(--c-primary); margin-top: 4px; }
.contact__row strong { display: block; font-size: .95rem; margin-bottom: 2px; }
.contact__row p { color: var(--c-ink-soft); font-size: .9rem; }

.map {
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--sh-md);
  border: 1px solid var(--c-line);
  aspect-ratio: 16 / 11;
}
.map iframe { width: 100%; height: 100%; border: 0; }


/* ============ 15. RODAPÉ ============ */
.footer {
  border-top: 1px solid var(--c-line);
  padding: var(--s-7) var(--s-5);
  text-align: center;
  background: var(--c-surface);
}
.footer__brand { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; margin-bottom: var(--s-2); }
.footer__copy { font-size: .82rem; color: var(--c-muted); }


/* ============ 16. ANIMAÇÕES UTILITÁRIAS ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}


/* ============ 17. RESPONSIVIDADE ============
   Mobile-first:
     - base: mobile (lang sempre visível ao lado do menu)
     - 640px: tablet (grids 2 col)
     - 900px: desktop (nav horizontal)
   ================================================ */

/* ---------- MOBILE: menu suspenso com animação ---------- */
@media (max-width: 899px) {
  .nav__menu {
    /* Painel fora da tela por padrão */
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(255,255,255,.98);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--c-line);
    padding: var(--s-4) var(--s-5) var(--s-6);

    /* Estado fechado: invisível, levemente acima, não clicável */
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    visibility: hidden;
    box-shadow: 0 12px 32px rgba(31,20,22,.10);

    transition:
      opacity .32s var(--ease-out),
      transform .42s var(--ease-out),
      visibility 0s linear .42s;
  }

  /* Estado aberto: visível, no lugar, clicável */
  .nav.is-open .nav__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
    transition:
      opacity .32s var(--ease-out),
      transform .42s var(--ease-out),
      visibility 0s linear 0s;
  }

  /* Itens do menu: stagger ao abrir/fechar */
  .nav__menu li {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
  }
  .nav.is-open .nav__menu li {
    opacity: 1;
    transform: translateY(0);
  }

  .nav__menu a {
    padding: var(--s-3) var(--s-4);
    font-size: 1rem;
    border-bottom: 1px solid transparent;
  }
}

@media (max-width: 380px) {
  :root { --s-5: 1.1rem; --s-7: 2rem; --s-9: 3.5rem; }
  .nav__inner { padding: 0 var(--s-4); gap: var(--s-2); }
  .nav__brand { font-size: 1.05rem; }
  .lang__btn { padding: 5px 8px; font-size: .68rem; }
  .hero__avatar { width: 120px; height: 120px; }
}

@media (min-width: 640px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: var(--s-4); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .testimonials { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  /* Nav horizontal no desktop */
  .nav__toggle { display: none; }

  .nav__menu {
    display: flex !important;
    flex-direction: row;
    gap: var(--s-1);
    position: static;
    background: none;
    padding: 0;
    box-shadow: none;
    height: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    visibility: visible;
    border: 0;
    margin-right: var(--s-4);
  }
  .nav__menu li { opacity: 1; transform: none; }
  .nav__menu a { padding: var(--s-2) var(--s-3); font-size: .95rem; }

  .nav__inner { gap: var(--s-4); }

  .hero { padding-block: var(--s-9); }
  .hero__avatar { width: 160px; height: 160px; }

  .gallery { grid-template-columns: repeat(4, 1fr); }
  .features { grid-template-columns: repeat(4, 1fr); }
  .testimonials { grid-template-columns: repeat(3, 1fr); }

  .contact {
    grid-template-columns: 1fr 1.4fr;
    gap: var(--s-7);
    align-items: start;
  }
}
