/* ============================================
   SUL AMÉRICA AGRO — Base Styles
   ============================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-white);
  background-color: var(--navy-deep);
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition);
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; }

::selection {
  background: var(--gold-matte);
  color: var(--navy-deep);
}

/* ── Tipografia Global ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-tight);
  color: var(--text-white);
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-bold); }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-semibold); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-semibold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-medium); font-family: var(--font-body); }

p {
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-sm);
  text-align: justify;
}

p:last-child { margin-bottom: 0; }

strong { font-weight: var(--fw-semibold); }

/* ── Layout Utilities ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: var(--section-py) 0;
  position: relative;
}

.section--dark {
  background-color: var(--navy-deep);
}

.section--mid {
  background-color: var(--navy-mid);
}

.section--graphite {
  background-color: var(--graphite);
}

.section--light {
  background-color: var(--white-ice);
}

.section--light h1,
.section--light h2,
.section--light h3,
.section--light h4 {
  color: var(--text-dark);
}

.section--light p {
  color: var(--text-body);
}

/* ── Flex & Grid Utilities ── */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ── Text Utilities ── */
.text-center { text-align: center; }
.text-gold { color: var(--gold-matte); }
.text-white { color: var(--text-white); }
.text-secondary { color: var(--text-secondary); }

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}

/* ── Decorators ── */
.gold-line {
  width: 60px;
  height: 2px;
  background: var(--gold-matte);
  margin: var(--space-md) 0;
}

.gold-line--center {
  margin-left: auto;
  margin-right: auto;
}

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--gold-matte);
  font-family: var(--font-body);
  margin-bottom: var(--space-xs);
}

.section-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 650px;
  line-height: var(--lh-relaxed);
}

.section-subtitle--center {
  margin-left: auto;
  margin-right: auto;
}

/* ── Reveal Animations (IntersectionObserver) ── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grid children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 500ms; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 { grid-template-columns: 1fr; }

  .container { padding: 0 var(--space-sm); }

  .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
  :root {
    --section-py: 3rem;
  }
}
