:root {
  --green: #1f6b3c;
  --green-deep: #15482a;
  --green-mid: #2d8a4e;
  --green-soft: #dceadf;
  --leaf: #3d9a4a;
  --orange: #e86b1a;
  --orange-deep: #c44e0c;
  --citrus: #f4a01a;
  --paper: #f6f1e6;
  --paper-2: #efe8d8;
  --ink: #1a221c;
  --ink-soft: #3d4a40;
  --muted: #5c6b5f;
  --line: #d7d0c2;
  --white: #fffdf8;
  --shadow: 0 24px 50px rgba(21, 72, 42, 0.12);
  --radius: 22px;
  --font-display: "Fraunces", "Times New Roman", serif;
  --font-ui: "Outfit", system-ui, sans-serif;
  --header-h: 88px;
  --max: 1180px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 520px at 88% -10%, rgba(61, 154, 74, 0.16), transparent 55%),
    radial-gradient(900px 480px at -10% 8%, rgba(232, 107, 26, 0.08), transparent 50%),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--green);
  color: #fff;
  padding: 8px 12px;
  z-index: 80;
}
.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(16px);
  background: rgba(246, 241, 230, 0.86);
  border-bottom: 1px solid rgba(31, 107, 60, 0.08);
}

.header-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  height: 64px;
  width: auto;
  max-width: 260px;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.is-active { color: var(--green); }

.nav-cta {
  background: var(--green);
  color: #fff !important;
  padding: 9px 14px;
  border-radius: 999px;
}

.menu-btn {
  display: none;
  border: 0;
  background: transparent;
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  position: relative;
  margin: 0 auto;
}
.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: 40px 0 70px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.74rem;
}

.kicker i {
  width: 18px;
  height: 2px;
  background: var(--orange);
  display: inline-block;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 5.1rem);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin: 14px 0 18px;
  font-weight: 620;
}

.hero h1 em {
  font-style: italic;
  color: var(--green);
}

.lead {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 34rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 13px 20px;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 24px rgba(31, 107, 60, 0.22);
}

.btn-orange {
  background: var(--orange);
  color: #fff;
  box-shadow: 0 12px 24px rgba(232, 107, 26, 0.22);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}

.hero-visual {
  position: relative;
  min-height: 520px;
}

.hero-map {
  width: 118%;
  max-width: none;
  margin-left: -8%;
  filter: drop-shadow(0 30px 40px rgba(21, 72, 42, 0.18));
}
.hero-map svg,
.feature-visual svg,
#mini-map svg { width: 100%; height: auto; display: block; }
#mini-map {
  min-height: 280px;
  background:
    radial-gradient(circle at 80% 10%, rgba(244, 160, 26, 0.2), transparent 42%),
    linear-gradient(160deg, #dceadf, #f6f1e6);
  border-color: transparent;
}
.feature-visual #brasil-map path { stroke: rgba(246,241,230,.35); }

.float-card {
  position: absolute;
  background: rgba(255, 253, 248, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--shadow);
  border-radius: 18px;
  padding: 14px 16px;
  max-width: 210px;
}

.float-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  line-height: 1.1;
}

.float-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.fc-1 { top: 8%; left: -4%; }
.fc-2 { bottom: 16%; right: 2%; }

/* Magazine sections */
.section { padding: 88px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 36px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin: 8px 0 0;
}
.section-head p { color: var(--muted); max-width: 36rem; margin: 0; }

.feature {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  background: var(--green-deep);
  color: #edf6ef;
  border-radius: 32px;
  overflow: hidden;
  min-height: 420px;
}

