/* Sinalização da estrada: a página é a pista, cada informação é uma placa de rodovia. */
:root {
  --asfalto: #2C2A27;
  --mata: #1B231C;
  --brita: #3D3933;
  --texto: #ECEAE4;
  --texto-2: #B9B6AE;
  --faixa-amarela: #F2B705;
  --faixa-branca: #E9E7E1;
  --verde: #0B6A48;
  --verde-hover: #E3F0EA;
  --verde-sub: #FFFFFF;
  --marrom: #6E3B1F;
  --marrom-sub: #EAD9CC;
  --azul: #1F4E9A;
  --azul-hover: #2A5DB0;
  --tinta: #121212;
  --branco: #FFFFFF;
  --erro: #FFE08A;

  --sans: "Overpass", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html {
  background: var(--mata) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='d'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='5' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .36  0 0 0 0 .47  0 0 0 0 .32  .9 0 0 0 -.5'/></filter><rect width='100%' height='100%' filter='url(%23d)'/></svg>");
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #5E5952 var(--asfalto);
}
body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
  color: var(--texto);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--faixa-amarela); color: var(--tinta); }
img { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, p, ul, ol, dl, dd, figure { margin: 0; }

/* ---------- Estrada ---------- */
/* a faixa de asfalto; fora dela, no computador, aparecem o acostamento de brita e a mata */
.estrada {
  position: relative;
  max-width: 760px;
  min-height: 100vh;
  margin: 0 auto;
  background-color: var(--asfalto);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='a'><feTurbulence type='fractalNoise' baseFrequency='1.4' seed='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  .8 0 0 0 -.5'/></filter><rect width='100%' height='100%' filter='url(%23a)'/></svg>"), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='b'><feTurbulence type='fractalNoise' baseFrequency='1.1' seed='9' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 1 0 0 -.6'/></filter><rect width='100%' height='100%' filter='url(%23b)'/></svg>"), url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='700' height='700'><filter id='c'><feTurbulence type='fractalNoise' baseFrequency='.005' numOctaves='3' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  .45 0 0 0 -.18'/></filter><rect width='100%' height='100%' filter='url(%23c)'/></svg>");
  background-size: 140px 140px, 140px 140px, 700px 700px;
  box-shadow: 0 0 0 9px var(--brita), 0 0 0 10px rgba(0, 0, 0, .4);
}
@media (min-width: 760px) {
  .estrada::before,
  .estrada::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--faixa-branca);
    opacity: .85;
    pointer-events: none;
  }
  .estrada::before { left: 16px; }
  .estrada::after { right: 16px; }
}

/* ---------- Pista ---------- */
.pista {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
  padding-inline: 32px;
  padding-block: max(28px, env(safe-area-inset-top)) max(56px, env(safe-area-inset-bottom));
  display: grid;
  gap: 30px;
  /* trilhas de pneu: o asfalto escurece onde as rodas passam */
  background: linear-gradient(90deg, transparent 12%, rgba(0, 0, 0, .1) 21%, transparent 30%, transparent 70%, rgba(0, 0, 0, .1) 79%, transparent 88%);
}
/* eixo: faixa dupla amarela com tachas; à direita, a divisória tracejada 1:3 */
.pista::before,
.pista::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
}
.pista::before {
  left: 7px;
  width: 14px;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='132'><rect x='4' y='60' width='6' height='12' rx='2' fill='%23B37C00'/><rect x='4.5' y='60.5' width='5' height='5' rx='1.5' fill='%23FFD866'/></svg>") 0 calc(var(--pista-y, 0) * -1px) / 14px 132px repeat-y,
    linear-gradient(90deg, var(--faixa-amarela) 0 4px, transparent 4px 10px, var(--faixa-amarela) 10px 14px);
  opacity: .92;
}
.pista::after {
  right: 9px;
  width: 5px;
  /* o script empurra o tracejado conforme a rolagem: a pista corre mais rápido que o conteúdo */
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='5' height='120'><rect width='5' height='36' rx='1' fill='%23E9E7E1'/></svg>") 0 calc(var(--pista-y, 0) * -1px) / 5px 120px repeat-y;
  opacity: .85;
}

