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

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/fraunces-600.woff2") format("woff2");
}

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

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-400.woff2") format("woff2");
}

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/source-serif-4-600.woff2") format("woff2");
}

:root {
  --pedra: #f3efe6;
  --pedra-2: #e7e0d2;
  --areia: #e4d8c2;
  --terracota: #8d3d28;
  --terracota-linha: #a85a3c;
  --verde: #1b3330;
  --verde-meio: #2a4743;
  --azul: #1a2744;
  --tinta: #1c1915;
  --tinta-suave: #3d362e;
  --linha: #d3c8b4;
  --claro: #f7f4ee;
  --medida: 40rem;
  --largo: 72rem;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --titulo: "Fraunces", "Iowan Old Style", Palatino, Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--tinta);
  background: var(--pedra);
}

:focus-visible {
  outline: 2px solid var(--azul);
  outline-offset: 3px;
}

::selection {
  background: #e8cfc0;
  color: var(--tinta);
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1,
h2,
h3 {
  font-family: var(--titulo);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--verde);
}

p,
ul,
ol,
blockquote,
table {
  margin: 0;
}

a {
  color: var(--azul);
  text-underline-offset: 0.22em;
}

.saltar {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: 0.6rem 0.9rem;
  background: var(--azul);
  color: var(--claro);
  text-decoration: none;
}

.saltar:focus {
  top: 1rem;
}

.interior {
  width: min(var(--largo), calc(100% - 2.5rem));
  margin-inline: auto;
}

.cabecalho {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--pedra);
  border-bottom: 1px solid var(--linha);
}

.cabecalho-interior {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}

.marca,
.marca-rodape {
  margin: 0;
  font-family: var(--titulo);
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.marca a {
  color: var(--verde);
  text-decoration: none;
}

.cabecalho nav ul,
.rodape nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  padding: 0;
  list-style: none;
}

.cabecalho nav a,
.rodape nav a {
  color: var(--azul);
  font-size: 1rem;
}

.abertura {
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0 2.75rem;
  scroll-margin-top: 6.5rem;
}

.estrada {
  display: block;
  width: min(12.6rem, 82%);
  height: auto;
  margin: 0.15rem auto 0.7rem;
  order: -1;
  pointer-events: none;
}

.abertura-texto {
  width: min(var(--largo), calc(100% - 2.5rem));
  margin-inline: auto;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 5.25rem);
  max-width: 10ch;
}

.subtitulo {
  margin-top: 0.65rem;
  max-width: 22rem;
  color: var(--verde-meio);
  font-size: 1.25rem;
}

.versos {
  margin-top: 1rem;
  font-family: var(--titulo);
  font-style: italic;
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.45;
  color: var(--verde);
}

.acoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.botao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid var(--verde);
  background: var(--verde);
  color: var(--claro);
  text-decoration: none;
}

.botao-secundario {
  background: transparent;
  color: var(--verde);
}

.botao:hover {
  background: var(--azul);
  border-color: var(--azul);
  color: var(--claro);
}

.seccao {
  padding-block: 4.5rem;
  border-top: 1px solid var(--linha);
  scroll-margin-top: 6.5rem;
}

h2 {
  margin: 0 0 1.4rem;
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  max-width: 16ch;
}

.prosa {
  max-width: var(--medida);
}

.prosa + .prosa {
  margin-top: 1rem;
}

.nota.seccao {
  border-top: 0;
  padding-top: 2.35rem;
  padding-bottom: 4.25rem;
}

.nota .interior {
  width: min(38rem, calc(100% - 2.5rem));
}

.nota h1 {
  max-width: 16ch;
  margin: 0 0 1.2rem;
  font-size: clamp(2.15rem, 4.2vw, 3rem);
  line-height: 1.14;
}

.nota h2 {
  margin: 2.3rem 0 1.2rem;
  max-width: none;
  font-size: clamp(1.45rem, 2.4vw, 1.8rem);
  line-height: 1.28;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.nota h2::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 1px;
  margin-bottom: 0.85rem;
  background: var(--terracota);
}

.nota .prosa + .prosa {
  margin-top: 1.2rem;
}

.nota .aviso {
  color: var(--tinta-suave);
}

.voltar {
  margin: 0 0 1.15rem;
  font-size: 0.98rem;
}

.voltar a {
  color: var(--verde-meio);
}

.elenco {
  max-width: none;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.elenco li {
  padding: 0.85rem 0;
  border-top: 1px solid var(--linha);
}

.elenco li:last-child {
  border-bottom: 1px solid var(--linha);
}

.fontes {
  max-width: none;
  margin: 1.2rem 0 0;
  padding-left: 1.35rem;
}

.fontes li::marker {
  color: var(--terracota);
}

.fontes li + li {
  margin-top: 1.05rem;
}

.pares {
  width: min(100%, 46rem);
  border-collapse: collapse;
}

.pares caption {
  caption-side: top;
  text-align: left;
  margin-bottom: 0.8rem;
  color: var(--tinta-suave);
}

.pares th,
.pares td {
  padding: 0.95rem 1rem 0.95rem 0;
  border-bottom: 1px solid var(--linha);
  text-align: left;
  vertical-align: baseline;
  font-weight: 400;
}

.pares thead th {
  padding-top: 0;
  color: var(--terracota);
  font-family: var(--serif);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
}

.pares tbody th {
  font-family: var(--titulo);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--verde);
  width: 42%;
}

