/* =========================================================
   PHASE · Instalações Elétricas
   Folha de estilos principal
   Conceito: duas metades que só funcionam ligadas.
   Blocos que se tocam num único ponto, diagonais ao ângulo
   do símbolo, ciano concentrado num só ponto de energia.
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  /* Cores oficiais do manual */
  --c-cyan:   #3fc4ee; /* única cor de energia */
  --c-light:  #e9ecef; /* fundos claros */
  --c-line:   #c8d0db; /* divisões, linhas, superfícies secundárias */
  --c-mid:    #a5b1c3; /* texto secundário em fundos escuros, detalhes */
  --c-slate:  #34383f; /* base escura, texto sobre claro */
  /* Preto profundo derivado da ardósia (mesmo matiz azulado, ~218°) */
  --c-deep:   #111317;

  /* Papéis */
  --bg-dark: var(--c-deep);
  --fg-on-dark: var(--c-light);
  --fg-on-dark-2: var(--c-mid);
  --bg-light: var(--c-light);
  --fg-on-light: var(--c-slate);
  --fg-on-light-2: rgb(52 56 63 / .78);

  /* Tipografia */
  --font: "Funnel Sans", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --fs-display: clamp(2.125rem, 1.35rem + 3.1vw, 4.25rem);
  --fs-h2: clamp(2rem, 1.35rem + 2.6vw, 3.625rem);
  --fs-h3: clamp(1.25rem, 1.1rem + .5vw, 1.5rem);
  --fs-lead: clamp(1.0625rem, 1rem + .3vw, 1.25rem);
  --fs-body: .9375rem;
  --fs-small: .8125rem;
  --fs-label: .75rem;
  --fw-light: 300;
  --fw-title: 400; /* títulos ao estilo da referência, peso regular */
  --fw-regular: 400;
  --fw-medium: 500;

  /* Espaço */
  --gutter: clamp(16px, 4.2vw, 64px);
  --section: clamp(88px, 11vw, 168px);
  --header-h: 72px;

  /* Geometria do símbolo: a diagonal tem a inclinação dos triângulos (≈ 35°) */
  --cut: 14px;
  --ease: cubic-bezier(.65, 0, .35, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);

  color-scheme: dark;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: 1.6;
  color: var(--fg-on-dark);
  background: var(--bg-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-weight: var(--fw-title); line-height: 1.04; letter-spacing: -.035em; text-wrap: balance; }

:focus-visible { outline: 2px solid var(--c-cyan); outline-offset: 3px; }
.on-light :focus-visible { outline-color: var(--c-slate); }

[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 100;
  padding: 12px 18px; background: var(--c-cyan); color: var(--c-deep);
  font-weight: var(--fw-medium); transition: top .2s;
}
.skip-link:focus { top: calc(16px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.section { padding-block: var(--section); position: relative; }
.on-light { background: var(--bg-light); color: var(--fg-on-light); }
.on-line  { background: var(--c-line);  color: var(--fg-on-light); }
.on-slate { background: var(--c-slate); color: var(--fg-on-dark); }
.on-dark  { background: var(--c-deep);  color: var(--fg-on-dark); }

/* Etiqueta de secção, com o pequeno par de triângulos desenhado em CSS */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: var(--fs-label); font-weight: var(--fw-medium);
  letter-spacing: -.005em;
}
.eyebrow::before {
  content: ""; width: 18px; height: 1px;
  background: currentColor; opacity: .5;
}

/* Cabeçalho de secção em duas colunas: título à esquerda, texto à direita */
.section-head {
  display: grid; gap: 24px 48px;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.section-head h2 { font-size: var(--fs-h2); margin-top: 20px; }
.section-head p { max-width: 44ch; font-size: var(--fs-lead); font-weight: var(--fw-light); line-height: 1.5; }
.on-light .section-head p, .on-line .section-head p { color: var(--fg-on-light-2); }
.on-dark .section-head p, .on-slate .section-head p { color: var(--fg-on-dark-2); }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; }
  .section-head p { justify-self: end; }
}

/* Linha fina em que o ciano se dissolve (único gradiente permitido) */
.energy-line {
  height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--c-cyan) 0%, rgb(63 196 238 / 0) 60%);
}

/* ---------- 3. Botões e ligações ---------- */
/* Botão com o canto inferior direito cortado na diagonal do símbolo.
   No hover, um triângulo sobe do canto e preenche o bloco. */
.btn {
  --btn-bg: var(--c-cyan);
  --btn-fg: var(--c-deep);
  --btn-fill: var(--c-light);
  position: relative; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 12px 26px 12px 20px;
  border: 0; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg);
  font-size: var(--fs-small); font-weight: var(--fw-medium); letter-spacing: .02em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut) * 1.43) 100%, 0 100%);
  overflow: hidden;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--btn-fill);
  clip-path: polygon(0 100%, 0 100%, 0 100%);
  transition: clip-path .55s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { clip-path: polygon(0 -60%, 260% 100%, 0 100%); }
.btn--small { min-height: 40px; padding: 9px 22px 9px 16px; font-size: var(--fs-small); }
.btn--dark { --btn-bg: var(--c-slate); --btn-fg: var(--c-light); --btn-fill: var(--c-deep); }
.btn:focus-visible { outline-offset: 4px; }

/* "Saber mais +" — o sinal roda e passa a ciano */
.link-plus {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--fs-label); font-weight: var(--fw-medium);
  letter-spacing: -.005em;
  padding-block: 10px;
}
.link-plus .plus {
  position: relative; width: 11px; height: 11px; flex: none;
  transition: transform .5s var(--ease);
}
.link-plus .plus::before, .link-plus .plus::after {
  content: ""; position: absolute; background: currentColor;
}
.link-plus .plus::before { left: 0; right: 0; top: 5px; height: 1px; }
.link-plus .plus::after  { top: 0; bottom: 0; left: 5px; width: 1px; }
.link-plus:hover .plus, .link-plus:focus-visible .plus { transform: rotate(90deg); }
.on-dark .link-plus:hover .plus, .hero .link-plus:hover .plus,
.on-slate .link-plus:hover .plus { color: var(--c-cyan); }

/* ---------- 4. Cabeçalho ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; z-index: 60;
  height: env(safe-area-inset-top, 0px); background: var(--c-deep);
}
.site-header {
  position: fixed; left: 0; right: 0; top: env(safe-area-inset-top, 0px); z-index: 50;
  height: var(--header-h);
  transition: background-color .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: rgb(17 19 23 / .86);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom-color: rgb(165 177 195 / .12);
}
.site-header.is-hidden { transform: translateY(-110%); }
.site-header .wrap {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; padding: 8px 0; color: var(--c-light); }
.brand svg { height: 22px; width: auto; display: block; }
.brand .brand__full { display: none; }

.nav { display: none; }
.nav ul { display: flex; gap: clamp(20px, 2.6vw, 40px); }
.nav a {
  position: relative; display: block; padding: 10px 0;
  font-size: var(--fs-small); color: var(--c-mid);
  transition: color .3s;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px;
  background: var(--c-light); transform: scaleX(0); transform-origin: left;
  transition: transform .5s var(--ease);
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--c-light); }
.nav a:hover::after, .nav a[aria-current="true"]::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 12px; }

.menu-toggle {
  width: 44px; height: 44px; display: grid; place-items: center;
  background: none; border: 0; cursor: pointer; color: var(--c-light); padding: 0;
}
.menu-toggle span { position: relative; display: block; width: 26px; height: 9px; }
.menu-toggle span::before, .menu-toggle span::after,
.menu-toggle span i { content: ""; position: absolute; right: 0; height: 1px; background: currentColor; transition: transform .45s var(--ease), width .45s var(--ease), opacity .3s; }
.menu-toggle span::before { top: 0; width: 26px; }
.menu-toggle span i { top: 4px; width: 26px; }
.menu-toggle span::after { top: 8px; width: 16px; }
.menu-toggle[aria-expanded="true"] span::before { transform: translateY(4px) rotate(35deg); }
.menu-toggle[aria-expanded="true"] span i { opacity: 0; }
.menu-toggle[aria-expanded="true"] span::after { width: 26px; transform: translateY(-4px) rotate(-35deg); }

@media (min-width: 1024px) {
  .nav { display: block; }
  .menu-toggle { display: none; }
}

/* Menu móvel */
.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: var(--c-cyan); color: var(--c-deep);
  padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 24px);
  padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  transition: clip-path .7s var(--ease), visibility 0s linear .7s;
  visibility: hidden;
}
.mobile-menu.is-open {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path .7s var(--ease), visibility 0s;
  visibility: visible;
}
.mobile-menu nav { flex: 1; }
.mobile-menu li { border-bottom: 1px solid rgb(17 19 23 / .18); }
.mobile-menu nav a {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 0; font-size: clamp(1.75rem, 7vw, 2.5rem); font-weight: var(--fw-light); letter-spacing: -.01em;
  color: var(--c-deep);
}
.mobile-menu nav a small { font-size: var(--fs-label); color: var(--c-slate); letter-spacing: .1em; }
.mobile-menu__foot { display: grid; gap: 16px; color: var(--c-slate); font-size: var(--fs-small); }
.mobile-menu__foot .btn { --btn-bg: var(--c-deep); --btn-fg: var(--c-light); --btn-fill: var(--c-slate); }
.mobile-menu :focus-visible { outline-color: var(--c-deep); }

/* Com o menu aberto, o cabeçalho passa para cores escuras sobre o ciano */
.menu-open .site-header,
.menu-open .site-header.is-scrolled { background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
.menu-open .brand, .menu-open .menu-toggle { color: var(--c-deep); }
.menu-open .header-actions .btn { --btn-bg: var(--c-deep); --btn-fg: var(--c-light); --btn-fill: var(--c-slate); }
.menu-open .menu-toggle:focus-visible { outline-color: var(--c-deep); }
.menu-open::before { background: var(--c-cyan); }
@media (min-width: 1024px) { .mobile-menu { display: none; } }

/* ---------- 5. Hero ---------- */
.hero {
  position: relative; isolation: isolate;
  min-height: 100vh; min-height: 100svh;
  background: var(--c-deep); color: var(--c-light);
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
/* grelha de linhas verticais finas, como no mockup */
.hero__grid {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.hero__grid span { border-left: 1px solid rgb(165 177 195 / .07); }
.hero__grid span:last-child { border-right: 1px solid rgb(165 177 195 / .07); }
.hero__grid span:nth-child(n+5) { display: none; }
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: repeat(8, 1fr); }
  .hero__grid span:nth-child(n+5) { display: block; }
}

/* imagens */
.hero__media {
  position: absolute; z-index: 0;
  left: 0; right: 0; top: 0; height: 64%;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
          mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
/* Escurece as fotografias do hero para a barra inferior e a navegação se lerem sempre.
   Mais forte em baixo e um pouco no topo, mantendo o centro da imagem visível. */
.hero__media::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    linear-gradient(to top, rgb(17 19 23 / .82) 0%, rgb(17 19 23 / .55) 22%, rgb(17 19 23 / .12) 50%, rgb(17 19 23 / 0) 68%),
    linear-gradient(to bottom, rgb(17 19 23 / .55) 0%, rgb(17 19 23 / 0) 18%),
    rgb(17 19 23 / .18);
}
.hero__img {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 0 0, -60% 100%, 0 100%);
  transition: clip-path 1.2s var(--ease);
}
.hero__img img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 2.4s var(--ease-out);
}
.hero__img.is-active { clip-path: polygon(0 0, 160% 0, 100% 100%, 0 100%); z-index: 2; }
.hero__img.is-active img { transform: scale(1); }
.hero__img.is-leaving { clip-path: polygon(0 0, 160% 0, 100% 100%, 0 100%); z-index: 1; }

