/* ============================================================
   Fazentech - Design System
   Fazenda Gotardo · grãos e derivados do leite
   ============================================================ */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, p, figure, fieldset { margin: 0; }
ul { list-style: none; padding: 0; margin: 0; }
img { max-width: 100%; display: block; }
button { font: inherit; border: none; background: none; cursor: pointer; }
input, textarea, select { font: inherit; }
a { color: inherit; }

/* ---------- Design tokens ---------- */
:root {
  --bg: #f5f7f0;
  --bg-alt: #e9eee1;
  --surface: #ffffff;
  --ink: #16231b;
  --ink-soft: #47543f;
  --forest: #1f4d34;
  --forest-dark: #0f2c1e;
  --forest-soft: #2c6146;
  --accent: #dd8a3c;
  --accent-dark: #b96a24;
  --line: #d8ddcb;
  --on-dark: #f3f6ec;
  --on-dark-soft: #c3cdb8;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 8px 20px -12px rgba(15, 35, 24, 0.35);
  --shadow-lg: 0 30px 60px -30px rgba(15, 35, 24, 0.45);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Work Sans", Arial, Helvetica, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101a13;
    --bg-alt: #172319;
    --surface: #182a1f;
    --ink: #eef2e7;
    --ink-soft: #b7c2ab;
    --forest: #6ec695;
    --forest-dark: #0c1f14;
    --forest-soft: #3d7a56;
    --accent: #f0a559;
    --accent-dark: #f6bc80;
    --line: #2a3a2e;
    --on-dark: #eef2e7;
    --on-dark-soft: #a9b6a0;
    --shadow-sm: 0 8px 20px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  }
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.4vw + 1rem, 2.4rem); }

p { color: var(--ink-soft); }

.lead {
  font-size: clamp(1.05rem, 0.5vw + 1rem, 1.25rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

em, i { font-style: italic; line-height: 1.1; padding-bottom: 0.15em; display: inline-block; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #1c1206;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: transparent;
  color: var(--on-dark, var(--ink));
  border: 1.5px solid currentColor;
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); }

.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 1.5px solid var(--forest);
}
.btn-outline:hover { background: var(--forest); color: var(--on-dark); }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-logo { width: 38px; height: 38px; object-fit: contain; border-radius: 8px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.nav-toggle-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  cursor: pointer;
}
.nav-toggle-btn span {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.site-nav a:hover { background: var(--bg-alt); color: var(--ink); }
.site-nav a[aria-current="page"] {
  color: var(--forest);
  background: var(--bg-alt);
  font-weight: 600;
}
.site-nav a.nav-cta {
  background: var(--forest);
  color: var(--on-dark, #fff);
}
.site-nav a.nav-cta:hover { background: var(--forest-soft); }

@media (max-width: 899px) {
  .nav-toggle-btn { display: flex; }

  .site-nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--surface);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 4px;
  }
  .site-nav a { padding: 14px 16px; font-size: 1.05rem; }

  .nav-toggle:checked ~ .site-nav { transform: translateX(0); }

  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (prefers-reduced-motion: reduce) {
  .site-nav, .nav-toggle-btn span { transition: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: min(72vh, 620px);
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: var(--on-dark);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 30, 20, 0.35) 0%, rgba(11, 22, 15, 0.85) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 20px 56px;
  width: 100%;
}

/* ---------- Hero video carousel ---------- */
.hero-video-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-video-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.hero-video-item.is-active { opacity: 1; }

/* Poupa dados móveis: em telas pequenas mantém só a imagem estática de fundo */
@media (max-width: 640px) {
  .hero-video-layer { display: none; }
}

/* Respeita a preferência de menos movimento: some com o carrossel, mantém a imagem */
@media (prefers-reduced-motion: reduce) {
  .hero-video-layer { display: none; }
}
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: var(--on-dark-soft); margin-top: 16px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ---------- Page intro (inner pages) ---------- */
.page-intro {
  padding: 56px 0 8px;
}
.page-intro .lead { margin-top: 14px; }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-dark {
  background: var(--forest-dark);
  color: var(--on-dark);
}
.section-dark h2 { color: #fff; }
.section-dark p { color: var(--on-dark-soft); }

.section-head { max-width: 60ch; margin-bottom: 32px; }

/* ---------- Split layout ---------- */
.split {
  display: grid;
  gap: 32px;
  align-items: center;
}
.split-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 800px) {
  .split { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
  .split-reverse { direction: rtl; }
  .split-reverse > * { direction: ltr; }
}

/* ---------- Certification badges ---------- */
.cert-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.cert-links a {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  text-decoration: none;
  color: var(--forest);
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.cert-links a:hover { border-color: var(--forest); background: var(--bg-alt); }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 8px;
}
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.product-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.product-card figcaption {
  padding: 14px 16px 18px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Stat band ---------- */
.stat-band {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 800px) { .stat-band { grid-template-columns: 0.7fr 1.3fr; } }
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.stat-number span { display: block; font-family: var(--font-body); font-size: 1rem; font-weight: 500; color: var(--on-dark-soft); margin-top: 10px; }

/* ---------- Teaser card ---------- */
.teaser-card {
  display: grid;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
}
@media (min-width: 700px) { .teaser-card { grid-template-columns: auto 1fr auto; } }
.teaser-card .avatar-row { display: flex; }
.teaser-card .avatar-row img {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--surface);
  margin-left: -14px;
}
.teaser-card .avatar-row img:first-child { margin-left: 0; }

/* ---------- Pull quote ---------- */
.pull-quote {
  border-left: 4px solid var(--accent);
  padding: 4px 0 4px 24px;
  margin: 40px 0 0;
  max-width: 60ch;
}
.pull-quote p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.2rem, 1.4vw + 1rem, 1.6rem);
  color: var(--ink);
  line-height: 1.45;
  padding-bottom: 0.2em;
}
.pull-quote cite {
  display: block;
  margin-top: 12px;
  font-style: normal;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Forms ---------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
}

