/* GestHeranças: página da lista de espera.
   Cores de uma casa alentejana: cal, azul e amarelo-ocre. Uma só família de letra,
   o Archivo, condensado nos títulos. Sem pedidos a terceiros. */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --cal: #FFFFFF;
  --preto: #000000;
  --azul: #1E3E94;
  --azul-escuro: #152C6B;
  --ocre: #E6A817;
  --ocre-vivo: #F2BA2E;
  --ocre-claro: #FBEFC9;
  --erro: #B3261E;
  --rosa-aviso: #FFE3E3;

  --letra: "Archivo", Arial, sans-serif;
  --largura: 76rem;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cal);
  color: var(--preto);
  font-family: var(--letra);
  font-size: 1.125rem;
  font-stretch: 100%;
  line-height: 1.55;
  font-kerning: normal;
}

p { margin: 0; }

a { color: var(--azul); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  font-stretch: 72%;
  line-height: 0.95;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(4rem, 1.4rem + 10vw, 10rem); letter-spacing: -0.02em; color: var(--azul); }
h2 { font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.5rem); }
h1, h2 { text-wrap: balance; }
/* Só o título de abertura começa com «, que fica pendurado à esquerda. */
@media (min-width: 88rem) { .abertura h1 { text-indent: -0.42em; } }

.largura { width: min(100% - 2rem, var(--largura)); margin-inline: auto; }
@media (min-width: 40rem) { .largura { width: min(100% - 4rem, var(--largura)); } }

.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;
}

.saltar {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  padding: 0.5rem 1rem;
  background: var(--preto); color: var(--cal);
}
.saltar:focus { top: 1rem; }

.por-preencher { padding: 0 0.2em; background: var(--rosa-aviso); outline: 1px dashed var(--erro); }

/* Botões */
.botao {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0.75rem 1.5rem;
  border: 0; border-radius: 3px;
  background: var(--ocre); color: var(--preto);
  font-family: var(--letra); font-size: 1.1875rem; font-weight: 800; font-stretch: 85%; line-height: 1.1;
  text-decoration: none; cursor: pointer;
}
.botao:hover { background: var(--ocre-vivo); }
.botao:focus-visible { outline-color: var(--preto); }
.botao:disabled { opacity: 0.6; cursor: progress; }
.botao--pequeno { min-height: 2.6rem; padding: 0.5rem 1rem; font-size: 1.0625rem; }

/* Topo */
.topo__linha { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 1.1rem; }
.topo__marca { display: flex; align-items: baseline; gap: 1rem; }
.marca {
  color: var(--azul); text-decoration: none; white-space: nowrap;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.125rem); font-weight: 800; font-stretch: 72%; line-height: 1; letter-spacing: -0.01em;
}
/* No logótipo, «Gest» fica mais leve para que «Herança» se leia primeiro. */
.marca__gest { font-weight: 500; }
.topo__descricao { display: none; font-size: 0.9375rem; font-weight: 600; }
@media (min-width: 70rem) { .topo__descricao { display: inline; } }
.topo__acoes { display: flex; align-items: center; gap: 2rem; }
.topo__entrar { color: var(--azul); font-weight: 800; white-space: nowrap; }
[hidden] { display: none !important; }
@media (max-width: 39.99rem) { .topo__acoes { gap: 1rem; } }
.menu { display: none; gap: 1.75rem; }
@media (min-width: 56rem) { .menu { display: flex; } }
.menu a { color: var(--preto); font-weight: 600; text-decoration: none; }
.menu a:hover { text-decoration: underline; text-decoration-thickness: 2px; }

/* Abertura */
.abertura { padding-top: 2.5rem; }
@media (min-width: 60rem) { .abertura { padding-top: 4rem; } }
.abertura__grelha { display: grid; gap: 3rem; margin-top: 2.25rem; padding-bottom: 4rem; }
@media (min-width: 60rem) {
  .abertura__grelha { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 5rem; margin-top: 3rem; padding-bottom: 5rem; }
}
.abertura__texto { display: grid; gap: 1.75rem; justify-items: start; align-content: start; }
.abertura__lead { max-width: 36rem; font-size: 1.375rem; line-height: 1.45; }
.abertura__preco { font-size: 1rem; font-weight: 600; }