/* texto */
.hero__copy {
  position: relative; z-index: 3;
  padding-top: calc(var(--header-h) + 34vh);
}
.hero__texts { position: relative; display: grid; }
.hero__text {
  grid-area: 1 / 1;
  display: grid; gap: 18px; align-content: start;
  opacity: 0; transform: translateY(14px); visibility: hidden;
  transition: opacity .6s var(--ease), transform .8s var(--ease-out), visibility 0s linear .6s;
}
.hero__text.is-active {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity .8s var(--ease) .35s, transform 1s var(--ease-out) .35s, visibility 0s;
}
.hero__kicker { font-size: var(--fs-label); letter-spacing: -.005em; color: var(--c-mid); }
.hero__title { font-size: var(--fs-display); font-weight: var(--fw-title); max-width: 13ch; }
.hero__text .link-plus { justify-self: start; }

/* barra inferior: miniatura + painel com contador */
.hero__bar {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: 44% 1fr;
  margin-top: 28px;
  min-height: 176px;
  margin-inline: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px))) calc(-1 * max(var(--gutter), env(safe-area-inset-right, 0px)));
}
.hero__thumb {
  position: relative; display: block; padding: 0; border: 0; cursor: pointer;
  background: var(--c-slate); overflow: hidden;
}
.hero__thumb img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.05);
  transition: opacity .9s var(--ease), transform 1.6s var(--ease-out);
}
.hero__thumb img.is-active { opacity: 1; transform: scale(1); }
.hero__thumb-label {
  position: absolute; left: 14px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--fs-label); letter-spacing: -.005em;
  color: var(--c-light);
}
.hero__thumb-label .arrow { width: 22px; height: 1px; background: currentColor; position: relative; transition: width .5s var(--ease); }
.hero__thumb-label .arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  border-left: 6px solid currentColor; border-top: 3.5px solid transparent; border-bottom: 3.5px solid transparent;
}
.hero__thumb:hover .arrow, .hero__thumb:focus-visible .arrow { width: 34px; }
.hero__thumb::after { /* sombra para garantir leitura da etiqueta */
  content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(to top, rgb(17 19 23 / .75), rgb(17 19 23 / 0));
}

.hero__panel {
  position: relative;
  /* O ciano nasce junto à miniatura e dissolve-se até deixar ver a imagem por trás */
  background: linear-gradient(90deg,
    rgb(63 196 238 / 1) 0%,
    rgb(63 196 238 / .82) 8%,
    rgb(63 196 238 / .58) 18%,
    rgb(63 196 238 / .36) 30%,
    rgb(63 196 238 / .18) 44%,
    rgb(63 196 238 / .07) 58%,
    rgb(63 196 238 / .02) 70%,
    rgb(63 196 238 / 0) 80%);
  padding: 18px 16px 16px 22%;
  display: grid; grid-template-rows: auto 1fr auto; gap: 10px;
}
.counter { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.counter__current { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem); font-weight: var(--fw-light); line-height: 1; }
.counter__sep, .counter__total { font-size: var(--fs-small); color: var(--c-light); opacity: .8; }
.hero__note { font-size: var(--fs-small); color: var(--c-light); line-height: 1.45; max-width: 30ch; }
.hero__controls { display: flex; align-items: center; gap: 4px; justify-content: space-between; }
.hero__progress { flex: 1; height: 1px; background: rgb(165 177 195 / .25); position: relative; margin-right: 8px; }
.hero__progress i { position: absolute; inset: 0; background: var(--c-cyan); transform-origin: left; transform: scaleX(0); }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border: 0; background: none; color: var(--c-light); cursor: pointer; padding: 0;
  transition: color .3s;
}
.icon-btn:hover { color: var(--c-cyan); }
.icon-btn svg { width: 16px; height: 16px; }

.hero__scroll { display: none; }

@media (min-width: 640px) {
  .hero__bar { grid-template-columns: 40% 1fr; min-height: 200px; }
  .hero__panel { padding: 22px 24px 18px 20%; }
}

@media (min-width: 1024px) {
  .hero { display: block; }
  .hero__media {
    left: 36%; height: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 22%), linear-gradient(to top, transparent 0, #000 18%);
            mask-image: linear-gradient(to right, transparent 0, #000 22%), linear-gradient(to top, transparent 0, #000 18%);
    -webkit-mask-composite: source-in; mask-composite: intersect;
  }
  .hero__copy {
    position: absolute; inset: 0; padding-top: 0;
    display: grid; grid-template-rows: 1fr auto;
  }
  .hero__texts { align-self: start; margin-top: calc(var(--header-h) + 15vh); }
  .hero__title { max-width: 14ch; }
  .hero__bar {
    width: 62%; margin-top: 0; min-height: 0; height: 30vh; max-height: 280px;
    grid-template-columns: 1.15fr 1fr;
    margin-left: calc(-1 * max(var(--gutter), env(safe-area-inset-left, 0px)));
    margin-right: 0;
  }
  .hero__copy.wrap { max-width: none; }
  .hero__panel { padding: 28px 32px 24px 16%; }
  .hero__note { font-size: var(--fs-small); }
  .hero__scroll {
    position: absolute; z-index: 3; right: max(var(--gutter), env(safe-area-inset-right, 0px)); bottom: 32px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    font-size: var(--fs-label); letter-spacing: -.005em; color: var(--c-mid);
  }
  .hero__scroll span { writing-mode: vertical-rl; }
  .hero__scroll i { width: 1px; height: 48px; background: rgb(165 177 195 / .3); position: relative; overflow: hidden; }
  .hero__scroll i::after {
    content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--c-cyan);
    animation: scrollcue 2.4s var(--ease) infinite;
  }
}
@keyframes scrollcue { to { top: 100%; } }

/* ---------- 6. Serviços ---------- */
.services-grid { display: grid; gap: 56px 24px; }
@media (min-width: 640px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); gap: 72px 32px; } }

.service { display: grid; grid-template-rows: auto auto 1fr auto; gap: 20px; align-content: start; scroll-margin-top: calc(var(--header-h) + 24px); }
/* "Pedir orçamento" alinhado na mesma linha em todos os cartões */
.service > p:not(.service__num) { align-self: start; }
.service__media {
  position: relative; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden;
  background: var(--c-slate);
}
.service__media img {
  width: 100%; height: 100%; object-fit: cover;
  filter: none;
  transition: transform 1.2s var(--ease-out), filter .7s var(--ease);
}
.service:hover .service__media img,
.service:focus-within .service__media img { transform: scale(1.04); filter: saturate(1) contrast(1.06); }
/* sombra suave para o número se ler sobre qualquer fotografia */
.service__media::after {
  content: ""; position: absolute; inset: 60% 0 0; pointer-events: none;
  background: linear-gradient(to top, rgb(17 19 23 / .45), rgb(17 19 23 / 0));
}

/* Hover. O ciano cobre a fotografia, entrando na diagonal do símbolo a partir do canto do número */
.service__media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: var(--c-cyan);
  clip-path: polygon(0 100%, 0 100%, 0 100%);
  transition: clip-path .65s var(--ease);
}
.service:hover .service__media::before,
.service:focus-within .service__media::before { clip-path: polygon(0 -80%, 230% 100%, 0 100%); }
.service__media::after { transition: opacity .4s var(--ease); }
.service:hover .service__media::after,
.service:focus-within .service__media::after { opacity: 0; }

/* Número no canto inferior esquerdo, em grande escala */
.service__num {
  position: absolute; left: clamp(18px, 1.8vw, 28px); bottom: clamp(20px, 2.2vw, 32px);
  font-size: clamp(3.5rem, 1.75rem + 4.5vw, 5.75rem); font-weight: var(--fw-light);
  line-height: .72; letter-spacing: -.06em; font-variant-numeric: tabular-nums;
  color: var(--c-light);
  z-index: 2; transition: color .45s var(--ease);
}
.service:hover .service__num, .service:focus-within .service__num { color: var(--c-slate); }

/* Sinal + no canto superior direito. O quadrado corta-se na diagonal do símbolo
   e passa a ciano no hover. */
.service__plus {
  position: absolute; top: 0; right: 0; z-index: 2;
  width: 56px; height: 56px; display: grid; place-items: center;
  background: rgb(17 19 23 / .55); color: var(--c-light);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 22px 100%, 0 calc(100% - 15px));
  transition: background-color .4s var(--ease), color .4s var(--ease);
}
.service__plus .plus { position: relative; width: 16px; height: 16px; transition: transform .5s var(--ease); }
.service__plus .plus::before, .service__plus .plus::after { content: ""; position: absolute; background: currentColor; }
.service__plus .plus::before { left: 0; right: 0; top: 7.25px; height: 1.5px; }
.service__plus .plus::after { top: 0; bottom: 0; left: 7.25px; width: 1.5px; }
.service:hover .service__plus, .service:focus-within .service__plus {
  background: transparent; color: var(--c-slate);
  -webkit-backdrop-filter: none; backdrop-filter: none;
}
.service:hover .service__plus .plus, .service__plus:focus-visible .plus { transform: rotate(90deg); }
.service__plus:focus-visible { outline-offset: -4px; outline-color: var(--c-slate); }

.service h3 { font-size: var(--fs-h3); font-weight: var(--fw-title); letter-spacing: -.025em; }
.service p { color: var(--fg-on-light-2); max-width: 38ch; }
.service .link-plus { justify-self: start; align-self: end; margin-top: -6px; }

/* ---------- 7. Sobre nós ---------- */
/* Sobre nós em secção fixa ao scroll.
   Desktop. A secção tem a altura de quatro ecrãs e o conteúdo fica preso no ecrã
   enquanto se faz scroll. O passo ativo vem em data-step (0 a 3).
   Mobile. O painel fica preso no topo e os quatro textos passam por baixo. */
.about-flow { position: relative; padding-top: var(--section); overflow-x: clip; }
.about-flow__head { margin-bottom: 0; }
.about-flow__head > * { will-change: opacity, transform; }

.flow { position: relative; }
.flow__sticky { position: relative; }
.flow__grid { display: grid; gap: 32px; }

/* Navegação de passos */
.flow-nav { display: none; position: relative; }
.flow-nav ol { display: grid; gap: 36px; position: relative; z-index: 1; }
.flow-nav button {
  display: grid; grid-template-columns: 12px 1fr; gap: 16px; align-items: start;
  padding: 0; border: 0; background: none; cursor: pointer; text-align: left;
  color: var(--c-mid); font-size: var(--fs-small); line-height: 1.25;
  transition: color .4s var(--ease);
}
.flow-nav button:hover { color: var(--c-light); }
.flow-nav button[aria-current="step"] { color: var(--c-light); }
.flow-nav__dot {
  width: 9px; height: 9px; margin: 3px 0 0 1.5px;
  border: 1px solid var(--c-mid); background: var(--c-deep);
  transform: rotate(45deg) scale(.85);
  transition: background-color .4s var(--ease), border-color .4s var(--ease), transform .4s var(--ease);
}
.flow-nav button[aria-current="step"] .flow-nav__dot { background: var(--c-cyan); border-color: var(--c-cyan); transform: rotate(45deg) scale(1); }
.flow-nav__track { position: absolute; left: 5.5px; top: 6px; bottom: 6px; width: 1px; background: rgb(165 177 195 / .2); }
.flow-nav__track i { position: absolute; inset: 0; background: var(--c-cyan); transform-origin: top; transform: scaleY(var(--flow-p, 0)); }

