/* dadiva-landing.css
   Camada das SECÇÕES da landing (index.html) abaixo da hero: mapa, pausa,
   inspiração/ferramentas, conversa e rodapé.
   Carregada depois de dadiva-hero.css e antes de dadiva-responsive.css.
   Dono: agente da landing. Não repetir aqui regras da hero.

   Escala vertical: 8 / 16 / 24 / 40 / 64 / 96 (--s1 … --s6).
   Tipografia: Gelasio nas frases-título, Nunito no corpo e nas etiquetas.
   As lavagens de aguarela entre secções são só gradientes — zero imagens. */

:root {
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: 64px;
  --s6: 96px;
  --serif: "Gelasio", "Gelasio Fallback", Georgia, serif;
  --sans: "Nunito", "Nunito Fallback", system-ui, "Segoe UI", sans-serif;
}

/* ── 1. Mapa ─────────────────────────────────────────────────────────── */
.world {
  position: relative;
  isolation: isolate;
  padding-top: 50px;
  margin-top: -15px;
}
.world h2 {
  position: relative;
  z-index: 2;
  text-align: center;
  font: clamp(36px, 4.3vw, 65px) / 1.1 var(--serif);
  letter-spacing: -2px;
  margin-bottom: -35px;
}
.map-wrap {
  position: relative;
  max-width: 1600px;
  margin: auto;
}
.map-picture {
  display: block;
}
.map-art {
  width: 100%;
  /* Obrigatório: o <img> traz width=1536 height=1024 como atributos, e sem
     height:auto essa dica de apresentação mantinha a altura fixa em 1024px
     em qualquer largura — a ilha ficava esmagada na horizontal (-33% a
     1024px de ecrã). Com height:auto escala proporcionalmente. */
  height: auto;
  display: block;
  mask-image: linear-gradient(transparent, #000 6%, #000 90%, transparent);
}
.map-link {
  position: absolute;
  display: grid;
  gap: var(--s1);
  width: max-content;
  max-width: 240px;
  padding: 17px 21px;
  background: rgba(255, 253, 245, 0.96);
  border-radius: var(--radius-card);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}
.map-link strong {
  font: 700 25px/1.1 var(--serif);
}
.map-link strong .ml-b {
  display: block;
}
.map-link > span {
  color: var(--blue);
  font-size: 15px;
}
.map-link:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
}
.map-link:active {
  transform: translateY(-1px);
}
.map-link.tools {
  left: 9%;
  top: 46%;
}
/* Recuado o suficiente para o avatar flutuante do MYLO (canto inferior
   direito) nunca tapar o cartão nem o seu "Ver o mapa →". */
.map-link.videos {
  right: 11%;
  top: 52%;
}
.map-link.mylo {
  left: 44%;
  top: 76%;
}

