/* =========================================================================
   Fazenda Várzea do Feijão — Landing Page (Fase 1)
   Paleta TERRACOTA · mobile-first · rápido em 3G · micro-animações sóbrias.
   ========================================================================= */

/* ------------------------------- Fontes ------------------------------- */
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../fonts/hanken-400.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 600;
  font-display: swap; src: url("../fonts/hanken-600.woff2") format("woff2");
}
@font-face {
  font-family: "Hanken Grotesk"; font-style: normal; font-weight: 700;
  font-display: swap; src: url("../fonts/hanken-700.woff2") format("woff2");
}

/* ------------------------------- Tokens ------------------------------- */
:root {
  /* fundos & superfícies */
  --cream:        #F8F1E7;
  --surface:      #FEFCF8;
  --surface-warm: #F2E7D8;
  --espresso:     #2A1A11;
  --footer:       #1E120B;
  /* marca */
  --brown:        #9C4E22;
  --brown-deep:   #6E3A1C;
  /* acentos */
  --terracotta:   #E0532F;   /* só realce/eyebrow em fundo claro */
  --terra-solid:  #B8431E;   /* preenchimento c/ texto branco (AA) */
  --terra-tint:   #FBE6DB;
  --redwood:      #A85458;
  --green:        #35613C;   /* apoio mínimo (marca) */
  --wa:           #128C4B;   /* verde WhatsApp (AA) p/ botão flutuante */
  /* texto */
  --text:         #2A1A11;
  --text-2:       #6E5A4A;
  --on-dark:      #F8F1E7;
  --on-dark-2:    #C9B6A4;
  /* divisórias */
  --line:         rgba(42, 26, 17, .10);
  --line-dark:    rgba(248, 241, 231, .14);
  /* forma */
  --r-card:  24px;
  --r-img:   28px;
  --r-lg:    40px;
  --shadow:  0 20px 40px rgba(42, 26, 17, .08);
  --shadow-panel: 0 24px 60px rgba(42, 26, 17, .12);
  --shadow-badge: 0 4px 12px rgba(42, 26, 17, .10);
  --wrap:   1180px;
  --pad:    clamp(1.15rem, 5vw, 3rem);
  --gap-section: clamp(3.75rem, 10vw, 8rem);
  --ease:   cubic-bezier(.22, .61, .36, 1);
}