/* Textos */
.flow-texts { display: grid; }
.flow-text { display: grid; gap: 20px; align-content: center; min-height: 52vh; padding-block: 24px; }
.flow-text__num { font-size: var(--fs-label); letter-spacing: .14em; color: var(--c-cyan); font-variant-numeric: tabular-nums; }
.flow-text h3 { font-size: clamp(2.25rem, 1.4rem + 3.2vw, 4.5rem); max-width: 11ch; }
.flow-text > p:last-child { max-width: 30ch; color: var(--fg-on-dark-2); font-size: var(--fs-lead); line-height: 1.55; }

/* Desenhos técnicos em linha ciano, diretamente sobre o fundo escuro.
   Cada traço desenha-se pela ordem em que foi escrito (--d dá o atraso). */
.flow-visual { position: relative; display: grid; aspect-ratio: 320 / 244; max-width: 100%; }
.flow-icon { grid-area: 1 / 1; width: 100%; height: 100%; overflow: hidden; position: relative; z-index: 1; }
.flow-icon path {
  fill: none; stroke: var(--c-cyan); stroke-width: .7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1 1; stroke-dashoffset: 1;
  opacity: 0;
  transition: stroke-dashoffset .3s var(--ease), opacity .25s var(--ease);
}
.flow-icon.is-active path {
  stroke-dashoffset: 0; opacity: 1;
  transition: stroke-dashoffset 1s var(--ease) var(--d), opacity .15s linear var(--d);
}

/* Mobile e tablet. Desenho preso no topo, textos por baixo */
@media (max-width: 1023px) {
  .about-flow__head { margin-bottom: 40px; }
  .flow__grid { grid-template-columns: 1fr; }
  .flow-visual {
    order: -1; position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 8px); z-index: 2;
    padding-block: 12px 20px;
  }
  /* faixa de fundo para os textos passarem por baixo do desenho sem se verem */
  .flow-visual::before {
    content: ""; position: absolute; z-index: 0; inset: -10px -24px -24px;
    background: linear-gradient(to bottom, var(--c-deep) 86%, rgb(17 19 23 / 0));
  }
  .flow-text { min-height: 56vh; opacity: .35; transition: opacity .5s var(--ease); }
  .flow-text.is-active { opacity: 1; }
  .flow-text h3 { font-size: clamp(2rem, 1.4rem + 3vw, 3rem); }
}

/* Desktop. Secção presa ao ecrã durante quatro ecrãs de scroll */
@media (min-width: 1024px) {
  .flow { height: 420vh; margin-top: -24vh; }
  .flow__sticky {
    position: sticky; top: 0; height: 100vh; height: 100svh;
    display: flex; align-items: center;
    padding-top: var(--header-h);
  }
  .flow__grid {
    width: 100%;
    grid-template-columns: 150px minmax(0, .9fr) minmax(0, 1.1fr);
    gap: clamp(32px, 4vw, 72px); align-items: center;
  }
  .flow-nav { display: block; }
  .flow-texts { position: relative; }
  .flow-text {
    grid-area: 1 / 1; min-height: 0;
    opacity: 0; transform: translateY(32px); visibility: hidden;
    transition: opacity .45s var(--ease), transform .7s var(--ease-out), visibility 0s linear .45s;
  }
  .flow-text.is-active {
    opacity: 1; transform: none; visibility: visible;
    transition: opacity .6s var(--ease) .2s, transform .9s var(--ease-out) .2s, visibility 0s;
  }
  .flow-text.is-past { transform: translateY(-32px); }
  .flow-visual { justify-self: start; width: min(100%, 620px, calc((100vh - var(--header-h) - 120px) * 320 / 244)); }
}

@media (prefers-reduced-motion: reduce) {
  .flow-text, .flow-icon path { transition: none !important; }
}

/* ---------- 8. Certificações ---------- */
.certs { padding-block: clamp(56px, 7vw, 96px); }
.certs__inner { display: grid; gap: 32px; }
.certs__intro h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); margin-top: 14px; }
.certs__intro p { margin-top: 12px; color: var(--fg-on-light-2); max-width: 40ch; }
.certs__list { display: grid; grid-template-columns: 1fr; gap: 1px; background: rgb(52 56 63 / .22); border: 1px solid rgb(52 56 63 / .22); }
.cert {
  background: var(--c-line); color: var(--c-slate);
  display: grid; grid-template-rows: 64px auto auto auto; gap: 4px; align-content: start;
  padding: 24px 20px;
}
/* Logótipos oficiais, sempre em ardósia, numa faixa de altura fixa para alinharem entre si */
.cert-logo { display: flex; align-items: center; margin-bottom: 14px; color: var(--c-slate); }
.cert-logo svg { display: block; height: 48px; width: auto; max-width: 100%; }
.cert-logo--anacom svg { height: 30px; }
.cert-logo--qnq svg { height: 54px; }
.cert strong { font-weight: var(--fw-medium); font-size: var(--fs-small); letter-spacing: -.005em; }
.cert > span:not(.cert-logo) { font-size: var(--fs-small); line-height: 1.45; }
.cert small { font-size: var(--fs-label); color: var(--fg-on-light-2); font-variant-numeric: tabular-nums; }
@media (min-width: 640px) { .certs__list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .certs__list { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1200px) { .certs__inner { grid-template-columns: 1fr 2.6fr; align-items: center; gap: 56px; } }

/* ---------- 9. Projetos ---------- */
.projects {
  display: grid; gap: 8px;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(140px, 42vw);
  grid-template-areas:
    "a a"
    "b c"
    "d e"
    "g g"
    "f h";
}
.projects > :nth-child(1) { grid-area: a; }
.projects > :nth-child(2) { grid-area: b; }
.projects > :nth-child(3) { grid-area: c; }
.projects > :nth-child(4) { grid-area: d; }
.projects > :nth-child(5) { grid-area: e; }
.projects > :nth-child(6) { grid-area: f; }
.projects > :nth-child(7) { grid-area: g; }
.projects > :nth-child(8) { grid-area: h; }
@media (min-width: 900px) {
  .projects {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(180px, 19vw, 300px);
    grid-template-areas:
      "a a b c"
      "a a d e"
      "f g g h";
  }
}
.tile { position: relative; overflow: hidden; margin: 0; min-width: 0; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.tile:hover img { transform: scale(1.04); }
.tile figcaption {
  position: absolute; left: 0; bottom: 0; z-index: 1;
  max-width: calc(100% - 24px);
  background: var(--c-deep); color: var(--c-light);
  padding: 10px 26px 10px 14px; display: grid; gap: 2px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 100%, 0 100%);
}
.tile figcaption strong { font-weight: var(--fw-regular); font-size: var(--fs-small); }
.tile figcaption span { font-size: var(--fs-label); color: var(--c-mid); letter-spacing: .06em; }
/* Triângulo ciano que entra no canto no hover */
.tile--photo::after {
  content: ""; position: absolute; right: 0; top: 0; width: 72px; height: 50px;
  background: var(--c-cyan);
  clip-path: polygon(100% 0, 100% 0, 100% 0);
  transition: clip-path .6s var(--ease);
}
.tile--photo:hover::after { clip-path: polygon(0 0, 100% 0, 100% 100%); }

.tile--block { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(16px, 2vw, 28px); }
.tile--cyan { background: var(--c-cyan); color: var(--c-deep); }
.tile--slate { background: var(--c-slate); color: var(--c-light); }
.tile--block p { font-size: clamp(1.0625rem, .9rem + .9vw, 1.75rem); font-weight: var(--fw-light); line-height: 1.15; letter-spacing: -.01em; }
.tile--block small { font-size: var(--fs-label); letter-spacing: -.005em; }
.tile--slate .tile__symbol { color: var(--c-light); width: 46px; }
.tile--slate .tile__symbol svg { width: 100%; height: auto; display: block; }

/* ---------- 10. Contactos ---------- */
.contact { display: grid; gap: 56px; }
.contact__intro h2 { font-size: var(--fs-h2); margin-top: 20px; }
.contact__intro > p { margin-top: 20px; color: var(--fg-on-dark-2); max-width: 38ch; font-size: var(--fs-lead); font-weight: var(--fw-light); }
.contact__details { margin-top: 44px; display: grid; gap: 0; border-top: 1px solid rgb(165 177 195 / .22); }
.contact__details div { display: grid; grid-template-columns: 6.5rem 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgb(165 177 195 / .22); }
.contact__details dt { font-size: var(--fs-label); letter-spacing: -.005em; color: var(--c-mid); padding-top: 3px; }
.contact__details dd { font-size: var(--fs-body); user-select: all; -webkit-user-select: all; }

.form { display: grid; gap: 22px; }
.form__row { display: grid; gap: 22px; }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; min-width: 0; }
.field label, .field legend { font-size: var(--fs-label); letter-spacing: -.005em; color: var(--c-mid); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px;
  background: rgb(17 19 23 / .35); color: var(--c-light);
  border: 0; border-bottom: 1px solid var(--c-mid);
  padding: 12px 14px; border-radius: 0;
  transition: border-color .3s, background-color .3s;
  -webkit-appearance: none; appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--c-mid) 50%), linear-gradient(-45deg, transparent 50%, var(--c-mid) 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px;
}
.field select option { background: var(--c-slate); color: var(--c-light); }
.field input::placeholder, .field textarea::placeholder { color: rgb(165 177 195 / .7); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-bottom-color: var(--c-cyan); background-color: rgb(17 19 23 / .55); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { box-shadow: 0 1px 0 0 var(--c-cyan); }
.field[data-invalid] input, .field[data-invalid] select, .field[data-invalid] textarea { border-bottom-color: var(--c-light); border-bottom-width: 2px; }
.field__error { font-size: var(--fs-small); color: var(--c-light); display: flex; gap: 8px; align-items: center; }
.field__error::before { content: ""; width: 8px; height: 8px; background: var(--c-cyan); clip-path: polygon(0 0, 100% 100%, 0 100%); flex: none; }

.check { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; font-size: var(--fs-small); color: var(--c-mid); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--c-cyan); }
.form__foot { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; }
.form__status { font-size: var(--fs-small); color: var(--c-light); min-height: 1.5em; flex-basis: 100%; }
.form__status:empty { display: none; }
.form__status::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px; background: var(--c-cyan); clip-path: polygon(0 0, 100% 0, 0 100%); }

@media (min-width: 1024px) {
  .contact { grid-template-columns: 5fr 6fr; gap: clamp(48px, 7vw, 128px); }
}

