@font-face {
  font-family: Switzer;
  src: url("assets/fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Switzer;
  src: url("assets/fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("assets/fonts/ibm-plex-mono-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

[data-editorial-theme] {
  --space-4: 0.25rem;
  --space-8: 0.5rem;
  --space-12: 0.75rem;
  --space-16: 1rem;
  --space-24: 1.5rem;
  --space-32: 2rem;
  --space-48: 3rem;
  --space-64: 4rem;
  --target-touch: 2.75rem;
  --font-editorial: Switzer, Manrope, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --border-hairline: 1px;
  --radius-pill: 999px;
}

[data-editorial-theme="home"] {
  --home-sky: #A5D1EB;
  --home-navigation: #E4F1FA;
  --home-intro: #BEDCEB;
  --home-page-dark: #081C34;
  --home-ink: #102D46;
  --home-ink-inverse: #EDF7FF;
  --home-action-selected-bg: #175E97;
  --home-focus-ring: #21BAD9;
  --home-chart-series-01: #9DE5F4;
  --home-explorer-economia: #C8DFED;
  --home-explorer-visitantes-e-origem: #8FC5DF;
  --home-explorer-hospedagem: #38789F;
  --home-explorer-trabalho: #163E72;
  --home-explorer-empresas-e-servicos: #103B4A;
  --home-explorer-cadastur: #081C37;
}

[data-editorial-theme="thematic"] {
  --theme-cream-100: #FDF7EE;
  --theme-cream-200: #F8EAD5;
  --theme-cream-300: #EFE0C6;
  --theme-cream-400: #E6D1AE;
  --theme-forest-900: #0F3D24;
  --theme-forest-700: #196938;
  --theme-forest-800: #355945;
  --theme-sage-500: #7EA68C;
  --theme-sage-300: #BDDAC6;
  --theme-bavarian-700: #295296;
  --theme-bavarian-500: #4A74B8;
  --theme-bavarian-300: #9CB8DA;
  --theme-gold-500: #DC9E2A;
  --theme-gold-700: #B57B14;
  --theme-coral-500: #D8483B;
  --theme-coral-700: #A93227;
  --theme-forest-muted: #527260;
  --theme-page: var(--theme-cream-200);
  --theme-panel: var(--theme-cream-100);
  --theme-surface-subtle: var(--theme-cream-300);
  --theme-overlay: rgb(15 61 36 / 45%);
  --theme-ink-primary: var(--theme-forest-900);
  --theme-ink-secondary: var(--theme-forest-800);
  --theme-ink-muted: var(--theme-forest-muted);
  --theme-ink-inverse: var(--theme-cream-100);
  --theme-ink-accent-gold: var(--theme-gold-700);
  --theme-ink-negative: var(--theme-coral-700);
  --theme-action-primary-bg: var(--theme-forest-900);
  --theme-action-primary-hover: var(--theme-forest-700);
  --theme-action-selected-bg: var(--theme-forest-900);
  --theme-action-unselected-bg: var(--theme-cream-100);
  --theme-action-unselected-hover: var(--theme-cream-300);
  --theme-action-unselected-border: rgb(15 61 36 / 22%);
  --theme-focus-ring: var(--theme-bavarian-700);
  --theme-chart-series-01: var(--theme-forest-900);
  --theme-chart-series-02: var(--theme-bavarian-700);
  --theme-chart-series-03: var(--theme-gold-500);
  --theme-chart-series-04: var(--theme-forest-700);
  --theme-chart-series-05: var(--theme-sage-500);
  --theme-chart-positive: var(--theme-forest-700);
  --theme-chart-negative: var(--theme-coral-500);
  --theme-chart-axis-label: var(--theme-forest-800);
  --theme-chart-gridline: rgb(15 61 36 / 10%);
  --theme-border-subtle: rgb(15 61 36 / 16%);
  --theme-border-strong: rgb(15 61 36 / 35%);
}

[data-editorial-theme] {
  --grid-columns: 4;
  --grid-edge: 1.25rem;
  --grid-gutter: var(--space-16);
}

@media (min-width: 768px) {
  [data-editorial-theme] {
    --grid-columns: 8;
    --grid-edge: clamp(2.25rem, calc(2.25rem + (100% - 900px) / 20), 4rem);
    --grid-gutter: 1.25rem;
  }
}

@media (min-width: 1440px) {
  [data-editorial-theme] {
    --grid-columns: 12;
    --grid-edge: var(--space-64);
    --grid-gutter: var(--space-24);
  }
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  column-gap: var(--grid-gutter);
  width: 100%;
  padding-inline: var(--grid-edge);
}

.editorial-grid > * {
  grid-column: 1 / -1;
  min-inline-size: 0;
}

[data-editorial-theme="thematic"] {
  background: var(--theme-page);
  color: var(--theme-ink-primary);
  font-family: var(--font-editorial);
}

[data-editorial-theme="thematic"] .chapter-hero {
  min-height: 100svh;
}

[data-editorial-theme="thematic"] .chapter-section {
  --accent: var(--theme-chart-series-01);
  background: var(--theme-panel);
  color: var(--theme-ink-primary);
}

[data-editorial-theme="thematic"] .editorial-grid > header {
  display: block;
}

[data-editorial-theme="thematic"] .editorial-grid > header p {
  margin-block-start: var(--space-12);
}

[data-editorial-theme="thematic"] :is(.chapter-fact strong, .chapter-selection, .chapter-meta) {
  font-family: var(--font-mono);
  font-weight: 400;
}

[data-editorial-theme="thematic"] .chapter-fact strong {
  color: var(--theme-ink-accent-gold);
}

[data-editorial-theme="thematic"] .chapter-controls label {
  min-inline-size: 0;
  max-inline-size: 100%;
  font-weight: 500;
}

[data-editorial-theme="thematic"] .chapter-controls select {
  max-inline-size: 100%;
  min-block-size: var(--target-touch);
  padding-inline: var(--space-16);
  border: var(--border-hairline) solid var(--theme-ink-secondary);
  border-radius: var(--radius-pill);
  background: var(--theme-action-unselected-bg);
  color: var(--theme-ink-primary);
}

[data-editorial-theme="thematic"] .chapter-controls select:hover {
  background: var(--theme-action-unselected-hover);
}

[data-editorial-theme="thematic"] .chapter :focus-visible {
  outline-color: var(--theme-focus-ring);
}

@media (min-width: 768px) {
  [data-editorial-theme="thematic"] .editorial-grid > header {
    grid-column: 1 / span 6;
  }
}

@media (min-width: 1440px) {
  [data-editorial-theme="thematic"] .editorial-grid > header {
    grid-column: 1 / span 8;
  }
}

.scenic-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  height: 44svh;
  pointer-events: none;
}

.scenic-stage > .scenic-plane {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--scenic-focus, center);
}

[data-editorial-theme="thematic"] .chapter-nav {
  background: var(--theme-page);
  color: var(--theme-ink-primary);
}

[data-editorial-theme="thematic"] .scenic-chapters {
  padding: 0;
  background: var(--theme-page);
}

.scenic-act {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
  grid-template-rows: auto;
  column-gap: var(--grid-gutter);
  width: 100%;
  background: var(--theme-page);
}

.scenic-act .scenic-stage {
  grid-column: 1 / -1;
  background: var(--theme-cream-400);
  --scenic-focus: 28% center;
}

.scenic-act .scenic-panel {
  grid-column: 1 / -1;
  display: block;
  min-inline-size: 0;
  width: 100%;
  align-self: center;
  padding: var(--space-32) var(--grid-edge);
  background: var(--theme-panel);
  color: var(--theme-ink-primary);
}

.scenic-panel .chapter-fact {
  margin-block: var(--space-24);
}

.scenic-panel header {
  margin-block-end: var(--space-24);
}

.scenic-panel .chapter-graph h3 {
  display: none;
}

.scenic-panel :is(.chapter-button, .chapter-action) {
  background: var(--theme-action-primary-bg);
  color: var(--theme-ink-inverse);
}

@media (min-width: 768px) {
  .scenic-act {
    min-height: 100svh;
    padding: var(--space-48) var(--grid-edge);
  }

  .scenic-act .scenic-stage {
    position: absolute;
    inset: 0 0 auto;
    grid-column: auto;
    height: 100svh;
    --scenic-focus: 35% center;
  }

  .scenic-act .scenic-panel {
    position: relative;
    grid-column: 6 / -1;
    padding: var(--space-32);
  }

  .scenic-act-data .scenic-panel {
    grid-column-start: 4;
  }

  .scenic-act .chapter-masthead h1 {
    font-size: clamp(2.5rem, 5vw, 6rem);
  }
}

@media (min-width: 1440px) {
  .scenic-act .scenic-panel {
    grid-column-start: 8;
  }

  .scenic-act-data .scenic-panel {
    grid-column-start: 6;
  }
}

[data-editorial-theme="home"] #inicio .hero-stage {
  background: var(--home-sky);
}

[data-editorial-theme="home"] .hero-stage .scenic-stage {
  height: 100%;
}

[data-editorial-theme="home"] .hero#inicio .hero-title {
  inset: 16% var(--grid-edge) auto;
  width: min(52rem, calc(100% - 2 * var(--grid-edge)));
  color: var(--home-ink);
}

[data-editorial-theme="home"] .hero-title img {
  filter: brightness(.25);
}

[data-editorial-theme="home"] #observatorio.story {
  background-color: var(--home-intro);
}

[data-editorial-theme="home"] [data-editorial-block="equipe"] {
  background-color: var(--home-page-dark);
  color: var(--home-ink-inverse);
}

@media (max-width: 767px) {
  [data-editorial-theme="thematic"] .scenic-act.chapter-hero {
    min-height: 0;
  }

  .scenic-act .scenic-panel {
    padding-bottom: var(--space-48);
  }

  [data-editorial-theme="home"] .hero-stage .scenic-stage {
    height: 44svh;
  }

  [data-editorial-theme="home"] .hero#inicio .hero-title {
    position: relative;
    inset: auto;
    margin: var(--space-24) auto 0;
  }
}
