/* ============================================================
   Edna Padaria — Vitrine
   Mundo visual único e quente (bege/verde). Sem dark mode: escolha
   deliberada, coerente com a identidade artesanal da marca.
   ============================================================ */

:root {
  /* Marca */
  --verde:        #3B4C2F;
  --verde-deep:   #2C3A23;
  --bege:         #FEECD3;
  --bege-2:       #FFF6E9;
  --trigo:        #C79A54;   /* dourado de crosta — só filetes/ornamentos */

  /* Neutros com viés quente (nunca cinza puro) */
  --tinta:        #2E3A24;   /* texto sobre claro */
  --tinta-suave:  #5A6249;
  --creme:        #FEECD3;   /* texto sobre escuro */
  --creme-suave:  rgba(254,236,211,0.76);

  /* Tipografia */
  --display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --corpo:   "EB Garamond", Georgia, serif;
  --rotulo:  "Jost", "Trebuchet MS", sans-serif;

  /* Ritmo */
  --wrap: 1160px;
  --pad-x: clamp(1.25rem, 5vw, 4rem);
  --radius: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: var(--corpo);
  color: var(--tinta);
  background: var(--bege);
  font-size: clamp(1.02rem, 0.55vw + 0.92rem, 1.2rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- Fundo vivo (canvas Three.js) ---------- */
#bg-canvas,
#bg-fallback {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}
#bg-canvas { display: block; }
#bg-fallback {
  background-size: cover;
  background-position: center;
}

/* Véu de gradiente sobre o pão: garante legibilidade e coesão de marca.
   Claro no topo (hero respira), escurece rumo ao verde no fim da jornada. */
#bg-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(254,236,211,0.28) 0%, rgba(254,236,211,0) 55%),
    linear-gradient(180deg,
      rgba(44,58,35,0.34) 0%,
      rgba(44,58,35,0.12) 18%,
      rgba(254,236,211,0.10) 42%,
      rgba(59,76,47,0.30) 74%,
      rgba(44,58,35,0.62) 100%);
}

/* ---------- Loader ---------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--verde);
  transition: opacity 0.8s ease;
}
#loader.is-done { opacity: 0; pointer-events: none; }
.loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  color: var(--creme);
  padding: 2rem;
}
.loader__label {
  font-family: var(--rotulo);
  letter-spacing: 0.42em;
  font-size: 0.82rem;
  text-indent: 0.42em;
}
.loader__sub {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--creme-suave);
}
.loader__track {
  width: min(240px, 60vw);
  height: 2px;
  background: rgba(254,236,211,0.22);
  overflow: hidden;
}
.loader__fill {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--trigo);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.2s ease-out;
}

/* Conteúdo entra suave quando pronto */
body:not(.is-ready) main,
body:not(.is-ready) .nav,
body:not(.is-ready) .footer { opacity: 0; }
body.is-ready main,
body.is-ready .nav,
body.is-ready .footer { opacity: 1; transition: opacity 0.9s ease 0.15s; }

/* ---------- Tipografia utilitária ---------- */
.eyebrow {
  font-family: var(--rotulo);
  text-transform: uppercase;
  letter-spacing: 0.32em;
  font-size: 0.72rem;
  color: var(--trigo);
  margin: 0 0 1.1rem;
}
.eyebrow--center { text-align: center; }
.eyebrow--light { color: rgba(254,236,211,0.85); }

.section__title,
.hero__title,
.cta-card__title,
.bread-card__name {
  font-family: var(--display);
  font-weight: 500;
  text-wrap: balance;
  line-height: 1.08;
  margin: 0;
}