/* ── 2. Pausa ────────────────────────────────────────────────────────── */
.pause {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: var(--s4) var(--s3) var(--s6);
}
/* Lavagem que traz o mar e a relva do mapa para dentro do papel. */
.pause:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -120px 0 auto;
  height: 420px;
  pointer-events: none;
  background:
    radial-gradient(38% 46% at 20% 38%, #d7eaff 0%, #d7eaff00 70%),
    radial-gradient(30% 38% at 43% 24%, #e8f4ff 0%, #e8f4ff00 72%),
    radial-gradient(34% 44% at 79% 30%, #e6f3e2 0%, #e6f3e200 70%),
    radial-gradient(52% 40% at 56% 62%, #fff7dd 0%, #fff7dd00 76%);
  opacity: 0.85;
}
/* Lavagem que leva a pausa para dentro da inspiração. */
.pause:after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: auto 0 -170px;
  height: 330px;
  pointer-events: none;
  background:
    radial-gradient(34% 48% at 22% 48%, #edf6e8 0%, #edf6e800 74%),
    radial-gradient(36% 46% at 78% 54%, #e9f2ff 0%, #e9f2ff00 76%);
  opacity: 0.75;
}
.sprout {
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto var(--s3);
  color: var(--green);
}
.pause h2 {
  font: clamp(32px, 3.8vw, 55px) / 1.2 var(--serif);
  letter-spacing: -1.8px;
  margin-bottom: 14px;
  text-wrap: balance;
}
.pause p {
  font-size: 21px;
  line-height: 1.55;
  max-width: 34ch;
  margin: 0 auto;
  text-wrap: balance;
}

/* ── 3. Inspiração + ferramentas ─────────────────────────────────────── */
/* Mesma grelha do header e do rodapé (--shell-pad). Antes tinha max-width
   1250 + padding 5%, o que punha o conteúdo 81px à direita da linha do
   logotipo: ao rolar da secção para o rodapé o bloco saltava para a esquerda. */
.resources {
  position: relative;
  isolation: isolate;
  padding: var(--s3) var(--shell-pad) var(--s6);
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 70px;
}
/* As duas colunas têm conteúdos de alturas diferentes (duas miniaturas de um
   lado, quatro fichas do outro). Sem isto os dois botões acabavam em linhas
   de base diferentes (86px de desfasamento a 1440) e abria-se um buraco em
   baixo à esquerda. Cada coluna é uma coluna flex e o CTA é empurrado para o
   fundo — os dois assentam na mesma linha. */
.resources > div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.resources > div > .button {
  margin-top: auto;
  align-self: flex-start;
}
.resources h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 36px/1.2 var(--serif);
  margin-bottom: var(--s1);
}
.resources h2 .mark {
  flex: none;
  width: 30px;
  height: 30px;
  color: var(--green);
}
.resources > div > p {
  line-height: 1.6;
  max-width: 46ch;
  margin-bottom: var(--s3);
}
.inspiration-pictures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
  margin: 0 0 var(--s3);
}
.inspiration-pictures figure {
  margin: 0;
}
.inspiration-pictures img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  border-radius: var(--radius-card);
  border: 1px solid #e3ecdf;
  box-shadow: var(--shadow-card);
}
.inspiration-pictures figcaption {
  font-size: 13px;
  line-height: 1.45;
  padding-top: var(--s1);
  color: #3c5470;
}
.tool-rows {
  margin: 0 0 var(--s3);
}
.tool-rows a {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px solid #d3e3f4;
  text-decoration: none;
}
.tool-rows a b {
  font-weight: 800;
  font-size: 17px;
}
.tool-rows a small {
  grid-column: 1;
  font-size: 13.5px;
  line-height: 1.45;
  color: #3c5470;
}
.tool-rows a span {
  grid-row: 1;
  grid-column: 2;
  color: var(--blue);
}
.tool-rows a:hover b,
.tool-rows a:hover span {
  color: var(--blue);
}
.tool-rows a:hover {
  border-bottom-color: var(--blue);
}

/* ── 4. Conversa ─────────────────────────────────────────────────────── */
/* A faixa é full-bleed, o conteúdo não: assenta no mesmo shell do resto da
   página. A frase encosta à linha da esquerda (logotipo, títulos, email) e o
   botão à linha da direita (links do header). */
.return {
  position: relative;
  isolation: isolate;
  padding: var(--s5) var(--shell-pad);
  background: linear-gradient(
    var(--ivory),
    #fff4bd 22%,
    #ffefa6 50%,
    #fff4bd 78%,
    var(--ivory)
  );
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) 75px;
}
.return:before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(45% 70% at 18% 50%, #fffbe6 0%, #fffbe600 70%),
    radial-gradient(40% 60% at 82% 45%, #fff9d5 0%, #fff9d500 72%);
}
.return h2 {
  font: 36px/1.25 var(--serif);
  max-width: 490px;
  margin: 0;
}

/* ── 5. Rodapé ───────────────────────────────────────────────────────── */
/* Duas linhas que ocupam a largura toda do shell: marca e email encostados à
   linha da esquerda, páginas e assinatura à linha da direita. O email fica
   sempre à esquerda porque é o único contacto da página — o canto inferior
   direito é por onde passa o avatar flutuante do MYLO, e o padding-bottom de
   130px (mylo-companion.css) garante ~50px de folga para a linha de baixo. */
.site-footer {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--s3) var(--s4);
  padding: var(--s4) var(--shell-pad) var(--s5);
  font-size: 13px;
}
.site-footer .brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -1.1px;
  text-decoration: none;
  justify-self: start;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  gap: 4px 14px;
  font-weight: 700;
}
.footer-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0 2px;
  text-decoration: none;
}
.footer-links a:hover,
.site-footer .footer-mail:hover {
  color: var(--blue);
}
.footer-links a[aria-current="page"] {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.site-footer .footer-made {
  grid-area: 2 / 2;
  justify-self: end;
  text-align: right;
  margin: 0;
  color: #3c5470;
}
.site-footer .footer-mail {
  grid-area: 2 / 1;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 700;
}

/* ── 6. Tablet: mesma composição do PC, cartões proporcionais ────────── */
@media (max-width: 900px) {
  .resources {
    grid-template-columns: 1fr;
    /* Empilhados, os dois blocos precisam do mesmo respiro que separa as
       secções (var(--s6)). Com 64px o botão do primeiro bloco lia-se como
       pertencendo ao título do segundo. */
    gap: var(--s6);
  }
}
@media (min-width: 701px) and (max-width: 950px) {
  .map-link {
    padding: 12px 15px;
    max-width: 190px;
  }
  .map-link strong {
    font-size: 20px;
  }
  .map-link > span {
    font-size: 13px;
  }
  /* Ecrã estreito: o avatar ocupa proporcionalmente mais canto. */
  .map-link.videos {
    right: 16%;
  }
}

/* ── 7. Telemóvel ────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  /* 6.1 Mapa: etiquetas de papel dentro da ilha, com pin no sítio certo. */
  .world {
    margin-top: 0;
    padding-top: var(--s3);
  }
  .world h2 {
    font-size: clamp(30px, 8vw, 40px);
    letter-spacing: -1.2px;
    margin: 0 var(--gutter) var(--s1);
  }
  .map-wrap {
    width: 100%;
    margin: 0;
    aspect-ratio: 4/5;
  }
  .map-art {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    mask-image: linear-gradient(transparent, #000 4%, #000 94%, transparent);
  }
  .map-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: auto;
    max-width: 44%;
    min-height: 44px;
    margin: 0;
    padding: 9px 13px;
    border: 1px solid #ffffffdd;
    border-radius: 999px;
    background: rgba(255, 253, 245, 0.93);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    box-shadow: 0 4px 14px #10294f2e;
  }
  .map-link strong {
    font: 800 14px/1.15 var(--sans);
    letter-spacing: -0.2px;
  }
  /* A segunda linha do rótulo continua a existir para leitores de ecrã. */
  .map-link strong .ml-b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  /* O "Explorar →" encolhe até sobrar só a seta, sem sair da árvore a11y. */
  .map-link > span {
    font-size: 0;
    line-height: 0;
    color: var(--blue);
  }
  .map-link > span:after {
    content: "→";
    font: 800 14px/1 var(--sans);
  }
  /* Pin: haste curta + ponto a pulsar em cima do sítio que representa. */
  .map-link:before,
  .map-link:after {
    content: "";
    position: absolute;
    left: 50%;
    pointer-events: none;
  }
  .map-link:before {
    width: 2px;
    height: 13px;
    margin-left: -1px;
    background: #fffdf5cc;
    box-shadow: 0 0 0 1px #10294f1f;
  }
  .map-link:after {
    width: 11px;
    height: 11px;
    margin-left: -5.5px;
    border-radius: 50%;
    background: var(--blue);
    border: 2px solid var(--ivory);
    box-shadow: 0 0 0 0 #0864ec55;
    animation: map-pin 3s ease-out infinite;
  }
  .map-link:active {
    background: rgba(238, 244, 253, 0.97);
    transform: scale(0.97);
  }
  /* Pins virados para baixo (etiqueta por cima do sítio). */
  .map-link.tools:before,
  .map-link.videos:before {
    top: 100%;
  }
  .map-link.tools:after,
  .map-link.videos:after {
    top: calc(100% + 11px);
  }
  /* Pin virado para cima (etiqueta por baixo da casa do MYLO). */
  .map-link.mylo:before {
    bottom: 100%;
  }
  .map-link.mylo:after {
    bottom: calc(100% + 11px);
  }
  .map-link.tools {
    left: 4%;
    top: 19%;
    right: auto;
  }
  .map-link.videos {
    left: auto;
    right: 7%;
    top: 24.5%;
  }
  .map-link.videos:after {
    animation-delay: 1s;
  }
  .map-link.mylo {
    left: 50%;
    right: auto;
    top: 73%;
    transform: translateX(-50%);
  }
  .map-link.mylo:active {
    transform: translateX(-50%) scale(0.97);
  }
  .map-link.mylo:after {
    animation-delay: 2s;
  }

  /* 6.2 Ritmo vertical do resto da página. */
  .pause {
    padding: var(--s4) var(--gutter) var(--s5);
  }
  .pause:before {
    inset: -90px 0 auto;
    height: 340px;
  }
  .pause:after {
    inset: auto 0 -130px;
    height: 260px;
  }
  .sprout {
    width: 38px;
    height: 38px;
    margin-bottom: var(--s2);
  }
  .pause h2 {
    font-size: 32px;
    line-height: 1.15;
    letter-spacing: -1.2px;
  }
  .pause p {
    font-size: 17px;
    line-height: 1.6;
  }
  .resources {
    grid-template-columns: 1fr;
    gap: var(--s6);
    padding: var(--s2) var(--gutter) var(--s5);
  }
  .resources h2 {
    font-size: 31px;
    letter-spacing: -0.8px;
  }
  .resources h2 .mark {
    width: 26px;
    height: 26px;
  }
  .inspiration-pictures {
    gap: var(--s2) 12px;
  }
  .inspiration-pictures img {
    height: 128px;
    border-radius: 9px;
  }
  .inspiration-pictures figcaption {
    font-size: 12.5px;
  }
  .tool-rows a {
    padding: 13px 0;
  }
  .return {
    display: block;
    padding: var(--s5) var(--gutter);
  }
  .return h2 {
    font-size: 30px;
    line-height: 1.22;
    letter-spacing: -0.8px;
    margin-bottom: var(--s3);
    text-wrap: balance;
  }
  .site-footer {
    grid-template-columns: 1fr;
    gap: var(--s2);
    /* O padding-bottom real (folga para o avatar) vem de mylo-companion.css. */
    padding: var(--s4) var(--gutter) var(--s4);
  }
  .footer-links {
    justify-content: flex-start;
    gap: 0 18px;
  }
  /* Uma coluna: volta tudo à ordem natural do HTML e à esquerda. */
  .site-footer .footer-mail,
  .site-footer .footer-made {
    grid-area: auto;
  }
  .site-footer .footer-links,
  .site-footer .footer-made {
    justify-self: start;
    text-align: left;
  }
}

@media (max-width: 380px) {
  .map-link {
    max-width: 46%;
    padding: 9px 11px;
  }
  .map-link strong {
    font-size: 13px;
  }
  /* A 320px o título da última secção caía em três linhas desirmanadas.
     Com 26px volta ao ritmo de duas linhas que tem a 360 e a 390. */
  .return h2 {
    font-size: 26px;
  }
}

@keyframes map-pin {
  0% {
    box-shadow: 0 0 0 0 #0864ec55;
  }
  60% {
    box-shadow: 0 0 0 13px #0864ec00;
  }
  100% {
    box-shadow: 0 0 0 0 #0864ec00;
  }
}

@media (prefers-reduced-motion: reduce) {
  .map-link:after {
    animation: none;
  }
}
