/* ARQCPR — folha de estilo única
   Conceito: a página é uma prancha de desenho. As perspectivas ficam sobre o
   branco da folha e cada projeto traz o seu carimbo (tabela de dados). */

:root {
  --folha: #ffffff;
  --tinta: #1e1e1e;
  --grafite: #cfcbc6;
  --cinza: #66625d;
  --vinho: #8b1a1a;
  --papel: #f4f3f1;

  --f-titulo: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-texto: 'Source Serif 4', Georgia, 'Times New Roman', serif;

  --gutter: clamp(20px, 4vw, 48px);
  --max: 1240px;
  --altura-header: 72px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--altura-header) + 16px); }

body {
  background: var(--folha);
  color: var(--tinta);
  font-family: var(--f-texto);
  font-size: 1.125rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

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

.pular {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  background: var(--tinta); color: var(--folha); padding: 10px 16px;
  font-family: var(--f-titulo); font-size: 0.9375rem; text-decoration: none;
}
.pular:focus { top: 12px; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ── Tipografia ───────────────────────────────────────── */
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 500; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.4vw, 4.4rem); font-stretch: 118%; line-height: 1.02; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.65rem, 3.2vw, 2.5rem); font-stretch: 112%; line-height: 1.1; }
h3 { font-size: 1.2rem; font-stretch: 105%; font-weight: 600; line-height: 1.2; }
p { text-wrap: pretty; max-width: 62ch; }
.texto-suave { color: var(--cinza); }

