/* Optizzo — landing page
   Tokens: ver BRAND.md */

:root {
  --papel: #fbfcfa;
  --tinta: #14213d;
  --tinta-suave: #55607a;
  --linha: #dce0e4;
  --azul: #2f6db5;
  --azul-claro: #7fa8dc;

  --fonte: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* escala tipográfica (razão ~1.25) */
  --t-0: 1rem;
  --t-1: 1.25rem;
  --t-2: 1.563rem;
  --t-3: 1.953rem;
  --t-4: 2.441rem;
  --t-5: 3.052rem;

  --largura: 72rem;
  --margem: clamp(1.25rem, 4vw, 2.5rem);
}

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

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

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font-family: var(--fonte);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: "tnum" 0;
}

a {
  color: inherit;
}

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

.ecra-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.contentor {
  max-width: var(--largura);
  margin: 0 auto;
  padding: 0 var(--margem);
}

/* ---------- cabeçalho ---------- */

.cabecalho {
  display: flex;
  align-items: center;
  gap: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.marca {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-weight: 800;
  font-size: var(--t-1);
  letter-spacing: -0.02em;
}

.marca svg {
  width: 1.6rem;
  height: 1.6rem;
}

.cabecalho nav {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
  font-size: 0.95rem;
}

.cabecalho nav a {
  text-decoration: none;
  color: var(--tinta-suave);
}

.cabecalho nav a:hover {
  color: var(--tinta);
}

.idiomas {
  display: flex;
  gap: 0.35rem;
}

.idiomas a {
  display: block;
  padding: 0.2rem;
  border: 2px solid transparent;
  border-radius: 0.4rem;
  line-height: 0;
  opacity: 0.55;
}

.idiomas a:hover {
  opacity: 1;
}

.idiomas a[aria-current="page"] {
  border-color: var(--tinta);
  opacity: 1;
}

.idiomas img {
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(20, 33, 61, 0.15);
}

.botao {
  display: inline-block;
  padding: 0.8rem 1.3rem;
  border: 2px solid var(--tinta);
  border-radius: 999px;
  background: var(--tinta);
  color: var(--papel);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.botao:hover {
  background: #22335c;
  border-color: #22335c;
}

.botao-pequeno {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(2rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 8vw, 6.5rem);
}

.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.3rem, 5vw, var(--t-5));
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 14ch;
}

.hero .lead {
  margin: 0 0 2rem;
  font-size: var(--t-1);
  line-height: 1.5;
  color: var(--tinta-suave);
  max-width: 34ch;
}

.hero .nota {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--tinta-suave);
}

/* ---------- secções ---------- */

.seccao {
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  border-top: 1px solid var(--linha);
}

.seccao h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.8rem, 3.4vw, var(--t-4));
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  max-width: 20ch;
}

.seccao .intro {
  margin: 0 0 2.75rem;
  max-width: 58ch;
  color: var(--tinta-suave);
  font-size: var(--t-1);
}

/* Percurso do cliente: é mesmo uma sequência, por isso tem números */
.percurso {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: passo;
}

.percurso li {
  counter-increment: passo;
  padding-top: 1rem;
  border-top: 3px solid var(--tinta);
}

.percurso li::before {
  content: counter(passo);
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 800;
  font-size: var(--t-2);
  color: var(--tinta-suave);
  font-variant-numeric: tabular-nums;
}

.percurso h3 {
  margin: 0 0 0.4rem;
  font-size: var(--t-1);
  letter-spacing: -0.01em;
}

.percurso p {
  margin: 0;
  color: var(--tinta-suave);
  font-size: 0.98rem;
}

/* Ficha de prescrição */
.prescricao {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.lista-simples {
  margin: 0;
  padding: 0;
  list-style: none;
}

.lista-simples li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--linha);
}

.lista-simples li:first-child {
  border-top: 1px solid var(--linha);
}

.lista-simples strong {
  display: block;
  font-size: 1.05rem;
}

.lista-simples span {
  color: var(--tinta-suave);
}

/* Equipa e ligações: listas de definição em colunas */
.colunas {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.25rem 2.5rem;
  margin: 0;
}

.colunas div {
  margin: 0;
}

.colunas dt {
  font-weight: 800;
  font-size: var(--t-1);
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.colunas dd {
  margin: 0;
  color: var(--tinta-suave);
}

.etiqueta-breve {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid var(--tinta-suave);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--tinta-suave);
  vertical-align: 0.2em;
}

/* Origem */
.origem {
  background: var(--tinta);
  color: var(--papel);
  border-top: 0;
}

