:root {
  --bg-paper: #f7f5ef;
  --bg-card: #ffffff;
  --bg-tint: #eef3ee;
  --bg-accent-soft: #f5efe1;
  --ink-primary: #17211d;
  --ink-secondary: #394842;
  --brand-green: #113c2e;
  --brand-emerald: #1d5b45;
  --brand-gold: #c88a2e;
  --brand-gold-deep: #9c6719;
  --border-subtle: rgba(17, 60, 46, 0.14);
  --shadow-card: 0 18px 42px rgba(17, 60, 46, 0.08);
  --font-display: "Playfair Display", Georgia, serif;
  --font-sans: "Be Vietnam Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-lg: 20px;
  --radius-md: 14px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-paper);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 1.125rem; /* 18px minimum comfortable body */
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

.emagazine {
  width: 100%;
}

/* =====================================================
   HERO COVER (NO TOP HEADER / NO MENU / NO TOC)
   ===================================================== */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  background-color: var(--brand-green);
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: -12% 0;
  z-index: 0;
  will-change: transform;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(11, 36, 27, 0.94) 0%,
    rgba(11, 36, 27, 0.78) 42%,
    rgba(11, 36, 27, 0.34) 75%,
    rgba(11, 36, 27, 0.16) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(4rem, 9vh, 6.5rem) clamp(1.25rem, 4vw, 2.5rem) clamp(2.75rem, 6vh, 4.5rem);
}

.hero-content {
  max-width: 820px;
  color: #ffffff;
}

.hero-title {
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(2.15rem, 4.6vw, 3.75rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-wrap: balance;
}

.hero-sapo {
  border-left: 4px solid var(--brand-gold);
  padding-left: clamp(1rem, 2.5vw, 1.5rem);
}

.hero-sapo p {
  margin: 0 0 1rem;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem); /* >= 17px */
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.94);
  font-weight: 400;
}

.hero-sapo p:last-child {
  margin-bottom: 0;
}

/* =====================================================
   ARTICLE SECTIONS & EDITORIAL COLUMN
   ===================================================== */
.story-section {
  padding: clamp(3rem, 7vw, 5.5rem) 0 0;
}

.article-column {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2rem);
}

.section-heading {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 1rem 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--brand-green);
}

.section-index {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1;
  color: var(--brand-gold-deep);
  font-variant-numeric: tabular-nums;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--brand-green);
  text-wrap: balance;
}

.story-p {
  margin: 0 0 1.5rem;
  font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); /* 17px to 19px */
  line-height: 1.82;
  color: var(--ink-primary);
}

.drop-cap::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 0.85;
  padding-right: 0.65rem;
  padding-top: 0.25rem;
  color: var(--brand-green);
}

/* =====================================================
   EDITORIAL PHOTOGRAPHY WITH PARALLAX
   ===================================================== */
.editorial-figure {
  width: min(100%, 1080px);
  margin: clamp(1.75rem, 4vw, 3rem) auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.parallax-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  background-color: #dbe3dc;
  box-shadow: var(--shadow-card);
}

.parallax-frame img {
  width: 100%;
  height: 116%;
  object-fit: cover;
  transform: translateY(-8%);
  will-change: transform;
}

/* =====================================================
   INFOGRAPHIC CONTAINERS (MIN 18PX TEXT EVERYWHERE!)
   ===================================================== */
.infographic-wrap {
  width: min(100%, 1080px);
  margin: clamp(2.25rem, 5vw, 3.75rem) auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.infographic-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 5px solid var(--brand-green);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  box-shadow: var(--shadow-card);
  font-size: 1.125rem; /* 18px base inside every infographic */
  line-height: 1.55;
}

.infographic-card * {
  font-size: max(18px, 1em);
}

.info-header {
  margin-bottom: 1.75rem;
}

.info-tag {
  display: inline-block;
  font-size: 1.125rem; /* 18px */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-gold-deep);
  margin-bottom: 0.4rem;
}

.info-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 1.9rem) !important;
  font-weight: 700;
  line-height: 1.3;
  color: var(--brand-green);
}

/* KPI 4-Column Row (4 on desktop, 2x2 on tablet/mobile - ALWAYS balanced) */
.kpi-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.125rem;
  margin-bottom: 1.75rem;
}