/* ---------- 11. Rodapé ---------- */
.site-footer { position: relative; overflow: hidden; background: var(--c-deep); color: var(--c-light); padding-top: clamp(40px, 4.5vw, 64px); padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer-top { position: relative; z-index: 1; display: grid; gap: 48px; }
.footer-logo { color: var(--c-light); display: inline-block; }
.footer-logo svg { height: 30px; width: auto; display: block; }
.footer-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.footer-cols h2 { font-size: var(--fs-label); letter-spacing: -.005em; color: var(--c-mid); font-weight: var(--fw-medium); margin-bottom: 14px; }
.footer-cols li a, .footer-cols li span { display: inline-block; padding: 5px 0; font-size: var(--fs-small); }
.footer-cols li a { transition: color .3s; }
.footer-cols li a:hover { color: var(--c-cyan); }
.footer-bottom {
  position: relative; z-index: 1;
  margin-top: clamp(56px, 7vw, 96px); padding-top: 20px; border-top: 1px solid rgb(165 177 195 / .16);
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  font-size: var(--fs-label); color: var(--c-mid); letter-spacing: .04em;
}
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-bottom a:hover { color: var(--c-light); }
@media (min-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1.4fr; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- 12. Revelação ao scroll ---------- */
/* Só os elementos abaixo da dobra no carregamento ficam escondidos (o JS marca-os). */
.reveal-pending { opacity: 0; transform: translateY(28px); }
.reveal-in {
  opacity: 1; transform: none;
  transition: opacity .9s var(--ease) var(--reveal-delay, 0ms), transform 1.1s var(--ease-out) var(--reveal-delay, 0ms);
}
/* As fotografias entram com um ligeiro zoom dentro da moldura */
.reveal-pending img { transform: scale(1.08); }
.reveal-in img { transition: transform 1.6s var(--ease-out) var(--reveal-delay, 0ms); }

/* ---------- 13. Cursor geométrico ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .has-cursor, .has-cursor a, .has-cursor button, .has-cursor label, .has-cursor select { cursor: none; }
  .has-cursor input, .has-cursor textarea { cursor: text; }
  .has-cursor .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 200; pointer-events: none;
    width: 0; height: 0; mix-blend-mode: difference; color: var(--c-light);
    transition: opacity .3s;
  }
  .cursor i {
    position: absolute; width: 11px; height: 8px; background: currentColor;
    transition: transform .45s var(--ease), background-color .3s;
  }
  /* dois triângulos que se tocam no ponto exato do ponteiro */
  .cursor i:first-child { right: 0; bottom: 0; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
  .cursor i:last-child  { left: 0; top: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }
  .cursor.is-link i:first-child { transform: translate(-4px, -3px) scale(1.4); }
  .cursor.is-link i:last-child  { transform: translate(4px, 3px) scale(1.4); }
  .cursor.is-hidden { opacity: 0; }
}

/* ---------- 14. Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .reveal-pending { opacity: 1; transform: none; }
}

/* Cursor sobre o menu ciano */
.menu-open .cursor { mix-blend-mode: normal; color: var(--c-deep); }
/* Cursor sobre o hover ciano dos serviços */
body:has(.service__media:hover) .cursor { mix-blend-mode: normal; color: var(--c-slate); }


/* ---------- 15. Subtítulos e textos ao estilo da referência ----------
   Título em dois tons. A etiqueta da secção tem o mesmo tamanho e peso do título,
   em cinzento, e o título continua na linha seguinte. Textos em peso regular,
   com entrelinha curta e espaçamento ligeiramente negativo. Ligações em frase
   normal, seguidas de uma seta. */
.eyebrow, .section-head .eyebrow, .contact__intro .eyebrow, .certs__intro .eyebrow, .about__intro .eyebrow {
  display: block; margin: 0;
  font-size: var(--fs-h2); font-weight: var(--fw-title); line-height: 1.04; letter-spacing: -.035em;
  text-transform: none; justify-self: start; text-align: left; max-width: none;
}
.eyebrow::before { content: none; }
.on-light .eyebrow, .on-line .eyebrow { color: rgb(52 56 63 / .55); }
.on-dark .eyebrow { color: rgb(165 177 195 / .7); }
.on-slate .eyebrow { color: rgb(165 177 195 / .62); }
.section-head h2, .about__intro h2, .contact__intro h2 { margin-top: 0; }
.certs__intro p.eyebrow { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.25rem); }
.certs__intro h2 { margin-top: 0; }

/* Textos corridos */
.section-head > p,
.contact__intro > p:not(.eyebrow),
.certs__intro p:not(.eyebrow),
.flow-text > p:last-child,
.service p,
.cert > span:not(.cert-logo) {
  font-weight: var(--fw-regular); line-height: 1.32; letter-spacing: -.012em;
}
.section-head > p, .contact__intro > p:not(.eyebrow), .flow-text > p:last-child { font-size: clamp(1.0625rem, 1rem + .3vw, 1.25rem); }
.on-light .section-head > p, .on-light .service p, .on-line .certs__intro p { color: var(--c-slate); }
.on-dark .section-head > p, .on-dark .flow-text > p:last-child, .on-slate .contact__intro > p { color: rgb(233 236 239 / .86); }
.service p { font-size: var(--fs-body); }

/* Ligações em frase normal com seta */
.link-plus {
  text-transform: none; letter-spacing: -.01em;
  font-size: var(--fs-body); font-weight: var(--fw-regular);
  gap: 10px;
}
.link-plus .arrow { display: inline-flex; width: 16px; height: 16px; transition: transform .45s var(--ease); }
.link-plus .arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.link-plus:hover .arrow, .link-plus:focus-visible .arrow { transform: translateX(4px); }
.hero .link-plus .arrow, .on-dark .link-plus .arrow, .on-slate .link-plus .arrow { color: var(--c-cyan); }
/* Texto da direita alinhado pelo topo do título, como na referência */
@media (min-width: 900px) {
  .section-head { align-items: start; }
  .section-head > p { justify-self: start; padding-top: .35em; }
}

/* ---------- 16. Valores medidos no site da Polestar ----------
   Títulos de secção e de cartão 30px, entrelinha 32px, espaçamento -0,04em, peso regular.
   Linha cinzenta com o mesmo tamanho. Textos 16px, entrelinha 18px, espaçamento -0,3px,
   na cor de texto principal. Ligações 16px seguidas de seta. */
:root { --fs-ps-title: 1.875rem; --lh-ps-title: 1.0667; --ls-ps-title: -.04em; --fs-ps-text: 1rem; --lh-ps-text: 1.125; --ls-ps-text: -.01875em; }

.eyebrow, .section-head .eyebrow, .contact__intro .eyebrow, .certs__intro .eyebrow, .about__intro .eyebrow, .certs__intro p.eyebrow,
.section-head h2, .certs__intro h2, .contact__intro h2, .about__intro h2,
.service h3 {
  font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); font-weight: var(--fw-title);
}
.section-head h2, .contact__intro h2 { max-width: 16ch; }

.section-head > p, .contact__intro > p:not(.eyebrow), .certs__intro p:not(.eyebrow),
.service p, .cert > span:not(.cert-logo), .flow-text > p:last-child {
  font-size: var(--fs-ps-text); line-height: var(--lh-ps-text); letter-spacing: var(--ls-ps-text); font-weight: var(--fw-regular);
}
.section-head > p { max-width: 52ch; padding-top: .3em; }
.on-light .section-head > p, .on-light .service p, .on-line .certs__intro p:not(.eyebrow), .on-line .cert > span:not(.cert-logo) { color: var(--c-slate); }
.on-dark .section-head > p, .on-dark .flow-text > p:last-child, .on-slate .contact__intro > p:not(.eyebrow) { color: var(--c-light); }

.link-plus { font-size: var(--fs-ps-text); letter-spacing: var(--ls-ps-text); line-height: 2; padding-block: 6px; }
.section-head { margin-bottom: clamp(40px, 5vw, 72px); }

/* Textos dos passos (Sobre nós) no mesmo sistema dos outros títulos.
   Linha cinzenta com número e nome do passo, título por baixo, ambos a 30px,
   e texto a 16px. */
.flow-text { gap: 0; }
.flow-text__num, .flow-text h3 {
  font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title);
  font-weight: var(--fw-title); font-variant-numeric: normal;
}
.flow-text__num { color: rgb(165 177 195 / .7); }
.flow-text__num span { color: var(--c-cyan); margin-right: .2em; font-variant-numeric: tabular-nums; }
.flow-text h3 { color: var(--c-light); max-width: 14ch; }
.flow-text > p:last-child { margin-top: 20px; max-width: 34ch; }
@media (max-width: 1023px) { .flow-text h3 { font-size: var(--fs-ps-title); } }

/* Menu. A secção ativa fica a ciano, com o traço por baixo também a ciano */
.nav a[aria-current="true"] { color: var(--c-cyan); }
.nav a[aria-current="true"]::after { background: var(--c-cyan); }


/* ---------- 17. Lista de serviços logo a seguir ao hero ----------
   Linhas grandes com seta à direita, como na referência.
   Cada palavra passa de cinzento muito claro a ardósia com o scroll (--ink de 0 a 1). */
.statement-list { padding-block: 96px; }
.statement-list__items { display: grid; gap: 0; }
.statement-list__items a {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 0; color: var(--c-slate);
}
/* Valores medidos no site da Polestar. 40px no telemóvel, 9,3vw a meio, máximo 110px.
   Entrelinha igual ao tamanho, espaçamento -0,045em, sem espaço entre linhas. */
.statement-list__text {
  font-size: clamp(2rem, 9.3vw, 6.875rem); font-weight: var(--fw-regular);
  line-height: 1; letter-spacing: -.045em; text-wrap: balance;
}
@media (max-width: 640px) { .statement-list__text { line-height: .95; } }
.ink { --ink: 0; color: color-mix(in srgb, var(--c-slate) calc(var(--ink) * 100%), var(--c-line)); }
.statement-list__chev {
  flex: none; width: clamp(16px, 1.7vw, 28px); height: auto; overflow: visible;
  fill: none; stroke: color-mix(in srgb, var(--c-slate) calc(var(--ink, 0) * 100%), var(--c-line)); stroke-width: 1;
  transition: transform .45s var(--ease);
}
.statement-list__items a:hover .statement-list__chev, .statement-list__items a:focus-visible .statement-list__chev { transform: translateX(6px); }
.statement-list__items a:hover .ink { color: var(--c-slate); }
@media (prefers-reduced-motion: reduce) { .ink { --ink: 1; } }
.statement-list__text { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 640px) { .statement-list__items a { gap: 12px; } }

/* ---------- 18. Logótipo em pontos ----------
   Secção alta com o canvas preso ao ecrã. O scroll faz a luz atravessar o logótipo. */
.dotlogo { position: relative; height: 220vh; background: var(--c-light); color: var(--c-slate); }
.dotlogo__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.dotlogo__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dotlogo__caption {
  position: absolute; left: max(var(--gutter), env(safe-area-inset-left, 0px)); bottom: calc(32px + env(safe-area-inset-bottom, 0px));
  font-size: var(--fs-ps-text); line-height: var(--lh-ps-text); letter-spacing: var(--ls-ps-text);
  color: rgb(52 56 63 / .6); max-width: 30ch;
}
@media (max-width: 640px) { .dotlogo { height: 180vh; } }

/* ---------- 19. Certificações, linhas que se desenham ----------
   A grelha deixa de usar o fundo por trás para fazer as linhas. Cada cartão desenha a sua
   linha de cima e da esquerda, e a lista desenha a da direita e a de baixo.
   As linhas crescem quando a faixa entra no ecrã, uma a seguir à outra. */
