/* Identidade Unidas Express: azul-marinho do logo sobre base fria, com o azul claro do X como segundo tom. */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #111722;
  --muted: #566072;
  --border: #dfe4ec;
  --border-strong: #c2cad6;
  --rule: #14386f;
  --accent: #14386f;
  --accent-hover: #0f2c58;
  --accent-bright: #5b8ad0;
  --accent-soft: #e8eef8;
  --on-accent: #ffffff;
  --cta: #14386f;
  --cta-hover: #0f2c58;
  --ring: rgb(91 138 208 / 0.45);
  --danger: #b42318;
  --placeholder: #6b7587;
  --map-nenhum: color-mix(in srgb, var(--text) 7%, var(--bg));
  --map-nenhum-hover: color-mix(in srgb, var(--text) 14%, var(--bg));
  --map-parcial: color-mix(in srgb, var(--accent-bright) 50%, var(--bg));
  --map-parcial-hover: color-mix(in srgb, var(--accent-bright) 75%, var(--bg));
  --map-fora: 0.35;
  --radius: 4px;
  --ease: 200ms ease-in-out;
  --font-sans: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Archivo", ui-sans-serif, system-ui, sans-serif;
  /* Só as siglas do mapa usam mono. */
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}

/* Claro é o padrão; escuro só quando o visitante escolhe no botão do topo. */
:root[data-theme="dark"] {
  --bg: #0b0e14;
  --surface: #151a23;
  --text: #f2f4f8;
  --muted: #b3bcca;
  --placeholder: #98a3b4;
  --border: #2d3644;
  --border-strong: #5f6d82;
  --rule: #6f7e95;
  --accent: #8fbaf7;
  --accent-hover: #b1d0fa;
  --accent-bright: #3f7fe0;
  --accent-soft: rgb(143 186 247 / 0.16);
  --on-accent: #ffffff;
  --cta: #1f5fcb;
  --cta-hover: #2b6fe0;
  --ring: rgb(143 186 247 / 0.55);
  --danger: #f79a90;
  --map-nenhum: color-mix(in srgb, var(--text) 16%, var(--bg));
  --map-nenhum-hover: color-mix(in srgb, var(--text) 26%, var(--bg));
  --map-parcial: color-mix(in srgb, var(--accent-bright) 70%, var(--bg));
  --map-parcial-hover: color-mix(in srgb, var(--accent-bright) 92%, var(--bg));
  --map-fora: 0.5;
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

/* Trava rolagem lateral: no iPhone a página ainda deslizava para o lado na seção do mapa. */
html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Topbar */
.topbar {
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 72px;
}

.brand {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand__logo {
  display: block;
  width: auto;
  height: 38px;
}

.brand__logo--escuro,
[data-theme="dark"] .brand__logo--claro {
  display: none;
}

[data-theme="dark"] .brand__logo--escuro {
  display: block;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.theme-toggle .icon-sun,
[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

/* Hero */
.hero {
  padding-top: 80px;
  padding-bottom: 112px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.hero__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
  align-items: end;
  gap: 32px 64px;
  margin-bottom: 48px;
}

.hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 7.5vw, 5.75rem);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

/* Duas cores em duas linhas, como UNIDAS / EXPRESS no logo. */
.hero__title em {
  display: block;
  font-style: normal;
  color: var(--accent);
}

.hero__kicker {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Etiqueta de carga: borda forte, células divididas, rótulos em mono. */
.label {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 15rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.label__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-height: 84px;
  padding: 14px 20px;
  transition: background-color var(--ease);
}

.label__cell + .label__cell {
  border-left: 1px solid var(--rule);
}

.label__cell:first-child {
  border-radius: 3px 0 0 3px;
}

.label__cell:hover {
  background: color-mix(in srgb, var(--text) 3%, var(--surface));
}

.label__cell:focus-within {
  background: var(--accent-soft);
}

.label__name {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--ease);
}

.label__cell:focus-within .label__name {
  color: var(--accent);
}

.label__control {
  width: 100%;
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 0;
  appearance: none;
}

.label__control:focus-visible {
  outline: none;
}

.label__control::placeholder {
  color: var(--placeholder);
}

.label__control:disabled {
  cursor: not-allowed;
}

/* Seletor de estado: botão ocupa a célula inteira, com a lista presa à borda da etiqueta. */
.uf-botao {
  text-align: left;
  cursor: pointer;
}

.uf-botao::after {
  content: "";
  position: absolute;
  inset: 0;
}

.uf-botao.is-vazio {
  color: var(--placeholder);
}

.uf-botao[aria-expanded="true"] ~ .label__chevron {
  transform: rotate(180deg);
}

.uf-lista,
.cidade-lista {
  position: absolute;
  top: calc(100% + 6px);
  left: -1px;
  z-index: 20;
  width: min(22rem, calc(100vw - 32px));
  max-height: 21rem;
  margin: 0;
  padding: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(17 23 34 / 0.12);
  animation: enter 160ms ease-in-out;
}

/* Largura da célula, e altura que sobra acima do teclado no celular. */
.cidade-lista {
  width: calc(100% + 2px);
  max-height: min(21rem, 45dvh);
}

.uf-lista.is-acima {
  top: auto;
  bottom: calc(100% + 6px);
}

.uf-opcao {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 10px;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--ease), color var(--ease);
}

.cidade-opcao {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  transition: background-color var(--ease);
}

.cidade-opcao__nome {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cidade-opcao__uf {
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--muted);
}

.cidade-opcao__entrega {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--on-accent);
  background: var(--cta);
  border-radius: 2px;
}

.cidade-opcao__entrega svg {
  flex: none;
}

.cidade-opcao__extra {
  margin-left: -0.35em;
  white-space: pre;
}

@media (max-width: 640px) {
  .cidade-opcao__extra {
    display: none;
  }
}

.cidade-opcao__retirada {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--muted);
}

