/* ===========================================================================
   Contratação do Projeto ESSENCIAL

   A gramática vem das páginas de venda, não de um sistema paralelo:
   fundo papel, tinta quase preta, Times italic para o que é humano, Arial
   para o que é instrução, régua de 1px no lugar de sombra, e nada arredondado.

   A ideia da página: uma prancha sendo montada. A coluna da esquerda é a
   especificação; a ficha escura da direita acompanha e fecha a conta.
   =========================================================================== */

:root {
  --ink: #171715;
  --ink-2: #23211d;
  --paper: #eee9e0;
  --paper-2: #e3dbcf;
  --ivory: #f7f3ec;
  --muted: #69635b;
  --accent: #b9a184;
  --wood: #5f4c3a;
  --wood-2: #80664d;
  --line: rgba(23, 23, 21, .18);
  --line-forte: rgba(86, 69, 51, .25);
  --alerta: #a8543c;
  --page: clamp(1.25rem, 4vw, 4.5rem);
  --curva: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid #8b6e4e; outline-offset: 4px; }

em { font-family: "Times New Roman", Times, serif; font-style: italic; font-weight: 400; }

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

/* ---------------------------------------------------------------- abertura */

.abertura {
  padding: clamp(7rem, 11vw, 9.5rem) var(--page) clamp(3.5rem, 6vw, 5.5rem);
  color: var(--ivory);
  background: var(--ink);
}

.abertura__grade {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  max-width: 84rem;
  margin-inline: auto;
}

.abertura .eyebrow { color: var(--accent); }

.abertura h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.9rem, 6vw, 5.6rem);
  font-weight: 400;
  line-height: .92;
  letter-spacing: -.06em;
}
.abertura h1 em { display: block; color: var(--accent); font-size: .82em; letter-spacing: -.045em; }

.abertura__lead {
  max-width: 40ch;
  margin: 0;
  color: #d4d0c9;
  font-size: clamp(1rem, 1.3vw, 1.16rem);
  line-height: 1.6;
}

.abertura__passos {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9c968d;
}
.abertura__passos b { color: var(--ivory); font-weight: 700; }

/* ---------------------------------------------------------------- corpo */

.compra {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 25rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  max-width: 84rem;
  margin-inline: auto;
  padding: clamp(3rem, 6vw, 5rem) var(--page) clamp(5rem, 9vw, 8rem);
}

/* ---------------------------------------------------------------- avisos */

.aviso {
  grid-column: 1 / -1;
  margin: 0 0 1rem;
  padding: 1.1rem 1.35rem;
  border-left: 2px solid var(--alerta);
  background: var(--ivory);
  color: var(--alerta);
  font-size: .92rem;
}

.desvio {
  grid-column: 1 / -1;
  padding: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
  color: var(--ivory);
  background: var(--wood);
}
.desvio h2 {
  max-width: 18ch;
  margin: 0 0 1.5rem;
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.04em;
}
.desvio p { max-width: 54ch; margin: 0 0 1rem; color: #f0e7dc; line-height: 1.6; }
.desvio .botao { margin-top: 1.5rem; width: auto; }

/* ---------------------------------------------------------------- etapas */

.etapa {
  border: 0;
  border-top: 1px solid var(--line);
  padding: clamp(2rem, 4vw, 3rem) 0 0;
  margin: 0 0 clamp(2.5rem, 5vw, 4rem);
}
.etapa:first-of-type { border-top: 0; padding-top: 0; }

.etapa > legend {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  align-items: baseline;
  gap: .75rem;
  width: 100%;
  padding: 0;
  margin-bottom: 1.75rem;
}

.etapa__n {
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(2rem, 3vw, 2.75rem);
  line-height: .8;
  color: var(--accent);
}

.etapa__titulo {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.nota {
  max-width: 56ch;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.55;
}

/* ---------------------------------------------------------------- planos */

.planos {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line-forte);
  border: 1px solid var(--line-forte);
}

.plano {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.35rem, 2.2vw, 1.9rem);
  background: #f5f0e8;
  cursor: pointer;
  transition: background .25s var(--curva), color .25s var(--curva);
}

.plano input { position: absolute; opacity: 0; width: 0; height: 0; }

.plano__nome {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: .6rem 1rem;
}
.plano__nome strong {
  min-width: 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(1.5rem, 2.2vw, 2.05rem);
  font-weight: 400;
  line-height: 1;
}
.plano__nome small {
  flex: 0 1 auto;
  margin-left: auto;
  min-width: 0;
  max-width: 11ch;
  overflow-wrap: break-word;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .09em;
  line-height: 1.45;
  text-align: right;
  text-transform: uppercase;
}