/* ---------- Placa ---------- */
.placa {
  --cor: var(--verde);
  position: relative;
  display: block;
  background: var(--cor);
  color: var(--branco);
  padding: 5px;
  border-radius: 14px;
  box-shadow: 0 14px 22px -12px rgba(0, 0, 0, .65);
}
.placa.marrom { --cor: var(--marrom); }
.placa.azul { --cor: var(--azul); }
.placa-in {
  display: block;
  border: 3px solid currentColor;
  border-radius: 10px;
  padding: 16px 18px 14px;
  container-type: inline-size;
}

/* placa da Tamoios */
.topo .placa-in { display: grid; gap: 6px; }
.placa-topo { display: flex; align-items: center; gap: 10px; }
.escudo {
  background: var(--branco);
  color: var(--verde);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  line-height: 1;
  padding: 6px 7px 4px;
  border-radius: 5px;
}
.rodovia { font-weight: 600; font-size: 15px; flex: 1; min-width: 0; }
.seta { width: 40px; height: 40px; flex: none; fill: currentColor; }
.seta-diag { transform: rotate(45deg); }
.seta-dir { transform: rotate(90deg); }
.seta-esq { transform: rotate(-90deg); }
.destino {
  font-weight: 800;
  font-size: min(11.6cqi, 62px);
  line-height: 1.05;
  letter-spacing: -.01em;
  padding-top: 4px;
  white-space: nowrap;
}
.placa-linha {
  border-top: 2px solid currentColor;
  margin-top: 6px;
  padding-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-weight: 800;
  font-size: min(6.6cqi, 30px);
}
.placa-linha span:last-child { white-space: nowrap; }

.poste { display: grid; }
.postes { display: flex; justify-content: space-between; padding-inline: 20%; height: 40px; }
.postes span {
  width: 10px;
  background: linear-gradient(90deg, #A2A4A6 0 58%, #7B7E81 58% 100%);
  border-radius: 0 0 2px 2px;
}

/* placa de datas */
.tabela-placa { padding-block: 6px; }
.tabela-placa > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-block: 10px 8px;
  font-weight: 800;
  font-size: min(7.4cqi, 30px);
  line-height: 1.1;
}
.tabela-placa > div + div { border-top: 2px solid currentColor; }
.tabela-placa dd { text-align: right; }