/* A conversa da família */
.conversa { margin: 0; padding-left: 1.25rem; border-left: 4px solid var(--azul); }
.conversa figcaption { margin-bottom: 0.9rem; font-size: 1rem; font-weight: 700; }
.conversa ol { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.conversa li { display: grid; grid-template-columns: 3.1rem 1fr; column-gap: 0.75rem; align-items: baseline; }
.conversa time { font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.conversa b { font-weight: 700; margin-right: 0.35em; }

/* A barra de cor, como a base pintada de uma casa caiada */
.barra { height: 1.5rem; background: var(--ocre); }

/* Secções */
.secao { padding-block: 4.5rem; }
@media (min-width: 60rem) { .secao { padding-block: 6rem; } }

/* O acerto */
.acerto__intro { max-width: 48rem; margin-top: 1.75rem; font-size: 1.375rem; line-height: 1.6; }
.acerto__intro input {
  width: 4.6ch; height: 1.45em; padding: 0;
  line-height: 1.2; vertical-align: baseline;
  border: 0; border-bottom: 3px solid var(--ocre); border-radius: 0;
  background: var(--ocre-claro); color: var(--azul);
  font: inherit; font-weight: 800; text-align: center;
  font-variant-numeric: tabular-nums;
}
.acerto__intro input:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.acerto__intro input[aria-invalid="true"] { border-bottom-color: var(--erro); color: var(--erro); }
.acerto__ajuda { margin-top: 0.5rem; font-size: 1rem; }
.acerto__depois { max-width: 44rem; margin-top: 1.75rem; }

.tabela { margin-top: 2.5rem; overflow-x: auto; }
.contas { width: 100%; min-width: 46rem; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.contas caption { padding-bottom: 0.75rem; font-weight: 700; text-align: left; }
.contas th, .contas td { padding: 0.95rem 0.75rem; border-bottom: 1px solid var(--preto); text-align: right; vertical-align: top; }
.contas th:first-child, .contas td:first-child { padding-left: 0; }
.contas th:last-child, .contas td:last-child { padding-right: 0; }
.contas thead th { border-bottom: 3px solid var(--preto); font-size: 1rem; font-weight: 700; }
.contas thead th:first-child { text-align: left; }
.contas tbody th, .contas tfoot th { font-size: 1.25rem; font-weight: 800; font-stretch: 85%; text-align: left; }
.contas .acerto-texto { width: 30%; font-weight: 700; text-align: left; }
.contas thead th:last-child { text-align: left; }
.contas tfoot th, .contas tfoot td { border-bottom: 0; font-weight: 700; }
.contas .valor { display: inline-block; }
.contas .nota { display: block; font-size: 0.875rem; font-weight: 400; }
.fracao { color: var(--azul); font-size: 1.375rem; font-weight: 800; font-variant-numeric: diagonal-fractions; }

@media (max-width: 47.99rem) {
  .tabela { overflow: visible; }
  .contas { min-width: 0; }
  .contas, .contas tbody, .contas tfoot, .contas tr, .contas th, .contas td { display: block; }
  .contas thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .contas tr { padding-block: 1rem; border-top: 3px solid var(--preto); }
  .contas tbody th, .contas tfoot th { padding: 0 0 0.4rem; border: 0; }
  .contas td { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 0.3rem 0; border: 0; }
  .contas td::before { content: attr(data-label); font-weight: 700; text-align: left; }
  .contas caption { display: block; }
  .contas .valor { text-align: right; }
  .contas .acerto-texto { display: block; width: auto; margin-top: 0.4rem; padding: 0.6rem 0.75rem; background: var(--ocre-claro); }
  .contas .acerto-texto::before { display: block; }
}

@media (prefers-reduced-motion: no-preference) {
  .mudou { animation: realce 900ms ease-out; }
}
@keyframes realce {
  from { background-color: var(--ocre-claro); }
  to { background-color: transparent; }
}

/* Secção com o título à esquerda e o texto à direita */
@media (min-width: 60rem) {
  .secao--duas { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: start; }
  .secao--duas .lei__corpo { margin-top: 0.6rem; }
}

/* A nova lei */
.lei__corpo { display: grid; gap: 1.1rem; max-width: 46rem; margin-top: 1.75rem; }
.lei__corpo .data { font-weight: 700; }

/* Fundador */
.fundador figure { max-width: 50rem; margin: 1.75rem 0 0; }
.fundador blockquote { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); line-height: 1.35; font-weight: 500; }
.fundador figcaption { margin-top: 1.25rem; font-weight: 700; }

/* Perguntas */
.perguntas { display: grid; gap: 2.25rem 4rem; margin: 2.25rem 0 0; }
@media (min-width: 56rem) { .perguntas { grid-template-columns: 1fr 1fr; } }
.perguntas dt { margin-bottom: 0.4rem; font-size: 1.5rem; font-weight: 800; font-stretch: 85%; line-height: 1.15; }
.perguntas dd { max-width: 34rem; margin: 0; }

/* Lista de espera: o bloco azul */
.lista { padding-block: 4.5rem; background: var(--azul); color: var(--cal); }
@media (min-width: 60rem) { .lista { padding-block: 6rem; } }
.lista a { color: var(--cal); }
.lista__grelha { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .lista__grelha { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 5rem; align-items: start; } }
.lista__texto { display: grid; gap: 1.1rem; align-content: start; }
.lista__texto h2 { margin-bottom: 0.5rem; }
.lista__texto p { max-width: 30rem; font-size: 1.25rem; }
.lista__texto .lista__preco { font-size: 1.875rem; font-weight: 800; font-stretch: 85%; line-height: 1.1; }

.painel { padding: 1.75rem 1.25rem; border-radius: 3px; background: var(--cal); color: var(--preto); }
@media (min-width: 40rem) { .painel { padding: 2.25rem 2.5rem; } }
.painel a { color: var(--azul); }

.campo { min-width: 0; margin: 0 0 1.4rem; padding: 0; border: 0; }
.campo__rotulo { display: block; margin-bottom: 0.4rem; padding: 0; font-weight: 700; }
.opcional { font-weight: 400; }
.campo input[type="email"],
.campo select {
  width: 100%; min-height: 3.25rem; padding: 0.6rem 0.8rem;
  border: 2px solid var(--preto); border-radius: 3px;
  background: var(--cal); color: var(--preto);
  font: inherit;
}
.campo input[type="email"]:focus-visible,
.campo select:focus-visible { outline: 3px solid var(--ocre); outline-offset: 1px; }
.campo input[aria-invalid="true"] { border-color: var(--erro); }

.opcao { display: flex; align-items: flex-start; gap: 0.7rem; padding: 0.4rem 0; cursor: pointer; }
.opcao input { flex: none; width: 1.25rem; height: 1.25rem; margin: 0.2rem 0 0; accent-color: var(--azul); }
.opcao--consentimento { font-size: 0.9375rem; }

.campo__erro { margin-top: 0.4rem; font-size: 0.9375rem; font-weight: 700; color: var(--erro); }
.campo--isco { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.formulario__estado { min-height: 1.6em; margin-top: 1rem; }
.formulario__estado.erro { font-weight: 700; color: var(--erro); }

.confirmacao { padding: 0.5rem 0 0.75rem; border-left: 6px solid var(--ocre); padding-left: 1.25rem; }
.confirmacao:focus { outline: none; }
.confirmacao__titulo { margin-bottom: 0.4rem; font-size: 2.25rem; font-weight: 800; font-stretch: 72%; line-height: 1; color: var(--azul); }

/* Rodapé: a barra amarela */
.rodape { background: var(--ocre); color: var(--preto); }
.rodape a { color: var(--preto); }
.rodape__grelha { display: grid; gap: 1.5rem 4rem; padding-block: 2.75rem 3rem; font-size: 1rem; }
@media (min-width: 48rem) { .rodape__grelha { grid-template-columns: 1fr auto; align-items: end; } }
.rodape__grelha > div { display: grid; gap: 0.5rem; }
.rodape__marca { font-size: 2.5rem; font-weight: 800; font-stretch: 72%; line-height: 1; }

/* Página da política de privacidade */
.documento { max-width: 46rem; padding-block: 3rem 5rem; }
.documento h1 { margin-bottom: 1rem; font-size: clamp(2.75rem, 1.8rem + 3.5vw, 4.5rem); }
.documento h2 { margin: 2.5rem 0 0.75rem; font-size: 2rem; }
.documento p, .documento li { max-width: 42rem; margin-bottom: 0.8rem; }
.documento ul { margin: 0; padding-left: 1.25rem; }
.documento .data { font-weight: 700; }

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

/* Página do produto */
h3 { font-size: 1.5rem; font-stretch: 85%; line-height: 1.15; letter-spacing: 0; }
.secao__intro { max-width: 46rem; margin-top: 1.75rem; font-size: 1.375rem; line-height: 1.5; }

/* Os passos: são mesmo uma sequência, por isso levam número. */
.passos { display: grid; gap: 0; margin: 3rem 0 0; padding: 0; list-style: none; counter-reset: passo; border-top: 3px solid var(--preto); }
.passos li { counter-increment: passo; display: grid; grid-template-columns: 3.5rem 1fr; column-gap: 1rem; padding-block: 1.5rem; border-bottom: 1px solid var(--preto); }
.passos li::before { content: counter(passo); grid-row: span 2; color: var(--azul); font-size: 4rem; font-weight: 800; font-stretch: 72%; line-height: 0.85; font-variant-numeric: tabular-nums; }
.passos h3, .passos p { grid-column: 2; }
.passos p { max-width: 40rem; margin-top: 0.5rem; }
@media (min-width: 60rem) {
  .passos li { grid-template-columns: 6rem minmax(0, 5fr) minmax(0, 7fr); column-gap: 2rem; align-items: start; padding-block: 2rem; }
  .passos li::before { grid-row: auto; font-size: 5.5rem; }
  .passos h3 { grid-column: 2; font-size: 1.875rem; }
  .passos p { grid-column: 3; margin-top: 0.2rem; }
}

/* As secções pintadas: a parede azul e a barra ocre. */
.secao--azul { background: var(--azul); color: var(--cal); }
.secao--ocre { background: var(--ocre); color: var(--preto); }
.secao--ocre a:not(.botao) { color: var(--preto); }
.secao--azul :focus-visible { outline-color: var(--ocre); }

.faz { display: grid; gap: 0 4rem; margin: 2.5rem 0 0; border-top: 3px solid var(--cal); }
@media (min-width: 56rem) { .faz { grid-template-columns: 1fr 1fr; } }
.faz > div { padding-block: 1.4rem; border-bottom: 1px solid rgb(255 255 255 / 0.55); }
.faz dt { font-size: 1.5rem; font-weight: 800; font-stretch: 85%; line-height: 1.15; color: var(--ocre-vivo); }
.faz dd { max-width: 34rem; margin: 0.4rem 0 0; }

@media (min-width: 48rem) { .contas--resultado { min-width: 44rem; } }
.contas--resultado thead th:last-child, .contas--resultado td:last-child { text-align: right; }

.quem { display: grid; gap: 2.5rem 3.5rem; margin-top: 2.5rem; }
@media (min-width: 56rem) { .quem { grid-template-columns: repeat(3, 1fr); } }
.quem > div { padding-top: 1.1rem; border-top: 3px solid var(--azul); }
.quem h3 { color: var(--azul); }
.quem p { margin-top: 0.6rem; }

/* O preço, escrito como uma conta. */
.preco { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) { .preco { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 4rem; align-items: start; } }
.preco__texto { display: grid; gap: 1.5rem; justify-items: start; align-content: start; }
.preco__texto p { max-width: 28rem; font-size: 1.375rem; line-height: 1.45; }
.botao--preto { background: var(--preto); color: var(--cal); }
.botao--preto:hover { background: var(--azul-escuro); }
.preco .tabela { margin-top: 0; overflow: visible; }
.contas--preco { min-width: 0; }
.contas--preco caption { font-size: 1.25rem; font-weight: 800; font-stretch: 85%; }
.contas--preco tbody th { width: 68%; }
.contas--preco thead th:last-child, .contas--preco td:last-child { text-align: right; }
.contas--preco td { font-size: 1.625rem; font-weight: 800; font-stretch: 85%; white-space: nowrap; }
.contas--preco td .nota { white-space: normal; }
.contas--preco tbody tr:last-child th, .contas--preco tbody tr:last-child td { border-bottom: 3px solid var(--preto); }
.preco__iva { margin-top: 0.9rem; font-size: 1rem; }
.contas--preco td a { color: var(--preto); }
@media (max-width: 47.99rem) {
  .contas--preco tbody th { width: auto; }
  .contas--preco td::before { font-size: 1rem; font-stretch: 100%; }
}

.condicoes { display: grid; gap: 2rem 3.5rem; margin: 3.5rem 0 0; }
@media (min-width: 40rem) { .condicoes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 70rem) { .condicoes { grid-template-columns: repeat(5, 1fr); gap: 2rem 2.5rem; } }
.condicoes dt { font-size: 1.5rem; font-weight: 800; font-stretch: 85%; line-height: 1.15; }
.condicoes dd { margin: 0.4rem 0 0; }

.garantias { display: grid; gap: 0; max-width: 46rem; margin: 1.75rem 0 0; padding: 0; list-style: none; border-top: 3px solid var(--preto); }
.garantias li { padding-block: 1rem; border-bottom: 1px solid var(--preto); }
.garantias b { font-weight: 800; }
@media (min-width: 60rem) { .secao--duas .garantias { margin-top: 0.6rem; } }