.certs__list { position: relative; gap: 0; background: none; border: 0; }
.cert { position: relative; background: transparent; }
.cert::before, .cert::after, .certs__list::before, .certs__list::after {
  content: ""; position: absolute; background: rgb(52 56 63 / .3); pointer-events: none;
  transition: transform 1s var(--ease);
}
.cert::before { left: 0; right: 0; top: 0; height: 1px; transform-origin: left; transform: scaleX(0); }
.cert::after { top: 0; bottom: 0; left: 0; width: 1px; transform-origin: top; transform: scaleY(0); }
.certs__list::before { top: 0; bottom: 0; right: 0; width: 1px; transform-origin: top; transform: scaleY(0); }
.certs__list::after { left: 0; right: 0; bottom: 0; height: 1px; transform-origin: left; transform: scaleX(0); }
.certs__list.is-drawn .cert::before, .certs__list.is-drawn::after { transform: scaleX(1); }
.certs__list.is-drawn .cert::after, .certs__list.is-drawn::before { transform: scaleY(1); }
.certs__list.is-drawn .cert:nth-child(1)::before, .certs__list.is-drawn .cert:nth-child(1)::after { transition-delay: 0s; }
.certs__list.is-drawn .cert:nth-child(2)::before, .certs__list.is-drawn .cert:nth-child(2)::after { transition-delay: .15s; }
.certs__list.is-drawn .cert:nth-child(3)::before, .certs__list.is-drawn .cert:nth-child(3)::after { transition-delay: .3s; }
.certs__list.is-drawn .cert:nth-child(4)::before, .certs__list.is-drawn .cert:nth-child(4)::after { transition-delay: .45s; }
.certs__list.is-drawn::before, .certs__list.is-drawn::after { transition-delay: .6s; }
@media (prefers-reduced-motion: reduce) {
  .cert::before, .cert::after, .certs__list::before, .certs__list::after { transform: none !important; }
}

/* ---------- 20. Contactos, versão minimal ----------
   Fundo ardósia. Telefone e email em grande, no mesmo sistema de títulos
   (linha cinzenta por cima, valor por baixo). Formulário só com linhas, sem caixas.
   Envio com o mesmo estilo das ligações do site, texto grande seguido de seta. */
.contact-section { background: var(--c-slate); }
.contact { gap: clamp(56px, 7vw, 120px); }
.contact__intro .eyebrow { color: rgb(165 177 195 / .75); }
.contact__intro > p:not(.eyebrow) { margin-top: 20px; max-width: 34ch; color: rgb(233 236 239 / .86); }

.contact__details {
  margin-top: clamp(48px, 6vw, 88px); border-top: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px 32px;
}
.contact__details div { display: grid; grid-template-columns: 1fr; gap: 4px; padding: 0; border: 0; }
.contact__details dt {
  font-size: var(--fs-ps-text); line-height: var(--lh-ps-text); letter-spacing: var(--ls-ps-text);
  color: rgb(165 177 195 / .7); padding: 0; text-transform: none;
}
.contact__details dd {
  font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: var(--c-light);
}
.contact__details .contact__big { grid-column: 1 / -1; gap: 0; }
.contact__details .contact__big dt, .contact__details .contact__big dd {
  font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); font-weight: var(--fw-title);
}
.contact__details .contact__big dd { overflow-wrap: anywhere; }

/* Formulário só com linhas */
.contact .form { gap: 36px; align-content: start; padding-top: 6px; }
.contact .form__row { gap: 36px; }
.contact .field { gap: 6px; }
.contact .field label {
  font-size: var(--fs-ps-text); line-height: var(--lh-ps-text); letter-spacing: var(--ls-ps-text);
  color: rgb(165 177 195 / .7); text-transform: none;
}
.contact .field input, .contact .field select, .contact .field textarea {
  background-color: transparent; min-height: 44px; padding: 6px 0 10px;
  border: 0; border-bottom: 1px solid rgb(165 177 195 / .3);
  font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); letter-spacing: -.02em; color: var(--c-light);
  transition: border-color .4s var(--ease);
}
.contact .field textarea { min-height: 96px; resize: vertical; }
.contact .field select { padding-right: 32px; background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; }
.contact .field input:hover, .contact .field select:hover, .contact .field textarea:hover { border-bottom-color: rgb(165 177 195 / .6); }
.contact .field input:focus, .contact .field select:focus, .contact .field textarea:focus {
  background-color: transparent; border-bottom-color: var(--c-cyan); box-shadow: 0 1px 0 0 var(--c-cyan);
}
.contact .field input::placeholder, .contact .field textarea::placeholder { color: rgb(165 177 195 / .45); }

/* Caixa de aceitação quadrada e fina */
.contact .check { font-size: var(--fs-ps-text); line-height: var(--lh-ps-text); letter-spacing: var(--ls-ps-text); color: rgb(165 177 195 / .8); grid-template-columns: 18px 1fr; gap: 14px; }
.contact .check input {
  -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin: 0;
  border: 1px solid rgb(165 177 195 / .5); background: transparent; display: grid; place-content: center; cursor: pointer;
}
.contact .check input::before { content: ""; width: 12px; height: 12px; background: var(--c-cyan); transform: scale(0); transition: transform .25s var(--ease); clip-path: polygon(0 0, 100% 0, 100% 100%); }
.contact .check input:checked { border-color: var(--c-cyan); }
.contact .check input { place-content: stretch; padding: 2px; }
.contact .check input::before { width: auto; height: auto; }
.contact .check input:checked::before { transform: scale(1); }

/* Envio em texto grande com seta */
.contact .form__foot { margin-top: 8px; padding-top: 28px; border-top: 1px solid rgb(165 177 195 / .18); }
.send {
  display: inline-flex; align-items: center; gap: 16px; padding: 6px 0; border: 0; background: none; cursor: pointer;
  font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); font-weight: var(--fw-title);
  color: var(--c-light); transition: color .3s var(--ease);
}
.send .arrow { width: 26px; height: 26px; color: var(--c-cyan); transition: transform .45s var(--ease); display: inline-flex; }
.send .arrow svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; }
.send:hover .arrow, .send:focus-visible .arrow { transform: translateX(6px); }
.send:hover { color: #fff; }
.send:disabled { opacity: .5; cursor: progress; }
.contact .field__error { color: var(--c-light); font-size: var(--fs-ps-text); }

@media (max-width: 640px) { .contact__details { grid-template-columns: 1fr; } }
@media (min-width: 1024px) { .contact { grid-template-columns: 5fr 6fr; align-items: start; } }

/* Campos do formulário em tamanho de texto, incluindo a lista de serviços */
.contact .field input, .contact .field select, .contact .field textarea {
  font-size: var(--fs-ps-text); letter-spacing: var(--ls-ps-text); min-height: 40px;
}
.contact .field select option { font-size: var(--fs-ps-text); background: var(--c-slate); color: var(--c-light); }

/* Serviços. O cabeçalho desvanece com o scroll como em Sobre nós */
.services-head > * { will-change: opacity, transform; }

/* ---------- 21. Conteúdo da apresentação PHASE ----------
   Botão de download para parceiros no cabeçalho, secção Sobre nós,
   oito soluções técnicas em quatro colunas e secção Parcerias. */
.dl-icon { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease); }
a:hover > .dl-icon, a:focus-visible > .dl-icon { transform: translateY(2px); }

.btn-dl {
  display: none; align-items: center; gap: 8px;
  min-height: 40px; padding: 8px 16px 8px 14px;
  border: 1px solid rgb(165 177 195 / .35);
  color: var(--c-light); font-size: var(--fs-small); font-weight: var(--fw-medium); letter-spacing: .02em;
  transition: border-color .3s, color .3s;
}
.btn-dl .dl-icon { color: var(--c-cyan); }
.btn-dl:hover, .btn-dl:focus-visible { border-color: var(--c-cyan); }
@media (min-width: 1024px) { .btn-dl { display: inline-flex; } }

.mobile-menu__dl { display: inline-flex; align-items: center; gap: 10px; color: var(--c-deep); font-weight: var(--fw-medium); }

/* Soluções técnicas, oito cartões */
@media (min-width: 1024px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .services-grid { grid-template-columns: repeat(4, 1fr); gap: 72px 24px; } }

/* Sobre nós
   Duas colunas alinhadas com o cabeçalho. A fotografia e o texto começam à mesma altura
   e a ligação fecha a coluna na base da fotografia. Por baixo, quatro números em grelha
   que contam ao entrar no ecrã, com linhas que se desenham. */
.about__body { display: grid; gap: 32px; }
.about__media { position: relative; margin: 0; aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; background: var(--c-line); }
.about__media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; object-position: 50% 38%; will-change: transform; transform: translate3d(0, var(--par, 0px), 0); }
.about__text { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.about__text > p {
  max-width: 46ch; color: var(--c-slate);
  font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text);
}
.about__text > p:first-child { margin-top: -.3em; }
.about__link { margin-top: auto; align-self: flex-start; padding-bottom: 0; }
@media (min-width: 900px) {
  .about__body { grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: stretch; }
  .about__media { aspect-ratio: 5 / 4; }
}

.about__facts {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px;
  margin-top: clamp(64px, 8vw, 120px);
}
.about__facts > div { position: relative; display: grid; grid-template-rows: auto 1fr; gap: 14px; padding: 22px 0 32px; align-content: start; }
.about__facts > div::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgb(52 56 63 / .25);
  transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease-out);
}
.about__facts.is-in > div::before { transform: scaleX(1); }
.about__facts.is-in > div:nth-child(2)::before { transition-delay: .12s; }
.about__facts.is-in > div:nth-child(3)::before { transition-delay: .24s; }
.about__facts.is-in > div:nth-child(4)::before { transition-delay: .36s; }
.about__facts dd {
  display: flex; align-items: baseline; gap: .12em;
  font-size: clamp(3rem, 2rem + 4.2vw, 6.5rem); line-height: .9; letter-spacing: -.055em; font-weight: var(--fw-title);
  color: var(--c-slate); font-variant-numeric: tabular-nums;
}
.about__facts dd small { font-size: .32em; letter-spacing: -.02em; color: rgb(52 56 63 / .6); }
.about__facts dd { order: -1; }
.about__facts dt { max-width: 22ch; font-size: var(--fs-small); line-height: 1.3; color: rgb(52 56 63 / .65); }
@media (min-width: 900px) { .about__facts { grid-template-columns: repeat(4, 1fr); gap: 0 24px; } }
@media (prefers-reduced-motion: reduce) { .about__facts > div::before { transform: none; transition: none; } }

/* Parcerias
   Cabeçalho em duas colunas, fotografia larga com a frase por cima e cinco compromissos
   em colunas. Números, títulos e textos alinham entre colunas (subgrid) e as linhas
   de cima desenham-se em sequência quando a lista entra no ecrã. */
.partners__lead { display: grid; gap: 16px; max-width: 46ch; }
.partners__lead p {
  color: rgb(233 236 239 / .86);
  font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text);
}
@media (min-width: 900px) { .partners__lead { padding-top: .35em; } }
.partners .section-head h2 { max-width: 20ch; }

.partners__media { position: relative; margin: 0 0 clamp(56px, 7vw, 96px); aspect-ratio: 4 / 3; max-width: 100%; overflow: hidden; background: var(--c-deep); }
.partners__media img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; object-position: 70% 55%; will-change: transform; transform: translate3d(0, var(--par, 0px), 0); }
.partners__media::after { content: ""; position: absolute; inset: 50% 0 0; background: linear-gradient(to top, rgb(17 19 23 / .55), rgb(17 19 23 / 0)); pointer-events: none; }
.partners__media figcaption {
  position: absolute; z-index: 1; left: clamp(20px, 3vw, 40px); bottom: clamp(20px, 3vw, 40px);
  color: var(--c-light); font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); max-width: 14ch;
}
.partners__media figcaption .nowrap { white-space: nowrap; }
/* A fotografia abre da esquerda para a direita quando chega ao ecrã. A frase entra depois. */
[data-wipe].is-pending { clip-path: inset(0 100% 0 0); }
[data-wipe].is-pending img { scale: 1.12; }
.partners__media.is-pending figcaption { opacity: 0; transform: translate3d(0, 16px, 0); }
[data-wipe].is-open { clip-path: inset(0 0 0 0); transition: clip-path 1.4s cubic-bezier(.77, 0, .18, 1); }
[data-wipe].is-open img { scale: 1; transition: scale 1.8s cubic-bezier(.22, 1, .36, 1); }
.partners__media.is-open figcaption { opacity: 1; transform: none; transition: opacity .8s var(--ease) .9s, transform 1s var(--ease-out) .9s; }
@media (min-width: 900px) { .partners__media { aspect-ratio: 21 / 9; } }

