/* =============================================
   ANTEMA — Design System Global
   Associação Nacional dos Técnicos Especialistas em Meio Ambiente
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Montserrat:wght@600;700;800;900&display=swap');

/* --- CSS Variables --- */
:root {
  /* Colors */
  --green-primary:  #1a6b3a;
  --green-dark:     #0d4226;
  --green-darker:   #082a18;
  --green-light:    #2a8a4e;
  --green-soft:     #e8f4ed;
  --green-mid:      #3ca361;

  --gold:           #c9a84c;
  --gold-light:     #e0c06a;
  --gold-dark:      #a88630;

  --graphite:       #1c2b22;
  --gray-900:       #111827;
  --gray-800:       #1f2937;
  --gray-700:       #374151;
  --gray-600:       #4b5563;
  --gray-500:       #6b7280;
  --gray-400:       #9ca3af;
  --gray-300:       #d1d5db;
  --gray-200:       #e5e7eb;
  --gray-100:       #f3f4f6;
  --gray-50:        #f8faf9;
  --white:          #ffffff;

  /* Typography */
  --font-body:      'Inter', system-ui, sans-serif;
  --font-heading:   'Montserrat', 'Inter', system-ui, sans-serif;

  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-lg:    1.125rem;
  --text-xl:    1.25rem;
  --text-2xl:   1.5rem;
  --text-3xl:   1.875rem;
  --text-4xl:   2.25rem;
  --text-5xl:   3rem;
  --text-6xl:   3.75rem;

  --weight-light:     300;
  --weight-regular:   400;
  --weight-medium:    500;
  --weight-semibold:  600;
  --weight-bold:      700;
  --weight-extrabold: 800;
  --weight-black:     900;

  --leading-tight:   1.25;
  --leading-snug:    1.375;
  --leading-normal:  1.5;
  --leading-relaxed: 1.625;
  --leading-loose:   2;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max:  1200px;
  --container-wide: 1400px;
  --container-sm:   768px;

  /* Borders */
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.10), 0 4px 12px rgba(0,0,0,0.06);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.08);
  --shadow-green: 0 4px 20px rgba(26,107,58,0.25);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;
  --transition-spring: 350ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Header */
  --header-height: 76px;
  --header-height-mobile: 68px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: var(--leading-relaxed);
  color: var(--gray-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, textarea, select {
  font-family: inherit;
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

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

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

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  color: var(--gray-900);
}

h1 { font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-2xl), 3.5vw, var(--text-4xl)); }
h3 { font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl)); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
  line-height: var(--leading-relaxed);
  color: var(--gray-600);
}

/* --- Section Headers --- */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green-primary);
  margin-bottom: var(--space-3);
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: var(--radius-full);
}

.section-title {
  font-family: var(--font-heading);
  font-weight: var(--weight-extrabold);
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
  max-width: 640px;
}

.section-header {
  margin-bottom: var(--space-12);
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-label {
  justify-content: center;
}

.section-header--center .section-subtitle {
  margin-inline: auto;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.02em;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  border: 2px solid transparent;
}

.btn--primary {
  background: var(--green-primary);
  color: var(--white);
  border-color: var(--green-primary);
  box-shadow: 0 4px 14px rgba(26,107,58,0.3);
}

.btn--primary:hover {
  background: var(--green-light);
  border-color: var(--green-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,107,58,0.35);
}

.btn--secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.btn--secondary:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  color: var(--green-primary);
  border-color: var(--green-primary);
}

.btn--outline:hover {
  background: var(--green-primary);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-green);
}

.btn--gold {
  background: var(--gold);
  color: var(--gray-900);
  border-color: var(--gold);
  box-shadow: 0 4px 14px rgba(201,168,76,0.35);
}

.btn--gold:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--green-primary);
  font-weight: var(--weight-semibold);
  padding: var(--space-2) 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
}

.btn--ghost:hover {
  border-bottom-color: var(--green-primary);
}

.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
}

.btn svg, .btn .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
}

.badge--green {
  background: var(--green-soft);
  color: var(--green-dark);
}

.badge--gold {
  background: rgba(201,168,76,0.15);
  color: var(--gold-dark);
}

.badge--gray {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* --- Sections --- */
.section {
  padding: var(--space-20) 0;
}

.section--lg {
  padding: var(--space-24) 0;
}

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

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

.section--dark .section-title,
.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

.section--dark p,
.section--dark .section-subtitle {
  color: rgba(255,255,255,0.7);
}

.section--dark .section-label {
  color: var(--gold);
}

.section--green {
  background: var(--green-primary);
  color: var(--white);
}

.section--green .section-title,
.section--green h2 {
  color: var(--white);
}

.section--green .section-subtitle {
  color: rgba(255,255,255,0.8);
}

.section--green .section-label {
  color: var(--gold);
}

.section--soft {
  background: var(--gray-50);
}

/* --- Grid Utilities --- */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

/* --- Flex Utilities --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* --- Text Utilities --- */
.text-center { text-align: center; }
.text-white { color: var(--white); }
.text-green { color: var(--green-primary); }
.text-gold { color: var(--gold); }
.text-muted { color: var(--gray-500); }

/* --- Divider --- */
.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--green-light));
  border-radius: var(--radius-full);
  margin-bottom: var(--space-8);
}

.divider--center {
  margin-inline: auto;
}

/* --- Page Banner (Internal Pages) --- */
.page-banner {
  background: linear-gradient(135deg, var(--green-darker) 0%, var(--green-dark) 50%, var(--green-primary) 100%);
  padding: var(--space-20) 0 var(--space-16);
  margin-top: var(--header-height);
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-banner .container {
  position: relative;
  z-index: 1;
}

.page-banner__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-4);
}

.page-banner__title {
  font-family: var(--font-heading);
  font-size: clamp(var(--text-3xl), 4vw, var(--text-5xl));
  font-weight: var(--weight-extrabold);
  color: var(--white);
  margin-bottom: var(--space-4);
}

.page-banner__text {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  line-height: var(--leading-relaxed);
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  margin-bottom: var(--space-6);
}

.breadcrumb a {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--white);
}

.breadcrumb__sep {
  color: rgba(255,255,255,0.4);
}

/* --- Scroll-aware utilities --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

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

@media (max-width: 768px) {
  :root {
    --space-20: 4rem;
    --space-24: 5rem;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }

  .container {
    padding-inline: var(--space-4);
  }

  .section {
    padding: var(--space-16) 0;
  }
}

@media (max-width: 480px) {
  .btn--lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
  }
}
