/* =========================================================
   PADARIA MARELI — estilos
   Paleta inspirada no logotipo: creme, marrom espresso,
   caramelo e vermelho escuro (vinho).
   ========================================================= */

:root {
  --cream:        #F8F2E4;
  --cream-soft:   #FCF8EE;
  --sand:         #EFE4CC;
  --sand-line:    #E2D3B4;
  --ink:          #2C231B;   /* marrom quase preto — textos/títulos */
  --brown:        #4A3A2C;
  --brown-soft:   #6B5744;
  --caramel:      #C08A3A;
  --caramel-deep: #A96F27;
  --wine:         #7E2B22;   /* vermelho escuro — CTA principal */
  --wine-deep:    #6A231C;
  --wpp:          #1FA855;
  --wpp-deep:     #128C43;

  --shadow-sm: 0 2px 8px rgba(44, 35, 27, .08);
  --shadow-md: 0 12px 30px rgba(44, 35, 27, .12);
  --shadow-lg: 0 24px 60px rgba(44, 35, 27, .18);

  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1160px;

  --ff-display: "Fraunces", Georgia, "Times New Roman", serif;
  --ff-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Reset base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--ff-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  /* textura discreta de "farinha/papel" */
  background-image:
    radial-gradient(circle at 20% 15%, rgba(192,138,58,.05), transparent 45%),
    radial-gradient(circle at 85% 70%, rgba(126,43,34,.04), transparent 45%);
  background-attachment: fixed;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.center { text-align: center; }

h1, h2, h3, h4 { font-family: var(--ff-display); font-weight: 500; line-height: 1.12; color: var(--ink); letter-spacing: -.01em; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.8rem); }
h3 { font-size: 1.3rem; }

/* ---------- Eyebrow (motivo do banner tracejado do logo) ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--ff-body); font-weight: 800;
  text-transform: uppercase; letter-spacing: .16em;
  font-size: .74rem; color: var(--caramel-deep);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 0;
  border-top: 2px dashed currentColor; opacity: .6;
}
.eyebrow-light { color: #F4D9A6; }
.eyebrow-light::before { border-color: #F4D9A6; }

.section-head { max-width: 640px; margin: 0 auto 46px; text-align: center; }
.section-head .eyebrow { justify-content: center; }
.section-sub { color: var(--brown-soft); margin-top: 12px; font-size: 1.05rem; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--ff-body); font-weight: 800; font-size: .98rem;
  padding: 13px 26px; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  line-height: 1; text-align: center;
}
.btn .ico { width: 20px; height: 20px; fill: currentColor; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--wine); color: #FDF6EC; box-shadow: 0 8px 20px rgba(126,43,34,.28); }
.btn-primary:hover { background: var(--wine-deep); box-shadow: 0 12px 26px rgba(126,43,34,.34); }

.btn-outline { background: transparent; color: var(--brown); border-color: var(--sand-line); }
.btn-outline:hover { border-color: var(--caramel); color: var(--caramel-deep); background: var(--cream-soft); }

.btn-outline-light { background: rgba(255,255,255,.08); color: #FFF; border-color: rgba(255,255,255,.7); backdrop-filter: blur(2px); }
.btn-outline-light:hover { background: #FFF; color: var(--ink); }

.btn-wpp { background: var(--wpp); color: #FFF; box-shadow: 0 8px 20px rgba(31,168,85,.28); }
.btn-wpp:hover { background: var(--wpp-deep); }

.btn-block { width: 100%; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(248,242,228,.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); border-color: var(--sand-line); background: rgba(248,242,228,.95); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 52px; height: 52px; border-radius: 12px; object-fit: cover; box-shadow: var(--shadow-sm); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--ff-display); font-weight: 600; font-size: 1.28rem; color: var(--ink); }
.brand-sub { font-size: .7rem; text-transform: uppercase; letter-spacing: .18em; color: var(--caramel-deep); font-weight: 700; }

.main-nav { display: flex; align-items: center; gap: 26px; }
.main-nav > a:not(.btn) {
  font-weight: 700; font-size: .96rem; color: var(--brown); position: relative; padding: 4px 0;
}
.main-nav > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--caramel); transition: width .22s ease;
}
.main-nav > a:not(.btn):hover { color: var(--ink); }
.main-nav > a:not(.btn):hover::after { width: 100%; }
.nav-cta { padding: 10px 18px; font-size: .9rem; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
}
.menu-toggle span { width: 26px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .28s ease, opacity .2s ease; }
.menu-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(30,22,16,.82) 0%, rgba(30,22,16,.5) 42%, rgba(30,22,16,.12) 78%),
    linear-gradient(0deg, rgba(30,22,16,.7) 0%, rgba(30,22,16,0) 55%);
}
.hero-content { position: relative; padding-bottom: 8vh; padding-top: 120px; max-width: 720px; }
.hero h1 { color: #FFF6E8; font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-weight: 500; }
.hero-lead { color: #F3E6D3; font-size: clamp(1.05rem, 1.6vw, 1.25rem); margin-top: 18px; max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

/* ---------- Destaques ---------- */
.destaques { margin-top: -46px; position: relative; z-index: 5; padding-bottom: 30px; }
.destaques-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  background: var(--cream-soft); border: 1px solid var(--sand-line);
  border-radius: 22px; padding: 30px; box-shadow: var(--shadow-md);
}
.destaque { text-align: center; padding: 8px 6px; }
.destaque-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--sand); color: var(--wine); margin-bottom: 12px;
}
.destaque-ico svg { width: 30px; height: 30px; fill: currentColor; }
.destaque h3 { font-size: 1.12rem; margin-bottom: 4px; }
.destaque p { font-size: .92rem; color: var(--brown-soft); }

