/* A página de apresentação do Aconchego.
   O mundo visual é o da app (`src/ui/theme.ts`) e o da referência (`docs/design/referencia.jpg`):
   o azul-petróleo, o verde-água, o coral, e o papel claro quase azul.

   A letra é a **da app**: a Nunito, nos mesmos três ficheiros que as páginas da conta e do convite
   servem (`web/conta/public/fonts/`). Esta página chegou a ter uma letra só dela — e uma marca só
   dela, desenhada à mão: as duas coisas eram a mesma, uma segunda identidade a nascer ao lado da
   que já existe. Quem vem da loja e abre a app a seguir tem de ver a mesma coisa. */

@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/nunito-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/nunito-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/nunito-800.woff2') format('woff2'); }

:root {
  --navy: #123e5d;
  --ink: #0a2137;
  --texto: #445561;
  --suave: #616e79;
  /** O verde da app, para superfícies e traços — nunca por baixo de texto branco (3,3:1). */
  --verde: #2e9e88;
  /** O mesmo verde escurecido até 5,2:1 com o branco: é este que leva texto por cima. */
  --verde-botao: #1f7a68;
  --verde-botao-premido: #1c6f5f;
  /** E este, 6,0:1, para texto verde sobre branco. */
  --verde-forte: #1c6f5f;
  --coral: #fd6e65;
  --papel: #f1f9fc;
  --branco: #fff;
  --linha: #e3ecf2;
  --azul: #137ef4;

  --medida: 68ch;
  --raio: 18px;
  --sombra: 0 2px 4px rgba(10, 33, 55, 0.04), 0 12px 32px -12px rgba(10, 33, 55, 0.16);
  --sombra-alta: 0 4px 8px rgba(10, 33, 55, 0.05), 0 28px 60px -24px rgba(10, 33, 55, 0.28);
}

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--branco);
  color: var(--texto);
  font-family: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: 'cv05' 1, 'ss03' 1;
  text-rendering: optimizeLegibility;
}

/* As superfícies do browser que não desenhámos, e que sem isto chegam com o cinzento de ninguém. */
::selection {
  background: #cdeae3;
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 3px;
  border-radius: 6px;
}
a {
  color: var(--navy);
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1.5px;
  text-decoration-color: color-mix(in srgb, var(--verde) 55%, transparent);
}
a:hover {
  text-decoration-color: var(--verde);
}
.num {
  font-variant-numeric: tabular-nums;
}

h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.1rem);
}
h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
}
h3 {
  font-size: 1.3125rem;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
  margin: 0;
}

p {
  text-wrap: pretty;
}

.env {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}
.estreito {
  width: min(100% - 2rem, 44rem);
  margin-inline: auto;
}

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

.topo {
  padding: 1.75rem 0 0;
}
.marca {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.marca img {
  width: 44px;
  height: 44px;
  flex: none;
}
.marca b {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.025em;
}
.marca span {
  display: block;
  font-size: 0.8125rem;
  color: var(--suave);
  letter-spacing: 0.01em;
  margin-top: -2px;
}

/* ------------------------------------------------------------------ herói */

.heroi {
  padding: 4.5rem 0 3.5rem;
  padding-block: clamp(3rem, 9vw, 6.5rem) clamp(3rem, 7vw, 5rem);
}
.heroi h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.1rem);
  max-width: 17ch;
}
.heroi h1 em {
  font-style: normal;
  color: var(--verde-forte);
}
.heroi .entrada {
  font-size: clamp(1.0625rem, 1.6vw, 1.28rem);
  color: var(--texto);
  max-width: 52ch;
  margin: 1.4rem 0 0;
}
.estado {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.6rem;
  border-radius: 999px;
  background: var(--papel);
  border: 1px solid var(--linha);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 700;
}
.estado i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--verde);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--verde) 18%, transparent);
}

/* O único momento de movimento da página: o herói assenta uma vez, de baixo para cima. */
.sobe {
  animation: sobe 900ms cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.sobe-2 {
  animation-delay: 90ms;
}
.sobe-3 {
  animation-delay: 180ms;
}
@keyframes sobe {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(6px);
  }
}

/* ------------------------------------------------------------------ formulário */