/* ---------- Placa de saída (confirmação) ---------- */
.saida { display: flex; flex-direction: column; align-items: flex-end; }
.saida > .placa:not(.aba) { align-self: stretch; }
.aba { border-radius: 12px 12px 0 0; padding-bottom: 0; margin-right: 22px; box-shadow: none; }
.aba .placa-in {
  container-type: normal;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 8px 14px 8px;
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.aba b { font-size: 18px; letter-spacing: .02em; }

.form-placa { display: grid; gap: 12px; }
.form-placa label { font-weight: 800; font-size: 21px; }
.form-placa input {
  width: 100%;
  font: 600 19px var(--sans);
  color: var(--tinta);
  background: var(--branco);
  border: 0;
  border-radius: 6px;
  padding: 14px 14px 11px;
  caret-color: var(--verde);
}
.form-placa input::placeholder { color: #5F6A65; }
.botao-placa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  font: 800 21px var(--sans);
  line-height: 1.2;
  color: var(--verde);
  background: var(--branco);
  border: 0;
  border-radius: 8px;
  padding: 13px 14px 11px 16px;
  cursor: pointer;
  transition: background-color .15s ease;
}
.botao-placa .seta { width: 28px; height: 28px; }
.botao-placa:hover { background: var(--verde-hover); }
.botao-placa:disabled { opacity: .7; cursor: progress; }
.erro { color: var(--erro); font-weight: 600; }

.feito { display: grid; gap: 4px; }
.feito-nome {
  font-weight: 900;
  font-size: min(12cqi, 52px);
  line-height: 1.02;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.feito-texto { font-weight: 600; font-size: 18px; color: var(--verde-sub); }
.link-placa {
  justify-self: start;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  font: 600 16px var(--sans);
  color: var(--branco);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
  border-radius: 3px;
}

@media (prefers-reduced-motion: no-preference) {
  .feito.chegou { animation: troca-placa 560ms cubic-bezier(.16, 1, .3, 1); }
  .aba.chegou { animation: troca-aba 560ms cubic-bezier(.16, 1, .3, 1); }
}
@keyframes troca-placa {
  from { clip-path: inset(0 0 100% 0); transform: translateY(10px); }
  to { clip-path: inset(0); transform: none; }
}
@keyframes troca-aba {
  from { transform: translateY(100%); }
  to { transform: none; }
}

/* ---------- A casa ---------- */
.placa-titulo { font-weight: 800; font-size: min(8.4cqi, 34px); line-height: 1.1; }
.fotos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-top: 14px;
  background: var(--branco);
  border: 3px solid var(--branco);
  border-radius: 6px;
  overflow: hidden;
}
.fotos figure { position: relative; min-width: 0; }
.fotos img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; background: #4A3A2E; }
.fotos .foto-grande { grid-column: 1 / -1; }
.fotos .foto-grande img { aspect-ratio: 4 / 3; }
.fotos figcaption {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: var(--marrom);
  color: var(--branco);
  border: 2px solid var(--branco);
  border-radius: 5px;
  padding: 4px 8px 2px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
}
.placa-endereco { margin-top: 14px; font-weight: 800; font-size: min(5.6cqi, 21px); line-height: 1.25; }
.placa-sub { margin-top: 8px; color: var(--marrom-sub); font-weight: 600; font-size: 15px; }

/* ---------- Perto da casa ---------- */
.atracoes { display: grid; gap: 14px; }
/* letreiro pintado no asfalto: branco de pista, esticado na vertical */
.pintura {
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faixa-branca);
  opacity: .92;
  transform: scaleY(1.7);
  transform-origin: left top;
  margin-bottom: 20px;
}
.destinos-topo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 2px solid currentColor;
  font-weight: 800;
  font-size: min(7.6cqi, 30px);
  line-height: 1.1;
}
.destinos-topo .seta { width: 34px; height: 34px; }
.destinos-topo.direita { justify-content: space-between; }
.destinos ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.destinos .fotos { margin-top: 0; }
.destinos .fotos .foto-grande img { aspect-ratio: 16 / 9; }
.destinos .fotos + ul { margin-top: 12px; }
.destinos li { font-weight: 800; font-size: min(7cqi, 26px); line-height: 1.15; }
.destinos li small { display: block; font-weight: 600; font-size: 15px; color: var(--marrom-sub); line-height: 1.3; }

/* ---------- Serviços ---------- */

.servicos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
a.placa { text-decoration: none; transition: background-color .15s ease; }
a.placa.azul:hover { --cor: var(--azul-hover); }
.servicos .placa-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 100%;
  padding: 12px 12px 10px 14px;
  font-weight: 800;
  font-size: 16px;
  line-height: 1.2;
}
.servicos .seta { width: 22px; height: 22px; }

/* foco visível em qualquer placa ou campo */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--faixa-amarela);
  outline-offset: 3px;
}

@media (max-width: 360px) {
  .servicos { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .botao-placa, a.placa { transition: none; }
}

/* créditos das fotos dos lugares */
.creditos { color: var(--texto-2); font-size: 13px; line-height: 1.5; }
.creditos summary { cursor: pointer; font-weight: 600; width: fit-content; border-radius: 3px; }
.creditos summary:focus-visible { outline: 3px solid var(--faixa-amarela); outline-offset: 3px; }
.creditos ul { list-style: none; padding: 0; margin: 10px 0 6px; display: grid; gap: 4px; }
.creditos a { color: var(--texto-2); text-decoration: underline; text-underline-offset: 3px; }