/* ── Botões e links de ação ───────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--f-titulo); font-size: 0.9375rem; font-weight: 500; font-stretch: 105%;
  padding: 13px 24px; border: 1px solid var(--tinta); background: var(--tinta); color: var(--folha);
  text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:hover { background: var(--vinho); border-color: var(--vinho); }
.btn--claro { background: transparent; color: var(--tinta); }
.btn--claro:hover { background: var(--tinta); border-color: var(--tinta); color: var(--folha); }
.btn--sobre-vinho { background: var(--folha); color: var(--vinho); border-color: var(--folha); }
.btn--sobre-vinho:hover { background: var(--tinta); border-color: var(--tinta); color: var(--folha); }
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }

.link-sublinhado {
  font-family: var(--f-titulo); font-size: 0.9375rem; font-weight: 500; font-stretch: 105%;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.link-sublinhado:hover { color: var(--vinho); }

/* ── Cabeçalho ────────────────────────────────────────── */
.topo {
  position: sticky; top: 0; z-index: 50;
  background: var(--folha); border-bottom: 1px solid var(--grafite);
}
.topo__in {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: var(--altura-header);
}
.topo__logo { display: block; flex: none; }
.topo__logo img { height: 46px; width: auto; }
.menu { display: flex; align-items: center; gap: clamp(18px, 3vw, 40px); font-family: var(--f-titulo); font-size: 0.9375rem; font-weight: 500; font-stretch: 105%; }
.menu a:not(.btn) { text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.menu a:not(.btn):hover { border-bottom-color: var(--grafite); }
.menu a[aria-current="page"] { border-bottom-color: var(--vinho); }
.menu .btn { padding: 10px 18px; }

/* ── Início: abertura ─────────────────────────────────── */
.abertura { padding-block: clamp(36px, 6vw, 80px) clamp(36px, 5vw, 64px); }
.abertura__grade { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.abertura h1 { margin-bottom: 24px; }
.abertura p { font-size: 1.1875rem; margin-bottom: 32px; }
.abertura__acoes { display: flex; flex-wrap: wrap; gap: 12px; }
.abertura__desenho { justify-self: end; width: 100%; }
.abertura__desenho img {
  width: 100%; max-height: min(66vh, 620px); object-fit: contain;
  animation: plotar 1.3s cubic-bezier(.3, .6, .2, 1) both;
}
@keyframes plotar { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }

/* ── Carimbo ──────────────────────────────────────────── */
.carimbo {
  display: grid; gap: 1px; background: var(--grafite);
  border: 1px solid var(--tinta);
}
.carimbo > * { background: var(--folha); padding: 12px 16px; min-width: 0; }
.carimbo__rotulo { display: block; font-family: var(--f-titulo); font-size: 0.8125rem; color: var(--cinza); line-height: 1.3; margin-bottom: 2px; }
.carimbo__valor { display: block; font-family: var(--f-titulo); font-size: 1.0625rem; font-weight: 500; font-stretch: 105%; line-height: 1.3; }

.carimbo--eixos { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.carimbo--eixos a { text-decoration: none; padding: 20px 20px 22px; transition: background-color .2s; }
.carimbo--eixos a:hover { background: var(--papel); }
.carimbo--eixos h3 { margin-bottom: 6px; }
.carimbo--eixos p { font-size: 0.9375rem; line-height: 1.5; color: var(--cinza); }
.carimbo--eixos .carimbo__fixo { padding: 20px 20px 22px; }

.carimbo--projeto { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-block: 32px 40px; background: var(--folha); overflow: hidden; }
.carimbo--projeto > * { padding: 14px 16px 16px; box-shadow: 1px 0 0 0 var(--grafite), 0 1px 0 0 var(--grafite); }

/* ── Seções ───────────────────────────────────────────── */
.secao { padding-block: clamp(56px, 8vw, 112px); }
.secao--papel { background: var(--papel); }
.secao__cab { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(28px, 4vw, 48px); flex-wrap: wrap; }

/* ── Cards de projeto (cada um é uma prancha) ─────────── */
.grade-projetos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.projeto-card { display: block; text-decoration: none; border: 1px solid var(--tinta); background: var(--folha); transition: border-color .2s; }
.projeto-card:hover { border-color: var(--vinho); }
.projeto-card[hidden] { display: none; }
.projeto-card__img { aspect-ratio: 4 / 3; background: var(--folha); overflow: hidden; }
.projeto-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 4%; }
.projeto-card__img--foto img { object-fit: cover; padding: 0; }
.projeto-card .carimbo { border: 0; border-top: 1px solid var(--tinta); grid-template-columns: 1.5fr 1fr .7fr; }
.projeto-card .carimbo__titulo { grid-column: 1 / -1; }
.projeto-card h3 { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; text-decoration-thickness: 1px; transition: text-decoration-color .2s; }
.projeto-card:hover h3 { text-decoration-color: currentColor; }

/* ── Início: sobre ────────────────────────────────────── */
.sobre { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.sobre h2 { margin-bottom: 24px; }
.sobre p + p { margin-top: 1em; }
.carimbo--sobre { grid-template-columns: 1fr; }
.carimbo--sobre-solo { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* Menu: Serviços com lista de opções */
.menu__sub { position: relative; }
.menu__sub-link::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.menu__sub-lista { display: none; position: absolute; top: 100%; left: -16px; min-width: 300px; padding: 8px 0; margin-top: 6px; background: var(--folha); border: 1px solid var(--tinta); z-index: 30; }
.menu__sub::before { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
.menu__sub:hover .menu__sub-lista, .menu__sub:focus-within .menu__sub-lista { display: block; }
.menu .menu__sub-lista a:not(.btn) { display: block; padding: 11px 16px; border-bottom: 0; font-weight: 400; line-height: 1.35; }
.menu .menu__sub-lista a:not(.btn):hover, .menu .menu__sub-lista a:not(.btn):focus-visible { background: var(--papel); }

/* ── Faixa de contato ─────────────────────────────────── */
.faixa { background: var(--vinho); color: var(--folha); padding-block: clamp(48px, 7vw, 88px); }
.faixa__in { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.faixa h2 { max-width: 20ch; }
.faixa p { margin-top: 12px; color: rgba(255, 255, 255, .85); }

/* ── Páginas internas ─────────────────────────────────── */
.pagina-topo { padding-block: clamp(40px, 6vw, 80px) clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--grafite); }
.pagina-topo h1 { margin-bottom: 20px; }
.pagina-topo p { font-size: 1.1875rem; }
.migalha { font-family: var(--f-titulo); font-size: 0.9375rem; font-weight: 500; font-stretch: 105%; display: inline-block; margin-bottom: 28px; text-decoration: none; color: var(--cinza); }
.migalha:hover { color: var(--vinho); text-decoration: underline; text-underline-offset: 5px; }

/* Filtros */
.filtros { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 28px 0; }
.filtro {
  font-family: var(--f-titulo); font-size: 0.9375rem; font-weight: 500; font-stretch: 105%;
  padding: 8px 16px; border: 1px solid var(--tinta); background: transparent; cursor: pointer; line-height: 1.2;
  transition: background-color .2s, color .2s;
}
.filtro:hover { background: var(--papel); }
.filtro[aria-pressed="true"] { background: var(--tinta); color: var(--folha); }
.portfolio-lista { padding-block: 32px clamp(56px, 8vw, 112px); }
.vazio { padding-block: 24px; color: var(--cinza); }

/* Serviços */
.servico { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(24px, 6vw, 88px); padding-block: clamp(40px, 6vw, 72px); border-bottom: 1px solid var(--grafite); }
.servico:last-of-type { border-bottom: 0; }
.servico h2 { margin-bottom: 16px; }
.servico__lista li { padding: 14px 0; border-top: 1px solid var(--grafite); font-size: 1.0625rem; line-height: 1.55; }
.servico__lista li:last-child { border-bottom: 1px solid var(--grafite); }
.servico__lista strong { font-family: var(--f-titulo); font-weight: 600; font-stretch: 105%; font-size: 1rem; display: block; }
.servico .link-sublinhado { display: inline-block; margin-top: 20px; }

.etapas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--grafite); border: 1px solid var(--tinta); counter-reset: etapa; margin-top: 32px; }
.etapas li { background: var(--folha); padding: 20px 20px 24px; counter-increment: etapa; }
.etapas li::before { content: counter(etapa); display: block; font-family: var(--f-titulo); font-stretch: 118%; font-weight: 500; font-size: 2rem; line-height: 1; color: var(--vinho); margin-bottom: 14px; }
.etapas h3 { margin-bottom: 6px; }
.etapas p { font-size: 0.9375rem; line-height: 1.55; color: var(--cinza); }
.nota { margin-top: 28px; font-size: 1rem; color: var(--cinza); }

/* Projeto */
.projeto-cab { padding-block: clamp(32px, 5vw, 64px) clamp(28px, 4vw, 48px); }
.projeto-cab h1 { font-size: clamp(2rem, 4.6vw, 3.6rem); }
.projeto-cab__desc { font-size: 1.1875rem; }
.galeria { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); padding-bottom: clamp(48px, 7vw, 96px); }
.galeria__item { display: block; padding: 0; margin: 0; border: 1px solid var(--grafite); background: var(--folha); cursor: zoom-in; aspect-ratio: 4 / 3; overflow: hidden; transition: border-color .2s; }
.galeria__item:hover { border-color: var(--tinta); }
.galeria__item:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.galeria__item img { width: 100%; height: 100%; object-fit: contain; padding: 3%; }
.galeria__item--foto { background: var(--papel); }
.galeria__item--foto img { padding: 0; object-fit: contain; }

dialog.ampliada { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.ampliada::backdrop { background: rgba(255, 255, 255, .97); }
.ampliada__in { display: grid; grid-template-rows: 1fr auto; width: 100%; height: 100%; padding: 56px clamp(16px, 4vw, 56px) 20px; gap: 12px; }
.ampliada__img { min-height: 0; display: flex; align-items: center; justify-content: center; }
.ampliada__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.ampliada__leg { font-family: var(--f-titulo); font-size: 0.9375rem; color: var(--cinza); text-align: center; }
.ampliada__btn { position: absolute; background: var(--folha); border: 1px solid var(--tinta); width: 44px; height: 44px; cursor: pointer; font-family: var(--f-titulo); font-size: 1.25rem; line-height: 1; display: grid; place-items: center; }
.ampliada__btn:hover { background: var(--tinta); color: var(--folha); }
.ampliada__fechar { top: 12px; right: 12px; }
.ampliada__ant { left: 12px; top: 50%; transform: translateY(-50%); }
.ampliada__prox { right: 12px; top: 50%; transform: translateY(-50%); }

/* Contato */
.contato { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 112px); align-items: start; }
.form { display: grid; gap: 20px; }
.campo label { display: block; font-family: var(--f-titulo); font-size: 0.9375rem; font-weight: 500; font-stretch: 105%; margin-bottom: 6px; }
.campo input, .campo select, .campo textarea { width: 100%; background: var(--folha); border: 1px solid var(--tinta); border-radius: 0; padding: 12px 14px; font-size: 1rem; line-height: 1.4; }
.campo textarea { min-height: 140px; resize: vertical; }
.campo input:focus-visible, .campo select:focus-visible, .campo textarea:focus-visible { outline: 2px solid var(--vinho); outline-offset: 1px; }
.campo__erro { color: var(--vinho); font-family: var(--f-titulo); font-size: 0.875rem; margin-top: 6px; }
.form__ajuda { font-size: 0.9375rem; color: var(--cinza); }
.carimbo--contato { grid-template-columns: 1fr; }
.carimbo--contato a { text-decoration: none; }
.carimbo--contato a:hover .carimbo__valor { color: var(--vinho); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ── Rodapé ───────────────────────────────────────────── */
.rodape { border-top: 1px solid var(--grafite); padding-block: 40px 32px; font-size: 0.9375rem; }
.rodape__grade { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.rodape img { height: 44px; width: auto; margin-bottom: 14px; }
.rodape h2 { font-size: 0.9375rem; font-stretch: 105%; font-weight: 600; letter-spacing: 0; margin-bottom: 10px; }
.rodape li + li { margin-top: 6px; }
.rodape a { text-decoration: none; }
.rodape a:hover { color: var(--vinho); text-decoration: underline; text-underline-offset: 4px; }
.rodape__fim { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--grafite); color: var(--cinza); font-size: 0.875rem; max-width: none; }

.zap-flutuante {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 54px; height: 54px; border-radius: 50%; background: #25d366; display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .22); transition: transform .2s;
}
.zap-flutuante:hover { transform: scale(1.06); }
.zap-flutuante svg { width: 28px; height: 28px; fill: #fff; }

/* ── Páginas de destino (campanhas) ───────────────────── */
.topo--lp .topo__in { flex-wrap: nowrap; }
.topo--lp .menu { width: auto; }
.lp-topo { padding-block: clamp(36px, 6vw, 80px); border-bottom: 1px solid var(--grafite); }
.lp-topo__grade { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px, 6vw, 88px); align-items: start; }
.lp-topo h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: 20px; }
.lp-topo__sub { font-size: 1.1875rem; margin-bottom: 28px; }
.lp-pontos li { position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--grafite); font-size: 1.0625rem; line-height: 1.5; }
.lp-pontos li:last-child { border-bottom: 1px solid var(--grafite); }
.lp-pontos li::before { content: ''; position: absolute; left: 0; top: 1.05em; width: 8px; height: 8px; background: var(--vinho); }
.form--cartao { border: 1px solid var(--tinta); padding: clamp(20px, 3vw, 32px); background: var(--folha); gap: 16px; }
.form--cartao h2 { font-size: 1.5rem; }
.form--cartao .btn { width: 100%; }
.servico--lp { padding-block: 0; border-bottom: 0; }
.perguntas { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(24px, 6vw, 88px); }
details { border-top: 1px solid var(--grafite); }
details:last-child { border-bottom: 1px solid var(--grafite); }
summary { list-style: none; cursor: pointer; padding: 18px 40px 18px 0; position: relative; font-family: var(--f-titulo); font-weight: 600; font-stretch: 105%; font-size: 1.0625rem; line-height: 1.35; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; font-weight: 400; line-height: 1; color: var(--vinho); }
details[open] summary::after { content: '\2212'; }
details p { padding: 0 0 20px; color: var(--cinza); }

/* Texto corrido (política de privacidade) */
.texto-longo { padding-block: clamp(32px, 5vw, 56px) clamp(56px, 8vw, 112px); max-width: 720px; }
.texto-longo h2 { font-size: 1.4rem; margin: 2em 0 .5em; }
.texto-longo h2:first-child { margin-top: 0; }
.texto-longo ul { margin: .75em 0; padding-left: 1.25em; list-style: disc; }
.texto-longo li { margin-bottom: .5em; }
.texto-longo a { text-decoration: underline; text-underline-offset: 3px; }

/* Aviso de cookies */
.cookies {
  position: fixed; left: 16px; bottom: 16px; z-index: 60; max-width: 520px;
  background: var(--folha); border: 1px solid var(--tinta); padding: 18px 20px;
  display: grid; gap: 14px; box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
}
.cookies[hidden] { display: none; }
.cookies p { font-size: 0.9375rem; line-height: 1.5; }
.cookies a { text-decoration: underline; text-underline-offset: 3px; }
.cookies__acoes { display: flex; gap: 10px; }
.cookies__acoes .btn { padding: 10px 20px; }
.rodape__cookies { background: none; border: 0; padding: 0; margin-left: 14px; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.rodape__cookies:hover, .rodape__fim a:hover { color: var(--vinho); }
.rodape__fim a { margin-left: 14px; }
.rodape__fim--lp { margin-top: 0; padding-top: 0; border-top: 0; }

/* ── Responsivo ───────────────────────────────────────── */
@media (max-width: 980px) {
  .carimbo--eixos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .carimbo--sobre-solo { grid-template-columns: 1fr; }
  .etapas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  :root { --altura-header: 64px; }
  .topo__in { flex-wrap: wrap; justify-content: center; padding-block: 14px 12px; gap: 10px 20px; }
  .topo__logo { width: 100%; display: flex; justify-content: center; }
  .topo__logo img { height: 40px; }
  .menu { width: 100%; justify-content: center; gap: clamp(14px, 5vw, 28px); }
  .menu a:not(.btn) { font-size: 0.875rem; padding: 10px 2px; }
  .menu .btn { padding: 10px 16px; font-size: 0.875rem; }
  .menu a.menu__extra { display: none; }
  .menu__sub-lista, .menu__sub::before { display: none !important; }
  .menu__sub-link::after { display: none; }
  html { scroll-padding-top: 128px; }

  .abertura { padding-top: clamp(28px, 7vw, 48px); }
  .abertura__grade, .sobre, .servico, .contato, .lp-topo__grade, .perguntas { grid-template-columns: 1fr; }
  .abertura__desenho { justify-self: stretch; }
  .abertura__desenho img { max-height: 46vh; }
  .grade-projetos, .galeria { grid-template-columns: 1fr; }
  .galeria__item:first-child { aspect-ratio: 4 / 3; }
  .rodape__grade { grid-template-columns: 1fr; gap: 24px; }
  .faixa__in { align-items: flex-start; }
}

@media (max-width: 520px) {
  body { font-size: 1.0625rem; }
  .cookies { left: 8px; right: 8px; bottom: 8px; }
  .topo--lp .menu .btn { padding: 8px 12px; }
  .carimbo--eixos, .etapas, .carimbo--sobre-solo { grid-template-columns: 1fr; }
  .projeto-card .carimbo > * { padding: 10px 12px 12px; }
  .projeto-card .carimbo__valor { font-size: 0.9375rem; }
  .abertura__acoes .btn { width: 100%; }
  .faixa__in .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