.origem h2 {
  max-width: 22ch;
}

.origem p {
  max-width: 60ch;
  font-size: var(--t-1);
  color: #c9d0de;
  margin: 0 0 1rem;
}

.origem p:last-child {
  margin-bottom: 0;
}

/* Formulário */
.demo {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.formulario {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
}

.campo {
  display: grid;
  gap: 0.35rem;
}

.campo-largo {
  grid-column: 1 / -1;
}

.campo label {
  font-weight: 600;
  font-size: 0.95rem;
}

.campo label span {
  font-weight: 400;
  color: var(--tinta-suave);
}

.campo input,
.campo select,
.campo textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border: 1.5px solid #b7bec8;
  border-radius: 0.6rem;
  background: #fff;
  color: var(--tinta);
  font: inherit;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--tinta);
  box-shadow: 0 0 0 3px rgba(20, 33, 61, 0.18);
}

.campo textarea {
  min-height: 7rem;
  resize: vertical;
}

.formulario .botao {
  justify-self: start;
}

.estado {
  grid-column: 1 / -1;
  margin: 0;
  min-height: 1.5em;
  font-weight: 600;
}

.estado[data-tipo="erro"] {
  color: #b3261e;
}

/* Rodapé */
.rodape {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--linha);
  font-size: 0.9rem;
  color: var(--tinta-suave);
}

.rodape .marca {
  font-size: 1rem;
  color: var(--tinta);
}

.rodape .direita {
  margin-left: auto;
}

/* Ações do hero */
.accoes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.botao-contorno {
  background: transparent;
  color: var(--tinta);
}

.botao-contorno:hover {
  background: rgba(20, 33, 61, 0.06);
  border-color: var(--tinta);
}

.botao-claro {
  background: var(--papel);
  border-color: var(--papel);
  color: var(--tinta);
}

.botao-claro:hover {
  background: #e6ebf3;
  border-color: #e6ebf3;
}

/* O desafio */
.desafios {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem 2.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.desafios li {
  padding-top: 1rem;
  border-top: 1px solid var(--linha);
}

.desafios h3 {
  margin: 0 0 0.4rem;
  font-size: var(--t-1);
  letter-spacing: -0.01em;
}

.desafios p {
  margin: 0;
  color: var(--tinta-suave);
}

/* Preços */
.calculadora {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.calculadora fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.linha-preco {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--linha);
  cursor: pointer;
}

.linha-base {
  border-top: 1px solid var(--linha);
  cursor: default;
}

.linha-base::before {
  content: "";
  justify-self: center;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--tinta);
}

.linha-preco input[type="checkbox"] {
  justify-self: center;
  width: 1.3rem;
  height: 1.3rem;
  margin: 0;
  accent-color: var(--tinta);
  cursor: pointer;
}

.linha-preco input[type="number"] {
  width: 4.25rem;
  padding: 0.45rem 0.5rem;
  border: 1.5px solid #b7bec8;
  border-radius: 0.5rem;
  font: inherit;
  font-weight: 700;
  text-align: center;
  color: var(--tinta);
  background: #fff;
}

.nome-preco {
  display: grid;
  gap: 0.15rem;
  cursor: inherit;
}

.nome-preco strong {
  font-size: 1.05rem;
}

.nome-preco span {
  color: var(--tinta-suave);
  font-size: 0.95rem;
}

.valor-preco {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.resumo {
  position: sticky;
  top: 1.5rem;
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: var(--tinta);
  color: var(--papel);
}

.resumo p {
  margin: 0;
}

.resumo-rotulo {
  color: var(--azul-claro);
  font-weight: 600;
}

.resumo .resumo-total {
  margin: 0.2rem 0 0.75rem;
  font-size: clamp(2.4rem, 4.5vw, var(--t-5));
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.resumo .resumo-fundador {
  margin-bottom: 1.5rem;
  color: #c9d0de;
}

.resumo .resumo-fundador strong {
  color: var(--papel);
  font-variant-numeric: tabular-nums;
}

.resumo .resumo-nota {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #c9d0de;
}

.fundadores {
  max-width: 60ch;
  margin-top: 3rem;
}

.fundadores h3 {
  margin: 0 0 0.5rem;
  font-size: var(--t-2);
  letter-spacing: -0.02em;
}

.fundadores p {
  margin: 0;
  color: var(--tinta-suave);
  font-size: var(--t-1);
}

/* Perguntas */
.perguntas {
  max-width: 48rem;
}

.perguntas details {
  border-bottom: 1px solid var(--linha);
}

.perguntas details:first-child {
  border-top: 1px solid var(--linha);
}

.perguntas summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
}

.perguntas summary::-webkit-details-marker {
  display: none;
}

.perguntas summary::after {
  content: "+";
  font-weight: 600;
  color: var(--tinta-suave);
}

.perguntas details[open] summary::after {
  content: "−";
}

.perguntas details p {
  margin: 0 0 1.25rem;
  max-width: 60ch;
  color: var(--tinta-suave);
}

/* Formulário: escolha do pedido */
.escolha {
  margin: 0;
  padding: 0;
  border: 0;
  gap: 0.5rem;
}

.escolha legend {
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.escolha label {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  font-weight: 400;
  cursor: pointer;
}

.escolha input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--tinta);
}