.cidade-opcao__retirada svg {
  flex: none;
}

.cidade-lista__dica {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 12px 10px;
  font-size: 0.875rem;
  color: var(--muted);
}

.uf-opcao.is-ativa,
.cidade-opcao.is-ativa {
  background: var(--accent-soft);
}

.uf-opcao[aria-selected="true"] {
  color: var(--on-accent);
  background: var(--cta);
}

.uf-opcao__sigla {
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  font-weight: 500;
}

.uf-opcao__nome {
  overflow: hidden;
  font-size: 0.9375rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uf-opcao__info {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.uf-opcao[aria-selected="true"] .uf-opcao__info {
  color: inherit;
}

.label__chevron {
  position: absolute;
  right: 16px;
  bottom: 26px;
  color: var(--muted);
  pointer-events: none;
  transition: transform var(--ease);
}

.label__cell.is-error {
  background: color-mix(in srgb, var(--danger) 6%, var(--surface));
}

.label__cell.is-error .label__name {
  color: var(--danger);
}

/* Seletor composto para vencer o height fixo de .btn, que vem depois no arquivo. */
.label .label__submit {
  align-self: stretch;
  height: auto;
  padding: 0 20px;
  font-size: 1rem;
  border-left: 1px solid var(--rule);
  border-radius: 0 3px 3px 0;
}

.hints {
  margin-top: 12px;
}

.hero__ajuda {
  margin-top: 20px;
}

.cidade-lista__dica .link-action,
.detail__empty .link-action {
  margin-top: 8px;
  font-size: 0.875rem;
}

.detail__empty span {
  display: block;
}

.hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--danger);
}

.hint:empty {
  display: none;
}

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease), transform var(--ease);
}

.btn svg {
  transition: transform var(--ease);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  color: var(--on-accent);
  background: var(--cta);
}

.btn--primary:hover {
  background: var(--cta-hover);
}

.btn--primary:hover svg {
  transform: translateX(2px);
}