.feature-copy { padding: 48px 46px; }
.feature-copy .kicker { color: var(--citrus); }
.feature-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  margin: 10px 0 16px;
}
.feature-copy p { color: #d5e6d9; max-width: 36rem; }
.feature-visual {
  position: relative;
  background:
    radial-gradient(circle at 30% 20%, rgba(244, 160, 26, 0.28), transparent 40%),
    linear-gradient(160deg, #1f6b3c, #12361f);
  display: grid;
  place-items: center;
  padding: 24px;
}
.feature-visual svg { width: min(360px, 90%); }

.story-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.story {
  background: var(--white);
  border-radius: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}
.story:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.story.wide {
  background:
    linear-gradient(180deg, rgba(26, 34, 28, 0.08), rgba(26, 34, 28, 0.55)),
    radial-gradient(circle at 80% 0%, #f4a01a, #1f6b3c 60%);
  color: #fff;
  border: 0;
}
.story .tag {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 650;
  color: var(--orange);
}
.story.wide .tag { color: #ffd089; }
.story h3 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.15;
  margin: 10px 0;
}
.story p { color: var(--muted); margin: 0; }
.story.wide p { color: rgba(255,255,255,.84); }

.quiz-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quiz-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  min-height: 250px;
  padding: 24px;
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--green);
}

.quiz-card:nth-child(2) { background: linear-gradient(160deg, #e86b1a, #a63d08); }
.quiz-card:nth-child(3) { background: linear-gradient(160deg, #15482a, #2d8a4e); }
.quiz-card:nth-child(4) { background: linear-gradient(160deg, #2a4d6e, #1f6b3c); }
.quiz-card:nth-child(5) { background: linear-gradient(160deg, #6b3d1f, #e86b1a); }
.quiz-card:nth-child(6) { background: linear-gradient(160deg, #1a3d2a, #3d9a4a); }

.quiz-card h3 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0 0 8px;
  line-height: 1.1;
}
.quiz-card p { margin: 0; color: rgba(255,255,255,.82); }
.quiz-card .q-num {
  position: absolute;
  top: 16px;
  right: 18px;
  font-family: var(--font-display);
  font-size: 2.4rem;
  opacity: .22;
}

.tools-band {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.tool-hero, .tool-mini {
  border-radius: 28px;
  padding: 32px;
  text-decoration: none;
  display: block;
  min-height: 240px;
}

.tool-hero {
  background:
    radial-gradient(500px 240px at 90% 10%, rgba(244,160,26,.25), transparent 50%),
    var(--white);
  border: 1px solid var(--line);
}

.tool-hero h3,
.tool-mini h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 10px 0;
}

.tool-stack { display: grid; gap: 16px; }
.tool-mini {
  background: var(--green-soft);
  color: var(--ink);
}

.region-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.region-chip {
  text-decoration: none;
  border-radius: 20px;
  padding: 20px 16px;
  min-height: 150px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.region-chip b { font-family: var(--font-display); font-size: 1.35rem; }
.r-norte { background: #1f6b3c; }
.r-nordeste { background: #e86b1a; }
.r-co { background: #b8860b; }
.r-sudeste { background: #2a4d6e; }
.r-sul { background: #3d6b4a; }

/* Pages */
.page-hero {
  padding: 54px 0 20px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.02;
  margin: 10px 0 12px;
  max-width: 16ch;
}
.page-hero > p { max-width: 40rem; color: var(--ink-soft); }
.page-hero .on-dark,
.page-hero .on-dark h2,
.page-hero .on-dark p,
.page-hero .biome p,
.page-hero .river p,
.page-hero .border-card p {
  color: #fff;
  max-width: none;
}

.prose {
  max-width: 42rem;
}
.prose h2, .prose h3 {
  font-family: var(--font-display);
  line-height: 1.15;
}
.prose p { color: var(--ink-soft); }
.note {
  font-size: 0.9rem;
  color: var(--muted);
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.state-card, .soon-card {
  text-decoration: none;
  border-radius: 22px;
  padding: 22px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--white);
  border: 1px solid var(--line);
}
.state-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); transition: .2s ease; }
.state-card h3 { font-family: var(--font-display); margin: 8px 0 4px; font-size: 1.6rem; }
.soon-card { opacity: .72; }
.badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 0.75rem;
  font-weight: 650;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 28px 0;
}
.stat {
  background: var(--white);
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--line);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
}
.stat span { color: var(--muted); font-size: 0.85rem; }

.article-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 36px;
  align-items: center;
  padding-bottom: 20px;
}

.biome, .river, .border-card {
  border-radius: 24px;
  padding: 26px;
  color: #fff;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.biome h3, .river h3, .border-card h3 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  margin: 0 0 8px;
}

/* Quiz */
.quiz-shell {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 24px;
  align-items: start;
}

.quiz-intro {
  position: sticky;
  top: 96px;
}

.quiz-q {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 22px;
}

.choices { display: grid; gap: 10px; }
.choice {
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
}
.choice:hover { border-color: var(--green); }
.choice.is-right { background: #dff3e5; border-color: var(--green); }
.choice.is-wrong { background: #fde4d6; border-color: var(--orange); }
.choice:disabled { cursor: default; }

.quiz-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.progress {
  height: 6px;
  background: var(--paper-2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 22px;
}
.progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--orange));
  width: 0;
}

.flag-preview, .sil-preview {
  height: 200px;
  border-radius: 16px;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 70% 20%, rgba(244, 160, 26, 0.22), transparent 46%),
    linear-gradient(160deg, #1f6b3c, #2d8a4e 55%, #e8f3ea);
  display: grid;
  place-items: center;
}
.flag-preview svg, .sil-preview svg { width: 78%; height: 78%; }

.result {
  text-align: center;
  padding: 20px 10px;
}
.result h2 {
  font-family: var(--font-display);
  font-size: 2.6rem;
  margin: 8px 0;
}

/* Tools */
.tool-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 22px;
  align-items: start;
}

.map-board {
  background: var(--white);
  border-radius: 28px;
  border: 1px solid var(--line);
  padding: 18px;
  min-height: 560px;
}

#brasil-map path,
#brasil-map polygon {
  stroke: #f6f1e6;
  stroke-width: 1.2;
  cursor: pointer;
  transition: fill .15s ease, transform .15s ease;
}
#brasil-map path:hover,
#brasil-map polygon:hover { filter: brightness(1.08); }
#brasil-map .is-on { stroke: #1a221c; stroke-width: 2.2; }

.fact-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}
.fact-list span { color: var(--muted); }

.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: start;
}
.compare-vs {
  align-self: center;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--orange);
}

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 0.86rem; font-weight: 650; color: var(--muted); }
.field select, .field input, .field textarea {
  border: 1.5px solid var(--line);
  background: var(--white);
  border-radius: 12px;
  padding: 11px 12px;
  width: 100%;
}

.form { display: grid; gap: 4px; max-width: 34rem; }

/* Footer */
.site-footer {
  margin-top: 40px;
  background: #0f1712;
  color: #e7efe8;
  padding: 56px 0 24px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-brand img {
  width: min(240px, 100%);
  margin-bottom: 12px;
}

.footer-brand p { color: #b7c4ba; max-width: 26rem; }

.site-footer h4 { margin: 0 0 10px; font-size: 0.95rem; }
.site-footer a { color: #d5e0d7; text-decoration: none; display: block; margin: 6px 0; }
.site-footer a:hover { color: #fff; }

.footer-bottom {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #93a196;
  font-size: 0.86rem;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* Misc */
.crumbs { color: var(--muted); font-size: 0.88rem; margin-bottom: 10px; }
.crumbs a { color: var(--green); text-decoration: none; }

@media (max-width: 980px) {
  .hero-grid,
  .feature,
  .story-grid,
  .quiz-rail,
  .tools-band,
  .region-row,
  .quiz-shell,
  .tool-layout,
  .article-hero,
  .grid-2, .grid-3, .grid-4,
  .stat-row,
  .compare,
  .footer-top {
    grid-template-columns: 1fr;
  }
  .hero-visual { min-height: 360px; }
  .hero-map { width: 100%; margin: 0; }
  .float-card { display: none; }
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 22px 22px;
    border-bottom: 1px solid var(--line);
    gap: 14px;
  }
  .nav.is-open { display: flex; }
  .quiz-intro { position: static; }
  .feature-copy { padding: 28px 24px; }
}