/* ------------------------------- Reset ------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, picture, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

h1, h2, h3 { line-height: 1.12; letter-spacing: -.01em; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(2.1rem, 7vw, 4rem); }
h2 { font-size: clamp(1.7rem, 5vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.5rem); }

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ------------------------------- Layout base ------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }

.section { padding-block: var(--gap-section); }
.section--warm  { background: var(--surface-warm); }
.section--dark  { background: var(--espresso); color: var(--on-dark); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--on-dark); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: .85rem;
}
.eyebrow::before { content: ""; width: 1.6em; height: 2px; background: currentColor; border-radius: 2px; }
.section--dark .eyebrow { color: var(--on-dark-2); }

.lead { font-size: clamp(1.02rem, 2.4vw, 1.2rem); color: var(--text-2); max-width: 46ch; }
.section--dark .lead { color: var(--on-dark-2); }

.section__head { max-width: 52rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .lead { margin-inline: auto; }

/* ------------------------------- Botões (pílula + badge seta) ------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  padding: .72rem .72rem .72rem 1.25rem;
  border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
  will-change: transform;
}
.btn__badge {
  display: grid; place-items: center;
  width: 2.15rem; height: 2.15rem; border-radius: 50%;
  background: rgba(255,255,255,.18);
  transition: transform .3s var(--ease), background .2s var(--ease);
}
.btn__badge svg { width: 1rem; height: 1rem; }
.btn:hover { transform: translateY(-2px); }
.btn:hover .btn__badge { transform: rotate(45deg); }

.btn--primary { background: var(--terra-solid); color: #fff; box-shadow: 0 10px 24px rgba(184,67,30,.28); }
.btn--primary:hover { background: #a33a17; }
.btn--primary .btn__badge { background: rgba(255,255,255,.2); }

.btn--dark { background: var(--espresso); color: var(--on-dark); }
.btn--dark:hover { background: #3a271a; }

.btn--ghost {
  background: rgba(255,255,255,.12); color: #fff;
  border: 1.5px solid rgba(255,255,255,.55); padding-left: 1.25rem;
}
.btn--ghost .btn__badge { background: rgba(255,255,255,.16); }
.btn--ghost:hover { background: rgba(255,255,255,.2); }

.btn--outline {
  background: transparent; color: var(--text);
  border: 1.5px solid var(--line); padding: .72rem 1.35rem;
}
.btn--outline:hover { border-color: var(--brown); color: var(--brown); }

/* ------------------------------- Header ------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(248,241,231,.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 20px rgba(42,26,17,.06);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 66px;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 42px; width: auto; }
.nav { display: none; gap: .35rem; }
.nav a {
  text-decoration: none; color: var(--text); font-weight: 600; font-size: .95rem;
  padding: .5rem .8rem; border-radius: 999px; transition: background .15s;
}
.nav a:hover { background: var(--surface-warm); }
.header-cta {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--terra-solid); color: #fff; text-decoration: none;
  font-weight: 700; font-size: .92rem; padding: .55rem 1rem; border-radius: 999px;
  transition: transform .15s var(--ease), background .15s;
}
.header-cta:hover { transform: translateY(-1px); background: #a33a17; }
.header-cta svg { width: 1.05rem; height: 1.05rem; }
.header-cta span { display: none; }

@media (min-width: 720px) {
  .nav { display: flex; }
  .brand img { height: 48px; }
  .header-cta span { display: inline; }
}

/* ------------------------------- Hero ------------------------------- */
.hero { position: relative; isolation: isolate; color: #fff; overflow: hidden; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(30,18,11,.15) 0%, rgba(30,18,11,.35) 45%, rgba(30,18,11,.86) 100%),
    linear-gradient(90deg, rgba(30,18,11,.45), rgba(30,18,11,0) 65%);
}
.hero__inner {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: min(88svh, 760px); padding-block: clamp(3rem, 12vw, 6rem);
}
.hero .eyebrow { color: #ffd9c9; }
.hero__title { color: #fff; max-width: 16ch; text-shadow: 0 2px 24px rgba(0,0,0,.28); }
.hero__lead { color: rgba(255,255,255,.94); font-size: clamp(1.05rem, 2.6vw, 1.3rem); max-width: 40ch; margin-top: 1rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.9rem; }

@media (min-width: 720px) {
  .hero__title { max-width: 18ch; }
}

/* ------------------------------- Faixa de confiança ------------------------------- */
.trust { background: var(--brown); color: var(--on-dark); }
.trust__list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px;
  background: var(--line-dark);
}
.trust__item {
  background: var(--brown);
  display: flex; align-items: center; gap: .7rem;
  padding: 1.05rem clamp(.6rem, 3vw, 1.2rem);
  font-weight: 600; font-size: .95rem;
}
.trust__item svg { width: 1.4rem; height: 1.4rem; flex: none; color: #ffcbb6; }
@media (min-width: 780px) {
  .trust__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------- Produtos ------------------------------- */
.cat { margin-top: clamp(2.25rem, 5vw, 3.25rem); }
.cat__title {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--brown); margin-bottom: 1.15rem;
}
.cat__title::after { content: ""; flex: 1; height: 1px; background: var(--line); min-width: 2rem; }

.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(.8rem, 2.5vw, 1.4rem);
}
@media (min-width: 620px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative; background: var(--surface);
  border-radius: var(--r-card); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.card__media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface-warm); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card__media img { transform: scale(1.045); }
.card__badge {
  position: absolute; top: .7rem; left: .7rem; z-index: 2;
  display: inline-flex; align-items: center; gap: .3rem;
  background: var(--terracotta); color: #fff;
  font-size: .72rem; font-weight: 700; letter-spacing: .02em;
  padding: .28rem .6rem; border-radius: 999px; box-shadow: var(--shadow-badge);
}
.card__body { padding: .9rem 1rem 1.05rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.card__title { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; flex-wrap: wrap; }
.card__meta { font-size: .72rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.card__desc { color: var(--text-2); font-size: .92rem; }

.card__toggle {
  display: none; align-items: center; gap: .35rem; align-self: flex-start;
  color: var(--terracotta); font-weight: 700; font-size: .85rem; padding: .1rem 0;
}
.card__toggle svg { width: .95rem; height: .95rem; transition: transform .25s var(--ease); }
.js .card__toggle { display: inline-flex; }
.js .card:not(.card--star) .card__desc {
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height .3s var(--ease), opacity .25s var(--ease), margin .3s var(--ease);
}
.js .card:not(.card--star).is-open .card__desc { max-height: 12rem; opacity: 1; }
.card.is-open .card__toggle svg { transform: rotate(180deg); }

/* Card destaque (carro-chefe) */
.card--star { grid-column: 1 / -1; }
.card--star .card__badge { background: var(--terra-solid); }
@media (min-width: 620px) {
  .card--star { grid-column: span 2; grid-row: span 1; display: grid; grid-template-columns: 1.1fr 1fr; }
  .card--star .card__media { aspect-ratio: auto; height: 100%; min-height: 280px; }
  .card--star .card__body { justify-content: center; padding: 1.5rem 1.5rem; gap: .6rem; }
  .card--star .card__title { font-size: 1.5rem; display: block; }
  .card--star .card__desc { font-size: 1rem; }
  .js .card--star .card__desc { max-height: none; opacity: 1; }
  .card--star .card__toggle { display: none !important; }
}

/* Nota "também temos / sob encomenda" */
.also {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: grid; gap: .9rem;
}
.also__row {
  display: flex; gap: .85rem; align-items: flex-start;
  background: var(--terra-tint); border-radius: 18px; padding: 1rem 1.2rem;
}
.also__row svg { width: 1.4rem; height: 1.4rem; flex: none; color: var(--terra-solid); margin-top: .1rem; }
.also__row strong { color: var(--text); }
.also__row p { color: var(--text-2); font-size: .95rem; }
@media (min-width: 720px) { .also { grid-template-columns: 1fr 1fr; } }

/* ------------------------------- Como é feito / mídia ------------------------------- */
.media, .video {
  position: relative; overflow: hidden; border-radius: var(--r-img);
  box-shadow: var(--shadow); background: var(--surface-warm);
}
.media { aspect-ratio: 3 / 2; }
.video { aspect-ratio: 3 / 2; background: var(--espresso); cursor: pointer; }
.media > img, .video > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s var(--ease);
}
.media:hover > img { transform: scale(1.045); }
.media__cap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  padding: 1.6rem 1.1rem .95rem; color: #fff; font-size: .9rem; font-weight: 600;
  background: linear-gradient(transparent, rgba(30,18,11,.82));
}

/* destaque (foto grande) */
.making__feature { margin-bottom: clamp(.8rem, 2.5vw, 1.3rem); aspect-ratio: 16 / 10; }
@media (min-width: 640px) { .making__feature { aspect-ratio: 21 / 9; } }

/* vídeo facade (poster + play) */
.video__play {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  background: rgba(30,18,11,.18); transition: background .2s;
}
.video__play::after {
  content: ""; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(255,255,255,.92) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%23B8431E'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/24px no-repeat;
  box-shadow: 0 8px 24px rgba(0,0,0,.3); transition: transform .2s var(--ease);
}
.video:hover .video__play::after { transform: scale(1.08); }
.video.is-playing .video__play { display: none; }

.gallery {
  margin-top: clamp(1.4rem, 4vw, 2.2rem);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.6rem, 2vw, 1rem);
}
@media (min-width: 640px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gallery .media, .gallery .video { aspect-ratio: 1 / 1; }

/* ------------------------------- Nossa história (split dark) ------------------------------- */
.story__grid { display: grid; gap: clamp(1.6rem, 5vw, 3rem); align-items: center; }
@media (min-width: 820px) { .story__grid { grid-template-columns: .95fr 1.05fr; } }
.story__media { border-radius: var(--r-img); overflow: hidden; box-shadow: var(--shadow-panel); }
.story__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.story__text p { color: var(--on-dark-2); margin-top: 1rem; max-width: 46ch; }
.story__facts { list-style: none; display: grid; gap: .9rem; margin-top: 1.6rem; }
.story__facts li { display: flex; gap: .7rem; align-items: flex-start; }
.story__facts svg { width: 1.3rem; height: 1.3rem; color: var(--terracotta); flex: none; margin-top: .15rem; }
.story__facts strong { color: var(--on-dark); }
.story__facts span { color: var(--on-dark-2); font-size: .95rem; }

/* ------------------------------- Onde estamos ------------------------------- */
.place__grid { display: grid; gap: clamp(1.4rem, 4vw, 2.4rem); }
@media (min-width: 820px) { .place__grid { grid-template-columns: 1fr 1.1fr; align-items: stretch; } }
.place__ref {
  background: var(--espresso); color: var(--on-dark);
  border-radius: var(--r-img); padding: clamp(1.3rem, 4vw, 2rem);
  display: flex; flex-direction: column; gap: 1.1rem;
}
.place__km { font-size: clamp(1.5rem, 5vw, 2.1rem); font-weight: 700; color: #fff; line-height: 1.1; }
.place__km span { color: var(--terracotta); }
.place__lines { display: grid; gap: .75rem; }
.place__line { display: flex; gap: .7rem; align-items: flex-start; font-size: .98rem; color: var(--on-dark-2); }
.place__line svg { width: 1.25rem; height: 1.25rem; color: #ffcbb6; flex: none; margin-top: .15rem; }
.place__line strong { color: var(--on-dark); font-weight: 600; }
.place__ref .btn { margin-top: auto; align-self: flex-start; }
.place__map { border-radius: var(--r-img); overflow: hidden; box-shadow: var(--shadow); min-height: 300px; }
.place__map iframe { width: 100%; height: 100%; min-height: 300px; border: 0; }

/* ------------------------------- Contato (dark CTA) ------------------------------- */
.contact { text-align: center; }
.contact .lead { margin-inline: auto; margin-block: 1rem 2rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; }
.contact__note { margin-top: 1.4rem; font-size: .88rem; color: var(--on-dark-2); }

/* ------------------------------- Footer ------------------------------- */
.site-footer { background: var(--footer); color: var(--on-dark-2); padding-block: clamp(2.5rem, 6vw, 4rem) 2rem; }
.site-footer__top { display: grid; gap: 1.8rem; }
@media (min-width: 720px) { .site-footer__top { grid-template-columns: 1.2fr 1fr 1fr; } }
.site-footer img { height: 54px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1) opacity(.9); }
.site-footer h4 { color: var(--on-dark); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: .8rem; }
.site-footer p, .site-footer a { font-size: .93rem; line-height: 1.7; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__legal {
  margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--line-dark);
  font-size: .82rem; color: var(--on-dark-2); display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; justify-content: space-between;
}

/* ------------------------------- WhatsApp flutuante ------------------------------- */
.wa-float {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 80;
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--wa); color: #fff; text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: .8rem 1.1rem; border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0,0,0,.28);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.wa-float svg { width: 1.5rem; height: 1.5rem; flex: none; }
.wa-float__txt { display: none; }
.wa-float:hover { transform: translateY(-2px) scale(1.02); }
@media (min-width: 520px) { .wa-float__txt { display: inline; } }

/* ------------------------------- Lightbox ------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  place-items: center; padding: 1.2rem;
  background: rgba(20,12,7,.9); backdrop-filter: blur(4px);
}
.lightbox.is-open { display: grid; animation: fade .2s ease; }
.lightbox img, .lightbox video { max-width: 92vw; max-height: 88vh; border-radius: 16px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox__close {
  position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 1.5rem; line-height: 1; display: grid; place-items: center;
}
.lightbox__close:hover { background: rgba(255,255,255,.26); }

/* ------------------------------- Reveal on scroll ------------------------------- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

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

/* ------------------------------- Reduced motion ------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* utilidades */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
