/* ============================================
   NACIONAL FERTILIZANTES — Design System
   ============================================ */

:root {
  /* Cores */
  --verde-floresta: #1B3A2B;
  --verde-floresta-escuro: #0E1F16;
  --verde-medio: #2F6B45;
  --verde-salvia: #7BA88A;
  --verde-acid: #8FD14F;
  --cinza-cru: #F7F6F2;
  --branco: #FFFFFF;
  --texto-escuro: #1A241E;
  --texto-suave: #5C6B62;
  --linha: rgba(27, 58, 43, 0.12);

  /* Tipografia */
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Espaçamento */
  --container-max: 1280px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --section-pad: clamp(4rem, 9vw, 8rem);

  /* Transições */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--texto-escuro);
  background: var(--cinza-cru);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

p, h1, h2, h3, h4, span, a, li {
  overflow-wrap: break-word;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  color: var(--verde-floresta-escuro);
  letter-spacing: -0.01em;
}

p {
  margin: 0;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

section {
  padding-block: var(--section-pad);
}

/* ============================================
   Tipografia utilitária
   ============================================ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verde-medio);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--verde-medio);
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); }

.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--texto-suave);
  max-width: 42ch;
}

.text-light { color: var(--branco); }
.text-light h1, .text-light h2, .text-light h3, .text-light h4 { color: var(--branco); }
.text-light .lede { color: rgba(255,255,255,0.78); }
.text-light .eyebrow { color: var(--verde-acid); }
.text-light .eyebrow::before { background: var(--verde-acid); }

/* ============================================
   Botões
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease), color 0.35s var(--ease), border-color 0.35s var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--verde-floresta);
  color: var(--branco);
}

.btn-primary:hover {
  background: var(--verde-medio);
  transform: translateY(-2px);
}

.btn-outline {
  border-color: rgba(255,255,255,0.35);
  color: var(--branco);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--linha);
  color: var(--verde-floresta-escuro);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--verde-floresta);
  color: var(--branco);
  border-color: var(--verde-floresta);
  transform: translateY(-2px);
}

.btn svg { width: 18px; height: 18px; }

/* ============================================
   Header
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: 1.4rem;
  transition: padding 0.4s var(--ease), background 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.site-header.is-scrolled {
  padding-block: 0.85rem;
  background: rgba(247, 246, 242, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--linha);
}

.logo-link img {
  height: 38px;
  width: auto;
  transition: opacity 0.3s var(--ease);
}

.logo-light { display: block; }
.logo-dark { display: none; }

.site-header.is-scrolled .logo-light { display: none; }
.site-header.is-scrolled .logo-dark { display: block; }

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 2.6rem;
}

.nav-desktop ul {
  display: flex;
  gap: 2.4rem;
  align-items: center;
}

.nav-desktop a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--branco);
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s var(--ease);
}

.site-header.is-scrolled .nav-desktop a {
  color: var(--texto-escuro);
}

.nav-desktop a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.35s var(--ease);
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
  width: 100%;
}

.nav-desktop a.active {
  font-weight: 600;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header .btn-primary {
  background: var(--verde-acid);
  color: var(--verde-floresta-escuro);
}
.site-header .btn-primary:hover {
  background: var(--branco);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border: none;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
  cursor: pointer;
}
.site-header.is-scrolled .nav-toggle {
  background: rgba(27,58,43,0.08);
}
.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--branco);
  transition: background 0.3s var(--ease);
}
.site-header.is-scrolled .nav-toggle span {
  background: var(--verde-floresta-escuro);
}

/* ============================================
   Scroll reveal
   ============================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }
[data-reveal-delay="5"] { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}

/* ============================================
   Footer
   ============================================ */

.site-footer {
  background: var(--verde-floresta-escuro);
  color: rgba(255,255,255,0.7);
  padding-block: 4.5rem 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-logo img { height: 34px; margin-bottom: 1.2rem; }

.footer-grid h4 {
  color: var(--branco);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
  font-weight: 600;
}

.footer-grid ul li {
  margin-bottom: 0.7rem;
}

.footer-grid a {
  color: rgba(255,255,255,0.65);
  transition: color 0.3s var(--ease);
  font-size: 0.95rem;
}
.footer-grid a:hover { color: var(--verde-acid); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.8rem;
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom .tagline {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--verde-acid);
}

/* ============================================
   Responsivo — header / footer
   ============================================ */

@media (max-width: 980px) {
  .nav-desktop ul { display: none; }
  .nav-toggle { display: flex; }
  .header-cta .btn-primary { padding: 0.8rem 1.4rem; font-size: 0.85rem; }

  .nav-desktop.nav-open {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--branco);
    box-shadow: 0 12px 30px rgba(27,58,43,0.12);
    border-radius: 0 0 18px 18px;
  }

  .nav-desktop.nav-open ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
  }

  .nav-desktop.nav-open ul li {
    border-bottom: 1px solid var(--linha);
  }
  .nav-desktop.nav-open ul li:last-child {
    border-bottom: none;
  }

  .nav-desktop.nav-open a {
    display: block;
    padding: 1rem var(--gutter);
    color: var(--texto-escuro);
    font-weight: 600;
  }

  .nav-desktop.nav-open a::after {
    display: none;
  }

  body.nav-open-lock {
    overflow: hidden;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
  .footer-logo { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