.partners__list { display: grid; gap: 0 24px; }
.partner-item { position: relative; display: grid; gap: 12px; align-content: start; padding: 22px 0 36px; min-width: 0; }
.partner-item::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgb(165 177 195 / .35);
  transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease-out);
}
.partners__list.is-in .partner-item::before { transform: scaleX(1); }
.partners__list.is-in .partner-item:nth-child(2)::before { transition-delay: .1s; }
.partners__list.is-in .partner-item:nth-child(3)::before { transition-delay: .2s; }
.partners__list.is-in .partner-item:nth-child(4)::before { transition-delay: .3s; }
.partners__list.is-in .partner-item:nth-child(5)::before { transition-delay: .4s; }
.partner-item__num { color: var(--c-cyan); font-size: var(--fs-small); letter-spacing: .02em; }
.partner-item h3 { font-size: 1.25rem; line-height: 1.1; letter-spacing: -.03em; font-weight: var(--fw-title); color: var(--c-light); }
.partner-item p { font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: rgb(233 236 239 / .72); }
@media (min-width: 640px) { .partners__list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) {
  .partners__list { grid-template-columns: repeat(5, 1fr); grid-template-rows: auto 1fr; }
  .partner-item { grid-row: span 2; grid-template-rows: subgrid; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { .partner-item::before { transform: none; transition: none; } }

.partners__cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  margin-top: clamp(40px, 5vw, 72px); padding-top: 32px; border-top: 1px solid rgb(165 177 195 / .35);
}
.partners__for { font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); color: var(--c-light); max-width: 22ch; }
.partners__file { margin-top: 10px; font-size: var(--fs-small); color: var(--c-mid); }

/* Ligações nos contactos */
.contact__details a, .footer-cols li a[href^="tel"], .footer-cols li a[href^="mailto"] { color: inherit; }
.contact__details a:hover { color: var(--c-cyan); }

/* ---------- 22. Fluidez ----------
   Menos pintura durante o scroll. O cabeçalho e o sinal + dos cartões deixam de usar
   desfoque por trás (fundo sólido translúcido), os elementos animados ganham camada
   própria e as transições usam só transform e opacity. */
.site-header { will-change: transform; }
.site-header.is-scrolled { background: rgb(17 19 23 / .94); -webkit-backdrop-filter: none; backdrop-filter: none; }
.service__plus { background: rgb(17 19 23 / .62); -webkit-backdrop-filter: none; backdrop-filter: none; }
.reveal-pending, .reveal-in { will-change: opacity, transform; backface-visibility: hidden; }
.reveal-in { transition-timing-function: cubic-bezier(.22, 1, .36, 1), cubic-bezier(.22, 1, .36, 1); }
.hero__img { will-change: clip-path; }
.hero__img img { backface-visibility: hidden; transform: translateZ(0); }
.service__media img { will-change: transform; backface-visibility: hidden; }
.dotlogo__canvas { will-change: contents; }
.cursor { will-change: transform; }
.about-flow__head > *, .services-head > * { transition: none; }
.reveal-done { will-change: auto; }

/* ---------- 23. Fotografias dos serviços abrem de baixo para cima ---------- */
.service.reveal-pending { transform: none; opacity: 1; }
.service.reveal-pending .service__media { clip-path: inset(100% 0 0 0); }
.service.reveal-pending .service__num, .service.reveal-pending .service__plus { opacity: 0; }
.service.reveal-pending > :not(.service__media) { opacity: 0; transform: translate3d(0, 16px, 0); }
.service.reveal-in .service__media { clip-path: inset(0 0 0 0); transition: clip-path 1.3s cubic-bezier(.77, 0, .18, 1) var(--reveal-delay, 0ms); }
.service.reveal-in .service__num { transition: opacity .6s var(--ease) calc(var(--reveal-delay, 0ms) + .8s); }
.service.reveal-in > :not(.service__media) { transition: opacity .7s var(--ease) calc(var(--reveal-delay, 0ms) + .5s), transform .9s var(--ease-out) calc(var(--reveal-delay, 0ms) + .5s); }
.service.reveal-done .service__media { transition: none; }

/* ---------- 24. Contactos no mesmo sistema tipográfico ----------
   Só três níveis, como no resto do site. Etiquetas pequenas em cinzento,
   texto corrido a 16px e destaque (telefone e email) ao tamanho dos títulos.
   O envio usa o botão ciano do site. */
.contact__details { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; border: 0; padding: 0; }
.contact__details div { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto; gap: 8px; padding: 0; border: 0; align-content: start; }
.contact__details dt, .contact__details .contact__big dt {
  font-size: var(--fs-small); line-height: 1.3; letter-spacing: 0; font-weight: var(--fw-regular);
  color: rgb(165 177 195 / .8); padding: 0;
}
.contact__details dd {
  font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); font-weight: var(--fw-regular);
  color: var(--c-light); padding: 0;
}
.contact__details .contact__big { grid-column: 1 / -1; padding-bottom: 20px; border-bottom: 1px solid rgb(165 177 195 / .22); }
.contact__details .contact__big dd {
  font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); font-weight: var(--fw-title);
}
.contact .field label { font-size: var(--fs-small); line-height: 1.3; letter-spacing: 0; color: rgb(165 177 195 / .8); }
.contact .field input, .contact .field select, .contact .field textarea { font-size: var(--fs-ps-text); letter-spacing: var(--ls-ps-text); }
.contact .check { font-size: var(--fs-small); line-height: 1.3; letter-spacing: 0; color: rgb(165 177 195 / .8); }
.contact .form__foot { border-top: 0; padding-top: 0; margin-top: 4px; }
.btn.send { font-size: var(--fs-small); font-weight: var(--fw-medium); letter-spacing: .02em; color: var(--c-deep); gap: 12px; }
.btn.send .arrow { width: 16px; height: 16px; color: currentColor; }
.btn.send .arrow svg { stroke-width: 1.4; }
.btn.send:hover { color: var(--c-deep); }
@media (max-width: 640px) { .contact__details { grid-template-columns: 1fr; } }
.btn.send { background: var(--btn-bg); padding: 12px 28px 12px 20px; min-height: 48px; line-height: 1; border: 0; }
/* Contactos, todos os dados com o mesmo tamanho, em grelha de duas colunas */
.contact__details { margin-top: 40px; grid-template-columns: 1fr 1fr; gap: 24px; padding-top: 24px; border-top: 1px solid rgb(165 177 195 / .22); }
.contact__details .contact__big { grid-column: auto; padding-bottom: 0; border-bottom: 0; }
.contact__details .contact__big dd {
  font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); font-weight: var(--fw-regular);
}
@media (max-width: 640px) { .contact__details { grid-template-columns: 1fr; } }
.contact__details div, .contact__details .contact__big { gap: 8px; }

/* ---------- 25. Contactos, layout ----------
   As mesmas duas colunas das outras secções (1fr 1fr, 48px). À esquerda o título e o texto
   em cima e os dados de contacto em baixo, alinhados com o botão de envio. À direita o
   formulário começa à altura do título. */
@media (min-width: 1024px) {
  .contact { grid-template-columns: 1fr 1fr; gap: 48px; align-items: stretch; }
  .contact__intro { display: flex; flex-direction: column; }
  .contact__details { margin-top: auto; }
  .contact .form { padding-top: .35em; }
}
.contact__intro > p:not(.eyebrow) { max-width: 40ch; }
.contact .form { gap: 28px; }
.contact .form__row { gap: 28px 24px; }
.contact .field textarea { min-height: 120px; }
.contact__details { width: 100%; }

/* ---------- 26. Contactos, nova estrutura ----------
   1. Cabeçalho igual às outras secções.
   2. Faixa com os quatro contactos em colunas, com linhas que se desenham (como os números do Sobre nós).
   3. Pedido de orçamento em duas colunas, título à esquerda e formulário à direita. */
.contact-head { margin-bottom: clamp(40px, 5vw, 72px); }
.ct-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; margin: 0; }
.ct-strip > div { position: relative; display: grid; gap: 8px; align-content: start; padding: 20px 0 28px; min-width: 0; }
.ct-strip > div::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgb(165 177 195 / .3);
  transform: scaleX(0); transform-origin: left; transition: transform 1.1s var(--ease-out);
}
.ct-strip.is-in > div::before { transform: scaleX(1); }
.ct-strip.is-in > div:nth-child(2)::before { transition-delay: .1s; }
.ct-strip.is-in > div:nth-child(3)::before { transition-delay: .2s; }
.ct-strip.is-in > div:nth-child(4)::before { transition-delay: .3s; }
.ct-strip dt { font-size: var(--fs-small); line-height: 1.3; color: rgb(165 177 195 / .8); }
.ct-strip dd { font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: var(--c-light); overflow-wrap: anywhere; }
.ct-strip a { color: inherit; transition: color .3s; }
.ct-strip a:hover { color: var(--c-cyan); }
@media (min-width: 1024px) { .ct-strip { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 520px) { .ct-strip { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ct-strip > div::before { transform: none; transition: none; } }

.ct-form { margin-top: clamp(64px, 8vw, 112px); display: grid; gap: 32px; }
.ct-form__intro h3 { font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); font-weight: var(--fw-title); color: var(--c-light); }
.ct-form__intro p { margin-top: 12px; max-width: 32ch; font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: rgb(233 236 239 / .72); }
@media (min-width: 1024px) {
  .ct-form { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .ct-form .form { padding-top: 0; }
}
.ct-form { margin-top: 0; padding-top: clamp(32px, 4vw, 56px); border-top: 1px solid rgb(165 177 195 / .22); }

/* ---------- 27. Política de privacidade ---------- */
.legal-hero { padding-block: calc(var(--header-h) + clamp(64px, 9vw, 140px)) clamp(56px, 7vw, 104px); }
.legal-hero .eyebrow { color: rgb(165 177 195 / .7); }
.legal-hero h1 { font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); font-weight: var(--fw-title); color: var(--c-light); max-width: 16ch; }
.legal-hero__lead { margin-top: 24px; max-width: 52ch; font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: rgb(233 236 239 / .86); }
.legal-hero__date { margin-top: 24px; font-size: var(--fs-small); color: var(--c-mid); }
@media (min-width: 900px) {
  .legal-hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; align-items: start; }
  .legal-hero .eyebrow, .legal-hero h1 { grid-column: 1; }
  .legal-hero__lead { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; padding-top: .35em; }
  .legal-hero__date { grid-column: 2; margin-top: 16px; }
}

