/* ==========================================================================
   Neural Core Studio
   HTML, CSS e JS puros. Cores fixas: #070D0A, #20744F, #E6EAE5.
   ========================================================================== */

/* ---- Tipos de letra (Rethink Sans, SIL Open Font License 1.1) ----------- */

@font-face {
  font-family: "Rethink Sans";
  src: url("../fonts/rethink-sans-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Rethink Sans";
  src: url("../fonts/rethink-sans-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0,
    U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Alternativa com as mesmas métricas, para o texto não saltar ao carregar. */
@font-face {
  font-family: "Rethink Sans Fallback";
  src: local("Arial");
  ascent-override: 94.29%;
  descent-override: 29.47%;
  line-gap-override: 0%;
  size-adjust: 105.21%;
}

/* ---- Tokens -------------------------------------------------------------- */

:root {
  /* As três cores da marca. */
  --bg: #070d0a;
  --green: #20744f;
  --text: #e6eae5;

  /* Derivadas das três acima: superfícies, linhas e texto secundário. */
  --green-deep: #185c3e;
  --surface: #0b1510;
  --surface-2: #101d16;
  --line: #1a2a21;
  --line-strong: #2a3f33;
  --muted: #a3aea7;
  --muted-2: #87938c;

  --font: "Rethink Sans", "Rethink Sans Fallback", system-ui, sans-serif;

  --shell: 1140px;
  --gutter: max(20px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --section-gap: clamp(96px, 13vw, 180px);
  --radius: 20px;
  --radius-lg: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.44, 0, 0.56, 1);

  --header-h: 108px;
}

@media (min-width: 810px) {
  :root {
    --gutter: max(40px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }
}

/* ---- Base ---------------------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  scrollbar-color: var(--line-strong) var(--bg);
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.5;
  caret-color: var(--green);
  /* Com o texto muito ampliado, uma palavra longa parte-se em vez de alargar a página. */
  overflow-wrap: break-word;
}

/* As grelhas de uma coluna não crescem para lá do ecrã por causa do conteúdo. */
.works,
.steps,
.plans,
.both,
.addon,
.close,
.checks,
.terms__list > div,
.footer__inner {
  grid-template-columns: minmax(0, 1fr);
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

::selection {
  background: var(--green);
  color: var(--text);
}

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

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

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--green);
  color: var(--text);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform 0.2s var(--ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }
}

/* Ligações em texto: o verde marca a ligação, o texto mantém o contraste. */
.link {
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: text-decoration-color 0.3s var(--ease-soft);
  overflow-wrap: anywhere;
}

.link:hover {
  text-decoration-color: var(--text);
}

/* Ligações isoladas: área de toque de pelo menos 44px. */
.link--block {
  display: inline-block;
  padding-block: 9px;
}

/* ---- Botões -------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 55px;
  padding: 14px 28px;
  border: 1px solid transparent;
  border-radius: 999px;
  overflow: hidden;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  transition: background-color 0.3s var(--ease-soft), border-color 0.3s var(--ease-soft),
    color 0.3s var(--ease-soft), transform 0.15s var(--ease-out);
}

.btn--primary {
  background: var(--green);
  color: var(--text);
}

.btn--primary:hover {
  background: var(--green-deep);
}

/* O reflexo diagonal do template, que atravessa o botão ao passar o rato. */
.btn--primary::after {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  left: -24px;
  width: 6px;
  background: linear-gradient(177deg, rgba(230, 234, 229, 0) 8%, rgba(230, 234, 229, 0.7) 84%);
  transform: rotate(30deg);
  pointer-events: none;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn--primary:hover::after {
    animation: shine 0.85s var(--ease-soft);
  }
}

/* Resposta ao toque: o botão cede ligeiramente. */
@media (prefers-reduced-motion: no-preference) {
  .btn:active {
    transform: scale(0.98);
  }
}

@keyframes shine {
  to {
    transform: rotate(30deg) translateX(420px);
  }
}

.btn--dark {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn--dark:hover {
  border-color: var(--green);
}

.btn--quiet {
  padding-inline: 20px;
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.btn--quiet:hover {
  text-decoration-color: var(--text);
}

.btn--small {
  min-height: 44px;
  padding: 8px 18px;
  font-size: 1rem;
}

.btn--block {
  display: flex;
  width: 100%;
}

.btn svg {
  flex: none;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn svg {
    transition: transform 0.4s var(--ease-out);
  }

  .btn:hover svg {
    transform: translate(2px, -2px);
  }
}

/* ---- Preloader -------------------------------------------------------------
   Só CSS: desenha o símbolo, mostra o nome e abre-se em 1,8 s, com ou sem
   JavaScript. A página carrega por baixo ao mesmo tempo e nunca fica bloqueada. */

@property --iris {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

.preloader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding-bottom: 8vh;
  background: var(--bg);
  pointer-events: none;
  /* A abertura: um círculo transparente que cresce a partir do símbolo. */
  -webkit-mask-image: radial-gradient(
    circle at 50% 46%,
    transparent calc(var(--iris) - 1px),
    #000 var(--iris)
  );
  mask-image: radial-gradient(circle at 50% 46%, transparent calc(var(--iris) - 1px), #000 var(--iris));
  animation: preloader-open 0.5s cubic-bezier(0.7, 0, 0.3, 1) 1.3s forwards;
}

/* A partir da segunda página da sessão não aparece. */
.no-preloader .preloader {
  display: none;
}

.preloader__inner {
  display: grid;
  justify-items: center;
  gap: 26px;
  animation: preloader-out 0.28s var(--ease-soft) 1.24s forwards;
}

.preloader__mark {
  width: clamp(132px, 38vw, 208px);
  height: auto;
  overflow: visible;
  color: var(--green);
}

.preloader__links path,
.preloader__ring {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0;
}

.preloader__links path {
  animation: preloader-draw 0.5s var(--ease-out) forwards;
  animation-delay: calc(0.1s + var(--d) * 0.06s);
}

.preloader__ring {
  animation: preloader-draw 0.6s cubic-bezier(0.6, 0, 0.2, 1) 0.45s forwards;
}

.preloader__nodes circle {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: preloader-node 0.5s var(--ease-out) forwards;
  animation-delay: calc(var(--d) * 0.06s);
}

.preloader__name {
  margin-right: -0.3em;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  animation: preloader-name 0.4s var(--ease-out) 0.8s forwards;
}

.preloader__name span {
  color: var(--green);
}

@keyframes preloader-draw {
  from {
    opacity: 1;
    stroke-dashoffset: 1;
  }

  to {
    opacity: 1;
    stroke-dashoffset: 0;
  }
}

/* Cada nó chega de fora e encaixa no seu lugar. */
@keyframes preloader-node {
  from {
    opacity: 0;
    transform: translate(var(--x), var(--y)) scale(0.3);
  }

  60% {
    opacity: 1;
  }

  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

@keyframes preloader-name {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes preloader-out {
  to {
    opacity: 0;
    transform: scale(1.06);
  }
}

@keyframes preloader-open {
  to {
    --iris: 120vmax;
    visibility: hidden;
  }
}

@keyframes preloader-fade {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ---- Cabeçalho ------------------------------------------------------------ */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 24px max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) 0;
  pointer-events: none;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(936px, 100%);
  min-height: 76px;
  padding: 10px 10px 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 13, 10, 0.72);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  pointer-events: auto;
}

/* O desfoque atrás do cabeçalho redesenha-se a cada fotograma do canvas.
   Em ecrãs pequenos fica um fundo quase opaco, muito mais leve de desenhar. */
@media (max-width: 809px) {
  .bar {
    background: rgba(7, 13, 10, 0.94);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

.bar__logo {
  flex: none;
  display: block;
  width: 124px;
}

.bar__links {
  display: none;
  align-items: center;
  gap: 4px;
}

.bar__links a {
  display: block;
  padding: 12px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s var(--ease-soft);
}

.bar__links a:hover,
.bar__links a[aria-current="true"] {
  color: var(--text);
}

.bar__cta {
  display: none;
  flex: none;
}

.bar__burger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--surface-2);
  transition: background-color 0.3s var(--ease-soft);
}

.bar__burger:hover {
  background: var(--line);
}

@media (min-width: 600px) {
  .bar__cta {
    display: inline-flex;
    margin-left: auto;
  }
}

@media (min-width: 1024px) {
  .site-header {
    padding-top: 32px;
  }

  .bar {
    min-height: 83px;
    padding: 14px 14px 14px 24px;
  }

  .bar__links {
    display: flex;
  }

  .bar__cta {
    margin-left: 0;
  }

  .bar__burger {
    display: none;
  }
}

/* ---- Menu (telemóvel e tablet) -------------------------------------------- */

.menu {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 24px max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) 32px;
  overflow-y: auto;
  border: 0;
  background: var(--bg);
  color: var(--text);
}

.menu[open] {
  display: flex;
  flex-direction: column;
  gap: 40px;
  animation: menu-fade 0.2s linear;
}

@media (prefers-reduced-motion: no-preference) {
  .menu[open] {
    animation: menu-in 0.45s var(--ease-out);
  }
}

.menu::backdrop {
  background: var(--bg);
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
}

@keyframes menu-fade {
  from {
    opacity: 0;
  }
}

.menu__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 10px 10px 10px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.menu__top img {
  width: 124px;
}

.menu__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: var(--surface-2);
}

.menu__links {
  display: flex;
  flex-direction: column;
  padding-inline: 12px;
}

.menu__links a {
  display: block;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.menu .btn {
  margin-top: auto;
}

/* ---- Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  --p: 0;
}

/* Com a animação ativa, o hero ganha altura extra: é esse percurso de scroll
   que faz a rede convergir para o símbolo. */
.hero.hero--scroll {
  min-height: 190svh;
}

.hero__stage {
  grid-area: 1 / 1;
  align-self: start;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  contain: layout paint;
  pointer-events: none;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Escurece a rede atrás do texto e desaparece à medida que o símbolo se forma. */
.hero__veil {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 62% 52% at 50% 50%,
    rgba(7, 13, 10, 0.86),
    rgba(7, 13, 10, 0.5) 55%,
    rgba(7, 13, 10, 0) 82%
  );
  opacity: calc(1 - var(--p) * 1.6);
}

.hero__stage::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 16%;
  background: linear-gradient(rgba(7, 13, 10, 0), var(--bg));
}

.hero__caption {
  position: absolute;
  inset: auto 0 clamp(28px, 6svh, 56px) 0;
  z-index: 1;
  padding-inline: var(--gutter);
  color: var(--muted);
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-align: center;
}

.hero--scroll .hero__caption {
  inset: var(--caption-top, 78%) 0 auto 0;
  color: var(--text);
  font-size: 1.125rem;
  opacity: var(--caption, 0);
}

.hero__content {
  grid-area: 1 / 1;
  align-self: start;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: calc(var(--header-h) + 40px) var(--gutter) 104px;
  text-align: center;
}

.hero--scroll .hero__content {
  opacity: calc(1 - var(--p) * 2.2);
}

/* Já invisível: deixa de receber cliques e foco. */
.hero.is-past .hero__content {
  visibility: hidden;
}

.hero__title {
  max-width: 100%;
  font-size: clamp(1.5rem, 8.2vw, 3.625rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.hero__lead,
.hero__word {
  display: block;
}

/* Cabe numa linha em qualquer ecrã; só quebra se o visitante ampliar o texto. */
.hero__word {
  min-height: 1.2em;
  overflow-wrap: break-word;
}

.hero__typed {
  text-decoration: underline;
  text-decoration-color: var(--green);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  text-decoration-skip-ink: none;
}

.hero__typed.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.06em;
  height: 0.86em;
  margin-left: 0.06em;
  vertical-align: -0.06em;
  background: var(--green);
  animation: caret 1.1s steps(1) infinite;
}

@keyframes caret {
  50% {
    opacity: 0;
  }
}

.hero__sub {
  max-width: 34ch;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(1.125rem, 2.2vw, 1.25rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin-top: 44px;
}

.hero__note {
  margin-top: 18px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

/* Telemóvel deitado: há pouca altura, por isso o cabeçalho e o hero encolhem. */
@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --header-h: 90px;
  }

  .site-header {
    padding-top: 10px;
  }

  .hero__content {
    padding-top: calc(var(--header-h) + 16px);
    padding-bottom: 72px;
  }

  .hero__title {
    font-size: clamp(1.5rem, 11svh, 3.625rem);
  }

  .hero__actions {
    margin-top: 24px;
  }
}

/* ---- Secções ---------------------------------------------------------------- */

.section {
  width: min(var(--shell), 100% - var(--gutter) * 2);
  margin-inline: auto;
  margin-top: var(--section-gap);
}

.hero + .section {
  margin-top: clamp(72px, 9vw, 120px);
}

.section--narrow {
  --shell: 920px;
}

.section__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(40px, 6vw, 72px);
  text-align: center;
}

.section__head h2 {
  max-width: min(21ch, 100%);
  font-size: clamp(1.875rem, 4.6vw, 3rem);
}

.section__head p {
  max-width: 52ch;
  color: var(--muted);
}

.section__note {
  max-width: 52ch;
  margin: clamp(40px, 5vw, 64px) auto 0;
  color: var(--muted);
  text-align: center;
}

/* ---- Trabalhos ---------------------------------------------------------------- */

.works {
  display: grid;
  gap: 20px;
}

@media (min-width: 900px) {
  .works {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.work {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.work__shot {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  aspect-ratio: 1600 / 870;
  background: var(--surface-2);
}

.work__shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .work__shot img {
    transition: transform 1.2s var(--ease-out);
  }

  .work:hover .work__shot img {
    transform: scale(1.03);
  }
}

.work__body {
  padding: 0 6px 8px;
}

.work__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.work__name {
  font-size: 1.5rem;
}

.work__tag {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 1rem;
}

.work__text {
  max-width: 54ch;
  margin-top: 14px;
  color: var(--muted);
}

/* ---- Como funciona: quatro nós ligados, como a rede do hero --------------------- */

.steps {
  display: grid;
  gap: 0;
}

.step {
  position: relative;
  padding: 0 0 40px 68px;
}

.step:last-child {
  padding-bottom: 0;
}

.step__node {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* A ligação até ao nó seguinte. */
.step::after {
  content: "";
  position: absolute;
  top: 44px;
  bottom: 0;
  left: 21px;
  width: 2px;
  background: var(--line-strong);
  transform-origin: top;
}

.step:last-child::after {
  display: none;
}

.step__title {
  padding-top: 8px;
  font-size: 1.375rem;
}

.step__text {
  max-width: 44ch;
  margin-top: 10px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
  }

  .step {
    padding: 76px 0 0;
  }

  .step::after {
    top: 21px;
    bottom: auto;
    left: 44px;
    width: calc(100% - 44px + 32px);
    height: 2px;
    transform-origin: left;
  }

  .step__title {
    padding-top: 0;
  }
}

/* A linha desenha-se nó a nó quando a secção entra no ecrã. */
@media (prefers-reduced-motion: no-preference) {
  .js .steps:not(.is-in) .step::after {
    transform: scale(0);
  }

  .js .steps:not(.is-in) .step__node {
    background: var(--surface-2);
    box-shadow: inset 0 0 0 2px var(--line-strong);
  }

  .step::after {
    transition: transform 0.9s var(--ease-out);
    transition-delay: calc(var(--i) * 0.28s + 0.25s);
  }

  .step__node {
    transition: background-color 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
    transition-delay: calc(var(--i) * 0.28s);
  }
}

/* ---- Preços ------------------------------------------------------------------- */

.plans {
  display: grid;
  gap: 20px;
}

@media (min-width: 810px) {
  .plans {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 3.4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Pacote com promoção em vigor. */
.plan--promo {
  border-color: var(--green);
}

.plan__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.plan__name {
  font-size: 1.5rem;
}

.plan__for {
  max-width: 40ch;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* A etiqueta por cima de cada valor. */
.plan__label {
  margin-top: 28px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
}

.plan__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.plan__price strong {
  font-size: clamp(2.75rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.plan__price s {
  color: var(--muted-2);
  font-size: 1.5rem;
  font-weight: 500;
  text-decoration-color: var(--green);
  text-decoration-thickness: 2px;
}

/* A data até à qual a promoção é válida, logo por baixo do valor. */
.plan__until {
  flex-basis: 100%;
  font-size: 1.0625rem;
  font-weight: 500;
}

.checks {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}

.plan .checks {
  margin-bottom: 36px;
}

.plan .btn {
  margin-top: auto;
}

.checks li {
  position: relative;
  padding-left: 38px;
}

.checks li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--green)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23e6eae5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 24px no-repeat;
}

/* "Os dois pacotes incluem": uma faixa entre linhas, sem caixa. */
.both {
  display: grid;
  gap: 24px;
  margin-top: 20px;
  padding: clamp(28px, 4vw, 44px) clamp(4px, 3.4vw, 36px);
  border-block: 1px solid var(--line);
}

.both__title {
  font-size: 1.5rem;
}

.both .checks {
  margin-top: 0;
}

@media (min-width: 700px) {
  .checks--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 32px;
  }
}

@media (min-width: 1024px) {
  .both {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 40px;
  }
}

.addon {
  display: grid;
  gap: 32px;
  margin-top: 20px;
  padding: clamp(24px, 3.4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.addon__name {
  font-size: 1.5rem;
}

.addon__text {
  max-width: 36ch;
  margin-top: 12px;
  font-size: 1.25rem;
  line-height: 1.4;
}

.addon .checks {
  margin-top: 26px;
}

.addon__side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.addon__side .plan__label {
  margin-top: 0;
}

.addon__price {
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.addon__price strong {
  font-size: clamp(2.75rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
}

.addon__price span {
  margin-left: 4px;
  color: var(--muted);
}

.addon__side .btn {
  margin-top: 24px;
}

@media (min-width: 900px) {
  .addon {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 48px;
  }

  .addon__side {
    justify-content: center;
    padding-top: 0;
    padding-left: 48px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }
}

.terms {
  margin-top: clamp(56px, 7vw, 88px);
}

.terms__title {
  font-size: 1.5rem;
}

.terms__list {
  margin-top: 20px;
  border-top: 1px solid var(--line);
}

.terms__list > div {
  display: grid;
  gap: 6px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.terms__list dt {
  font-weight: 600;
}

.terms__list dd {
  max-width: 68ch;
  color: var(--muted);
}

@media (min-width: 810px) {
  .terms__list > div {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 32px;
  }
}

/* ---- Perguntas frequentes -------------------------------------------------------- */

.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.faq,
.qa {
  interpolate-size: allow-keywords;
}

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
}

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

/* O título pode encolher e partir palavras; o botão nunca sai da linha. */
summary > h2,
summary > h3 {
  min-width: 0;
}

.faq__summary {
  padding: clamp(22px, 3.4vw, 34px) clamp(20px, 3.4vw, 36px);
  border-radius: var(--radius-lg);
}

.faq__title {
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
}

.faq__body {
  padding: 0 clamp(20px, 3.4vw, 36px) clamp(12px, 2vw, 20px);
}

.faq__lead {
  padding-bottom: 20px;
  color: var(--muted);
}

.qa {
  border-top: 1px solid var(--line);
}

.qa summary {
  padding: 22px 0;
}

.qa h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.35;
  text-wrap: pretty;
}

.qa p {
  max-width: 64ch;
  padding: 0 0 26px;
  color: var(--muted);
}

/* O botão de abrir/fechar: um "+" que roda para "−". */
.toggle {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  transition: background-color 0.3s var(--ease-soft);
}

.toggle--small {
  width: 40px;
  height: 40px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.toggle::before,
.toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 2px;
  margin: -1px 0 0 -8px;
  border-radius: 2px;
  background: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
  .toggle::before,
  .toggle::after {
    transition: transform 0.5s var(--ease-out);
  }
}

.toggle::after {
  transform: rotate(90deg);
}

details[open] > summary .toggle::before {
  transform: rotate(180deg);
}

details[open] > summary .toggle::after {
  transform: rotate(180deg);
}

summary:hover .toggle--small {
  background: var(--line);
}

summary:hover .toggle:not(.toggle--small) {
  background: var(--green-deep);
}

@media (prefers-reduced-motion: no-preference) {
  .faq::details-content,
  .qa::details-content {
    block-size: 0;
    overflow: clip;
    transition: block-size 0.55s var(--ease-out), content-visibility 0.55s allow-discrete;
  }

  .faq[open]::details-content,
  .qa[open]::details-content {
    block-size: auto;
  }
}

/* ---- Fecho e contacto ------------------------------------------------------------ */

.close {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  padding: clamp(20px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.close__photo {
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
}

.close__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}

.close__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.close__body h2 {
  max-width: 18ch;
  font-size: clamp(1.875rem, 4.4vw, 2.875rem);
}

.close__text {
  max-width: 46ch;
  margin-top: 20px;
  color: var(--muted);
}

.close__body .btn {
  margin-top: 36px;
}

.close__alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  align-self: stretch;
}

.close__alt-label {
  color: var(--muted);
}

.copy {
  min-height: 44px;
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 1rem;
  font-weight: 500;
  transition: border-color 0.3s var(--ease-soft), background-color 0.3s var(--ease-soft);
}

.copy:hover {
  border-color: var(--green);
}

.copy.is-done {
  border-color: var(--green);
  background: var(--green);
}

@media (min-width: 810px) {
  .close {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: stretch;
  }

  .close__photo {
    aspect-ratio: 4 / 5;
  }
}

/* ---- Rodapé ---------------------------------------------------------------------- */

.footer {
  margin-top: var(--section-gap);
  padding: 0 max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) 24px;
}

.footer__inner,
.footer__bottom {
  width: min(1380px, 100%);
  margin-inline: auto;
  background: var(--surface);
  border-inline: 1px solid var(--line);
}

.footer__inner {
  display: grid;
  gap: 36px;
  padding: clamp(36px, 6vw, 80px) clamp(20px, 6vw, 80px) clamp(28px, 4vw, 48px);
  border-top: 1px solid var(--line);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.footer__brand img {
  width: 172px;
}

.footer__brand p {
  max-width: 30ch;
  margin-top: 18px;
  color: var(--muted);
}

.footer__nav ul {
  display: grid;
  gap: 4px;
}

.footer__nav a {
  display: inline-block;
  padding: 9px 0;
  color: var(--muted);
  transition: color 0.3s var(--ease-soft);
}

.footer__nav a:hover {
  color: var(--text);
}

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 0 clamp(20px, 6vw, 80px) 24px;
  border-bottom: 1px solid var(--line);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  color: var(--muted);
  font-size: 1rem;
}

.footer__bottom::before {
  content: "";
  flex: 0 0 100%;
  height: 1px;
  margin-bottom: 14px;
  background: var(--line);
}

.footer__top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  transition: color 0.3s var(--ease-soft);
}

.footer__top:hover {
  color: var(--text);
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .footer__top svg {
    transition: transform 0.4s var(--ease-out);
  }

  .footer__top:hover svg {
    transform: translateY(-3px);
  }
}

@media (min-width: 810px) {
  .footer {
    padding: 0 max(30px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)) 30px;
  }

  .footer__inner {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr) auto;
    gap: 48px;
    align-items: start;
  }

  .footer__contact {
    padding-top: 8px;
  }
}

/* ---- Barra fixa de WhatsApp (só no telemóvel) -------------------------------------- */

.wa-bar {
  display: none;
}

@media (max-width: 599px) {
  .wa-bar {
    position: fixed;
    right: max(12px, env(safe-area-inset-right, 0px));
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: max(12px, env(safe-area-inset-left, 0px));
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 12px 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: var(--green);
    color: var(--text);
    font-weight: 600;
    text-align: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
    transition: transform 0.5s var(--ease-out), visibility 0.5s;
  }

  .js .wa-bar:not(.is-visible) {
    transform: translateY(calc(100% + 32px));
    visibility: hidden;
  }

  /* Espaço para a barra não tapar o fim do rodapé. */
  .footer {
    padding-bottom: 24px;
  }
}

/* ---- Movimento reduzido ---------------------------------------------------------------
   Sai o movimento no espaço (deslizar, ampliar, rodar). Ficam as mudanças de
   cor e de opacidade, que confirmam o que o visitante fez. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero__typed.is-typing::after {
    animation: none;
  }

  /* Preloader: o símbolo aparece já completo e sai num fade rápido. */
  .preloader {
    -webkit-mask-image: none;
    mask-image: none;
    animation: preloader-fade 0.35s linear 0.15s forwards;
  }

  .preloader__inner,
  .preloader__links path,
  .preloader__ring,
  .preloader__nodes circle,
  .preloader__name {
    opacity: 1;
    stroke-dashoffset: 0;
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) and (max-width: 599px) {
  /* A barra aparece e desaparece sem deslizar. */
  .wa-bar {
    transition: opacity 0.2s linear, visibility 0.2s;
  }

  .js .wa-bar:not(.is-visible) {
    transform: none;
    opacity: 0;
  }
}

/* ---- Sem JavaScript ---------------------------------------------------------------------
   O menu precisa de JavaScript; sem ele o botão sai e as ligações ficam no rodapé. */

html:not(.js) .bar__burger {
  display: none;
}

/* ---- Modo de alto contraste do sistema --------------------------------------------------- */

@media (forced-colors: active) {
  .toggle::before,
  .toggle::after {
    background: CanvasText;
  }

  .toggle,
  .step__node {
    border: 1px solid CanvasText;
  }

  .checks li::before {
    forced-color-adjust: none;
  }

  .hero__typed {
    text-decoration-color: currentColor;
  }
}
