:root {
  --papel: #f4efe4;
  --tinta: #241f1a;
  --tinta-suave: #4f483d;
  --linha: #d4cbb6;
  --marinho: #1a2744;
  --marinho-escuro: #101a30;
  --ouro: #8a6a22;
  --branco: #ffffff;
  --sombra-texto: rgba(16, 26, 48, 0.55);
  --veu: rgba(16, 26, 48, 0.62);
  --texto: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --medida: 36rem;
  --largura: 70rem;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 1.0625rem/1.6 var(--texto); }
h1, h2 { line-height: 1.12; overflow-wrap: break-word; min-width: 0; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); max-width: 14ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2.15rem); }
p { margin: 0 0 1em; }
a { color: var(--marinho); text-underline-offset: .18em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--ouro); outline-offset: 2px; }
.largura { width: min(100% - 2.5rem, var(--largura)); margin-inline: auto; }
.pular { position: absolute; left: -999px; }
.pular:focus { left: 1rem; top: 1rem; background: var(--papel); padding: .5rem .75rem; z-index: 5; }

.topo { background: var(--papel); border-bottom: 1px solid var(--linha); position: relative; z-index: 2; }
.topo-linha { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: .75rem; }
.marca { font: 600 1.25rem var(--texto); color: var(--tinta); text-decoration: none; }
.menu { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; list-style: none; margin: 0; padding: 0; font: .95rem var(--ui); }
.menu a { color: var(--tinta-suave); text-decoration: none; }
.menu a:hover { color: var(--marinho); text-decoration: underline; }

.botao { display: inline-block; font: 600 1rem var(--ui); color: var(--branco); background: var(--marinho); padding: .8rem 1.2rem; border-radius: 4px; text-decoration: none; border: 0; cursor: pointer; transition: background-color .15s ease; }
.botao:hover { background: var(--marinho-escuro); }
.botao-leve { font: 600 1rem var(--ui); color: var(--branco); text-decoration: underline; text-underline-offset: .2em; padding: .8rem .2rem; }
.botao-texto { font: .95rem var(--ui); background: none; border: 0; padding: 0; color: var(--marinho); text-decoration: underline; cursor: pointer; }

.abertura { position: relative; min-height: min(88vh, 46rem); display: grid; align-items: end; background: var(--marinho-escuro); }
.pintura { position: absolute; inset: 0; overflow: hidden; }
.pintura img, .pintura canvas, .mapa img, .mapa canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pintura img { object-position: 40% 35%; }
.pintura canvas, .mapa canvas { opacity: 0; transition: opacity .6s ease; }
.pintura canvas.pronto, .mapa canvas.pronto { opacity: 1; }
.pintura::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--veu) 0%, transparent 55%); pointer-events: none; }
.abertura-texto { position: relative; z-index: 1; color: var(--branco); padding-block: 3rem 2.5rem; text-shadow: 0 1px 12px var(--sombra-texto); }
.abertura-texto p { font-size: 1.2rem; max-width: 32rem; }
.acoes { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; align-items: center; margin-top: 1.4rem; }
.credito { font: .82rem/1.45 var(--ui); color: var(--tinta-suave); margin-top: .6rem; }
cite { font-style: italic; }

.faixa { padding-block: clamp(3rem, 8vw, 5rem); }
.portas { list-style: none; margin: 1.5rem 0 0; padding: 0; max-width: 46rem; border-top: 1px solid var(--linha); }
.portas li { border-bottom: 1px solid var(--linha); }
.portas a { display: grid; gap: .2rem; padding: 1rem .25rem; text-decoration: none; color: var(--tinta); }
.portas a:hover strong { text-decoration: underline; }
.portas strong { font-size: 1.15rem; font-weight: 600; color: var(--marinho); }
.portas span { font: .98rem/1.5 var(--ui); color: var(--tinta-suave); }

.mapa-secao { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; background: var(--papel); border-block: 1px solid var(--linha); }
.mapa { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--linha); }
.mapa-texto { padding: 2.5rem clamp(1.25rem, 4vw, 3rem); width: auto; margin: 0; max-width: var(--medida); }

.formulario { display: grid; gap: .45rem; max-width: 26rem; margin-top: 1rem; }
.formulario label { font: .95rem var(--ui); }
.formulario input { font: 1rem var(--ui); padding: .7rem .75rem; border: 1px solid var(--tinta-suave); border-radius: 4px; background: var(--branco); margin-bottom: .6rem; }
.formulario .botao { justify-self: start; }
.rodape { border-top: 1px solid var(--linha); padding-block: 2rem 3rem; font: .9rem var(--ui); color: var(--tinta-suave); }

@media (max-width: 760px) {
  .menu { display: none; }
  .abertura { min-height: 82vh; }
  .mapa-secao { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .pintura canvas, .mapa canvas, .botao { transition: none; }
}