.legal__grid { display: grid; gap: 48px; }
.legal__toc p { font-size: var(--fs-small); color: rgb(52 56 63 / .6); margin-bottom: 12px; }
.legal__toc ol { display: grid; border-top: 1px solid rgb(52 56 63 / .18); }
.legal__toc a { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgb(52 56 63 / .18); font-size: var(--fs-small); color: var(--c-slate); transition: color .3s; }
.legal__toc a span { color: rgb(52 56 63 / .5); font-variant-numeric: tabular-nums; }
.legal__toc a:hover { color: var(--c-deep); }
.legal__toc a[aria-current="true"] span, .legal__toc a:hover span { color: var(--c-slate); }
.legal__body { display: grid; gap: 56px; min-width: 0; }
.legal__block { scroll-margin-top: calc(var(--header-h) + 24px); display: grid; gap: 16px; max-width: 64ch; }
.legal__block h2 { display: flex; gap: 14px; font-size: 1.375rem; line-height: 1.1; letter-spacing: -.03em; font-weight: var(--fw-title); color: var(--c-slate); }
.legal__block h2 span { font-size: var(--fs-small); letter-spacing: .02em; color: rgb(52 56 63 / .5); padding-top: .45em; flex: none; }
.legal__block p, .legal__block li { font-size: var(--fs-ps-text); line-height: 1.45; letter-spacing: var(--ls-ps-text); color: var(--c-slate); }
.legal__block ul { display: grid; gap: 12px; padding-left: 0; }
.legal__block li { position: relative; padding-left: 22px; }
.legal__block li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; background: var(--c-slate); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.legal__block strong { font-weight: var(--fw-medium); }
.legal__block a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal__block a:hover { color: var(--c-deep); }
@media (min-width: 900px) {
  .legal__grid { grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
  .legal__toc { position: sticky; top: calc(var(--header-h) + 32px); max-width: 360px; }
}
.contact .check a { color: var(--c-light); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 28. Política de privacidade em gavetas ---------- */
.legal__aside { display: grid; gap: 12px; align-content: start; max-width: 36ch; }
.legal__aside-title { font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); color: var(--c-slate); }
.legal__aside p:not(.legal__aside-title) { font-size: var(--fs-ps-text); line-height: 1.35; letter-spacing: var(--ls-ps-text); color: var(--c-slate); }
.legal__aside a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal__toggle {
  justify-self: start; margin-top: 12px; padding: 8px 14px; border: 1px solid rgb(52 56 63 / .3); background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-small); color: var(--c-slate); transition: border-color .3s, background-color .3s;
}
.legal__toggle:hover { border-color: var(--c-slate); }
@media (min-width: 900px) { .legal__aside { position: sticky; top: calc(var(--header-h) + 32px); } }

.legal__acc { border-top: 1px solid rgb(52 56 63 / .2); min-width: 0; }
.acc { border-bottom: 1px solid rgb(52 56 63 / .2); scroll-margin-top: calc(var(--header-h) + 24px); }
.acc summary {
  display: grid; grid-template-columns: 40px 1fr 20px; gap: 12px; align-items: baseline;
  padding: 24px 0; cursor: pointer; list-style: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc__num { font-size: var(--fs-small); color: rgb(52 56 63 / .5); font-variant-numeric: tabular-nums; }
.acc__title { font-size: 1.375rem; line-height: 1.15; letter-spacing: -.03em; color: var(--c-slate); transition: color .3s; }
.acc__icon { position: relative; width: 14px; height: 14px; align-self: center; justify-self: end; transition: transform .5s var(--ease); }
.acc__icon::before, .acc__icon::after { content: ""; position: absolute; background: var(--c-slate); }
.acc__icon::before { left: 0; right: 0; top: 6.5px; height: 1px; }
.acc__icon::after { top: 0; bottom: 0; left: 6.5px; width: 1px; transition: transform .5s var(--ease); }
.acc[open] .acc__icon { transform: rotate(180deg); }
.acc[open] .acc__icon::after { transform: scaleY(0); }
.acc summary:hover .acc__title { color: var(--c-deep); }
.acc summary:focus-visible { outline: 2px solid var(--c-slate); outline-offset: 4px; }
.acc__panel { display: grid; gap: 16px; padding: 0 0 32px 52px; max-width: calc(64ch + 52px); overflow: hidden; }
.acc__panel p, .acc__panel li { font-size: var(--fs-ps-text); line-height: 1.45; letter-spacing: var(--ls-ps-text); color: var(--c-slate); }
.acc__panel ul { display: grid; gap: 12px; }
.acc__panel li { position: relative; padding-left: 22px; }
.acc__panel li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; background: var(--c-slate); clip-path: polygon(0 0, 100% 100%, 0 100%); }
.acc__panel strong { font-weight: var(--fw-medium); }
.acc__panel a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
@media (max-width: 640px) {
  .acc summary { grid-template-columns: 28px 1fr 16px; }
  .acc__title { font-size: 1.125rem; }
  .acc__panel { padding-left: 0; }
}

/* ---------- 29. Gavetas a toda a largura, no sistema do site ----------
   Cada gaveta usa as duas colunas das outras secções. O título fica à esquerda,
   ao tamanho dos títulos de cartão, e o texto abre na coluna da direita. */
.legal { padding-bottom: var(--section); }
.legal__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; }
.legal__bar p { font-size: var(--fs-small); color: rgb(52 56 63 / .6); }
.legal__toggle { margin: 0; border: 0; padding: 6px 0; font-size: var(--fs-small); color: var(--c-slate); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal__toggle:hover { color: var(--c-deep); }
.legal__acc { border-top: 1px solid rgb(52 56 63 / .25); }
.acc { border-bottom: 1px solid rgb(52 56 63 / .25); }
.acc summary { grid-template-columns: 48px 1fr 24px; gap: 0 16px; align-items: start; padding: 28px 0; }
.acc__num { padding-top: .55em; font-size: var(--fs-small); color: rgb(52 56 63 / .5); }
.acc__title { font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); font-weight: var(--fw-title); max-width: 22ch; }
.acc__icon { width: 16px; height: 16px; margin-top: .5em; align-self: start; }
.acc__icon::before { top: 7.5px; height: 1.5px; }
.acc__icon::after { left: 7.5px; width: 1.5px; }
.acc__panel { padding: 0 0 40px; max-width: none; gap: 14px; }
.acc__panel p, .acc__panel li { line-height: 1.35; max-width: 60ch; }
@media (min-width: 900px) {
  .acc summary { grid-template-columns: calc(50% - 24px) 1fr 24px; gap: 0 48px; }
  .acc summary .acc__num { display: none; }
  .acc__title { grid-column: 1; display: flex; gap: 16px; }
  .acc__title::before { content: attr(data-n); font-size: var(--fs-small); letter-spacing: .02em; color: rgb(52 56 63 / .5); padding-top: .55em; min-width: 32px; }
  .acc__panel { padding-left: calc(50% + 24px); margin-top: -.25em; }
}
@media (max-width: 899px) { .acc summary { grid-template-columns: 36px 1fr 20px; } .acc__title { font-size: 1.375rem; } }
.legal-contact .section-head { margin-bottom: 0; }
.legal-contact__text { display: grid; gap: 16px; justify-items: start; max-width: 46ch; }
.legal-contact__text p { font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: rgb(233 236 239 / .86); }
.legal-contact__text p a { color: var(--c-light); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legal-contact .eyebrow { color: rgb(165 177 195 / .62); }
@media (min-width: 900px) { .legal-contact__text { padding-top: .35em; } }
.acc__icon { grid-column: 3; justify-self: end; }
.acc__title { max-width: none; }
@media (max-width: 899px) { .acc__title { grid-column: 2; } }
.legal-contact .section-head .legal-contact__text p { color: var(--c-light); font-size: var(--fs-ps-text); line-height: 1.3; max-width: none; }

/* ---------- 30. Crédito de design no rodapé ---------- */
.footer-bottom { align-items: center; }
.footer-bottom ul { margin-left: auto; }
.credit { display: inline-flex; align-items: center; gap: 8px; color: var(--c-mid); transition: color .3s; }
.credit span { font-size: inherit; }
.credit__logo { height: 11px; width: auto; display: block; transform: translateY(-1px); }
.credit:hover, .credit:focus-visible { color: var(--c-light); }
@media (max-width: 720px) { .footer-bottom ul { margin-left: 0; } .credit { flex-basis: 100%; } }
/* "BY" com a mesma altura das letras do logótipo (cerca de 7,8px com o logótipo a 11px) */
.credit { align-items: baseline; gap: 6px; }
.credit span { font-size: 11px; line-height: 1; font-weight: var(--fw-medium); letter-spacing: .04em; text-transform: uppercase; }
.credit__logo { transform: none; }

/* ---------- 31. Contactos no cabeçalho da secção ---------- */
.contact-head__side { display: grid; gap: 32px; max-width: 46ch; }
@media (min-width: 900px) { .contact-head__side { padding-top: .35em; } }
.contact-head__side > p { font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: rgb(233 236 239 / .86); }
.ct-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 0; padding-top: 24px; border-top: 1px solid rgb(165 177 195 / .22); }
.ct-list div { display: grid; gap: 8px; align-content: start; min-width: 0; }
.ct-list dt { font-size: var(--fs-small); line-height: 1.3; color: rgb(165 177 195 / .8); }
.ct-list dd { font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: var(--c-light); overflow-wrap: anywhere; }
.ct-list a { color: inherit; transition: color .3s; }
.ct-list a:hover { color: var(--c-cyan); }
@media (max-width: 480px) { .ct-list { grid-template-columns: 1fr; } }
.contact-head__side { max-width: none; width: 100%; } .contact-head__side > p { max-width: 46ch; } .section-head .contact-head__side { justify-self: stretch; }
.section-head .contact-head__side > p { justify-self: start; padding-top: 0; }
.service__num { font-size: clamp(2.25rem, 1.4rem + 2.2vw, 3.5rem); }

/* ---------- 32. Desempenho das animações ----------
   Camadas de composição só onde há movimento nesse momento, para não gastar memória
   gráfica com imagens paradas. A secção Como trabalhamos fica presa durante menos scroll. */
.hero__img { will-change: auto; }
.hero__img.is-active, .hero__img.is-leaving { will-change: clip-path; }
.service__media img { will-change: auto; }
.reveal-in { will-change: auto; }
.reveal-pending { will-change: opacity, transform; }
.service.reveal-pending > :not(.service__media) { will-change: opacity, transform; }
.site-header { will-change: auto; }
.site-header.is-hidden, .site-header:not(.is-hidden) { backface-visibility: hidden; }
@media (min-width: 1024px) { .flow { height: 300vh; margin-top: -16vh; } }

/* ---------- 33. Página de erro ----------
   O mesmo sistema das outras secções. Texto à esquerda e, à direita, um desenho técnico
   em linha ciano como os do Como trabalhamos, que se desenha ao abrir a página.
   Uma tomada e uma ficha desligada, com o espaço entre as duas. */