.inscricao {
  margin-top: 2.5rem;
  max-width: 34rem;
}
.inscricao .linha {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.inscricao input[type='email'] {
  flex: 1 1 15rem;
  min-width: 0;
  padding: 0.95rem 1.1rem;
  font: inherit;
  color: var(--ink);
  background: var(--branco);
  border: 1.5px solid var(--linha);
  border-radius: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.inscricao input[type='email']::placeholder {
  color: #667079;
}
.inscricao input[type='email']:hover {
  border-color: #cfdde7;
}
.inscricao input[type='email']:focus {
  border-color: var(--verde);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--verde) 16%, transparent);
  outline: none;
}
.botao {
  appearance: none;
  border: 0;
  padding: 0.95rem 1.5rem;
  font: inherit;
  font-weight: 700;
  color: var(--branco);
  background: var(--verde-botao);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms ease;
}
.botao:hover {
  background: var(--verde-botao-premido);
}
.botao:active {
  transform: translateY(1px);
}
.botao[disabled] {
  background: #9dc6bd;
  cursor: progress;
}
.consentimento {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 1rem;
  font-size: 0.9375rem;
  color: var(--suave);
  line-height: 1.5;
}
.consentimento input {
  margin: 0.28rem 0 0;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--verde);
  flex: none;
}
.mel {
  position: absolute;
  left: -9999px;
}
.resposta {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  font-size: 0.9375rem;
}
.resposta[data-tom='ok'] {
  background: #e1f4ee;
  color: #15603f;
}
.resposta[data-tom='erro'] {
  background: #fde8e5;
  color: #9c2b28;
}
.resposta:empty {
  display: none;
}

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

.faixa {
  background: var(--papel);
  border-block: 1px solid var(--linha);
  padding: 4rem 1.25rem;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.bloco {
  padding: 4rem 0;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.bloco h2,
.faixa h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  max-width: 20ch;
}
.bloco h2 + p,
.faixa h2 + p {
  margin-top: 1rem;
  max-width: 54ch;
}

.momentos {
  margin-top: 3rem;
  display: grid;
  gap: 2.5rem;
}
.momento {
  display: grid;
  grid-template-columns: 2.75rem 1fr;
  gap: 0 1.25rem;
  align-items: start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--linha);
}
.momentos .momento:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.momento svg {
  width: 2.75rem;
  height: 2.75rem;
  grid-row: span 2;
}
.momento h3 {
  font-size: 1.3125rem;
  align-self: center;
}
.momento p {
  margin: 0.5rem 0 0;
  max-width: 58ch;
}

.lista-feitos {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.25rem 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.lista-feitos li {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  gap: 0.85rem;
  align-items: start;
}
.lista-feitos svg {
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.15rem;
  color: var(--verde-forte);
}
.lista-feitos b {
  color: var(--ink);
  font-weight: 700;
  display: block;
}
.lista-feitos span {
  font-size: 0.9375rem;
  color: var(--suave);
}

/* ------------------------------------------------------------------ dados */

.dados {
  background: var(--navy);
  color: #cfe0ea;
  padding: 4rem 1.25rem;
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.dados h2 {
  color: var(--branco);
}
.dados h2 + p {
  color: #b9d1df;
}
.dados .promessas {
  margin: 2.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.dados .promessas b {
  display: block;
  color: var(--branco);
  font-size: 1.1875rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}
.dados .promessas p {
  margin: 0;
  font-size: 0.9375rem;
  color: #b9d1df;
}
.dados a {
  color: #9fe3d2;
  text-decoration-color: color-mix(in srgb, #9fe3d2 55%, transparent);
}
.dados a:hover {
  text-decoration-color: #9fe3d2;
}

/* ------------------------------------------------------------------ rodapé */

.rodape {
  padding: 3rem 0 4rem;
  font-size: 0.9375rem;
  color: var(--suave);
}
.rodape .separa {
  border-top: 1px solid var(--linha);
  padding-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  justify-content: space-between;
}
.rodape p {
  margin: 0 0 0.35rem;
  max-width: 34ch;
}
.rodape .ligacoes {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

@media (max-width: 40rem) {
  .momento {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  .momento svg {
    grid-row: auto;
  }
}

/* ------------------------------------------------------------------ remate */

/* Isto esteve em atributos `style=` dentro do HTML, e o `.htaccess` manda
   `style-src 'self'` — sem `'unsafe-inline'`, o browser deita fora os atributos e esta secção
   ficava desalinhada **só no alojamento**, nunca ao abrir o ficheiro à mão. */
.remate {
  text-align: center;
}
.remate h2,
.remate p {
  margin-inline: auto;
}
.remate .remate-botao {
  margin-top: 2rem;
}
.remate .botao {
  display: inline-block;
  text-decoration: none;
}

/* Os dois números da página da build de teste. Sem o `anywhere`, um SHA-256 de 64 caracteres não
   parte a linha e a página ganha barra horizontal no telemóvel. */
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
  color: #0a2137;
}