/* ---------- Sobre ---------- */
.sobre { padding: 80px 0; }
.sobre-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.sobre-text h2 { margin-bottom: 18px; }
.sobre-text p { color: var(--brown-soft); margin-bottom: 16px; font-size: 1.06rem; }
.sobre-text .btn { margin-top: 8px; }
.sobre-media { position: relative; }
.sobre-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; object-fit: cover; }
.sobre-badge {
  position: absolute; bottom: -18px; left: -18px;
  background: var(--wine); color: #FBEAD9; font-weight: 800;
  padding: 12px 20px; border-radius: 999px; font-size: .88rem;
  box-shadow: var(--shadow-md); letter-spacing: .02em;
}

/* ---------- Produtos ---------- */
.produtos { padding: 80px 0; background: var(--sand); border-top: 1px solid var(--sand-line); border-bottom: 1px solid var(--sand-line); }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cat-card {
  background: var(--cream-soft); border: 1px solid var(--sand-line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .22s ease, box-shadow .22s ease;
  display: flex; flex-direction: column;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.cat-media { aspect-ratio: 4 / 3; overflow: hidden; }
.cat-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-card:hover .cat-media img { transform: scale(1.06); }
.cat-body { padding: 20px 22px 24px; }
.cat-body h3 { margin-bottom: 7px; }
.cat-body p { color: var(--brown-soft); font-size: .96rem; }
.cat-link { display: inline-block; margin-top: 12px; font-weight: 800; color: var(--wine); }
.cat-link:hover { color: var(--wine-deep); }
.cat-card-wide { grid-column: span 3; }
.cat-card-wide { flex-direction: row; }
.cat-card-wide .cat-media { flex: 0 0 42%; aspect-ratio: auto; }
.cat-card-wide .cat-body { align-self: center; }

/* ---------- Mais queridos ---------- */
.queridos { padding: 80px 0; }
.queridos-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 40px; }
.querido { position: relative; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.querido img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; transition: transform .5s ease; }
.querido:hover img { transform: scale(1.07); }
.querido figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 26px 14px 12px; color: #FFF; font-weight: 800; font-size: .96rem;
  background: linear-gradient(0deg, rgba(28,20,14,.85), transparent);
}

