:root {
  color-scheme: dark;
  --background: #101a17;
  --foreground: #f2f1e9;
  --muted: #c1c9be;
  --accent: #e3b36e;
  --ink: #18221b;
  --impacts-background: #f2ebdd;
  --impacts-foreground: #1f2b24;
  --impacts-muted: #5d625b;
  --impacts-accent: #9b3e24;
  --impacts-divider: #1f2b2433;
  --page-gutter: clamp(20px, 5vw, 80px);
  --header-height: 6rem;
  font-family: system-ui, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--foreground); }
a { color: inherit; }
button { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
#conteudo:focus { outline: none; }

.container { width: min(100%, 1440px); margin-inline: auto; padding-inline: var(--page-gutter); }
.home-opening { position: relative; isolation: isolate; }
.skip-link {
  position: absolute;
  z-index: 5;
  top: 1rem;
  left: var(--page-gutter);
  padding: 1rem;
  background: var(--foreground);
  color: var(--ink);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }
.site-header { position: relative; z-index: 3; }
.site-header:focus-visible { outline-offset: -4px; }
.site-header__inner {
  position: relative;
  min-height: var(--header-height);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .5rem; max-width: 100%; min-height: 44px; text-decoration: none; }
.brand__mark { width: 26px; height: 32px; flex-shrink: 0; color: var(--accent); }
.brand__name { font-size: clamp(.875rem, 1.8vw, 1.125rem); font-weight: 650; line-height: 1.4; letter-spacing: -.025em; overflow-wrap: anywhere; }
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-width: 44px;
  min-height: 44px;
  padding: .5rem 0 .5rem .5rem;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--foreground);
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle__label { font-size: .8rem; }
.menu-toggle__cross, .site-header:has(.site-nav:popover-open) .menu-toggle__bars { display: none; }
.site-header:has(.site-nav:popover-open) .menu-toggle__cross { display: block; }
.site-nav {
  display: none;
  position: absolute;
  inset: var(--header-height) var(--page-gutter) auto;
  width: auto;
  max-height: calc(100svh - var(--header-height) - 1rem);
  overflow-y: auto;
  margin: 0;
  padding: .75rem;
  border: 1px solid #435247;
  background: #14201b;
  color: var(--foreground);
}
.site-nav:popover-open { display: block; }
.site-nav ul { display: flex; flex-direction: column; gap: .25rem; list-style: none; padding: 0; margin: 0; }
.site-nav a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: .75rem;
  color: var(--muted);
  font-size: .9rem;
  text-decoration: none;
  border-radius: 6px;
  transition: color 160ms ease, background-color 160ms ease;
}
.site-nav a[aria-current="page"] { color: var(--foreground); }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  inset: auto .75rem .35rem;
  height: 2px;
  background: var(--accent);
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--foreground); background: #e3b36e14; }
.site-nav a:focus-visible { outline-offset: 2px; }
.site-nav__pending {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 48px;
  padding: .75rem;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.5;
}
.site-nav__pending small { font-size: .75rem; }

.hero {
  --hero-scene-height: clamp(12rem, min(90vw, 32vh), 24rem);
  --hero-scene-height: clamp(12rem, min(90vw, 32svh), 24rem);
  --hero-scene-space: calc(var(--hero-scene-height) * .7 + clamp(1rem, 3svh, 2rem));
  position: relative;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100svh - var(--header-height));
}
.hero__content {
  position: relative;
  z-index: 1;
  padding-top: clamp(1.5rem, 6svh, 4.5rem);
  /* Os 30% superiores da cena são difusos; reserva a parte visível e um respiro. */
  padding-bottom: var(--hero-scene-space);
}
.hero h1 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(2rem, min(8.4vw, 8svh), 4.25rem);
  line-height: 1.09;
  font-weight: 650;
  letter-spacing: -.055em;
  text-wrap: balance;
}
.hero h1 span { color: var(--accent); }
.hero__description {
  max-width: 36ch;
  margin: clamp(1rem, 3svh, 2rem) 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.7;
  text-wrap: pretty;
}
.hero__impacts-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  max-width: 100%;
  min-height: 44px;
  margin-top: clamp(.5rem, 2svh, 1.25rem);
  padding-block: .5rem;
  color: var(--accent);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}