.privacidade {
  grid-column: 1 / -1;
  margin: -0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--tinta-suave);
}

/* Molduras dos ecrãs reais */
.ecra {
  margin: 0;
  border: 1px solid #cdd3dc;
  border-radius: 0.9rem;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 2.5rem 4rem -2.5rem rgba(20, 33, 61, 0.45);
}

.ecra-barra {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.8rem;
  background: #eef1f4;
  border-bottom: 1px solid var(--linha);
}

.ecra-barra i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #c6ccd5;
}

.ecra-barra span {
  margin: 0 auto;
  padding: 0.1rem 1rem;
  border-radius: 0.4rem;
  background: #fff;
  font-size: 0.72rem;
  color: var(--tinta-suave);
}

.ecra img,
.telemovel img {
  display: block;
  width: 100%;
  height: auto;
}

.telemovel {
  margin: 0;
  padding: 0.45rem;
  border-radius: 2.6rem;
  background: #0d1424;
  box-shadow: 0 2rem 3.5rem -1.5rem rgba(20, 33, 61, 0.55);
}

.telemovel img {
  border-radius: 2.2rem;
}

.legenda {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
  color: var(--tinta-suave);
}

/* Hero com o produto */
.hero-visual {
  position: relative;
  padding: 0 0 2.5rem 3rem;
}

.hero-visual .telemovel {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 27%;
}

/* Fotografias */
.foto {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.25rem;
}

.com-foto {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: stretch;
}

.com-foto .foto {
  min-height: 22rem;
}

.com-foto .desafios {
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
}

.ecra-largo {
  margin-top: 3rem;
}

/* App dos clientes */
.app-clientes {
  background: #eef2f7;
  border-top: 0;
}

.telemoveis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 15.5rem));
  justify-content: center;
  align-items: start;
  gap: clamp(1rem, 3vw, 2.5rem);
  margin-top: 1rem;
}

.telemoveis .telemovel-com-legenda:nth-child(2) {
  margin-top: 2.5rem;
}

.telemovel-com-legenda {
  margin: 0;
}

.telemoveis figcaption {
  margin-top: 0.9rem;
  text-align: center;
  font-weight: 600;
}

.origem .com-foto .foto {
  min-height: 20rem;
}

.fundadores-bloco {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin-top: 3.5rem;
}

.fundadores-bloco .fundadores {
  margin-top: 0;
}

.fundadores-bloco .foto {
  aspect-ratio: 3 / 2;
  height: auto;
}

/* ---------- responsivo ---------- */

@media (max-width: 960px) {
  .desafios {
    grid-template-columns: minmax(0, 1fr);
  }
  .calculadora {
    grid-template-columns: minmax(0, 1fr);
  }
  .resumo {
    position: static;
  }
  .percurso {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .colunas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .com-foto,
  .fundadores-bloco,
  .hero,
  .prescricao,
  .demo {
    grid-template-columns: minmax(0, 1fr);
  }
  .cabecalho nav {
    display: none;
  }
  .cabecalho .idiomas {
    margin-left: auto;
  }
}

@media (max-width: 560px) {
  .telemoveis {
    grid-template-columns: minmax(0, 15rem);
  }
  .telemoveis .telemovel-com-legenda:nth-child(2) {
    margin-top: 0;
  }
  .hero-visual {
    padding-left: 1.5rem;
  }
  .linha-preco {
    grid-template-columns: 3.5rem minmax(0, 1fr);
  }
  .linha-preco .valor-preco {
    grid-column: 2;
  }
  .linha-preco input[type="number"] {
    width: 3.25rem;
  }
  .percurso,
  .colunas,
  .formulario {
    grid-template-columns: minmax(0, 1fr);
  }
  .cabecalho .botao {
    display: none;
  }
  .rodape .direita {
    margin-left: 0;
  }
}