/* ---------- Encomendas ---------- */
.encomendas { padding: 84px 0; background: var(--ink); color: #F3E6D3; }
.encomendas-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.encomendas-media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.encomendas-text .eyebrow { color: var(--caramel); }
.encomendas-text .eyebrow::before { border-color: var(--caramel); }
.encomendas-text h2 { color: #FFF6E8; margin-bottom: 16px; }
.encomendas-text > p { color: #E7D6C0; font-size: 1.06rem; }
.enc-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; margin: 22px 0; }
.enc-list li { position: relative; padding-left: 24px; color: #EBDCC6; font-weight: 600; }
.enc-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 9px; height: 9px; background: var(--caramel); transform: rotate(45deg);
}
.enc-note { font-size: .95rem; color: #C9B79E; margin-bottom: 22px; font-style: italic; }

/* ---------- Experiência ---------- */
.experiencia { position: relative; min-height: 60vh; display: flex; align-items: center; overflow: hidden; }
.exp-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.exp-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(28,20,14,.8), rgba(28,20,14,.35)); }
.exp-content { position: relative; max-width: 620px; padding: 60px 22px; }
.exp-content h2 { color: #FFF6E8; }
.exp-content p { color: #F1E3CF; font-size: 1.15rem; margin-top: 16px; }

/* ---------- Instagram ---------- */
.insta { padding: 80px 0; background: var(--sand); border-top: 1px solid var(--sand-line); }
.insta-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 36px; }
.insta-item { border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); position: relative; }
.insta-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform .5s ease, filter .3s ease; }
.insta-item:hover img { transform: scale(1.08); filter: brightness(.9); }

/* ---------- Localização ---------- */
.local { padding: 80px 0; }
.local-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 44px; align-items: stretch; }
.info-block { margin-bottom: 26px; }
.info-block h3 { color: var(--wine); font-size: 1.05rem; margin-bottom: 6px; }
.info-block address { font-style: normal; color: var(--brown); line-height: 1.7; }
.info-block a { color: var(--brown); border-bottom: 1px solid var(--sand-line); }
.info-block a:hover { color: var(--wine); }
.horarios li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--sand-line); color: var(--brown); }
.horarios li span:last-child { font-weight: 800; color: var(--ink); }
.local-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.local-map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); min-height: 420px; border: 1px solid var(--sand-line); }
.local-map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; display: block; }

