/* ===========================
   VARIÁVEIS DE MARCA — Padaria Tupi Guarani
   Fonte: identidade_visual_padaria_guarani.pdf
=========================== */
:root {
  --gold: #C09C64;
  --gold-dark: #A9825A;
  --green: #575C3B;
  --bg: #F5F3EF;
  --brown: #4A2E1E;
  --text: #1A1A1A;
  --muted: #6B6B6B;
  --white: #FFFFFF;
  --gold-light: #F1E3C6;

  --font-title: 'Fraunces', serif;
  --font-label: 'Jost', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-script: 'Dancing Script', cursive;

  --radius: 6px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  animation: pageFadeIn .8s ease;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===========================
   FADE AO ROLAR (scroll reveal)
=========================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.feature-card.reveal:nth-child(2),
.categoria-card.reveal:nth-child(2),
.info-item.reveal:nth-child(2) { transition-delay: .1s; }
.feature-card.reveal:nth-child(3),
.categoria-card.reveal:nth-child(3),
.info-item.reveal:nth-child(3) { transition-delay: .2s; }
.feature-card.reveal:nth-child(4),
.categoria-card.reveal:nth-child(4),
.info-item.reveal:nth-child(4) { transition-delay: .3s; }
.categoria-card.reveal:nth-child(5) { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-content {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

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

a { text-decoration: none; color: inherit; }

h1, h2, h3, h4 { font-family: var(--font-title); color: var(--text); }

.section-header { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section-header h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 10px; }
.section-header p { color: var(--muted); }

section { padding: 80px 0; }

/* ===========================
   TRANSIÇÕES DE COR ENTRE SEÇÕES (degradê suave)
=========================== */
.sobre, .secao-destaque, .servicos, .contato, .fechamento, .footer {
  position: relative;
}
.sobre::before,
.secao-destaque::before,
.servicos::before,
.contato::before,
.fechamento::before,
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 20px;
  pointer-events: none;
  z-index: 1;
}
.sobre::before { background: linear-gradient(to bottom, rgba(0,0,0,.12), transparent); }
.secao-destaque::before { background: linear-gradient(to bottom, rgba(245,243,239,.35), transparent); }
.servicos::before { background: linear-gradient(to bottom, rgba(87,92,59,.25), transparent); }
.contato::before { background: linear-gradient(to bottom, rgba(241,227,198,.35), transparent); }
.fechamento::before { background: linear-gradient(to bottom, rgba(255,255,255,.18), transparent); }
.footer::before { background: linear-gradient(to bottom, rgba(87,92,59,.18), transparent); }

/* ===========================
   BOTÕES
=========================== */
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-body);
  transition: background .2s ease, transform .15s ease;
}
.btn-primary { background: var(--gold); color: var(--text); }
.btn-primary:hover { background: var(--green); color: var(--white); transform: translateY(-2px) scale(1.03); }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-secondary:hover { background: rgba(255,255,255,.15); }
.btn-whatsapp { background: #25D366; color: #fff; margin-top: 8px; }
.btn-whatsapp:hover { background: #1ebe5b; }
.btn-call { background: var(--green); color: #fff; }
.btn-call:hover { opacity: .9; }
.btn-maps { background: var(--brown); color: #fff; }
.btn-maps:hover { opacity: .9; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-buttons .btn-call {
  background: rgba(87, 92, 59, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
}
.hero-buttons .btn-call:hover { background: rgba(87, 92, 59, .55); opacity: 1; }
.hero-buttons .btn-maps {
  background: rgba(74, 46, 30, .35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.25);
}
.hero-buttons .btn-maps:hover { background: rgba(74, 46, 30, .55); opacity: 1; }

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-whatsapp .icon-whatsapp { flex-shrink: 0; }

/* ===========================
   BARRA SUPERIOR (topbar)
=========================== */
.topbar {
  background: var(--brown);
  color: var(--white);
  font-family: var(--font-label);
  font-size: .82rem;
  letter-spacing: .5px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar-info { display: flex; gap: 20px; flex-wrap: wrap; }
.topbar-info a { color: var(--white); }
.topbar-info a:hover { color: var(--gold); }

.topbar-whatsapp-link { text-decoration: underline; }

/* ===========================
   HEADER / NAV
=========================== */
.header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}
.logo { display: flex; align-items: center; }
.logo-img { height: 65px; width: auto; }

.footer-logo-img { height: 130px; width: auto; margin: 0 auto 14px; }
.nav-menu {
  list-style: none;
  display: flex;
  gap: 28px;
  font-family: var(--font-label);
  font-size: .92rem;
  letter-spacing: .5px;
}
.nav-menu a:hover { color: var(--gold-dark); }
.nav-cta { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text);
}

/* CTA WhatsApp do header — vidro esverdeado com brilho no hover */
.header .btn-whatsapp {
  position: relative;
  margin-top: 0;
  background: rgba(37, 211, 102, .82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 4px 16px rgba(37, 211, 102, .35);
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.header .btn-whatsapp:hover {
  background: #25D366;
  border-color: rgba(255, 255, 255, .7);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 26px rgba(37, 211, 102, .55);
}
.header .btn-whatsapp:active { transform: translateY(-1px) scale(1.02); }
.header .btn-whatsapp .icon-whatsapp { transition: transform .25s ease; }
.header .btn-whatsapp:hover .icon-whatsapp { transform: rotate(-8deg) scale(1.1); }

/* ===========================
   HERO
=========================== */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-background { position: absolute; inset: 0; z-index: -1; }
.hero-bg-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-overlay {
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(
    rgba(0,0,0,.75),
    rgba(0,0,0,.65),
    rgba(0,0,0,.75)
  );
}
.hero .container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-top: 60px;
  padding-bottom: 60px;
  justify-items: center;
  text-align: center;
}
.hero-content {
  color: var(--white);
  max-width: 640px;
  margin: 0 auto;
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 1s ease, transform 1s ease;
}
.hero-content.is-visible {
  opacity: 1;
  transform: translateX(0);
}
.hero-badge {
  display: inline-block;
  font-family: var(--font-label);
  font-size: .8rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 6px 14px;
  border-radius: 30px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  margin-bottom: 18px;
  color: var(--white);
}
.hero h1 .destaque { color: var(--gold-dark); }
.hero-subtitle {
  font-size: 1.05rem;
  margin-bottom: 28px;
  opacity: .92;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hero-buttons { margin-bottom: 34px; }
.hero-buttons.cta-row { justify-content: center; }
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; justify-content: center; }
.stat { display: flex; flex-direction: column; align-items: center; }
.stat-number { font-family: var(--font-title); font-size: 2.1rem; color: var(--gold-dark); }
.stat-label { font-family: var(--font-label); font-size: .95rem; letter-spacing: .5px; opacity: .85; }

/* ===========================
   SOBRE / INSTITUCIONAL
=========================== */
.sobre-content, .diferencial-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.sobre-image img, .diferencial-image img {
  border-radius: var(--radius);
}
.sobre-text { text-align: center; }
.sobre-text p { margin-bottom: 16px; color: var(--text); }
.sobre-text strong { color: var(--green); }

.emocional {
  font-family: var(--font-script);
  color: var(--gold-dark);
  font-size: 1.6rem;
  text-align: center;
  margin: 30px 0;
}

/* ===========================
   DIFERENCIAIS (grid de features)
=========================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.feature-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid #E7E2D8;
  text-align: center;
  overflow: hidden;
}
.feature-image {
  aspect-ratio: 4/3;
  overflow: hidden;
}
.feature-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.feature-card:hover .feature-image img { transform: scale(1.06); }
.feature-body { padding: 22px; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: .92rem; }

@media (min-width: 1024px) {
  .secao-destaque .container { max-width: 1440px; }
  .features-grid { grid-template-columns: repeat(4, 1fr); gap: 32px; }
  .feature-body { padding: 26px; }
  .feature-card h3 { font-size: 1.15rem; }
  .feature-card p { font-size: .96rem; }
}

/* ===========================
   GRID DE CATEGORIAS DE PRODUTOS
=========================== */
.categorias-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 600px) {
  .categorias-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1400px) {
  .categorias-grid { grid-template-columns: repeat(4, 1fr); }
}
.servicos { background: var(--gold-light); }
.servicos .container { max-width: 1440px; }
.categoria-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid #E7E2D8;
  overflow: hidden;
  cursor: default;
}
.categoria-image {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.categoria-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.categoria-card:hover .categoria-image img { transform: scale(1.06); }
.categoria-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,26,26,0) 40%, rgba(26,26,26,.75));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px;
}
.categoria-overlay h3 {
  color: var(--white);
  font-size: 1.1rem;
  text-align: center;
}
.categoria-desc {
  padding: 16px 18px;
  color: var(--muted);
  font-size: .92rem;
  text-align: center;
}

.produtos-nota {
  font-family: var(--font-script);
  font-size: 1.7rem;
  color: var(--gold-dark);
  text-align: center;
  margin: 40px auto 0;
  width: fit-content;
  position: relative;
  padding-bottom: 10px;
}
.produtos-nota::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .8s ease .3s, left .8s ease .3s;
}
.produtos-nota.is-visible::after {
  width: 100%;
  left: 0;
}

/* seção secundária (fundo verde) */
.secao-destaque {
  background: linear-gradient(180deg, rgba(0,0,0,.4), rgba(0,0,0,.25)), var(--green);
  color: var(--white);
}
.secao-destaque .section-header h2,
.secao-destaque .section-header p { color: var(--white); }
.secao-destaque .section-header p { opacity: .85; }

/* ===========================
   LOCALIZAÇÃO / MAPA
=========================== */
.contato { background: var(--white); padding: 48px 0; }
.contato .section-header { margin-bottom: 32px; }
.contato-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  text-align: center;
}
.info-item:last-child { margin-bottom: 0; }
.info-item h4 { font-size: 1rem; margin-bottom: 4px; }
.info-item p { color: var(--muted); }
.mapa-embed { text-align: center; }
.mapa-embed .btn-maps { background: var(--gold); color: var(--text); }
.mapa-embed .btn-maps:hover { background: var(--green); color: var(--white); transform: translateY(-2px) scale(1.03); }
.mapa-embed iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: var(--radius);
}