.hero__impacts-link span:first-child { min-width: 0; text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }
.hero__impacts-link span[aria-hidden] { flex-shrink: 0; }
.hero__impacts-link:hover { color: var(--foreground); }
/* Mantém o enquadramento que inclui a navbar, limitando a cena ao Hero. */
.hero__landscape { position: absolute; inset: calc(-1 * var(--header-height)) 0 0; z-index: 0; overflow: hidden; pointer-events: none; user-select: none; }
.hero__landscape::after { content: ""; position: absolute; inset: 0 0 auto; height: calc(var(--header-height) + 3rem); background: linear-gradient(var(--background) 70%, transparent); }
.landscape-definitions { position: absolute; }
.landscape { position: absolute; display: block; width: 100%; }
.landscape--desktop { display: none; }
.landscape--mobile { bottom: 0; height: var(--hero-scene-height); mask-image: linear-gradient(to bottom, transparent, #000 30%); }

.impacts {
  --terrain-height: clamp(16px, 2.5vw, 40px);
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  color-scheme: light;
  padding-block: calc(var(--terrain-height) + clamp(1rem, 3svh, 2rem)) clamp(1.5rem, 6svh, 6rem);
  background: var(--impacts-background);
  color: var(--impacts-foreground);
}
.impacts__intro { position: relative; }
.impacts:focus-visible { outline-color: var(--impacts-foreground); outline-offset: -4px; }
.impacts::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -1px;
  height: calc(var(--terrain-height) + 1px);
  background: #0b1210;
  clip-path: polygon(0 0, 100% 0, 100% 60%, 91% 55%, 80% 73%, 68% 61%, 54% 80%, 42% 65%, 28% 78%, 14% 57%, 0 68%);
  pointer-events: none;
}
.impacts ::selection { background: var(--impacts-accent); color: var(--impacts-background); }
.impacts__eyebrow {
  margin: 0 0 clamp(.75rem, 2svh, 1.25rem);
  color: var(--impacts-muted);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .1em;
}
.impacts h2 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(2rem, min(4vw, 6svh), 3.5rem);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -.045em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.impacts__axes { display: grid; gap: 2rem; margin-top: clamp(1.5rem, 5svh, 4rem); }
.impacts__axis { min-width: 0; padding-top: clamp(1rem, 3svh, 1.5rem); border-top: 1px solid var(--impacts-divider); }
.impacts__number { color: var(--impacts-accent); font-size: clamp(1rem, 2.8svh, 1.25rem); line-height: 1.5; font-variant-numeric: tabular-nums; }
.impacts h3 { margin: .5rem 0 .75rem; font-size: 1.375rem; font-weight: 650; line-height: 1.3; letter-spacing: -.025em; }
.impacts__axis p { max-width: 38ch; margin: 0; color: var(--impacts-muted); font-size: 1rem; line-height: 1.65; text-wrap: pretty; }

/* Rodapé da Home */
.site-footer { position: relative; isolation: isolate; padding-top: clamp(2.5rem, 4vw, 4rem); background: var(--background); color: var(--foreground); text-align: left; overflow-wrap: anywhere; }
.site-footer__layout { display: grid; grid-template-areas: "groups" "landscape" "bottom"; gap: 1.5rem; }
.site-footer__groups { grid-area: groups; display: grid; gap: 2rem; }
.site-footer__groups > * { min-width: 0; }
.site-footer__identity { display: grid; grid-template-columns: 34px minmax(0, 1fr); column-gap: .75rem; align-content: start; }
.site-footer__mark { color: var(--accent); }
.site-footer h2 { margin: 0 0 .75rem; font-size: clamp(1.25rem, 1.65vw, 1.5rem); font-weight: 650; line-height: 1.35; letter-spacing: -.025em; }
.site-footer h2 span { display: block; }
.site-footer__identity p { grid-column: 2; }
.site-footer h3 { margin: 0 0 .75rem; font-size: .75rem; font-weight: 600; line-height: 1.5; letter-spacing: .1em; text-transform: uppercase; }
.site-footer p { margin: 0; max-width: 34ch; color: var(--muted); font-size: .9375rem; line-height: 1.65; text-wrap: pretty; }
.site-footer ul { display: grid; gap: .5rem; padding: 0; margin: 0; list-style: none; font-size: 1rem; line-height: 1.65; }
.site-footer a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.site-footer a:hover, .site-footer a:focus-visible { color: var(--accent); }
.site-footer .site-footer__availability { margin-top: 1rem; max-width: 24ch; font-size: .875rem; }
.site-footer .site-footer__location { display: flex; align-items: flex-start; gap: .375rem; margin-top: 1rem; font-size: .875rem; }
.site-footer__location-mark { flex-shrink: 0; width: 1.15em; height: 1.15em; margin-top: .25em; color: var(--accent); }
.site-footer__landscape { grid-area: landscape; height: 180px; margin-inline: calc(-1 * var(--page-gutter)); overflow: hidden; pointer-events: none; background: #061912; }
.site-footer__landscape img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.site-footer__landscape picture { position: relative; display: block; width: min(100%, 960px); height: 100%; }
.site-footer__landscape picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, transparent 85%, #061912); }
.site-footer__bottom { grid-area: bottom; padding-block: 1.25rem; border-top: 1px solid color-mix(in srgb, var(--muted) 20%, transparent); }
.site-footer__bottom p { max-width: none; font-size: .875rem; }

@media (min-width: 600px) {
  .site-footer__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1200px) {
  .site-footer__layout { container-type: inline-size; grid-template-columns: minmax(0, .8fr) minmax(0, 3.2fr); grid-template-areas: ". groups" "bottom bottom"; gap: 2rem; }
  .site-footer__groups { grid-template-columns: minmax(0, 1.25fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; align-self: center; }
  .site-footer__groups > :not(:first-child) { padding-left: 1.5rem; border-left: 1px solid color-mix(in srgb, var(--muted) 20%, transparent); }
  .site-footer__landscape { grid-area: auto; position: absolute; inset: 0; height: 100%; margin: 0; z-index: -1; }
  .site-footer__landscape picture { width: 50%; max-width: 960px; height: auto; }
  .site-footer__landscape img { height: auto; }
  .site-footer__landscape picture::after { content: ""; position: absolute; inset: auto 0 0; height: 12px; background: linear-gradient(to top, #061912, transparent); }
  .site-footer__landscape::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, transparent 20%, #061912 38%), linear-gradient(to top, #061912 2.5rem, transparent 5rem); }
  @container (max-width: 64rem) {
    .site-footer__groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer__groups > :not(:first-child) { padding-left: 0; border-left: 0; }
  }
}

@media (prefers-reduced-motion: no-preference) {
  .site-footer a { transition: color 160ms ease; }
}
/* Fim do rodapé */

.flame, .flame__shape { transform-box: fill-box; transform-origin: center bottom; }
.flame { opacity: .92; }
.smoke { transform-box: fill-box; transform-origin: center bottom; opacity: .85; }
.smoke-layers { display: none; }
.smoke-layer, .smoke-texture { transform-box: fill-box; transform-origin: center bottom; }
.embers { display: none; }
.cursor-glow { opacity: 0; }
.landscape--desktop.is-pointer-active .cursor-glow { opacity: 1; }
@keyframes flame-breathe {
  0%, 100% { transform: scale(.97, .94) rotate(-1.8deg); opacity: .94; }
  31% { transform: scale(1.025, 1.12) rotate(2deg); opacity: 1; }
  62% { transform: scale(.94, .99) rotate(-1.2deg); opacity: .96; }
  82% { transform: scale(1.015, 1.08) rotate(.9deg); opacity: 1; }
}
@keyframes fire-light { from { opacity: .72; } to { opacity: 1; } }
@keyframes smoke-rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  15% { opacity: .65; }
  45% { opacity: .7; }
  70% { opacity: .45; }
  100% { transform: translateY(-80px) scale(1.08); opacity: 0; }
}
@keyframes smoke-sway { from { transform: translateX(-11.1px); } to { transform: translateX(11.1px); } }
@keyframes ember-rise { 0%, 100% { opacity: 0; } 15%, 45% { opacity: .55; } 85% { opacity: 0; transform: translate(7px, -48px); } }

@media (min-width: 600px) and (max-width: 959px) and (max-height: 480px) {
  .hero {
    --hero-scene-height: clamp(8rem, 24svh, 12rem);
    --hero-scene-space: calc(var(--hero-scene-height) * .7 + clamp(.5rem, 2svh, 1rem));
  }
}

@media (min-width: 960px) {
  :root { --header-height: 7rem; }
  .site-header__inner { flex-wrap: nowrap; }
  .brand { max-width: none; }
  .brand__mark { width: 30px; height: 36px; }
  .menu-toggle { display: none; }
  .site-nav, .site-nav:popover-open {
    position: static;
    display: block;
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .site-nav ul { flex-direction: row; gap: clamp(.25rem, 1vw, 1rem); }
  .site-nav a { padding: .75rem; font-size: .875rem; }
  .site-nav__pending { flex-direction: column; align-items: flex-start; gap: 0; padding: .5rem .25rem; font-size: .875rem; }
  .hero {
    --hero-scene-space: 0px;
    display: flex;
    align-items: center;
  }
  .hero__content { padding-top: clamp(2rem, 5svh, 4rem); padding-bottom: clamp(3rem, 10svh, 7rem); }
  .hero h1 { max-width: 15ch; font-size: clamp(3rem, min(5.7vw, 10svh), 5.5rem); }
  .hero__description { max-width: 43ch; font-size: clamp(1rem, 1.2vw, 1.125rem); }
  .landscape--mobile { display: none; }
  .landscape--desktop { display: block; height: 100%; }
  .impacts {
    --impacts-type-unit: clamp(.875rem, min(1.2vw, 2.4svh), 1.375rem);
    padding-block: calc(var(--terrain-height) + clamp(.75rem, 3svh, 3rem)) clamp(1rem, 5svh, 6rem);
  }
  .impacts__eyebrow { font-size: clamp(.75rem, calc(var(--impacts-type-unit) * .75), 1rem); margin-bottom: clamp(.5rem, 2svh, 1.5rem); }
  .impacts h2 { font-size: clamp(1.75rem, min(4.5vw, calc(10svh - 2rem)), 4.5rem); }
    .impacts__axes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, min(4vw, 6svh), 4rem); margin-top: clamp(1rem, 4svh, 5rem); }
  .impacts__axis { padding-top: clamp(.75rem, 2.5svh, 2.25rem); }
  .impacts__number { font-size: clamp(.875rem, calc(var(--impacts-type-unit) * 1.125), 1.5rem); }
  .impacts h3 { margin: clamp(.375rem, 1svh, .875rem) 0 clamp(.5rem, 1.3svh, 1.25rem); font-size: clamp(1.125rem, calc(var(--impacts-type-unit) * 1.375), 1.75rem); }
  .impacts__axis p { font-size: var(--impacts-type-unit); line-height: 1.6; }
}

@media (min-width: 600px) and (max-height: 520px) {
  .reading-shade { fill: url(#reading-wide); }
  :root { --header-height: clamp(3.5rem, 9svh, 5rem); }
  .hero__content { padding-top: clamp(.75rem, 3svh, 1.5rem); padding-bottom: max(clamp(2rem, 8svh, 3rem), var(--hero-scene-space)); }
  .hero h1 { max-width: 22ch; font-size: clamp(2rem, min(5.7vw, 8svh), 3rem); }
  .hero__description { max-width: 52ch; margin-top: clamp(.5rem, 2svh, 1rem); font-size: clamp(.9375rem, 2svh, 1.0625rem); }
}

@media (min-width: 960px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .is-motion-ready .flame__shape { animation: flame-breathe 2.3s ease-in-out -1.3s infinite; }
  .is-motion-ready .flame--slow { animation-duration: 4.2s; animation-delay: -3.2s; }
  .is-motion-ready .flame:nth-of-type(3n) .flame__shape { animation-duration: 3.1s; animation-delay: -2.1s; }
  .is-motion-ready .fire-light { animation: fire-light 7.1s ease-in-out -2s infinite alternate; }
  .landscape--desktop.is-smoke-ready .smoke-simple { display: none; }
  .landscape--desktop.is-smoke-ready .smoke-layers { display: block; }
  .landscape--desktop.is-smoke-ready .smoke-layer { animation: smoke-rise 18s linear -9s infinite; }
  .landscape--desktop.is-smoke-ready .smoke-layer--second { animation-duration: 22s; animation-delay: 0s; }
  .landscape--desktop.is-smoke-ready .smoke-texture { animation: smoke-sway 9s ease-in-out -4.5s infinite alternate; }
  .landscape--desktop.is-smoke-ready .smoke-layer--second .smoke-texture { animation-duration: 11s; animation-delay: 0s; }
  .is-motion-ready .embers { display: block; }
  .is-motion-ready .ember { animation: ember-rise 9s linear infinite; opacity: 0; }
  .is-motion-ready .ember--second { animation-delay: -3s; animation-duration: 11s; }
  .is-motion-ready .ember--third { animation-delay: -6s; animation-duration: 13s; }
}

@supports not selector(:popover-open) {
  .menu-toggle { display: none; }
  .site-nav { display: block; position: static; width: 100%; padding-block: .5rem 1.25rem; border: 0; background: transparent; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  ::view-transition-group(root) { animation-duration: 180ms; animation-timing-function: ease; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 180ms; animation-timing-function: ease; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .embers { display: none; }
  .cursor-glow { opacity: 0 !important; }
}

/* Sumário compartilhado das páginas educativas. */
.reading-contents { padding-block: var(--reading-gap, var(--data-gap, 1rem)); }
.reading-contents__title { margin: 0 0 .5rem; font-weight: 650; }
.reading-contents ul { display: grid; margin: 0; padding: 0; list-style: none; }
.reading-contents li { min-width: 0; }
.reading-contents a { display: inline-flex; align-items: center; min-height: 44px; padding-block: .5rem; line-height: 1.5; text-underline-offset: .25em; }
.reading-contents a:hover { color: var(--impacts-accent); }