/* ---------- Contato ---------- */
.contato { padding: 80px 0 90px; background: var(--sand); border-top: 1px solid var(--sand-line); }
.contato-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 50px; align-items: start; }
.contato-intro { position: sticky; top: 110px; }
.contato-intro h2 { margin-bottom: 14px; }
.contato-intro p { color: var(--brown-soft); font-size: 1.06rem; }
.contato-form {
  background: var(--cream-soft); padding: 30px; border-radius: var(--radius);
  border: 1px solid var(--sand-line); box-shadow: var(--shadow-md);
}
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 800; font-size: .9rem; margin-bottom: 6px; color: var(--brown); }
.field input, .field textarea {
  width: 100%; padding: 13px 15px; font-family: var(--ff-body); font-size: 1rem;
  border: 1.5px solid var(--sand-line); border-radius: var(--radius-sm);
  background: #FFFDF8; color: var(--ink); transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(192,138,58,.18);
}
.field textarea { resize: vertical; }
.field.invalid input, .field.invalid textarea { border-color: var(--wine); }
.err { display: block; color: var(--wine); font-size: .82rem; font-weight: 700; margin-top: 5px; min-height: 1em; }
.form-hint { text-align: center; margin-top: 14px; font-weight: 700; color: var(--wpp-deep); min-height: 1em; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--ink); color: #D9C7AF; padding-top: 56px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand img { width: 60px; height: 60px; border-radius: 12px; margin-bottom: 14px; }
.footer-name { font-family: var(--ff-display); font-size: 1.4rem; color: #FFF6E8; font-weight: 600; }
.footer-tag { font-size: .95rem; margin-top: 6px; max-width: 260px; color: #C9B79E; }
.footer-col h4 { color: #FFF6E8; font-family: var(--ff-body); font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: .82rem; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 9px; font-size: .96rem; }
.footer-col a { color: #D9C7AF; transition: color .18s ease; }
.footer-col a:hover { color: var(--caramel); }
.footer-contato li { line-height: 1.6; }
.footer-bottom { border-top: 1px solid rgba(217,199,175,.18); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 20px 0; font-size: .88rem; color: #B8A488; }
.credit a { color: var(--caramel); font-weight: 700; }
.credit a:hover { text-decoration: underline; }

/* ---------- Flutuantes ---------- */
.float-wpp {
  position: fixed; right: 20px; bottom: 22px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wpp); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(31,168,85,.45); transition: transform .2s ease, background .2s ease;
}
.float-wpp svg { width: 30px; height: 30px; fill: #FFF; }
.float-wpp:hover { transform: scale(1.08); background: var(--wpp-deep); }

.to-top {
  position: fixed; right: 22px; bottom: 90px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--brown); color: #FFF6E8;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none;
  transform: translateY(10px); transition: opacity .25s ease, transform .25s ease, background .2s ease;
}
.to-top svg { width: 22px; height: 22px; fill: currentColor; }
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--ink); }

/* ---------- Animações de reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Foco acessível ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--caramel); outline-offset: 2px; border-radius: 4px;
}

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 980px) {
  .sobre-grid, .encomendas-grid, .local-grid, .contato-grid { grid-template-columns: 1fr; gap: 36px; }
  .contato-intro { position: static; }
  .destaques-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-card-wide { grid-column: span 2; }
  .queridos-grid { grid-template-columns: repeat(3, 1fr); }
  .insta-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 74px; }
  .header-inner { height: 66px; }
  .brand-sub { display: none; }

  /* Menu mobile */
  .main-nav {
    position: fixed; inset: 66px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--cream-soft); border-bottom: 1px solid var(--sand-line);
    box-shadow: var(--shadow-md); padding: 8px 18px 22px;
    transform: translateY(-120%); transition: transform .34s cubic-bezier(.4,0,.2,1);
    max-height: calc(100vh - 66px); overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav > a:not(.btn) { padding: 14px 4px; border-bottom: 1px dashed var(--sand-line); font-size: 1.05rem; }
  .main-nav > a:not(.btn)::after { display: none; }
  .nav-cta { margin-top: 16px; padding: 14px 18px; font-size: 1rem; }
  .menu-toggle { display: flex; }

  .hero { min-height: 88vh; }
  .hero-overlay { background:
      linear-gradient(0deg, rgba(28,20,14,.85) 0%, rgba(28,20,14,.25) 60%, rgba(28,20,14,.35) 100%); }
  .hero-content { padding-bottom: 6vh; }
  .hero-actions .btn { flex: 1 1 auto; }

  .destaques { margin-top: -30px; }
  .destaques-grid { grid-template-columns: 1fr 1fr; padding: 22px 16px; gap: 14px; }
  .sobre, .produtos, .queridos, .encomendas, .insta, .local, .contato { padding: 56px 0; }
  .sobre-media img { max-height: 420px; }
  .sobre-badge { left: 50%; transform: translateX(-50%); bottom: -16px; }

  .queridos-grid { grid-template-columns: repeat(2, 1fr); }
  .insta-grid { grid-template-columns: repeat(3, 1fr); }
  .enc-list { grid-template-columns: 1fr; }

  .cat-card-wide { flex-direction: column; }
  .cat-card-wide .cat-media { flex: none; aspect-ratio: 4/3; }

  .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: left; }
  .footer-bottom-inner { flex-direction: column; text-align: center; }

  .float-wpp { width: 52px; height: 52px; right: 16px; bottom: 16px; }
  .to-top { right: 18px; bottom: 78px; }
}

@media (max-width: 430px) {
  .destaques-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card-wide { grid-column: span 1; }
  h2 { font-size: 1.7rem; }
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