/* ---------- Navegação ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem var(--pad-x);
  background: linear-gradient(180deg, rgba(44,58,35,0.55), rgba(44,58,35,0));
}
.nav__brand {
  text-decoration: none;
  color: var(--creme);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  line-height: 1;
}
.nav__mark { font-family: var(--display); font-size: 1.6rem; font-weight: 600; }
.nav__mark-sub {
  font-family: var(--rotulo);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.66rem;
  color: var(--creme-suave);
}
.nav__links {
  display: flex;
  gap: 1.8rem;
}
.nav__links a {
  font-family: var(--rotulo);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--creme);
  text-decoration: none;
  opacity: 0.86;
  transition: opacity 0.2s;
}
.nav__links a:hover { opacity: 1; }
.nav__cta { flex-shrink: 0; }
@media (max-width: 820px) {
  .nav__links { display: none; }
}

/* ---------- Botões ---------- */
.btn {
  --btn-pad-y: 0.85em;
  --btn-pad-x: 1.9em;
  display: inline-block;
  font-family: var(--rotulo);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  text-decoration: none;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--solid { background: var(--verde); color: var(--creme); }
.btn--solid:hover { background: var(--verde-deep); }
.btn--line { background: transparent; color: var(--verde); border-color: rgba(59,76,47,0.4); }
.btn--line:hover { border-color: var(--verde); background: rgba(59,76,47,0.06); }
.btn--ghost { background: rgba(254,236,211,0.1); color: var(--creme); border-color: rgba(254,236,211,0.4); }
.btn--ghost:hover { background: rgba(254,236,211,0.2); }
.btn--lg { --btn-pad-y: 1.05em; --btn-pad-x: 2.6em; font-size: 0.88rem; }

/* Foco acessível */
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--trigo);
  outline-offset: 3px;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 8rem var(--pad-x) 6rem;
  position: relative;
}
.hero__content { max-width: 46rem; }
.hero__title {
  color: var(--creme);
  font-size: clamp(2.9rem, 8vw, 6.4rem);
  text-shadow: 0 2px 40px rgba(20,26,14,0.45);
}
.hero__lede {
  color: var(--creme);
  max-width: 34rem;
  margin: 1.6rem auto 0;
  font-size: clamp(1.12rem, 1.4vw, 1.4rem);
  text-shadow: 0 1px 24px rgba(20,26,14,0.5);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2.4rem;
}
.hero .btn--line { color: var(--creme); border-color: rgba(254,236,211,0.5); }
.hero .btn--line:hover { border-color: var(--creme); background: rgba(254,236,211,0.1); }

.scroll-cue {
  position: absolute;
  bottom: 2.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--creme-suave);
  font-family: var(--rotulo);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.62rem;
}
.scroll-cue__line {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--trigo), transparent);
  animation: cue 2.4s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
  50%      { transform: scaleY(1);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-cue__line { animation: none; }
}