.kpi-box {
  background-color: var(--bg-tint);
  border: 1px solid rgba(17, 60, 46, 0.12);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kpi-icon {
  color: var(--brand-emerald);
  display: flex;
  align-items: center;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 2.5vw, 2.25rem) !important;
  font-weight: 700;
  line-height: 1.15;
  color: var(--brand-green);
  font-variant-numeric: tabular-nums;
}

.kpi-value .counter,
.kpi-value .kpi-arrow,
.kpi-value .kpi-unit {
  font-size: inherit !important;
}

.kpi-arrow {
  color: var(--brand-gold-deep);
  margin: 0 0.15rem;
}

.kpi-unit {
  font-family: var(--font-sans);
  font-size: 1.125rem !important; /* 18px */
  font-weight: 600;
}

.kpi-label {
  font-size: 1.125rem !important; /* 18px */
  color: var(--ink-secondary);
  line-height: 1.45;
}

.kpi-label .counter {
  font-weight: 700;
  color: var(--brand-green);
}

/* 2-Column Balanced Grids */
.info-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.info-panel {
  background-color: var(--bg-paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.full-panel {
  margin-top: 1.25rem;
}

.panel-title {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.25rem !important; /* 20px */
  font-weight: 700;
  color: var(--brand-green);
  line-height: 1.35;
}

.panel-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

/* Stacked Bar (30 ha = 15 ha + 15 ha) */
.stacked-bar-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stacked-bar-track {
  display: flex;
  height: 28px;
  border-radius: 999px;
  overflow: hidden;
  background-color: #dde3de;
}

.stacked-seg {
  height: 100%;
  width: 0;
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.seg-primary {
  background-color: var(--brand-green);
}

.seg-secondary {
  background-color: #5b8f74;
}

.legend-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.125rem !important; /* 18px */
  color: var(--ink-primary);
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
}

.swatch-primary {
  background-color: var(--brand-green);
}

.swatch-secondary {
  background-color: #5b8f74;
}

.crop-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.crop-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background-color: #ffffff;
  border: 1px solid rgba(17, 60, 46, 0.22);
  color: var(--brand-green);
  font-weight: 600;
  font-size: 1.125rem !important; /* 18px */
}

.partner-strip {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(17, 60, 46, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.partner-label {
  font-size: 1.125rem !important; /* 18px */
  color: var(--ink-secondary);
}

.partner-items {
  font-size: 1.125rem !important; /* 18px */
  font-weight: 700;
  color: var(--brand-green);
}

/* Interactive Scenario Tabs & Bars */
.scenario-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.scenario-btn,
.node-btn {
  appearance: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 1.125rem !important; /* 18px */
  font-weight: 600;
  padding: 0.5rem 0.95rem;
  border-radius: 10px;
  border: 1.5px solid rgba(17, 60, 46, 0.25);
  background-color: #ffffff;
  color: var(--brand-green);
  transition: background-color 0.22s ease, color 0.22s ease, border-color 0.22s ease, transform 0.15s ease;
}

.scenario-btn:hover,
.node-btn:hover {
  border-color: var(--brand-green);
  background-color: var(--bg-tint);
}

.scenario-btn.is-active,
.node-btn.is-active {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
  color: #ffffff;
}

.scenario-btn:focus-visible,
.node-btn:focus-visible {
  outline: 3px solid var(--brand-gold);
  outline-offset: 2px;
}

.price-chart-area {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.bar-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.bar-row-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 1.125rem !important; /* 18px */
  font-weight: 600;
  color: var(--ink-primary);
}

.bar-track {
  height: 22px;
  background-color: #e4e7e2;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.35s ease;
}

.bar-market {
  background-color: #7c8d85;
}

.bar-coop {
  background-color: var(--brand-gold-deep);
}

.scenario-note {
  margin: 0.25rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background-color: var(--bg-accent-soft);
  color: var(--ink-primary);
  font-size: 1.125rem !important; /* 18px */
  line-height: 1.5;
}

/* Infographic 2 Metrics */
.metric-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.metric-row {
  background-color: #ffffff;
  border: 1px solid rgba(17, 60, 46, 0.12);
  border-radius: 12px;
  padding: 0.9rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metric-num {
  font-family: var(--font-display);
  font-size: 1.5rem !important; /* 24px */
  font-weight: 700;
  color: var(--brand-green);
  font-variant-numeric: tabular-nums;
}

.metric-num .counter {
  font-size: inherit !important;
}

.metric-desc {
  font-size: 1.125rem !important; /* 18px */
  color: var(--ink-secondary);
}

/* Lime Bonus Bar */
.lime-visual {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lime-bar-labels {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: 1.125rem !important; /* 18px */
}

.lime-track {
  display: flex;
  height: 30px;
  background-color: #e4e7e2;
  border-radius: 999px;
  overflow: hidden;
}

.lime-base-fill {
  height: 100%;
  width: 0;
  background-color: var(--brand-green);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.lime-bonus-fill {
  height: 100%;
  background-color: var(--brand-gold);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.lime-scale {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  font-size: 1.125rem !important; /* 18px */
  color: var(--ink-secondary);
}

/* 4-Column Timeline */
.timeline-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.timeline-node {
  background-color: var(--bg-tint);
  border-top: 4px solid var(--brand-emerald);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 1.45rem !important;
  font-weight: 700;
  color: var(--brand-green);
}

.timeline-text {
  font-size: 1.125rem !important; /* 18px */
  color: var(--ink-primary);
  line-height: 1.45;
}

/* Infographic 3: Circular SVG & 2x2 Balanced Grid */
.circular-panel {
  align-items: stretch;
}

.circular-diagram {
  position: relative;
  width: 210px;
  height: 210px;
  margin: 0 auto;
  display: grid;
  place-items: center;
}

.circular-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.circular-ring-anim {
  transition: stroke-dashoffset 1.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.circular-ring-anim.is-drawn {
  stroke-dashoffset: 0;
}

.circular-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.circular-center-label {
  font-size: 1.125rem !important; /* 18px */
  font-weight: 700;
  color: var(--brand-green);
  line-height: 1.3;
}

.node-grid-2x2,
.goal-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.node-btn {
  text-align: center;
  padding: 0.65rem 0.75rem;
}

.node-readout {
  background-color: var(--bg-accent-soft);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 1.125rem !important; /* 18px */
  color: var(--ink-primary);
  line-height: 1.45;
}

.award-banner {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: var(--brand-green);
  color: #ffffff;
  border-radius: 12px;
  padding: 1rem 1.2rem;
}

.award-stat {
  font-family: var(--font-display);
  font-size: 2rem !important;
  font-weight: 700;
  line-height: 1;
  color: #f3c46b;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.award-stat .counter {
  font-size: inherit !important;
}

.award-year {
  font-size: 1.125rem !important; /* 18px */
  color: rgba(255, 255, 255, 0.88);
}

.award-name {
  font-size: 1.2rem !important;
  font-weight: 700;
  color: #ffffff;
}

.goal-card {
  background-color: #ffffff;
  border: 1px solid rgba(17, 60, 46, 0.14);
  border-radius: 12px;
  padding: 0.95rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.goal-title {
  font-size: 1.125rem !important; /* 18px */
  font-weight: 700;
  color: var(--brand-green);
}

.goal-desc {
  font-size: 1.125rem !important; /* 18px */
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* =====================================================
   BYLINE
   ===================================================== */
.article-byline {
  margin-top: 2.5rem;
  padding-bottom: clamp(3.5rem, 8vw, 5.5rem);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.byline-rule {
  width: 56px;
  height: 2px;
  background-color: var(--brand-gold);
}

.byline-author {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-green);
}

/* =====================================================
   SCROLL-TRIGGER REVEAL ANIMATIONS
   ===================================================== */
.reveal-up,
.reveal-fade {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-fade {
  transform: translateY(12px) scale(0.985);
}

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

/* =====================================================
   RESPONSIVE: TABLET & MOBILE
   ===================================================== */
@media (max-width: 960px) {
  .kpi-grid-4,
  .timeline-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .info-grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 82vh;
  }

  .kpi-grid-4,
  .timeline-grid-4,
  .node-grid-2x2,
  .goal-grid-2x2 {
    grid-template-columns: 1fr;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .drop-cap::first-letter {
    font-size: 3rem;
  }

  .award-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-up,
  .reveal-fade {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .stacked-seg,
  .lime-base-fill,
  .lime-bonus-fill,
  .bar-fill,
  .circular-ring-anim {
    transition: none;
  }
}