fieldset {
  border: none;
  border-top: 1px solid var(--line);
  padding: 24px 0 0;
  margin: 24px 0 0;
}
fieldset:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--ink);
  padding: 0 0 16px;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.field-row { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 18px; }
.field-row .field { flex: 1 1 220px; margin-bottom: 0; }

.radio-group { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.radio-group label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.radio-group input { width: 18px; height: 18px; accent-color: var(--forest); }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="date"], input[type="number"], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: 0.75; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(31, 77, 52, 0.15);
}
textarea { resize: vertical; min-height: 120px; }

.checkbox-field { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--forest); }
.checkbox-field label { font-weight: 500; color: var(--ink-soft); }

.form-actions { margin-top: 8px; }

/* ---------- Forum topics ---------- */
.topic-list { display: flex; flex-direction: column; gap: 16px; margin-top: 8px; }
.topic-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.topic-card img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.topic-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.topic-card h3 a { text-decoration: none; color: var(--ink); }
.topic-card h3 a:hover { color: var(--forest); }
.topic-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 0.85rem; color: var(--ink-soft); }
.topic-meta strong { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-dark); color: var(--on-dark); }
.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 20px 24px;
  display: grid;
  gap: 28px;
}
@media (min-width: 700px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand { display: flex; align-items: flex-start; gap: 12px; }
.footer-logo { width: 34px; height: 34px; object-fit: contain; border-radius: 8px; }
.footer-brand p { color: var(--on-dark-soft); max-width: 32ch; }
.footer-links, .footer-social { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-social a { text-decoration: none; color: var(--on-dark-soft); }
.footer-links a:hover, .footer-social a:hover { color: #fff; }
.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 18px 20px;
  font-size: 0.85rem;
  color: var(--on-dark-soft);
}

/* ---------- Founded badge ---------- */
.founded-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--forest);
  margin-bottom: 18px;
}

/* ---------- Product card body (name + copy) ---------- */
.product-card-body { padding: 14px 16px 18px; }
.product-card-body h3 { font-size: 1.05rem; margin-bottom: 4px; font-weight: 600; }
.product-card-body p { font-size: 0.88rem; margin: 0; color: var(--ink-soft); font-weight: 400; }

/* ---------- Value list / alt contact / form notes ---------- */
.value-list { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 26px; }
.value-list li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); }
.value-list li::before { content: "✓"; color: var(--forest); font-weight: 700; flex-shrink: 0; }

.alt-contact { margin-top: 18px; font-size: 0.92rem; color: var(--ink-soft); }
.alt-contact a { color: var(--forest); font-weight: 600; text-decoration: none; }
.alt-contact a:hover { text-decoration: underline; }

.form-note { margin-top: 12px; font-size: 0.85rem; color: var(--ink-soft); }

/* ---------- CTA banner (ex.: rodapé do fórum) ---------- */
.cta-banner { text-align: center; }
.cta-banner h2 { margin-bottom: 10px; }
.cta-banner p { max-width: 52ch; margin: 0 auto 22px; }

/* ---------- Footer contact (NAP) ---------- */
.footer-contact { margin-top: 10px; font-size: 0.9rem; line-height: 1.8; }
.footer-contact a { color: var(--on-dark-soft); text-decoration: none; }
.footer-contact a:hover { color: #fff; }

/* ---------- WhatsApp floating button ---------- */
.whatsapp-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  background: var(--forest);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow-lg);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.whatsapp-fab:hover { background: var(--forest-soft); transform: translateY(-2px); }
.whatsapp-fab svg { flex-shrink: 0; }
@media (max-width: 480px) {
  .whatsapp-fab span { display: none; }
  .whatsapp-fab { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab { transition: none; }
}

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