/* ---------- Seções ---------- */
.section {
  position: relative;
  padding: clamp(4.5rem, 10vw, 8rem) var(--pad-x);
}
.section__head { max-width: 40rem; margin: 0 auto clamp(2.5rem, 5vw, 4rem); text-align: center; }
.section__title { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
.section__note {
  margin: 1rem 0 0;
  font-style: italic;
  color: var(--tinta-suave);
}

/* Painel translúcido: deixa o pão aparecer atrás, mantendo leitura confortável */
.panel {
  max-width: 60rem;
  margin: 0 auto;
  background: rgba(255,246,233,0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(199,154,84,0.35);
  border-radius: var(--radius);
  padding: clamp(2rem, 5vw, 3.6rem);
  text-align: center;
  box-shadow: 0 30px 80px -50px rgba(20,26,14,0.7);
}
.section--story .section__title { font-size: clamp(1.9rem, 4vw, 3rem); margin-top: 0.2rem; }
.prose { max-width: 40rem; margin: 1.6rem auto 0; text-align: left; }
.prose p { margin: 0 0 1rem; }
.prose strong { color: var(--verde); font-weight: 600; }

/* Pilares */
.pillars {
  list-style: none;
  margin: clamp(2rem, 4vw, 3rem) auto 0;
  padding: 0;
  max-width: 60rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.pillar {
  background: rgba(59,76,47,0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--creme);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pillar__k { font-family: var(--display); font-size: 1.3rem; }
.pillar__v { font-size: 0.94rem; color: var(--creme-suave); line-height: 1.5; }
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
}

/* Divisor de trigo */
.wheat-divider {
  display: flex;
  justify-content: center;
  color: var(--trigo);
  padding: 1rem var(--pad-x);
}
.wheat-divider svg { opacity: 0.85; }

/* ---------- Catálogo ---------- */
.menu-grid {
  max-width: var(--wrap);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
@media (max-width: 900px) { .menu-grid { grid-template-columns: 1fr; max-width: 34rem; } }

.bread-card {
  background: rgba(255,246,233,0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(199,154,84,0.4);
  border-radius: var(--radius);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.bread-card::before {
  /* moldura vintage interna (nod às cantoneiras do material impresso) */
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(199,154,84,0.28);
  border-radius: 1px;
  pointer-events: none;
}
.bread-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 40px 80px -50px rgba(20,26,14,0.8);
  border-color: var(--trigo);
}
.bread-card__ico { color: var(--trigo); margin-bottom: 0.2rem; }
.bread-card__name { font-size: 2rem; color: var(--verde); }
.bread-card__desc { color: var(--tinta-suave); font-size: 0.98rem; line-height: 1.55; margin: 0; }
.bread-card__meta {
  margin: 0.4rem 0 0;
  font-family: var(--rotulo);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--tinta);
}
.price { color: var(--trigo); }

/* ---------- CTA ---------- */
.section--cta { padding-top: clamp(3rem, 6vw, 5rem); }
.cta-card {
  max-width: 46rem;
  margin: 0 auto;
  background: linear-gradient(160deg, var(--verde) 0%, var(--verde-deep) 100%);
  color: var(--creme);
  border-radius: var(--radius);
  padding: clamp(2.6rem, 6vw, 4.5rem);
  text-align: center;
  box-shadow: 0 40px 100px -50px rgba(20,26,14,0.9);
  border: 1px solid rgba(199,154,84,0.4);
}
.cta-card__title { color: var(--creme); font-size: clamp(2rem, 4.4vw, 3.1rem); }
.cta-card__lede { color: var(--creme-suave); max-width: 32rem; margin: 1.2rem auto 0; }
.cta-card__actions { margin: 2rem 0 0; }
.cta-card .btn--solid { background: var(--trigo); color: var(--verde-deep); }
.cta-card .btn--solid:hover { background: #d8ad68; }

.contacts {
  list-style: none;
  margin: 2.6rem 0 0;
  padding: 2rem 0 0;
  border-top: 1px solid rgba(254,236,211,0.2);
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 6vw, 4rem);
  flex-wrap: wrap;
}
.contacts li { display: flex; flex-direction: column; gap: 0.3rem; }
.contacts__k {
  font-family: var(--rotulo);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.64rem;
  color: rgba(254,236,211,0.6);
}
.contacts__v {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--creme);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.contacts__v:hover { border-color: var(--trigo); }

/* ---------- Rodapé ---------- */
.footer {
  position: relative;
  background: var(--verde-deep);
  color: var(--creme);
  padding: clamp(3rem, 6vw, 4.5rem) var(--pad-x) 2rem;
}
.footer__inner {
  max-width: var(--wrap);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}
.footer__brand { display: flex; flex-direction: column; gap: 0.35rem; }
.footer__mark { font-family: var(--display); font-size: 1.9rem; }
.footer__tag { color: var(--creme-suave); font-style: italic; }
.footer__links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer__links a {
  font-family: var(--rotulo);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--creme-suave);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--creme); }
.footer__note {
  max-width: var(--wrap);
  margin: 2.4rem auto 0;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(254,236,211,0.15);
  font-size: 0.8rem;
  color: rgba(254,236,211,0.55);
  text-align: center;
}

/* ---------- Reveal on scroll ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.22,0.61,0.36,1), transform 0.9s cubic-bezier(0.22,0.61,0.36,1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