.pares td {
  font-size: 1.15rem;
}

.etapas {
  counter-reset: etapa;
  max-width: 42rem;
  margin: 0.5rem 0 0;
  padding: 0 0 0 2.6rem;
  list-style: none;
  border-left: 1px solid var(--terracota-linha);
}

.etapa {
  position: relative;
}

.etapa::before {
  content: counter(etapa);
  counter-increment: etapa;
  position: absolute;
  left: -2.6rem;
  top: 0.85rem;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  background: var(--pedra);
  border: 1px solid var(--terracota);
  color: var(--terracota);
  font-family: var(--titulo);
  font-size: 0.8rem;
}

.etapa details {
  padding-block: 0.35rem 1rem;
}

.etapa summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.45rem 0;
  cursor: pointer;
  font-family: var(--titulo);
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  color: var(--verde);
  list-style: none;
}

.etapa summary::-webkit-details-marker {
  display: none;
}

.etapa summary::after {
  content: "";
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 1.5px solid var(--terracota);
  border-bottom: 1.5px solid var(--terracota);
  transform: translateY(-0.15rem) rotate(45deg);
}

.etapa details[open] summary::after {
  transform: translateY(0.15rem) rotate(225deg);
}

.etapa p {
  max-width: 36rem;
  padding-bottom: 0.4rem;
  color: var(--tinta-suave);
}

.caminhos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 2rem;
  max-width: 60rem;
  margin-top: 1.5rem;
  padding: 0;
  list-style: none;
}

.caminhos li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--linha);
  font-family: var(--titulo);
  font-size: 1.25rem;
  color: var(--verde);
}

.caminhos li::before {
  content: "";
  display: inline-block;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.7rem;
  background: var(--terracota);
  vertical-align: 0.12em;
}

.caminhos a {
  color: var(--verde);
}

.assinatura {
  margin-top: 2rem;
  max-width: 22rem;
  font-family: var(--titulo);
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--verde);
}

.assinatura span {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.45;
  color: var(--tinta-suave);
}

.guia {
  margin-top: 2.75rem;
  padding-left: 1.15rem;
  border-left: 2px solid var(--terracota);
  max-width: 38rem;
}

.guia h3 {
  margin: 0 0 0.55rem;
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--terracota);
}

.guia blockquote {
  margin: 0;
}

.guia blockquote p {
  font-family: var(--titulo);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.28;
  color: var(--verde);
}

.papeis {
  margin-top: 0.9rem;
  max-width: 36rem;
  color: var(--tinta-suave);
}

.frase {
  background: var(--verde);
  border-top-color: var(--verde);
}

.frase h2,
.frase p {
  color: var(--claro);
}

.frase h2 {
  max-width: 18ch;
  font-style: italic;
  font-size: clamp(2rem, 5vw, 3.3rem);
}

.frase p {
  max-width: 36rem;
  font-size: 1.2rem;
}

.frase :focus-visible {
  outline-color: var(--claro);
}

.rodape {
  padding-block: 3rem 4rem;
  background: var(--pedra-2);
  border-top: 1px solid var(--linha);
}

.marca-rodape {
  font-size: 1.6rem;
  color: var(--verde);
}

.rodape nav {
  margin-top: 1.1rem;
}

.dominio,
.assinatura-rodape {
  margin-top: 1.25rem;
  color: var(--tinta-suave);
  font-size: 0.98rem;
}

.assinatura-rodape {
  font-family: var(--titulo);
  font-size: 1.05rem;
  color: var(--verde);
}

.berma,
.boca {
  fill: none;
  stroke-linecap: butt;
}

@media (min-width: 42rem) {
  .caminhos {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 64rem) {
  .interior,
  .abertura-texto {
    width: min(var(--largo), calc(100% - 6rem));
  }

  .abertura,
  .seccao {
    scroll-margin-top: 5rem;
  }

  .abertura {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 20.5rem);
    align-items: end;
    column-gap: 2.75rem;
    width: min(var(--largo), calc(100% - 6rem));
    margin-inline: auto;
    padding-block: 1.5rem 3.5rem;
  }

  .estrada {
    order: 0;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: auto;
    margin: 0;
  }

  .abertura-texto {
    grid-column: 1;
    grid-row: 1;
    width: auto;
    margin: 0;
    align-self: center;
  }

  .subtitulo {
    margin-top: 0.85rem;
  }

  .versos {
    margin-top: 1.35rem;
  }

  .acoes {
    margin-top: 1.6rem;
  }

  .caminhos {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .js .etapa {
    opacity: 0;
    transform: translateY(0.7rem);
    transition: opacity 0.55s ease, transform 0.55s ease;
  }

  .js .etapa.visivel {
    opacity: 1;
    transform: none;
  }

  .berma {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: desenhar 1.8s ease forwards;
  }

  .marco {
    opacity: 0;
    animation: surgir 0.65s ease 0.7s forwards;
  }
}

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

@keyframes desenhar {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes surgir {
  to {
    opacity: 1;
  }
}