.btn--accent {
  color: var(--on-accent);
  background: var(--cta);
}

.btn--accent:hover {
  background: var(--cta-hover);
}

.btn--ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}

.btn--ghost:hover {
  border-color: var(--rule);
}

/* Carimbo da resposta: continua a etiqueta, com as mesmas colunas e borda. */
.label.is-carimbado {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.label.is-carimbado .label__submit {
  border-bottom-right-radius: 0;
}

.stamp {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr) 15rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  animation: enter 200ms ease-in-out;
}

.stamp--ok {
  background: var(--accent-soft);
}

.stamp__cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 72px;
  padding: 14px 20px;
}

.stamp__cell + .stamp__cell {
  border-left: 1px solid var(--rule);
}

.stamp__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.15;
}

.stamp--ok .stamp__status {
  color: var(--accent);
}

.stamp--fora .stamp__status,
.stamp--erro .stamp__status {
  color: var(--muted);
}

.stamp__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

.stamp__nota {
  display: block;
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.selo-linha {
  display: block;
  margin-bottom: 6px;
}

.selo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
}

.selo svg {
  flex: none;
}

.selo--entrega {
  color: var(--on-accent);
  background: var(--cta);
  border-color: var(--cta);
}

.stamp__text strong {
  font-weight: 600;
  color: var(--text);
}

.stamp .stamp__action {
  align-self: stretch;
  height: auto;
  min-height: 72px;
  padding: 0 20px;
  border-left: 1px solid var(--rule);
  border-radius: 0 0 3px 0;
}

.stamp .btn--ghost {
  border-color: transparent;
  border-left-color: var(--rule);
  border-radius: 0 0 3px 0;
}

.stamp .btn--ghost:hover {
  background: color-mix(in srgb, var(--text) 5%, var(--surface));
}

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Abertura em 2,1 s. Só existe com .com-cortina, que o script do head põe a cada carregamento. */
.cortina {
  display: none;
}

.com-cortina .cortina {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: block;
  overflow: hidden;
  cursor: pointer;
  animation: cortina-fim 1ms linear 2.1s forwards;
  transition: opacity 150ms ease-in-out;
}

.cortina.is-pulando {
  opacity: 0;
}

/* Inclinados como o X do logo. A sobra nas laterais cobre os cantos que a inclinação deixaria abertos. */
.cortina__painel {
  position: absolute;
  inset: 0 -40vh;
  transform: skewX(-18deg);
  animation: cortina-painel 720ms cubic-bezier(0.7, 0, 0.3, 1) forwards;
}

.cortina__painel--marinho {
  background: #14386f;
  animation-delay: 1250ms;
}

.cortina__painel--claro {
  background: #5b8ad0;
  animation-delay: 1380ms;
}

.cortina__logo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(62vw, 340px);
  aspect-ratio: 720 / 225;
  transform: translate(-50%, -50%);
}

/* Mesmo arquivo nas duas partes, recortado na linha entre as palavras. Branco sobre o marinho. */
.cortina__parte {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
}

.cortina__parte--unidas {
  clip-path: inset(0 0 45% 0);
  animation:
    cortina-entra 360ms ease-out both,
    cortina-some 260ms ease-in 1080ms forwards;
}

.cortina__parte--express {
  clip-path: inset(55% 0 0 0);
  animation:
    cortina-entra-rapido 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both,
    cortina-dispara 560ms cubic-bezier(0.7, 0, 0.84, 0) 900ms forwards;
}

/* Rastro atrás de EXPRESS, para ler como velocidade. */
.cortina__rastro {
  position: absolute;
  top: 58%;
  right: 100%;
  width: 60vw;
  height: 34%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 0.28));
  opacity: 0;
  transform-origin: right center;
  animation: cortina-rastro 560ms cubic-bezier(0.7, 0, 0.84, 0) 900ms forwards;
}