.error-page { min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding-block: calc(var(--header-h) + 48px) 72px; }
.error-page__grid { display: grid; gap: 48px; width: 100%; align-items: center; }
.error-page__text { display: grid; gap: 20px; max-width: 46ch; }
.error-page .eyebrow { color: rgb(165 177 195 / .7); }
.error-page h1 { font-size: var(--fs-ps-title); line-height: var(--lh-ps-title); letter-spacing: var(--ls-ps-title); font-weight: var(--fw-title); color: var(--c-light); margin-top: -20px; max-width: 16ch; }
.error-page__text > p:not(.eyebrow) { font-size: var(--fs-ps-text); line-height: 1.3; letter-spacing: var(--ls-ps-text); color: rgb(233 236 239 / .86); }
.error-page__actions { margin-top: 8px; }
.error-page__visual { width: 100%; max-width: 560px; justify-self: start; }
.error-art { display: block; width: 100%; height: auto; overflow: visible; }
.error-art path {
  fill: none; stroke: var(--c-cyan); stroke-width: .9; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 1 1; stroke-dashoffset: 1;
  animation: errDraw 1.1s cubic-bezier(.65, 0, .35, 1) forwards;
  animation-delay: calc(var(--d) + var(--start, .3s));
}
@keyframes errDraw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .error-art path { animation: none; stroke-dashoffset: 0; } }
@media (min-width: 900px) { .error-page__grid { grid-template-columns: 1fr 1fr; gap: 48px; } }
.error-page__visual { max-width: 640px; justify-self: end; } @media (max-width: 899px) { .error-page__visual { justify-self: start; } }
/* Depois de desenhada, a energia corre pelo cabo até à ficha e as faíscas acendem no espaço vazio */
.error-art .spark {
  animation: errDraw 1.1s cubic-bezier(.65, 0, .35, 1) forwards, errSpark 2.6s ease-in-out infinite;
  animation-delay: calc(var(--d) + var(--start, .3s)), 3.2s;
}
@keyframes errSpark { 0%, 62% { opacity: .15; } 70% { opacity: 1; } 76% { opacity: .3; } 82% { opacity: 1; } 100% { opacity: .15; } }
.error-art .pulse {
  stroke-width: 2.4; stroke-dasharray: .14 1.2; stroke-dashoffset: .14; opacity: 0;
  animation: errPulse 2.6s cubic-bezier(.45, 0, .2, 1) 3.2s infinite;
  filter: drop-shadow(0 0 3px rgb(63 196 238 / .8));
}
@keyframes errPulse { 0% { stroke-dashoffset: .14; opacity: 0; } 8% { opacity: 1; } 62% { stroke-dashoffset: -.86; opacity: 1; } 66%, 100% { stroke-dashoffset: -.86; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .error-art .spark { animation: none; stroke-dashoffset: 0; } .error-art .pulse { display: none; } }

/* ---------- 34. Adaptação a todos os ecrãs ----------
   Boas práticas para telemóvel, tablet e ecrãs grandes. */

/* Base para telemóvel. Sem zoom automático do texto ao rodar o ecrã e sem o realce
   cinzento do toque. A rolagem respeita a altura do cabeçalho fixo. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
a, button, summary, label, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
img { height: auto; }

/* Ecrãs de toque. O hover ciano dos cartões não fica preso depois de um toque,
   e os alvos de toque têm pelo menos 44px de altura. */
@media (hover: none) {
  .service:hover .service__media img { transform: none; filter: none; }
  .service:hover .service__media::before { clip-path: polygon(0 100%, 0 100%, 0 100%); }
  .service:hover .service__media::after { opacity: 1; }
  .service:hover .service__num { color: var(--c-light); }
  .service:hover .service__plus { background: rgb(17 19 23 / .62); color: var(--c-light); }
  .service:hover .service__plus .plus { transform: none; }
  .service:active .service__media img { transform: scale(1.02); transition-duration: .3s; }
}
@media (pointer: coarse) {
  .footer-cols li a, .footer-cols li span { padding-block: 11px; }
  .footer-bottom a, .credit { display: inline-flex; align-items: center; min-height: 44px; }
  .ct-list a, .legal__toggle, .link-plus { display: inline-flex; align-items: center; min-height: 44px; }
  .brand { padding: 10px 10px 10px 0; }
  .contact .check { padding-block: 6px; }
  .contact .check input { width: 22px; height: 22px; }
  .statement-list__items a { min-height: 44px; }
}

/* Telemóvel. Cartões de serviço mais baixos para a lista não ficar interminável
   e passos do Como trabalhamos mais próximos. */
@media (max-width: 639px) {
  .service__media { aspect-ratio: 4 / 3; }
  .services-grid { gap: 44px; }
  .flow-text { min-height: 44vh; }
  .partners__media { aspect-ratio: 4 / 3; }
  .about__facts dd { font-size: clamp(2.5rem, 12vw, 3.5rem); }
}

/* Telemóvel deitado (pouca altura). O título do topo encolhe e o desenho do
   Como trabalhamos deixa de ficar preso, para não ocupar o ecrã inteiro. */
@media (orientation: landscape) and (max-height: 520px) {
  .hero__copy { padding-top: calc(var(--header-h) + 14vh); }
  .hero__title { font-size: clamp(1.75rem, 1rem + 4vh, 2.5rem); }
  .flow-visual { position: relative; top: auto; width: min(100%, 420px); }
  .flow-visual::before { display: none; }
  .flow-text { min-height: 0; padding-block: 32px; opacity: 1; }
  .mobile-menu nav a { font-size: clamp(1.5rem, 7vh, 2.25rem); padding-block: 8px; }
  .error-page { padding-block: calc(var(--header-h) + 24px) 48px; }
}

/* Ecrãs grandes. O conteúdo usa mais largura e o texto cresce um pouco,
   mantendo o alinhamento entre o cabeçalho, o topo e as secções. */
:root { --wrap: 1440px; }
@media (min-width: 1680px) { :root { --wrap: 1600px; } html { font-size: 17px; } }
@media (min-width: 2200px) { :root { --wrap: 1840px; } html { font-size: 18.5px; } }
.wrap { max-width: var(--wrap); }
@media (min-width: 1024px) {
  .hero__texts { margin-left: max(0px, calc((100vw - var(--wrap)) / 2)); }
}

/* ---------- 35. Fluidez da home ----------
   Menos camadas permanentes. Cada camada extra obriga o browser a recompor a página
   a cada frame do scroll. Só ficam promovidos os elementos que estão a animar. */
.reveal-pending, .reveal-in, .service.reveal-pending > :not(.service__media) { will-change: auto; backface-visibility: visible; }
.hero__img img { transform: none; backface-visibility: visible; }
.hero__img:not(.is-active):not(.is-leaving) { visibility: hidden; }
.about-flow__head > *, .services-head > * { will-change: auto; }
.about__media img, .partners__media img { will-change: auto; }
.flow-nav__track i { transform: scaleY(0); }

/* ---------- 36. Aviso de cookies ----------
   Cartão em ardósia no canto inferior esquerdo, que sobe depois do ecrã de entrada. */
.cookie-bar {
  position: fixed; z-index: 80;
  left: max(16px, env(safe-area-inset-left, 0px)); right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  max-width: 440px; padding: 24px;
  display: grid; gap: 12px;
  background: var(--c-slate); color: var(--c-light);
  border: 1px solid rgb(165 177 195 / .18);
  box-shadow: 0 18px 48px rgb(17 19 23 / .35);
  transform: translate3d(0, calc(100% + 40px), 0); opacity: 0;
  transition: transform .8s cubic-bezier(.22, 1, .36, 1), opacity .5s var(--ease);
}
.cookie-bar.is-in { transform: none; opacity: 1; }
.cookie-bar__title { font-size: 1.25rem; line-height: 1.1; letter-spacing: -.03em; }
.cookie-bar__text { font-size: var(--fs-small); line-height: 1.45; color: rgb(233 236 239 / .82); }
.cookie-bar__text a { color: var(--c-light); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.cookie-bar__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 8px; }
.cookie-bar__accept { min-height: 44px; }
.cookie-bar__reject {
  min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: var(--fs-small); font-weight: var(--fw-medium); letter-spacing: .02em;
  color: var(--c-light); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.cookie-bar__reject:hover { color: var(--c-cyan); }
@media (min-width: 640px) { .cookie-bar { left: max(var(--gutter), env(safe-area-inset-left, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); right: auto; } }
@media (prefers-reduced-motion: reduce) { .cookie-bar { transition: none; } }

/* Aviso de cookies em barra fixa no fundo do ecrã, a toda a largura, como um rodapé */
.cookie-bar {
  left: 0; right: 0; bottom: 0; max-width: none; padding: 0;
  display: block; border: 0; border-top: 1px solid rgb(165 177 195 / .18);
  box-shadow: 0 -12px 40px rgb(17 19 23 / .3);
  background: var(--c-slate);
  transform: translate3d(0, 100%, 0);
}
.cookie-bar__inner {
  width: 100%; max-width: var(--wrap); margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  padding-top: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 8px 32px; align-items: center;
}
.cookie-bar__actions { margin-top: 4px; }
@media (min-width: 640px) {
  .cookie-bar { left: 0; right: 0; bottom: 0; }
}
@media (min-width: 900px) {
  .cookie-bar__inner { grid-template-columns: auto 1fr auto; padding-top: 18px; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
  .cookie-bar__text { max-width: 80ch; }
  .cookie-bar__actions { margin-top: 0; flex-wrap: nowrap; }
}

/* ---------- 37. Telemóvel e tablet, botões dentro do menu ----------
   O Orçamento sai do cabeçalho e fica no menu, junto ao download para parceiros. */
@media (max-width: 1023px) {
  .header-quote { display: none; }
  .mobile-menu__foot { gap: 12px; }
  .mobile-menu__foot .btn { width: 100%; min-height: 52px; justify-content: flex-start; }
  .mobile-menu__foot span:not(.dl-icon) { font-size: var(--fs-small); }
  .mobile-menu__foot > span:first-of-type { margin-top: 8px; }
}
.btn--line { --btn-bg: transparent; --btn-fg: var(--c-deep); --btn-fill: rgb(17 19 23 / .08); box-shadow: inset 0 0 0 1px var(--c-deep); gap: 10px; }
.mobile-menu__dl .dl-icon { color: var(--c-deep); }
.mobile-menu__foot .btn.btn--line { --btn-bg: transparent; --btn-fg: var(--c-deep); --btn-fill: rgb(17 19 23 / .1); color: var(--c-deep); background: transparent; box-shadow: inset 0 0 0 1px var(--c-deep); }
.mobile-menu__foot .btn.btn--line { clip-path: none; }

/* ---------- 38. Topo no telemóvel, tudo no primeiro ecrã ----------
   Ao abrir o site vê-se a imagem, o título, o "Saber mais" e a barra com a miniatura
   e o contador, sem fazer scroll. O topo ocupa exatamente a altura visível do ecrã. */
@media (max-width: 1023px) {
  .hero { height: 100vh; height: 100svh; min-height: 560px; display: flex; flex-direction: column; }
  .hero__media { height: 74%; }
  .hero__copy { position: relative; flex: 1; min-height: 0; padding-top: 0; display: flex; flex-direction: column; justify-content: flex-end; }
  .hero__texts { padding-bottom: 20px; }
  .hero__text { gap: 10px; }
  .hero__kicker { font-size: var(--fs-label); }
  .hero__title { font-size: clamp(1.625rem, 1.1rem + 2.6vw, 2.25rem); line-height: 1.08; letter-spacing: -.035em; max-width: 16ch; }
  .hero__text .link-plus { min-height: 36px; padding-block: 4px; }
  .hero__bar { margin-top: 0; min-height: 0; height: clamp(150px, 24svh, 210px); flex: none; }
  .hero__panel { padding: 14px 12px 8px 18%; gap: 6px; }
  .counter__current { font-size: 1.75rem; }
  .hero__note { font-size: .75rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .icon-btn { width: 40px; height: 40px; }
}
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 520px) {
  .hero { min-height: 0; }
  .hero__media { height: 100%; }
  .hero__bar { display: none; }
  .hero__copy { padding-top: 0; }
}

/* Rodapé no telemóvel. A coluna Contacto ocupa a largura toda, para o email e a morada
   não partirem a meio, e a morada fica com entrelinha normal. */
@media (max-width: 899px) {
  .footer-cols > div:last-child { grid-column: 1 / -1; }
  .footer-cols li span { line-height: 1.5; }
  .footer-cols li a, .footer-cols li span { white-space: nowrap; }
}
@media (pointer: coarse) {
  .footer-cols li span { padding-block: 6px; }
}
