/* ArqPerto — tokens do design system (tokens.json) e estilos das páginas. */
:root {
  color-scheme: light dark;
  --surface: #f5f5f7;
  --surface-raised: #ffffff;
  --ink: #1d1d1f;
  --ink-muted: #6e6e73;
  --hairline: #d2d2d7;
  --accent: #1d4f91;
  --on-accent: #ffffff;
  --stone: #e6e3dc;
  --verified: #1f7a4d;
  --space-2: 8px; --space-4: 16px; --space-6: 24px; --space-12: 48px;
  --radius-sm: 8px; --radius-lg: 18px; --radius-pill: 980px;
  --shadow-card-hover: 0 4px 20px rgba(0,0,0,0.08);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #000000;
    --surface-raised: #1c1c1e;
    --ink: #f5f5f7;
    --ink-muted: #a1a1a6;
    --hairline: #424245;
    --accent: #7fa8e0;
    --on-accent: #000000;
    --stone: #2a2926;
    --verified: #4cc38a;
    --shadow-card-hover: 0 4px 20px rgba(0,0,0,0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px; line-height: 25px;
  color: var(--ink);
  background: var(--surface-raised);
}
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.suave { color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.pular { position: absolute; left: -999px; top: 8px; background: var(--surface-raised); padding: 8px 16px; border-radius: var(--radius-pill); z-index: 10; }
.pular:focus { left: 8px; }

/* Topo */
.topo { border-bottom: 1px solid var(--hairline); padding: 20px clamp(16px, 4vw, 40px) 32px; }
.topo-linha { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.marca { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.marca:hover { text-decoration: none; }
.abas { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); }
.aba {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-height: 44px; padding: 6px 12px 10px;
  font-size: 12px; line-height: 16px; font-weight: 600;
  color: var(--ink-muted); border-bottom: 2px solid transparent;
}
.aba:hover { color: var(--ink); text-decoration: none; border-bottom-color: var(--hairline); }
.aba[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.link-forte { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; padding: 12px 8px; }

.chamada { max-width: 1280px; margin: 40px auto 0; text-align: center; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.015em; }

.busca {
  max-width: 760px; margin: var(--space-6) auto 0;
  display: flex; flex-wrap: wrap; align-items: stretch;
  border: 1px solid var(--hairline); border-radius: 40px;
  background: var(--surface-raised); box-shadow: var(--shadow-card-hover);
  padding: 8px;
}
.campo { flex: 1 1 220px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 8px 20px; border-radius: 32px; cursor: text; }
.campo:hover { background: var(--surface); }
.campo-rotulo { font-size: 12px; line-height: 16px; font-weight: 600; }
.campo input, .campo select {
  border: 0; padding: 0; margin: 0; background: transparent; color: var(--ink);
  font: inherit; font-size: 14px; line-height: 20px; min-height: 24px; width: 100%;
}
.campo input::placeholder { color: var(--ink-muted); }
.campo input:focus, .campo select:focus { outline: none; }
.campo:focus-within { outline: 2px solid var(--accent); outline-offset: -2px; }
.divisor { width: 1px; background: var(--hairline); margin: 12px 0; }
.buscar {
  flex: 0 0 auto; align-self: center; width: 56px; height: 56px; margin-left: auto;
  border: 0; border-radius: var(--radius-pill); cursor: pointer;
  background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
}
@media (max-width: 560px) {
  .divisor { display: none; }
  .busca { border-radius: var(--radius-lg); }
  .buscar { width: 100%; border-radius: var(--radius-pill); margin-top: 4px; }
}

/* Miolo */
.miolo { max-width: 1280px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.secao { padding-top: var(--space-12); }
.secao h2 { font-size: 24px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.secao-topo { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.carrossel {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr);
  gap: var(--space-6); overflow-x: auto; padding-bottom: var(--space-2);
  scroll-snap-type: x mandatory;
}
.carrossel > * { scroll-snap-align: start; }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 40px var(--space-6); margin-top: var(--space-6); }
.titulo-pagina { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.015em; }
.estreita { max-width: 640px; }
.estreita p { margin-top: var(--space-4); }
.vazio p, .vazio-texto { margin: var(--space-4) 0; color: var(--ink-muted); max-width: 60ch; }

/* Card */
.card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card-midia { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius-lg); background: var(--stone); overflow: hidden; }
.card-midia img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-planta { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: square; }
.selo { position: absolute; top: 12px; left: 12px; background: var(--surface-raised); color: var(--ink); font-size: 12px; line-height: 16px; font-weight: 600; padding: 6px 10px; border-radius: var(--radius-pill); }
.selo-fundador { background: var(--accent); color: var(--on-accent); }
.avatar {
  position: absolute; left: 12px; bottom: 12px; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill); border: 2px solid var(--surface-raised);
  background: var(--ink); color: var(--surface-raised); font-size: 14px; font-weight: 600;
}
.card-texto { display: flex; flex-direction: column; gap: 2px; }
.card-linha { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
.card-nome { font-size: 15px; line-height: 20px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nota { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 20px; flex: 0 0 auto; }
.preco { margin-top: 4px; font-size: 14px; line-height: 20px; }

/* Convite para correspondentes */
.convite {
  margin-top: 64px; padding: var(--space-12) clamp(24px, 5vw, 48px);
  background: var(--stone); border-radius: var(--radius-lg);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 40px;
}
.convite-texto { flex: 1 1 420px; max-width: 620px; display: flex; flex-direction: column; gap: var(--space-4); }
.convite-texto h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.015em; }
.convite-planta { flex: 0 1 320px; max-width: 100%; height: auto; fill: none; stroke: var(--accent); stroke-width: 2; }
.convite-planta .fina { stroke-width: 1.2; }
.botao {
  align-self: flex-start; display: inline-flex; align-items: center; min-height: 48px;
  margin-top: var(--space-2); padding: 12px 24px; border-radius: var(--radius-pill);
  background: var(--accent); color: var(--on-accent); font-size: 17px; font-weight: 600;
}
.botao:hover { text-decoration: none; filter: brightness(1.08); }

/* Cidades */
.estados { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); margin-top: var(--space-4); border-bottom: 1px solid var(--hairline); }
.estados a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--ink-muted); border-bottom: 2px solid transparent; }
.estados a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.cidades { list-style: none; margin: 0; padding: var(--space-6) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 20px var(--space-6); }
.cidades a { display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 20px; }

/* Conta no topo */
.conta { display: flex; align-items: center; gap: var(--space-2); }
.botao-link { border: 0; background: none; cursor: pointer; color: inherit; font: inherit; }
.botao-link:hover { text-decoration: underline; }

/* Formulários */
.form { display: flex; flex-direction: column; gap: 20px; margin-top: var(--space-6); max-width: 560px; }
.form > label { display: flex; flex-direction: column; gap: 6px; }
.form label > span { font-size: 14px; line-height: 20px; font-weight: 600; }
.form label em { font-style: normal; font-weight: 400; color: var(--ink-muted); }
.form input[type="text"], .form input[type="tel"], .form input[type="date"],
.form select, .form textarea {
  font: inherit; color: var(--ink); background: var(--surface-raised);
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  padding: 12px 14px; width: 100%;
}
.form input[type="file"] { font: inherit; }
.form textarea { resize: vertical; }
.form .botao { border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.form-apoio { margin-top: var(--space-4); color: var(--ink-muted); max-width: 60ch; }
.form-grupo { border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: var(--space-4); display: flex; flex-direction: column; gap: 10px; margin: 0; }
.form-grupo legend { font-size: 14px; font-weight: 600; padding: 0 6px; }
.form-grupo .form-apoio { margin-top: 0; font-size: 14px; line-height: 20px; }
.opcao { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.opcao input { width: 18px; height: 18px; accent-color: var(--accent); }
.servico-linha { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.preco-campo input { font: inherit; color: var(--ink); background: var(--surface-raised); border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 8px 12px; width: 140px; }
.aviso {
  margin-top: var(--space-4); padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--stone); border-left: 3px solid var(--accent); max-width: 60ch;
}

/* Pedidos */
.bloco { margin-top: var(--space-12); }
.bloco h2 { font-size: 20px; line-height: 25px; }
.pedidos-lista { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: flex; flex-direction: column; }
.pedido-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2);
  padding: var(--space-4) var(--space-2); border-top: 1px solid var(--hairline);
}
.pedidos-lista li:last-child .pedido-item { border-bottom: 1px solid var(--hairline); }
.pedido-item:hover { text-decoration: none; background: var(--surface); }
.pedido-item > div { display: flex; flex-direction: column; gap: 2px; }
.estado {
  display: inline-flex; align-self: flex-start; padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--stone); font-size: 13px; line-height: 18px; font-weight: 600;
}
.estado-contratado, .estado-entregue { background: var(--accent); color: var(--on-accent); }
.estado-avaliado { background: var(--verified); color: var(--on-accent); }
.detalhes { margin: var(--space-6) 0 0; display: flex; flex-direction: column; gap: 10px; }
.detalhes div { display: flex; gap: var(--space-2); }
.detalhes dt { flex: 0 0 160px; color: var(--ink-muted); font-size: 14px; line-height: 25px; }
.detalhes dd { margin: 0; }
.descricao { margin-top: var(--space-4); white-space: pre-line; max-width: 60ch; }
.proposta { border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: var(--space-4); margin-top: var(--space-4); display: flex; flex-direction: column; gap: 10px; }
.proposta-topo { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.proposta-preco { font-size: 20px; font-weight: 600; }
.proposta .botao { border: 0; cursor: pointer; font: inherit; font-weight: 600; align-self: flex-start; min-height: 44px; padding: 10px 20px; }
.botao-discreto {
  border: 1px solid var(--hairline); background: none; cursor: pointer; color: var(--ink-muted);
  font: inherit; font-size: 14px; border-radius: var(--radius-pill); padding: 8px 16px;
}
.botao-discreto:hover { color: var(--ink); }
.entregas { list-style: none; margin: var(--space-4) 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.entregas a { color: var(--accent); font-weight: 600; }
.notas { gap: 6px; }

/* Páginas institucionais */
.artigo { max-width: 760px; }
.artigo h2 { font-size: 20px; line-height: 25px; margin-top: var(--space-12); }
.artigo p, .artigo ul { margin-top: var(--space-4); max-width: 70ch; }
.artigo ul { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.artigo .botao { margin-top: var(--space-6); }
.duas-colunas { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-6) 40px; }
.duas-colunas h2 { margin-top: var(--space-12); }
.passos { margin: var(--space-4) 0 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.artigo details { border-bottom: 1px solid var(--hairline); }
.artigo details:first-of-type, .artigo h2 + details { border-top: 1px solid var(--hairline); }
.artigo summary { cursor: pointer; font-weight: 600; padding: 14px 4px; list-style-position: inside; }
.artigo summary:hover { color: var(--accent); }
.artigo details p { margin: 0 4px 14px; color: var(--ink-muted); }

/* Rodapé */
.rodape { margin-top: 64px; background: var(--surface); border-top: 1px solid var(--hairline); padding: var(--space-12) clamp(16px, 4vw, 40px) 32px; font-size: 14px; line-height: 20px; }
.rodape-colunas { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.rodape-colunas div { display: flex; flex-direction: column; gap: 12px; }
.rodape h2 { font-size: 14px; line-height: 20px; font-weight: 600; }
.rodape-base { max-width: 1280px; margin: 40px auto 0; padding-top: var(--space-6); border-top: 1px solid var(--hairline); color: var(--ink-muted); }