/* Marca de pneu e fumaça na arrancada: discretas e em branco translúcido, para não virar desenho animado. */
.cortina__pneu {
  position: absolute;
  top: 104%;
  left: 6%;
  width: 120vw;
  height: 9px;
  border-block: 2px solid rgb(255 255 255 / 0.3);
  transform: scaleX(0);
  transform-origin: left center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 90px);
  mask-image: linear-gradient(90deg, transparent, #000 90px);
  animation:
    cortina-pneu 560ms cubic-bezier(0.7, 0, 0.84, 0) 900ms forwards,
    cortina-apaga 240ms ease-out 1320ms forwards;
}

.cortina__fumaca {
  position: absolute;
  top: 66%;
  left: -14%;
  width: 46%;
  aspect-ratio: 2 / 1;
  background:
    radial-gradient(closest-side at 62% 55%, rgb(255 255 255 / 0.4), transparent),
    radial-gradient(closest-side at 28% 42%, rgb(255 255 255 / 0.22), transparent);
  opacity: 0;
  animation: cortina-fumaca 720ms ease-out 960ms forwards;
}

@keyframes cortina-pneu {
  to {
    transform: scaleX(1);
  }
}

@keyframes cortina-apaga {
  to {
    opacity: 0;
  }
}

@keyframes cortina-fumaca {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-28%) scale(1.5);
  }
}

@keyframes cortina-entra {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes cortina-entra-rapido {
  from {
    opacity: 0;
    transform: translateX(-48px);
  }
}

@keyframes cortina-some {
  to {
    opacity: 0;
    transform: translateX(-12px);
  }
}

@keyframes cortina-dispara {
  to {
    transform: translateX(120vw) skewX(-14deg);
  }
}

@keyframes cortina-rastro {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(190vw);
  }
}

@keyframes cortina-painel {
  to {
    transform: translateX(calc(100vw + 90vh)) skewX(-18deg);
  }
}

@keyframes cortina-fim {
  to {
    visibility: hidden;
  }
}

/* Parceiros: faixa corrida em células com fio de 1px, no desenho da etiqueta. */
.parceiros {
  border-top: 1px solid var(--border);
}

.parceiros__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 72px;
  padding-bottom: 40px;
}

.parceiros__pausa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.parceiros__pausa:hover {
  border-color: var(--rule);
}