.plano__preco {
  display: flex;
  align-items: start;
  margin: 2.25rem 0 0;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  line-height: .8;
  letter-spacing: -.05em;
}
.plano__preco sup {
  margin: .1rem .3rem 0 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .05em;
}
.plano__desde {
  margin: .85rem 0 0;
  color: var(--muted);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.plano__marca {
  margin-top: 1.75rem;
  padding-top: .9rem;
  border-top: 1px solid var(--line);
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Selecionado herda o tratamento do plano em destaque das páginas de venda. */
.plano:has(input:checked) { color: #fffaf3; background: var(--wood); }
.plano:has(input:checked) .plano__nome small,
.plano:has(input:checked) .plano__desde { color: #e6d9c9; }
.plano__marca b { display: none; font-weight: 700; }
.plano:has(input:checked) .plano__marca { color: #fffaf3; border-top-color: rgba(255, 250, 243, .35); }
.plano:has(input:checked) .plano__marca i { display: none; }
.plano:has(input:checked) .plano__marca b { display: inline; }
.plano:hover:not(:has(input:checked)) { background: #efe8dd; }

/* O rádio do plano tem 0x0 para sair do caminho, então o contorno de foco
   precisa aparecer no cartão, senão quem navega por teclado fica sem pista. */
.plano:has(input:focus-visible) { outline: 2px solid #8b6e4e; outline-offset: -2px; }

/* ---------------------------------------------------------------- ambientes */

.ambientes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid var(--ink-2);
}

.ambiente {
  display: grid;
  gap: .55rem;
  align-content: start;
  padding: 1.15rem 1.25rem;
  background: var(--ink-2);
  color: var(--ivory);
  cursor: pointer;
  transition: background .2s;
}
.ambiente:has(input:checked) { background: var(--wood-2); }
.ambiente:hover:not(:has(input:checked)) { background: #2c2a25; }
.ambiente:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.ambiente__pick input:focus-visible { outline: none; }

.ambiente__pick { display: flex; gap: .7rem; align-items: center; }

.ambiente__pick input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.ambiente:has(input:checked) .ambiente__pick input {
  background: #fffaf3;
  border-color: #fffaf3;
  box-shadow: inset 0 0 0 3px var(--wood-2);
}

.ambiente__pick span {
  font-family: "Times New Roman", Times, serif;
  font-size: 1.18rem;
  line-height: 1.15;
}

.ambiente__meta {
  display: flex;
  gap: .55rem;
  align-items: baseline;
  flex-wrap: wrap;
  padding-left: 1.75rem;
}
.ambiente__valor { color: #c3b6a6; font-size: .76rem; font-weight: 700; }
.ambiente:has(input:checked) .ambiente__valor { color: #fffaf3; }
.ambiente__tag { color: #94897d; font-size: .56rem; letter-spacing: .08em; text-transform: uppercase; }
.ambiente:has(input:checked) .ambiente__tag { color: #f0e4d5; }

/* ---------------------------------------------------------------- binário */

.pergunta { max-width: 48ch; margin: 0 0 1.25rem; font-size: 1.05rem; line-height: 1.5; }

.binarios { display: grid; gap: 1px; background: var(--line-forte); border: 1px solid var(--line-forte); }
.binarios > * { min-width: 0; }
@media (min-width: 40rem) { .binarios { grid-template-columns: 1fr 1fr; } }

.binario {
  display: flex;
  gap: .8rem;
  align-items: center;
  padding: 1.35rem 1.5rem;
  background: #f5f0e8;
  cursor: pointer;
  transition: background .2s;
}
.binario input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(23, 23, 21, .4);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.binario:has(input:checked) { background: var(--paper-2); }
.binario:has(input:checked) input { background: var(--ink); box-shadow: inset 0 0 0 3px var(--paper-2); }
.binario span { font-size: .95rem; line-height: 1.4; }
.binario:has(input:focus-visible) { outline: 2px solid #8b6e4e; outline-offset: -2px; }
.binario input:focus-visible { outline: none; }

/* ---------------------------------------------------------------- campos */

.campos { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }

.campo { display: block; }
.campo > span {
  display: block;
  margin-bottom: .5rem;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.campo input {
  display: block;
  width: 100%;
  padding: .55rem 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: "Times New Roman", Times, serif;
  font-size: 1.32rem;
  border-radius: 0;
  transition: border-color .2s;
}
.campo input::placeholder { color: #a49c91; font-family: Arial, Helvetica, sans-serif; font-size: .92rem; }
.campo input:focus { outline: none; border-bottom-color: var(--wood-2); border-bottom-width: 2px; padding-bottom: calc(.55rem - 1px); }
.campo small { display: block; margin-top: .5rem; color: var(--muted); font-size: .76rem; line-height: 1.45; }

/* ---------------------------------------------------------------- ficha */

.ficha {
  position: sticky;
  top: 1.5rem;
  color: var(--ivory);
  background: var(--ink);
}

.ficha__corpo { padding: clamp(1.5rem, 2.5vw, 2rem); }
.ficha .eyebrow { color: var(--accent); margin-bottom: 1.5rem; }

.ficha__linhas { display: grid; gap: 0; margin-bottom: 1.5rem; }
.ficha__linha {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  font-size: .84rem;
}
.ficha__linha:first-child { border-top: 1px solid rgba(255, 255, 255, .14); }
.ficha__linha span { color: #a8a29a; }
.ficha__linha b { font-weight: 400; text-align: right; }
.ficha__linha--desconto b { color: var(--accent); }

.ficha__vazia { margin: 0 0 1.5rem; color: #8d877e; font-size: .88rem; line-height: 1.5; }

.ficha__total { padding-top: .5rem; }
.ficha__total > span {
  display: block;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #8d877e;
}
.ficha__total strong {
  display: block;
  margin: .5rem 0 .35rem;
  font-family: "Times New Roman", Times, serif;
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  font-weight: 400;
  line-height: .85;
  letter-spacing: -.04em;
}
.ficha__nota { margin: 0; color: #8d877e; font-size: .78rem; line-height: 1.5; }

.aceite {
  display: flex;
  gap: .8rem;
  align-items: start;
  margin: 1.75rem 0 1.25rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #c9c4bc;
  font-size: .8rem;
  line-height: 1.55;
  cursor: pointer;
}
.aceite input {
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  margin: .15rem 0 0;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(255, 255, 255, .45);
  background: transparent;
  cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.aceite input:checked { background: var(--accent); box-shadow: inset 0 0 0 2px var(--ink); }
.aceite a { color: var(--accent); }

.botao {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: 3.4rem;
  padding: 1rem 1.25rem;
  border: 0;
  color: var(--ink);
  background: var(--ivory);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--curva), color .25s var(--curva);
}
.botao:hover { background: var(--accent); }
.desvio .botao { display: inline-flex; }

.ficha__seguro {
  padding: 1.15rem clamp(1.5rem, 2.5vw, 2rem);
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: #8d877e;
  font-size: .72rem;
  line-height: 1.5;
}
.ficha__seguro strong { color: #c9c4bc; font-weight: 700; }

/* ---------------------------------------------------------------- barra do celular

   No telefone a ficha cai depois de quatro etapas longas, e o valor sai de
   vista bem na hora de decidir. A barra traz o total de volta, sem repetir a
   ficha inteira. Fora do celular ela nem existe.
   ------------------------------------------------------------------------- */

.barra { display: none; }

@media (max-width: 62rem) {
  .barra {
    position: sticky;
    z-index: 30;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem .9rem .75rem 1.25rem;
    color: var(--ivory);
    background: rgba(23, 23, 21, .95);
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255, 255, 255, .16);
  }

  .barra__valor > span {
    display: block;
    font-size: .55rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #8d877e;
  }
  .barra__valor strong {
    display: block;
    margin-top: .15rem;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.7rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: -.02em;
  }

  .barra .botao { width: auto; min-height: 3rem; padding: .8rem 1.15rem; }
}

/* ---------------------------------------------------------------- rodapé */

.rodape {
  padding: 2.5rem var(--page);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.6;
}
.rodape__interno { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; max-width: 84rem; margin-inline: auto; }
.rodape a { color: var(--muted); }

/* ---------------------------------------------------------------- entrada */

@media (prefers-reduced-motion: no-preference) {
  .surge { opacity: 0; transform: translateY(18px); animation: surgir .8s var(--curva) forwards; }
  .surge:nth-of-type(1) { animation-delay: .05s; }
  .surge:nth-of-type(2) { animation-delay: .13s; }
  .surge:nth-of-type(3) { animation-delay: .21s; }
  .surge:nth-of-type(4) { animation-delay: .29s; }
  .ficha { opacity: 0; animation: surgir .8s var(--curva) .18s forwards; }
}

@keyframes surgir { to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- telas */

@media (max-width: 62rem) {
  .compra { grid-template-columns: 1fr; }
  .abertura__grade { grid-template-columns: 1fr; align-items: start; }
  .abertura__lead { margin-top: 1.75rem; }
  .ficha { position: static; }
}

@media (max-width: 46rem) {
  .planos { grid-template-columns: 1fr; }
  .plano__preco { margin-top: 1.5rem; }
  .etapa > legend { grid-template-columns: 2.25rem 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