/* ===========================
   FECHAMENTO EMOCIONAL
=========================== */
.fechamento {
  background: var(--green);
  color: var(--white);
  text-align: center;
}
.fechamento h2 { color: var(--white); }
.fechamento p { max-width: 600px; margin: 16px auto 30px; opacity: .92; }

.fechamento .cta-row .btn {
  min-width: 220px;
  height: 54px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background-color .25s ease, border-color .25s ease, transform .25s ease, box-shadow .25s ease;
  margin-top: 0;
}
.fechamento .cta-row .btn-whatsapp {
  background: rgba(37, 211, 102, .18);
  border-color: rgba(37, 211, 102, .65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.fechamento .cta-row .btn-whatsapp:hover {
  background: rgba(37, 211, 102, .32);
  border-color: rgba(37, 211, 102, .9);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.fechamento .cta-row .btn-secondary {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.fechamento .cta-row .btn-secondary:hover {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.85);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

/* ===========================
   FOOTER
=========================== */
.footer {
  background: var(--white);
  color: var(--text);
  border-top: 1px solid #E7E2D8;
  padding: 50px 0 20px;
}
.footer-content { text-align: center; margin-bottom: 30px; transform: translateX(-14px); }
.footer-logo { font-family: var(--font-title); font-size: 1.4rem; margin-bottom: 10px; }
.footer-links { display: flex; justify-content: center; gap: 22px; margin: 20px 0; font-family: var(--font-label); font-size: .9rem; flex-wrap: wrap; }
.footer-links a { color: var(--text); }
.footer-links a:hover { color: var(--gold); }
.footer-social { display: flex; justify-content: center; gap: 14px; margin-top: 16px; }
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  color: var(--gold-dark);
  background: transparent;
  transition: background-color .25s ease, color .25s ease, transform .25s ease;
}
.social-btn:hover {
  background: var(--gold);
  color: var(--white);
  transform: translateY(-3px);
}
.footer-bottom {
  border-top: 1px solid #E7E2D8;
  padding-top: 18px;
  text-align: center;
  font-size: .82rem;
  color: var(--muted);
  opacity: 1;
}

/* ===========================
   RESPONSIVO
=========================== */
@media (min-width: 768px) {
  .sobre-content, .diferencial-content { grid-template-columns: 1fr 1fr; }
  .contato-content { grid-template-columns: 1fr 1fr; }
  .hero-overlay {
    background: linear-gradient(
      rgba(0,0,0,.72),
      rgba(0,0,0,.64),
      rgba(0,0,0,.72)
    );
  }
  /* revela a marca completa do saco de pão (logo + "Tupi Guarani" + "desde 1956") */
  .hero-bg-image { object-position: 0% 15%; }
}

/* O menu horizontal completo (logo + 6 itens + botão CTA) só cabe numa
   linha a partir de ~890px — por isso o nav some para hambúrguer até 1024px,
   cobrindo tablets em retrato (768–1023px) que quebrariam o menu em 2 linhas. */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .nav-cta { display: inline-flex; }

  /* Aumenta o texto do header em 15% no desktop */
  .nav-menu {
    font-size: 1.058rem;
    flex: 1;
    justify-content: center;
    margin: 0 40px;
  }
  .nav-cta.btn { font-size: 1.15rem; }

  .topbar .container { justify-content: center; gap: 60px; }

  /* Faz topbar + header + hero caberem exatamente numa tela de desktop,
     sem precisar rolar para ver o final da hero (stats). */
  .above-fold { min-height: 100vh; display: flex; flex-direction: column; }
  .hero { flex: 1 1 auto; min-height: 0; padding: 0; }
  .hero .container { padding-top: 24px; padding-bottom: 24px; }
}

@media (max-width: 1023px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    top: 0; right: -100%;
    width: 75%; max-width: 340px; height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 90px 30px;
    gap: 22px;
    transition: right .3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,.1);
  }
  .nav-menu.active { right: 0; }

  .topbar .container { flex-direction: column; gap: 2px; }
  .topbar-info { justify-content: center; text-align: center; gap: 4px; row-gap: 0; }

  /* Telefone e WhatsApp centralizados como par, com espaço entre eles para não confundir os dois links */
  .topbar-contact {
    justify-content: center;
    align-items: center;
    gap: 40px;
  }
}

@media (max-width: 767px) {
  section { padding: 56px 0; }

  .nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 9px 0; }
  .nav-toggle { grid-column: 1; grid-row: 1; justify-self: start; }
  .logo { grid-column: 2; grid-row: 1; justify-self: center; }
  .logo-img { height: 68px; }

  .hero-content { max-width: 100%; }
  .stat-number { color: var(--white); }

  .footer-content { transform: none; }
}