.parceiros__pausa:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.parceiros__corpo {
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.parceiros__rotulo {
  display: none;
  flex: none;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 24px;
  border-right: 1px solid var(--border);
}

.parceiros__rotulo strong {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.1;
}

.parceiros__rotulo span {
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.parceiros__faixa {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
}

.parceiros__trilho {
  display: flex;
  width: max-content;
  will-change: transform;
}

.parceiros__grupo {
  display: flex;
}

.parceiros__cel {
  --largura: 156px;
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--largura);
  height: 96px;
  border-right: 1px solid var(--border);
}

.parceiros__logo {
  display: block;
  max-width: calc(var(--largura) - 48px);
  object-fit: contain;
  border-radius: 4px;
  filter: grayscale(1) opacity(0.55);
  transition:
    filter 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
    background-color 420ms cubic-bezier(0.22, 0.61, 0.36, 1),
    box-shadow 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.parceiros__cel.is-revelada .parceiros__logo {
  filter: grayscale(0) opacity(1);
  transform: scale(1.16);
}

/* Escuro: cinza invertido em repouso mantém o detalhe. Ao revelar, cor original sobre fundo claro, para logo escura não sumir. */
[data-theme="dark"] .parceiros__logo {
  filter: grayscale(1) invert(1) opacity(0.82);
}

[data-theme="dark"] .parceiros__cel.is-revelada .parceiros__logo {
  background-color: #ffffff;
  box-shadow: 0 0 0 8px #ffffff;
  filter: grayscale(0) invert(0) opacity(1);
}

@media (min-width: 720px) {
  .parceiros__rotulo {
    display: flex;
  }

  .parceiros__cel {
    --largura: 200px;
    height: 120px;
  }
}

/* Sem animação a faixa rola à mão, e o hover volta a funcionar porque nada se move. */
@media (prefers-reduced-motion: reduce) {
  .parceiros__faixa {
    overflow-x: auto;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .parceiros__cel:hover .parceiros__logo {
    filter: grayscale(0) opacity(1);
  }
}

/* Cobertura */
.coverage {
  padding: 96px 0;
}

.coverage__head {
  margin-bottom: 56px;
}

h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.coverage__summary {
  max-width: 52ch;
  margin: 20px 0 0;
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--muted);
}

.coverage__summary strong {
  font-weight: 600;
  color: var(--text);
}

.map__hint {
  margin: 0 0 24px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.coverage__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 64px;
}

.regions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.region-chip {
  min-height: 40px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color var(--ease), background-color var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.region-chip:hover {
  border-color: var(--rule);
}

.region-chip:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.region-chip[aria-pressed="true"] {
  color: var(--on-accent);
  background: var(--cta);
  border-color: var(--cta);
}

/* Mapa do Brasil (malha do IBGE). Divisas na cor do fundo, como em mapa editorial. */
.map {
  --fill-nenhum: var(--map-nenhum);
  --fill-nenhum-hover: var(--map-nenhum-hover);
  --fill-parcial: var(--map-parcial);
  --fill-parcial-hover: var(--map-parcial-hover);
  max-width: 480px;
}

.map svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.estado {
  fill: var(--fill-nenhum);
  stroke: var(--bg);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  outline: none;
  transition: fill var(--ease), stroke var(--ease), opacity var(--ease);
}

.estado.is-fora,
.map__label.is-fora {
  opacity: var(--map-fora);
}

.estado:hover {
  fill: var(--fill-nenhum-hover);
}

.estado--parcial {
  fill: var(--fill-parcial);
}

.estado--parcial:hover {
  fill: var(--fill-parcial-hover);
}

.estado--total {
  fill: var(--cta);
}

.estado--total:hover {
  fill: var(--cta-hover);
}

/* Selecionado: mesma cor do botão ativo, para ligar mapa e botões de região. */
.estado[aria-pressed="true"],
.estado[aria-pressed="true"]:hover {
  fill: var(--cta);
  stroke: var(--bg);
}

.estado:focus-visible {
  stroke: var(--accent-bright);
  stroke-width: 3;
}

.map__label {
  font-family: var(--font-mono);
  font-size: 0.9px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--text);
  pointer-events: none;
  transition: opacity var(--ease);
}

.map__label--total,
.map__label.is-selecionado {
  fill: var(--on-accent);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 24px 0 0;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--muted);
  list-style: none;
}

.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend__swatch {
  width: 12px;
  height: 12px;
  background: var(--map-nenhum);
  border-radius: 3px;
}

.legend__nota {
  flex-basis: 100%;
}

.legend__icone {
  display: inline-flex;
  color: var(--muted);
}

.legend__icone {
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.legend__icone--entrega {
  color: var(--on-accent);
  background: var(--cta);
  border-radius: 4px;
}

.legend__swatch--parcial {
  background: var(--map-parcial);
}

.legend__swatch--total {
  background: var(--cta);
}

/* Detalhe do estado selecionado: texto corrido ao lado do mapa, sem cartão nem selo. */
.detail {
  padding-top: 8px;
  animation: enter 200ms ease-in-out;
}

.detail__meta {
  margin: 0 0 8px;
  font-variant-numeric: tabular-nums;
  font-size: 0.75rem;
  color: var(--muted);
}

.detail__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.875rem, 3.4vw, 2.75rem);
  font-stretch: 125%;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

.detail__name:focus-visible {
  outline: none;
}

.detail__back {
  display: block;
  margin: 0 0 16px;
  padding: 0;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  background: none;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
  transition: color var(--ease), box-shadow var(--ease);
}

.detail__back:hover {
  color: var(--accent-hover);
}

.detail__back:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.detail__list {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--border);
}

.detail__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 14px 0;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  background: none;
  border: 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: color var(--ease), padding-left var(--ease), box-shadow var(--ease);
}

.detail__row:hover {
  padding-left: 6px;
  color: var(--accent);
}

.detail__row:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--ring);
}

.detail__count {
  flex: none;
  font-variant-numeric: tabular-nums;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
}

.detail__search {
  width: 100%;
  height: 44px;
  margin-top: 24px;
  padding: 0 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.detail__search:hover {
  border-color: var(--rule);
}

.detail__search:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.detail__filtro {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin-top: 12px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color var(--ease), background-color var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.detail__filtro:hover {
  border-color: var(--rule);
}

.detail__filtro:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.detail__filtro[aria-pressed="true"] {
  color: var(--on-accent);
  background: var(--cta);
  border-color: var(--cta);
}

/* Ícone em coluna própria à esquerda: nome longo quebra sem levar o ícone para outra linha. */
.detail__entrega,
.detail__retirada {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--muted);
}

/* Entrega se destaca por forma, cor e peso, para quem enxerga pouco ou não distingue cores. */
.detail__entrega {
  color: var(--on-accent);
  background: var(--cta);
  border-radius: 4px;
}

.detail__cities .is-entrega {
  font-weight: 600;
}

.detail__cities {
  max-height: 20rem;
  margin: 16px 0 28px;
  padding: 0;
  /* Grade, não columns: com altura máxima, columns cria colunas extras para o lado e estoura a página. */
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 0 24px;
  overflow-x: hidden;
  overflow-y: auto;
  list-style: none;
  border-radius: 2px;
}

.detail__cities:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.detail__cities li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.detail__cities .detail__empty {
  display: block;
  grid-column: 1 / -1;
  color: var(--muted);
}

.detail__text {
  max-width: 40ch;
  margin: 24px 0 28px;
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--muted);
}

/* Ação como link sublinhado com seta, não como mais um botão. */
.link-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 0 4px;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: 0;
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease);
}

.link-action svg {
  transition: transform var(--ease);
}

.link-action:hover {
  color: var(--accent);
}

.link-action:hover svg {
  transform: translateX(3px);
}

.link-action:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

/* Formulário de quem não achou a cidade */
.contato {
  width: min(28rem, calc(100vw - 32px));
  max-height: none;
  padding: 0;
  overflow: visible;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}

.contato[open] {
  animation: enter 200ms ease-in-out;
}

.contato::backdrop {
  background: rgb(7 9 13 / 0.6);
}

.contato__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.contato__topo {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.contato__titulo {
  font-size: 1.5rem;
}

.contato__fechar {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  margin: -8px -8px 0 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: color var(--ease), box-shadow var(--ease);
}

.contato__fechar:hover {
  color: var(--text);
}

.contato__fechar:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.contato__texto {
  margin: -8px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

.contato__linha {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 12px;
}

.contato__campo {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.contato__seletor {
  position: relative;
}

/* 16px evita o zoom automático do iPhone ao focar o campo. */
.contato__controle {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.contato__controle:hover {
  border-color: var(--rule);
}

.contato__controle:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--ring);
}

.contato__campo.is-error .contato__controle {
  border-color: var(--danger);
}

.contato__campo.is-error .label__name {
  color: var(--danger);
}

.contato__seletor .label__chevron {
  right: 12px;
  bottom: 15px;
}

/* Campos estreitos: cada lista se alinha à borda externa e fica mais larga que o campo. */
.contato__seletor .uf-lista,
.contato__seletor .cidade-lista {
  width: min(19rem, calc(100vw - 80px));
  max-height: 14rem;
}

.contato__seletor .cidade-lista {
  right: -1px;
  left: auto;
}

.contato__controle:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.contato__controle::placeholder {
  color: var(--placeholder);
}

.contato__dica {
  margin: -8px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
}

.contato__aviso {
  margin: -4px 0 0;
  padding: 10px 12px;
  font-size: 0.875rem;
  background: var(--accent-soft);
  border-radius: var(--radius);
}

.contato__enviar {
  width: 100%;
  margin-top: 4px;
}

/* Rodapé */
.footer {
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 32px;
  padding-bottom: 32px;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer__legal {
  flex-basis: 100%;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

/* Aviso de privacidade: coluna de leitura estreita, sem enfeite. */
.legal__marca {
  border-radius: var(--radius);
  transition: opacity var(--ease);
}

.legal__marca:hover {
  opacity: 0.8;
}

.legal__marca:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.legal {
  max-width: 720px;
  padding-top: 64px;
  padding-bottom: 96px;
}

.legal__data {
  margin: 0 0 12px;
  font-size: 0.875rem;
  color: var(--muted);
}

.legal__titulo {
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.legal__lead {
  margin: 0 0 48px;
  font-size: 1.125rem;
  color: var(--muted);
}

.legal h2 {
  margin: 48px 0 12px;
  padding-top: 24px;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  border-top: 1px solid var(--border);
}

.legal h3 {
  margin: 24px 0 4px;
  font-size: 1rem;
}

.legal p,
.legal ul {
  margin: 0 0 12px;
  line-height: 1.7;
}

.legal ul {
  padding-left: 20px;
}

/* Link discreto no formulário para o aviso de privacidade. */
.contato__privacidade {
  margin: 12px 0 0;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

/* Responsivo */
@media (max-width: 900px) {
  .hero {
    padding-top: 56px;
    padding-bottom: 72px;
  }

  .hero__head {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 36px;
  }

  .coverage {
    padding: 72px 0;
  }

  .coverage__body {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .map {
    max-width: 420px;
  }
}

@media (max-width: 640px) {
  .container {
    padding-inline: 16px;
  }

  .hero {
    padding-top: 40px;
  }

  .hero__kicker {
    font-size: 1rem;
  }

  .brand__logo {
    height: 32px;
  }

  /* No celular a etiqueta vira duas linhas: UF + cidade, e o botão embaixo. */
  .label {
    grid-template-columns: 5.5rem minmax(0, 1fr);
  }

  .label__cell {
    min-height: 72px;
    padding: 12px 14px;
  }

  .label__control {
    font-size: 1.375rem;
  }

  .label__chevron {
    right: 10px;
    bottom: 22px;
  }

  .label .label__submit {
    grid-column: 1 / -1;
    height: 56px;
    border-top: 1px solid var(--rule);
    border-left: 0;
    border-radius: 0 0 3px 3px;
  }

  .label__cell:first-child {
    border-radius: 3px 0 0 0;
  }

  /* Carimbo no celular: uma coluna, porque "Ainda não confirmada" não cabe na largura da célula de UF. */
  .stamp {
    grid-template-columns: minmax(0, 1fr);
  }

  .stamp__cell {
    min-height: 0;
    padding: 12px 14px;
  }

  .stamp__cell + .stamp__cell {
    border-top: 1px solid var(--rule);
    border-left: 0;
  }

  .stamp__cell:first-child {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
  }

  .stamp .stamp__action {
    grid-column: 1 / -1;
    min-height: 56px;
    border-top: 1px solid var(--rule);
    border-left: 0;
    border-radius: 0 0 3px 3px;
  }

  .stamp .btn--ghost {
    border-color: transparent;
    border-top-color: var(--rule);
    border-radius: 0 0 3px 3px;
  }

  .parceiros__head {
    padding-top: 56px;
    padding-bottom: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* Crédito de quem produziu o site */
.credit {
  font-weight: 500;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  border-radius: 2px;
  transition: color var(--ease), text-decoration-color var(--ease);
}

.credit:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.credit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

/* Mantém CNPJ e CEP numa linha só. */
.sem-quebra {
  white-space: nowrap;
}
