/* ===== CSS CUSTOM PROPERTIES — PREMIUM ===== */
:root {
  --acc: #2088ca;
  --acc2: #1668a0;
  --acc3: #3aabf0;
  --accent: var(--acc);
  --acc-gold: #2088ca;
  --acc-orange: #F28000;
  --acc-gold2: #5bb0e6;
  --bg: #060a0f;
  --bg2: #0b1017;
  --bg3: #101820;
  --bgcard: #0d141d;
  --text: #edf2f7;
  --text2: #8fa3b8;
  --text3: #6b8299; /* contraste 4.99:1 sobre --bg (WCAG AA texto normal) */
  --border: rgba(255,255,255,.06);
  --border-premium: rgba(32,136,202,.12);
  --shadow: rgba(0,0,0,.6);
  --glass: rgba(11,16,23,.72);
  --r14: 16px;
  --r22: 24px;
  --r50: 50px;
  --transition: all .35s cubic-bezier(.4,0,.2,1);
  --transition-slow: all .6s cubic-bezier(.4,0,.2,1);
  /* Tipografia (Fase 2 v2 — Geist substitui Montserrat) */
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-display: 'Geist', system-ui, -apple-system, sans-serif;
  --font-mono:    'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: clip; }
/* As âncoras (ex.: #contacto) não devem ficar tapadas pelo cabeçalho fixo. */
section[id], [id="contacto"] { scroll-margin-top: 92px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  /* overflow-x: clip (nao hidden) contem o overflow horizontal SEM tornar o
     <body> num contentor de scroll — 'hidden' forcava overflow-y a computar
     'auto' e quebrava o position:sticky das secções (a timeline do Percurso
     deixava de prender). 'clip' nao cria contexto de scroll. */
  overflow-x: clip;
  transition: background .4s ease, color .4s ease;
  font-weight: 400;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: default;
}
h1,h2,h3,h4,h5 { font-family: var(--font-display); letter-spacing: -.02em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--text3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--acc); }
::selection { background: rgba(32,136,202,.3); color: var(--text); }

/* ===== UTILITY ===== */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.grad {
  background: linear-gradient(135deg, var(--acc), var(--acc3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--acc);
  background: rgba(32,136,202,.12);
  padding: 6px 16px;
  border-radius: var(--r50);
  margin-bottom: 16px;
  border: 1px solid rgba(32,136,202,.2);
}
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; margin-bottom: 12px; line-height: 1.08; }
.section-header p { font-size: 1.02rem; color: var(--text2); max-width: 560px; margin: 0 auto; line-height: 1.6; }

/* Section padding */
section { padding: 92px 0; }
@media(max-width:768px) { section { padding: 60px 0; } }

/* Homepage: a hairline alinha à fronteira (início) de cada secção e só depois
   há 100px de respiro, igual às restantes páginas (padding-top: 0 vem de
   .section-divider; o respiro faz-se com margin da linha + padding-bottom). */
body.home-page section:not(#hero):not(.sobre-hero) { padding: 0 0 100px; }
body.home-page .section-divider::before { margin-bottom: 100px; }
@media(max-width:768px) {
  body.home-page section:not(#hero):not(.sobre-hero) { padding: 0 0 64px; }
  body.home-page .section-divider::before { margin-bottom: 64px; }
}

/* Section divider line — line sits on the section boundary, not inside a dead band */
.section-divider {
  position: relative;
  padding-top: 0;
}
.section-divider::before {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(32,136,202,.34), transparent);
  margin-bottom: clamp(38px, 4.2vw, 58px);
}
@media(max-width:768px) {
  .section-divider::before { margin-bottom: 34px; }
}

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Skip-link (WCAG 2.4.1 Bypass Blocks) ===== */
.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 2000;
  padding: 10px 18px;
  background: var(--acc);
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  transform: translateY(-160%);
  transition: transform .2s ease;
}
.skip-link:focus-visible { transform: translateY(0); outline: 2px solid #fff; outline-offset: 2px; }

/* ===== Movimento reduzido: garante conteúdo visível e corta animações ===== */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--r50);
  font-family: 'Hanken Grotesk', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 0;
}
.btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.15), transparent);
  transition: left .5s ease;
  z-index: -1;
}
.btn:hover::after { left: 150%; }
.btn-primary {
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  color: #fff;
  box-shadow: 0 4px 20px rgba(32,136,202,.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(32,136,202,.5); }
.btn-outline {
  border: 1.5px solid rgba(32,136,202,.5);
  color: var(--acc);
  background: transparent;
}
.btn-outline:hover { background: rgba(32,136,202,.1); border-color: var(--acc); transform: translateY(-2px); }
.btn-sm { padding: 10px 20px; font-size: .85rem; }

/* ===== COOKIE BANNER ===== */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  box-shadow: 0 -8px 30px rgba(0,0,0,.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
#cookie-banner p { font-size: .88rem; color: var(--text2); max-width: 700px; line-height: 1.6; }
#cookie-banner p a { color: var(--acc); text-decoration: underline; }
#cookie-banner .ck-btns { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
#cookie-banner .btn { padding: 10px 22px; font-size: .88rem; display: inline-flex; align-items: center; justify-content: center; text-align: center; }

/* ===== NAV ===== */
#nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all .3s ease;
}
#nav.sc { padding: 12px 0; }
#nav.sc::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(8,12,16,.88);
  /* Raio reduzido (era 20px): elemento fixo com blur re-amostra a página a cada
     frame de scroll — custo alto de paint, sobretudo em Firefox. Como o fundo já
     é 88% opaco, 12px mantém o aspeto de vidro com muito menos repaint. */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ni {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 1;
}
.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 38px; width: auto; transition: var(--transition); }
.logo-dark-v { display: block; }

/* Nav sobre hero escuro: no topo (sem scroll), reforça o tratamento
   claro-sobre-escuro, porque o hero tem fundo próprio. */
#nav.nav-over-dark:not(.sc) .nav-links a { color: rgba(255,255,255,.82); }
#nav.nav-over-dark:not(.sc) .nav-links a:hover,
#nav.nav-over-dark:not(.sc) .nav-links a:focus-visible { color: #fff; }
#nav.nav-over-dark:not(.sc) .nav-pill { background: rgba(255,255,255,.14); }
#nav.nav-over-dark:not(.sc) .lang-btn { color: rgba(255,255,255,.62); }
#nav.nav-over-dark:not(.sc) .lang-btn:hover,
#nav.nav-over-dark:not(.sc) .lang-btn.lang-active { color: #fff; }
#nav.nav-over-dark:not(.sc) .lang-sep { background: rgba(255,255,255,.3); }
#nav.nav-over-dark:not(.sc) .hamburger span { background: #fff; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text2);
  padding: 8px 14px;
  border-radius: var(--r50);
  transition: color .25s ease;
  position: relative;
  z-index: 1;
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--text); }

/* Motion Nav — highlight pill que segue o hover (port Unlumen) */
.nav-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  border-radius: var(--r50);
  background: rgba(255,255,255,.08);
  transform: translateX(0) scaleX(0);
  transform-origin: left center;
  transition: transform .42s cubic-bezier(.22,.61,.36,1),
              width .42s cubic-bezier(.22,.61,.36,1),
              opacity .22s ease;
  pointer-events: none;
  z-index: 0;
}

/* ===== Mega-menu de Serviços (desktop) ===== */
.nav-svc-trigger { cursor: pointer; }
.svc-megamenu {
  position: absolute; top: 100%; left: 0; right: 0;
  visibility: hidden;
  transition: visibility 0s linear .34s;
  z-index: 60;
  /* IMPORTANTE: nada de transform/filter/will-change AQUI — num ancestral do backdrop-filter
     isso recorta o backdrop e o blur deixa de apanhar a página. A animação de entrada é feita
     no conteúdo (.container), não no painel. */
}
/* Vidro fosco: o ::before desfoca o que está por trás do painel (backdrop-filter) com um nível
   FIXO (só depende do menu estar aberto). Sem opacity aqui — o backdrop-filter nunca é desligado;
   o blur entra em fade animando o próprio blur() (não por "pop"). */
.svc-megamenu::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(14,19,27,0), rgba(9,12,18,0));
  backdrop-filter: blur(0px) brightness(1) saturate(1); -webkit-backdrop-filter: blur(0px) brightness(1) saturate(1);
  transition: background .34s ease, backdrop-filter .34s ease, -webkit-backdrop-filter .34s ease;
}
/* UNIVERSAL — uma só regra para todas as páginas (atuais e futuras).
   blur = fosco; brightness(<1) ESCURECE o que está por trás, por isso títulos/imagens claros
   dos heros ficam sempre reduzidos a escuro (não transparecem legíveis) → o mesmo fosco
   escuro da homepage em qualquer página, seja qual for o conteúdo por baixo. */
.svc-megamenu.is-open::before {
  background: linear-gradient(180deg, rgba(14,19,27,.5), rgba(9,12,18,.58));
  /* Raio reduzido (era 30px) pela mesma razão do cabeçalho: menos custo de paint
     no Firefox. O brightness(.5) já garante o fosco escuro, o raio pesa pouco. */
  backdrop-filter: blur(18px) brightness(.5) saturate(1.25);
  -webkit-backdrop-filter: blur(18px) brightness(.5) saturate(1.25);
}
/* Sombra de elevação + linha de luz no topo numa camada separada, que faz fade por opacity
   (não tem backdrop-filter, por isso pode usar opacity) — desaparece COM o menu, sem fantasma. */
.svc-megamenu::after {
  content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none;
  border-top: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 40px 90px -12px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08);
  opacity: 0; transition: opacity .34s ease;
}
.svc-megamenu.is-open { visibility: visible; transition: visibility 0s; }
.svc-megamenu.is-open::after { opacity: 1; }
/* A animação de entrada (fade + slide) vive no conteúdo, não no painel — para não recortar
   o backdrop-filter. */
.svc-megamenu .container {
  position: relative; padding-top: 30px; padding-bottom: 26px;
  opacity: 0; transform: translateY(-8px);
  transition: opacity .34s ease .04s, transform .34s cubic-bezier(.22,1,.36,1) .04s;
}
.svc-megamenu.is-open .container { opacity: 1; transform: translateY(0); }
.svc-mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }

/* Cabeçalho de categoria — azul (como o logótipo) com linha branca por baixo; hover a branco. */
.svc-mega-head {
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--acc); margin: 0 0 14px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,.38);
}
a.svc-mega-head { display: block; text-decoration: none; transition: color .2s ease, border-color .2s ease; }
a.svc-mega-head:hover { color: #fff; border-bottom-color: #fff; }

/* Serviços — sub-itens (só dentro do <ul>, para não afetar o cabeçalho <a>):
   branco para leitura; hover a azul do logótipo. */
.svc-mega-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.svc-mega-col ul a {
  font-size: .88rem; color: #fff; text-decoration: none;
  transition: color .2s ease, padding-left .2s ease; display: inline-block;
}
.svc-mega-col ul a:hover, .svc-mega-col ul a:focus-visible { color: var(--acc); padding-left: 6px; }
.svc-mega-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--border);
}
.svc-mega-all {
  font-size: .82rem; font-weight: 600; color: var(--text);
}
.svc-mega-all:hover { color: var(--acc); }
.svc-mega-pc {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 700; color: var(--acc);
  padding: 8px 14px; border: 1px solid color-mix(in oklch, var(--acc) 32%, transparent);
  border-radius: 999px; background: color-mix(in oklch, var(--acc) 8%, transparent);
  transition: var(--transition);
}
.svc-mega-pc svg { width: 16px; height: 16px; }
.svc-mega-pc:hover { background: color-mix(in oklch, var(--acc) 16%, transparent); border-color: var(--acc); }

@media (prefers-reduced-motion: reduce) {
  .svc-megamenu { transition: visibility 0s; }
  .svc-megamenu::before,
  .svc-megamenu::after,
  .svc-megamenu .container { transition: none; }
  .svc-megamenu .container { transform: none; }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* ===== Smooth caret input (port Skiper106) ===== */
.sc-field { position: relative; display: block; }
.sc-input { caret-color: transparent; }
.sc-caret {
  position: absolute;
  top: 50%;
  left: 0;
  width: 2px;
  height: 1.15em;
  margin-top: -0.575em;
  border-radius: 2px;
  background: var(--acc);
  opacity: 0;
  transform: translateX(0);
  pointer-events: none;
  transition: transform .11s cubic-bezier(.22,1,.36,1), opacity .14s ease;
  will-change: transform, opacity;
}
.sc-measure {
  position: absolute;
  top: 0; left: 0;
  visibility: hidden;
  white-space: pre;
  pointer-events: none;
}
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
}
.hamburger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: var(--transition);
}
.hamburger span:nth-child(1) { width: 24px; }
.hamburger span:nth-child(2) { width: 18px; }
.hamburger span:nth-child(3) { width: 24px; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); width: 24px; }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); width: 24px; }

/* Mobile Drawer */
.nav-drawer {
  position: fixed;
  top: 0; right: -320px;
  width: 300px; height: 100vh;
  background: var(--bg2);
  border-left: 1px solid var(--border);
  z-index: 999;
  transition: right .35s cubic-bezier(.4,0,.2,1);
  padding: 80px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nav-drawer.open { right: 0; }
.nav-drawer a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text2);
  padding: 12px 16px;
  border-radius: var(--r14);
  transition: var(--transition);
  display: block;
}
.nav-drawer a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.nav-drawer .btn { margin-top: 16px; width: 100%; justify-content: center; }
.nav-drawer .btn.btn-primary { color: #fff; font-size: 1rem; padding: 14px 24px; box-shadow: 0 4px 18px rgba(32,136,202,.4); }
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 998;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }

/* ===== HERO — CINEMATIC APPLE-LIKE OPENING ===== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #000;
  position: relative;
  overflow: hidden;
  padding: 150px 0 105px;
  isolation: isolate;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Sem filter: um <video> a reproduzir com CSS filter obriga o Firefox a
     re-aplicar o filtro a cada frame de vídeo em toda a viewport (caminho lento,
     "aos soluços" no hero). O escurecimento/tom já é dado pelos gradientes de
     #hero::before por cima; baixei a opacidade para compensar o brightness que
     foi retirado. */
  opacity: .15;
  z-index: -4;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 74% 26%, rgba(32,136,202,.26), transparent 36%),
    linear-gradient(90deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.72) 44%, rgba(0,0,0,.42) 100%),
    linear-gradient(180deg, rgba(0,0,0,.62) 0%, rgba(0,0,0,.08) 46%, #000 100%);
  z-index: -3;
}
#hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--bg));
  z-index: -1;
}
.hero-dot-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: .16;
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}
.hero-blob {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .9;
}
.hero-blob-1 {
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(32,136,202,.2) 0%, transparent 70%);
  top: -160px; right: -120px;
}
.hero-blob-2 {
  width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 68%);
  bottom: -110px; left: 12%;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: clamp(42px, 6vw, 82px);
  align-items: center;
  position: relative;
  z-index: 1;
}
.hero-kicker {
  color: rgba(255,255,255,.72);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.hero-badge {
  font-size: .74rem;
  font-weight: 600;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.1);
  padding: 6px 13px;
  border-radius: 999px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.hero-text h1 {
  max-width: 850px;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: clamp(2.8rem, 6.7vw, 6.35rem);
  font-weight: 700;
  line-height: .96;
  margin-bottom: 24px;
  letter-spacing: -.065em;
  color: #fff;
}
.hero-text h1 .grad {
  background: linear-gradient(180deg, #fff 0%, #b8c5d2 54%, #72b9ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: clamp(1.08rem, 1.75vw, 1.36rem);
  color: rgba(255,255,255,.72);
  margin-bottom: 14px;
  min-height: 1.9em;
  line-height: 1.48;
}
.hero-subtitle span { color: #fff; font-weight: 700; }
.hero-proofline {
  max-width: 620px;
  color: rgba(255,255,255,.62);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 34px;
}
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: #fff;
  margin-left: 3px;
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cinematic .btn {
  min-height: 48px;
  padding: 13px 24px;
  border-radius: 999px;
}
.hero-cinematic .btn-primary {
  background: #f5f5f7;
  color: #111;
  box-shadow: 0 14px 40px rgba(255,255,255,.16);
}
.hero-cinematic .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 54px rgba(255,255,255,.22); }
.hero-cinematic .btn-outline {
  border: 1px solid rgba(255,255,255,.28);
  color: #fff;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.hero-cinematic .btn-outline:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); transform: translateY(-2px); }
.hero-photo { position: relative; min-height: 560px; }
.hero-orbit {
  position: absolute;
  inset: 8% -5% 4% 6%;
  border-radius: 42% 58% 48% 52%;
  border: 1px solid rgba(255,255,255,.1);
  background: radial-gradient(circle at 50% 35%, rgba(255,255,255,.12), transparent 54%);
  transform: rotate(-8deg);
}
.hero-photo-frame {
  position: relative;
  width: min(430px, 88%);
  margin-left: auto;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 34px 90px rgba(0,0,0,.62), inset 0 1px 0 rgba(255,255,255,.16);
  aspect-ratio: 4/5;
}
.hero-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(0,0,0,.28) 100%);
  pointer-events: none;
}
.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(.94) contrast(1.04);
}
.hero-diagnostic-card {
  position: absolute;
  left: 0;
  bottom: 42px;
  width: min(350px, 72%);
  background: rgba(245,245,247,.92);
  color: #1d1d1f;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 22px;
  padding: 20px 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.34);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 3;
}
.diag-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #0071e3;
  margin-bottom: 8px;
}
.hero-diagnostic-card p {
  font-size: .92rem;
  line-height: 1.55;
  color: rgba(29,29,31,.78);
  margin-bottom: 12px;
}
.hero-diagnostic-card ul {
  display: grid;
  gap: 7px;
}
.hero-diagnostic-card li {
  position: relative;
  padding-left: 18px;
  font-size: .82rem;
  font-weight: 700;
  color: #1d1d1f;
}
.hero-diagnostic-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .65em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0071e3;
}
.float-card {
  position: absolute;
  background: rgba(0,0,0,.68);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 12px 16px;
  font-size: .8rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
  z-index: 4;
}
.float-card-1 { top: 62px; left: 6px; animation-delay: 0s; }
.float-card-2 { right: -8px; bottom: 150px; animation-delay: 2s; }
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Simplified value-led hero: fewer elements, stronger message */
.hero-value .hero-grid {
  grid-template-columns: minmax(0, 1.12fr) minmax(330px, .78fr);
  gap: clamp(48px, 7vw, 96px);
}
.hero-value .hero-text h1 {
  max-width: 900px;
  font-size: clamp(3.25rem, 7.4vw, 7.4rem);
  line-height: .92;
  letter-spacing: -.075em;
  margin-bottom: 30px;
}
.hero-value .hero-kicker {
  max-width: 660px;
  color: rgba(255,255,255,.66);
  margin-bottom: 26px;
}
.hero-value .hero-proofline {
  max-width: 690px;
  color: rgba(255,255,255,.74);
  font-size: clamp(1.08rem, 1.45vw, 1.28rem);
  line-height: 1.62;
  margin-bottom: 38px;
}
.hero-value .hero-photo {
  min-height: auto;
  display: flex;
  justify-content: flex-end;
}
.hero-value .hero-photo-frame {
  width: min(390px, 88%);
  border-radius: 40px;
  opacity: .92;
  box-shadow: 0 38px 110px rgba(0,0,0,.68);
}
.hero-value .hero-photo-frame::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.28), transparent 38%, rgba(32,136,202,.22));
  z-index: 2;
  opacity: .55;
}
.hero-value .hero-photo-frame img {
  filter: saturate(.9) contrast(1.02) brightness(.88);
}

/* Cinematic visitor-led hero: stronger lettering, fewer distractions, more emotional pull */
.hero-cinematic.hero-value {
  min-height: 100svh;
  padding: clamp(132px, 14vh, 172px) 0 clamp(84px, 10vh, 126px);
  background: #000;
}
.hero-cinematic.hero-value::before {
  background:
    radial-gradient(circle at 72% 20%, rgba(82,154,209,.2), transparent 34%),
    radial-gradient(circle at 22% 76%, rgba(255,255,255,.07), transparent 28%),
    linear-gradient(90deg, rgba(0,0,0,.96) 0%, rgba(0,0,0,.84) 43%, rgba(0,0,0,.48) 100%),
    linear-gradient(180deg, rgba(0,0,0,.74) 0%, rgba(0,0,0,.12) 45%, #000 100%);
}
.hero-cinematic.hero-value .hero-video {
  /* Sem filter: um <video> a reproduzir com CSS filter obriga o Firefox a
     re-aplicar o filtro a cada frame em toda a viewport (o "aos soluços" do
     hero). Os gradientes de #hero::before por cima já dão o tom escuro; opacidade
     baixada para compensar o brightness que foi retirado. */
  opacity: .16;
  transform: scale(1.03);
}
.hero-cinematic.hero-value .container { max-width: 1320px; }
.hero-cinematic.hero-value .hero-grid {
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
  gap: clamp(38px, 6vw, 92px);
}
.hero-cinematic.hero-value .hero-text {
  max-width: 890px;
}
.hero-cinematic.hero-value .hero-kicker {
  max-width: 720px;
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  color: rgba(255,255,255,.62);
  font-size: clamp(.78rem, .72rem + .28vw, .96rem);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: none;
  margin-bottom: 24px;
}
.hero-cinematic.hero-value .hero-kicker::before {
  content: '';
  display: inline-block;
  width: 42px;
  height: 1px;
  margin-right: 14px;
  vertical-align: middle;
  background: rgba(255,255,255,.42);
}
.hero-cinematic.hero-value .hero-text h1 {
  max-width: 960px;
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-size: clamp(4.4rem, 9.4vw, 10.6rem);
  font-weight: 400;
  line-height: .82;
  letter-spacing: -.055em;
  margin-bottom: clamp(28px, 4.3vw, 54px);
  color: #fff;
  text-wrap: balance;
}
.hero-cinematic.hero-value .hero-text h1 .grad {
  display: block;
  margin-top: .08em;
  font-style: italic;
  /* Parte de destaque no azul do logótipo (sólido), sem gradiente branco->azul. */
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: var(--acc);
  color: var(--acc);
}
.hero-audience {
  position: relative;
  max-width: 760px;
  margin: 0 0 18px;
  padding-left: 22px;
  color: rgba(255,255,255,.9);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: clamp(1.35rem, 2vw, 2rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -.035em;
}
.hero-audience::before {
  content: '';
  position: absolute;
  left: 0;
  top: .16em;
  bottom: .15em;
  width: 2px;
  border-radius: 99px;
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(58,171,240,.24));
}
.hero-cinematic.hero-value .hero-proofline {
  max-width: 680px;
  color: rgba(255,255,255,.68);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: clamp(1.04rem, 1.15vw, 1.22rem);
  line-height: 1.58;
  letter-spacing: -.015em;
  margin-bottom: 36px;
}
.hero-cinematic.hero-value .hero-btns { gap: 14px; }
.hero-cinematic.hero-value .btn {
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  min-height: 52px;
  padding: 14px 28px;
  font-weight: 700;
  letter-spacing: -.015em;
}
.hero-cinematic.hero-value .btn-primary {
  background: #f5f5f7;
  color: #05070a;
  box-shadow: 0 18px 58px rgba(255,255,255,.15);
}
.hero-cinematic.hero-value .btn-outline {
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.22);
}
.hero-cinematic.hero-value .hero-photo {
  align-self: stretch;
  align-items: center;
  min-height: 560px;
  perspective: 1000px;
}
.hero-cinematic.hero-value .hero-photo-frame {
  width: min(520px, 94%);
  aspect-ratio: 3.8 / 5;
  border-radius: clamp(34px, 4vw, 58px);
  opacity: 1;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 46px 140px rgba(0,0,0,.72), 0 0 90px rgba(32,136,202,.12);
  transform: rotateY(-5deg) rotateZ(.6deg);
}
.hero-cinematic.hero-value .hero-photo-frame::after {
  background:
    linear-gradient(180deg, rgba(0,0,0,.05) 0%, transparent 34%, rgba(0,0,0,.34) 100%),
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.16), transparent 42%);
}
.hero-cinematic.hero-value .hero-photo-frame img {
  filter: saturate(.82) contrast(1.12) brightness(.78);
  transform: scale(1.045);
}
.hero-cinematic.hero-value .hero-blob-1 {
  width: 720px;
  height: 720px;
  top: -210px;
  right: -240px;
  opacity: .7;
}
@media(max-width:1024px) {
  .hero-cinematic.hero-value .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-cinematic.hero-value .hero-photo {
    min-height: 0;
    justify-content: flex-start;
  }
  .hero-cinematic.hero-value .hero-photo-frame {
    width: min(420px, 82vw);
    transform: none;
  }
}
@media(max-width:640px) {
  .hero-cinematic.hero-value {
    padding-top: 118px;
  }
  .hero-cinematic.hero-value .hero-kicker::before { width: 28px; margin-right: 10px; }
  .hero-cinematic.hero-value .hero-text h1 {
    font-size: clamp(3.75rem, 18vw, 6rem);
    line-height: .86;
    letter-spacing: -.048em;
  }
  .hero-audience { padding-left: 16px; }
  .hero-cinematic.hero-value .hero-proofline { margin-bottom: 28px; }
  .hero-cinematic.hero-value .hero-photo-frame { width: min(360px, 88vw); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-cinematic.hero-value .hero-photo-frame,
  .hero-cinematic.hero-value .hero-video { transform: none; }
}

/* ===== ABOUT ===== */
#sobre { background: var(--bg2); }
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.about-photo-wrap { position: relative; }
.about-photo-inner { position: relative; }
.about-photo-frame {
  border-radius: var(--r22);
  overflow: hidden;
  aspect-ratio: 1;
  box-shadow: 0 24px 60px var(--shadow);
}
.about-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.about-stats-box {
  position: absolute;
  bottom: -20px; right: -20px;
  background: linear-gradient(135deg, var(--acc), var(--acc2));
  color: #fff;
  border-radius: var(--r14);
  padding: 20px 24px;
  z-index: 2;
  box-shadow: 0 12px 40px rgba(32,136,202,.4);
}
.about-stats-box .num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 900; line-height: 1; }
.about-stats-box .lbl { font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin-top: 4px; }
.about-section-title {
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  font-weight: 900;
  margin-bottom: 18px;
  line-height: 1.08;
}
.about-main-title {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.6vw, 2.35rem);
  font-weight: 900;
  margin-bottom: 22px;
  line-height: 1.18;
}
.about-content p { color: var(--text2); margin-bottom: 14px; font-size: .97rem; line-height: 1.68; }
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: clamp(32px, 5vw, 56px) 0 0;
}
.value-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r14);
  padding: 20px;
  transition: var(--transition);
}
.value-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(180px circle at var(--mx, 100%) var(--my, 0%), rgba(32,136,202,.16), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.value-card:hover { border-color: rgba(32,136,202,.35); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(0,0,0,.24); }
.value-card:hover::before { opacity: 1; }
.value-card .vc-icon { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 12px; background: rgba(32,136,202,.12); border: 1px solid rgba(32,136,202,.18); display: grid; place-items: center; color: var(--acc); }
.value-card .vc-icon svg { width: 21px; height: 21px; }
.vc-body { min-width: 0; }
.value-card h4 { font-size: .96rem; font-weight: 700; margin-bottom: 5px; }
.value-card p { font-size: .86rem; color: var(--text2); margin: 0; line-height: 1.5; }

/* Foto com tilt 3D + brilho a seguir o cursor */
.about-photo-inner { transition: transform .4s cubic-bezier(.22,1,.36,1); transform-style: preserve-3d; will-change: transform; }
.about-photo-frame { position: relative; }
.about-photo-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(200px circle at var(--mx, 50%) var(--my, 50%), rgba(32,136,202,.3), transparent 60%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
  mix-blend-mode: screen;
}
.about-photo-inner:hover .about-photo-frame::after { opacity: 1; }

/* ===== TIMELINE VIVA (Sobre / homepage) ===== */
.about-timeline-live { margin-top: clamp(48px, 6vw, 88px); }
.atl-head { text-align: center; margin-bottom: clamp(28px, 4vw, 52px); }
.atl-eyebrow {
  display: inline-block;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--acc); margin-bottom: 10px;
}
.atl-title { font-family: var(--font-display); font-size: clamp(1.6rem, 1rem + 2vw, 2.6rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; }
.atl-track { position: relative; }
.atl-line {
  position: absolute; left: 50%; top: 6px; bottom: 6px; width: 2px;
  transform: translateX(-50%);
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.atl-line-fill {
  position: absolute; inset: 0;
  transform-origin: top;
  transform: scaleY(var(--tl-progress, 0));
  background: linear-gradient(var(--acc), var(--acc2));
  transition: transform .12s linear;
}
.atl-nodes { list-style: none; margin: 0; padding: 0; }
.atl-node { position: relative; width: 50%; box-sizing: border-box; padding: 14px 46px; }
.atl-node:nth-child(odd) { text-align: right; }
.atl-node:nth-child(even) { margin-left: 50%; text-align: left; }
.atl-dot {
  position: absolute; top: 24px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--border);
  transition: background .35s ease, border-color .35s ease, box-shadow .35s ease, transform .35s ease;
  z-index: 2;
}
.atl-node:nth-child(odd) .atl-dot { right: -8px; }
.atl-node:nth-child(even) .atl-dot { left: -8px; }
.atl-node.is-reached .atl-dot {
  background: var(--acc); border-color: var(--acc);
  box-shadow: 0 0 0 5px rgba(32,136,202,.16);
  transform: scale(1.14);
}
.atl-card {
  display: inline-block; text-align: left; max-width: 340px;
  background: var(--bgcard); border: 1px solid var(--border);
  border-radius: var(--r14); padding: 15px 18px;
  opacity: .5;
  transition: opacity .4s ease, border-color .4s ease, transform .4s ease;
}
.atl-node.is-reached .atl-card { opacity: 1; border-color: rgba(32,136,202,.28); }
.atl-year { font-family: var(--font-display); font-weight: 900; font-size: 1.08rem; color: var(--acc); display: block; margin-bottom: 4px; }
.atl-text { font-size: .9rem; color: var(--text2); margin: 0; line-height: 1.5; }

/* ===== Desktop (homepage Sobre Mim): 4 blocos horizontais + timeline horizontal ===== */
@media (min-width: 993px) {
  /* Os 4 blocos ocupam a largura toda da secção */
  .about-values { grid-template-columns: repeat(4, 1fr); }

  /* Timeline horizontal: linha no topo, pontos sobre a linha, cartões por baixo em colunas */
  .atl-line {
    left: 0; right: 0; top: 8px; bottom: auto;
    width: auto; height: 2px; transform: none;
  }
  .atl-line-fill { transform-origin: left; transform: scaleX(var(--tl-progress, 0)); }
  .atl-nodes { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
  .atl-node,
  .atl-node:nth-child(odd),
  .atl-node:nth-child(even) {
    width: auto; margin: 0; padding: 30px 10px 0; text-align: center;
  }
  .atl-dot,
  .atl-node:nth-child(odd) .atl-dot,
  .atl-node:nth-child(even) .atl-dot {
    top: 8px; left: 50%; right: auto; transform: translate(-50%, -50%);
  }
  /* No layout horizontal os cartões estão sempre visíveis (a linha é que anima no scroll) */
  .atl-card { opacity: 1; max-width: none; }
}

@media (max-width: 680px) {
  .atl-line { left: 7px; }
  .atl-node,
  .atl-node:nth-child(odd),
  .atl-node:nth-child(even) { width: 100%; margin-left: 0; text-align: left; padding: 12px 0 12px 34px; }
  .atl-node:nth-child(odd) .atl-dot,
  .atl-node:nth-child(even) .atl-dot { left: 0; right: auto; }
  .atl-card { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  .about-photo-inner { transition: none; }
  .atl-line-fill { transition: none; }
}

/* ===== SERVICES ===== */
#servicos { background: var(--bg); }
.service-group { margin-bottom: 72px; }
.service-group:last-child { margin-bottom: 0; }
.group-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.group-icon { font-size: 2rem; }
.group-name { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--bgcard);
  border: 1px solid var(--border);
  border-radius: var(--r14);
  padding: 28px 22px 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(32,136,202,.18);
  border-color: rgba(32,136,202,.3);
}
.sc-num {
  position: absolute;
  top: 14px; right: 16px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: rgba(32,136,202,.12);
  line-height: 1;
  transition: var(--transition);
}
.service-card:hover .sc-num { color: rgba(32,136,202,.2); }
.sc-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(32,136,202,.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  transition: var(--transition);
}
.service-card:hover .sc-icon { background: var(--acc); }
.sc-icon svg { transition: var(--transition); }
.service-card:hover .sc-icon svg path,
.service-card:hover .sc-icon svg circle,
.service-card:hover .sc-icon svg rect,
.service-card:hover .sc-icon svg polyline,
.service-card:hover .sc-icon svg line,
.service-card:hover .sc-icon svg polygon { stroke: #fff; }
.sc-title { font-size: .95rem; font-weight: 700; margin-bottom: 8px; }
.sc-desc { font-size: .82rem; color: var(--text2); line-height: 1.6; }
.sc-bar {
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--acc), var(--acc3));
  transition: width .4s ease;
}
.service-card:hover .sc-bar { width: 100%; }

/* Service SVGs */
.sc-svg { width: 28px; height: 28px; stroke: var(--acc); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== PORTFOLIO ===== */
#portfolio { background: var(--bg2); }
/* Hero da página de Portfólio (/portfolio) */
.portfolio-hero {
  padding: clamp(130px, 16vh, 200px) 0 clamp(20px, 4vw, 48px);
  text-align: center;
}
.portfolio-hero-inner { max-width: 720px; margin: 0 auto; }
.portfolio-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--acc); margin-bottom: 14px;
}
.portfolio-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 1rem + 5vw, 4.4rem);
  font-weight: 900; letter-spacing: -.03em; line-height: 1; margin: 0 0 16px;
}
.portfolio-hero p { color: var(--text2); font-size: 1.05rem; line-height: 1.65; margin: 0 auto; max-width: 620px; }

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.pf-btn {
  padding: 9px 22px;
  border-radius: var(--r50);
  border: 1.5px solid var(--border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text2);
  transition: var(--transition);
  background: transparent;
}
.pf-btn:hover, .pf-btn.active {
  background: var(--acc);
  color: #fff;
  border-color: var(--acc);
}
.portfolio-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.p-row {
  display: flex;
  gap: 20px;
}
.p-card {
  border-radius: var(--r22);
  overflow: hidden;
  position: relative;
  min-height: 260px;
  min-width: 0;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  flex-grow: 1;
  flex-shrink: 1;
  flex-basis: 0;
  transition: flex-grow .5s cubic-bezier(0.4,0,0.2,1), box-shadow .5s cubic-bezier(0.4,0,0.2,1), border-color .5s cubic-bezier(0.4,0,0.2,1);
}
.p-card:hover {
  box-shadow: 0 8px 40px rgba(32,136,202,.25), 0 2px 12px rgba(0,0,0,.4);
  border-color: rgba(32,136,202,.3);
}
.p-card.featured { flex-grow: 2; }
.p-card.featured.shrink { flex-grow: 1; }
.p-card.p-hoverable { transition: flex-grow .5s cubic-bezier(0.4,0,0.2,1), box-shadow .5s cubic-bezier(0.4,0,0.2,1), border-color .5s cubic-bezier(0.4,0,0.2,1); }
.p-card.p-hoverable:hover { z-index: 2; }
.p-card.p-video:hover { transform: none; }
.p-card.p-video.expanded { flex-grow: 2; transform: none; }
.p-card-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px;
  transition: var(--transition);
}
.p-card:hover .p-card-bg { transform: scale(1.05); }
.p-card-bg .big-emoji { font-size: 4rem; filter: drop-shadow(0 4px 12px rgba(0,0,0,.4)); }
.p-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 20px 22px 18px;
  background: linear-gradient(0deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 60%, transparent 100%);
  z-index: 2;
}
.p-cat { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); margin-bottom: 4px; }
.p-title { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 8px; }
.p-link { font-size: .8rem; color: rgba(255,255,255,.7); transition: var(--transition); }
.p-link:hover { color: var(--acc); }
.p-card.hidden { display: none; }

/* ── Portfolio: filtered mode ──────────────────────────────────────────────── *
 * Virtual rows are built by JS with the correct number of cards, so the      *
 * Em modo filtro, cada card mantém a largura definida no dashboard,           *
 * independentemente do número de cards na row virtual.                       */
.portfolio-grid.filtering .p-card[data-span="1"] { flex: 0 0 calc(33.333% - 13.333px); max-width: calc(33.333% - 13.333px); }
.portfolio-grid.filtering .p-card[data-span="2"] { flex: 0 0 calc(66.666% - 6.667px);  max-width: calc(66.666% - 6.667px); }
.portfolio-grid.filtering .p-card[data-span="3"] { flex: 0 0 100%; max-width: 100%; }
.portfolio-note {
  text-align: center;
  margin-top: 40px;
  font-size: .9rem;
  color: var(--text2);
}
.portfolio-note a { color: var(--acc); text-decoration: underline; }

/* DM At Studio card */
.dmat-bg {
  background: linear-gradient(135deg, #060e1f 0%, #0d2655 100%);
}
.dmat-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: .06em;
}
.dmat-sub {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  margin-top: 8px;
}

/* ===== CLIENTS ===== */
#clientes { background: var(--bg); }
.counters-section {
  margin-top: 40px;
  padding-top: 48px;
}
.counters-heading {
  text-align: center;
  margin: 0 auto 28px;
  width: 100%;
}
.counters-heading h2 {
  font-size: clamp(1.85rem, 3.3vw, 2.8rem);
  font-weight: 900;
  line-height: 1.1;
}
.counters-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 0;
}
.counter-item {
  text-align: center;
  padding: 32px 20px;
  background: var(--bgcard);
  border: 1px solid var(--border);
  border-radius: var(--r22);
  transition: var(--transition);
}
.counter-item:hover { border-color: rgba(32,136,202,.3); transform: translateY(-3px); }
.counter-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  color: var(--acc);
  line-height: 1;
  margin-bottom: 8px;
}
.counter-lbl { font-size: .88rem; color: var(--text2); font-weight: 500; }
/* Grelha igual (todos os tiles com a mesma relevância), mas interativa:
   spotlight a seguir o cursor + hover que cresce e esbate os vizinhos. */
.sectors-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 16px;
}
.sector-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bgcard);
  border: 1px solid var(--border);
  border-radius: var(--r22);
  padding: 28px;
  transition: var(--transition);
}
/* Spotlight de acento que segue o cursor (--mx/--my definidos por JS) */
.sector-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(220px circle at var(--mx, 100%) var(--my, 0%), rgba(32,136,202,.2), transparent 62%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
/* Hover: o tile cresce e sobrepõe-se; os vizinhos recuam e esbatem */
.sector-card:hover {
  border-color: rgba(32,136,202,.4);
  transform: scale(1.04);
  z-index: 3;
  box-shadow: 0 22px 52px rgba(0,0,0,.34);
}
.sector-card:hover::before { opacity: 1; }
.sectors-bento:hover .sector-card:not(:hover) {
  transform: scale(.975);
  opacity: .5;
}

@media (prefers-reduced-motion: reduce) {
  .sector-card:hover { transform: none; }
  .sectors-bento:hover .sector-card:not(:hover) { transform: none; opacity: 1; }
}
.sector-card .s-icon { width: 52px; height: 52px; border-radius: 15px; flex-shrink: 0; background: rgba(32,136,202,.1); border: 1px solid rgba(32,136,202,.2); display: grid; place-items: center; color: var(--acc); }
.sector-card .s-icon svg { width: 26px; height: 26px; }
.sector-body { min-width: 0; }
.sector-card h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 10px; line-height: 1.25; }
.sector-card p { font-size: .98rem; color: var(--text2); line-height: 1.62; }

@media (max-width: 900px) {
  .sectors-bento { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .sectors-bento { grid-template-columns: 1fr; }
}

/* ===== TESTIMONIALS ===== */
#testemunhos { background: var(--bg2); }
.testimonials-wrap { position: relative; overflow: hidden; }
.testimonials-track {
  display: flex;
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}
.t-card {
  min-width: 100%;
  padding: 0 20px;
}
.t-inner {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r22);
  padding: 44px 48px;
  text-align: center;
}
.t-stars { font-size: 1.3rem; color: #f5a623; margin-bottom: 20px; letter-spacing: 2px; }
.t-text { font-size: 1.05rem; color: var(--text2); line-height: 1.8; margin-bottom: 28px; font-style: italic; }
.t-author { display: flex; align-items: center; justify-content: center; gap: 14px; }
.t-avatar { font-size: 2.2rem; }
.t-name { font-weight: 700; font-size: .95rem; }
.t-role { font-size: .82rem; color: var(--text3); }
.testimonials-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}
.t-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--text2);
  transition: var(--transition);
  background: transparent;
}
.t-arrow:hover { border-color: var(--acc); color: var(--acc); }
.t-dots { display: flex; gap: 8px; }
.t-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: var(--transition);
  cursor: pointer;
  border: none;
}
.t-dot.active { background: var(--acc); width: 24px; border-radius: 4px; }

/* ===== FAQ ===== */
#faq { background: var(--bg); }
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r14);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}
.faq-item.open { border-color: rgba(32,136,202,.3); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  cursor: pointer;
  font-weight: 600;
  font-size: .97rem;
  gap: 16px;
  background: transparent;
  color: var(--text);
  width: 100%;
  text-align: left;
}
.faq-q:hover { background: rgba(255,255,255,.03); }
.faq-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
  transition: var(--transition);
  color: var(--text2);
}
.faq-item.open .faq-icon { background: var(--acc); border-color: var(--acc); color: #fff; transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .3s ease;
  padding: 0 24px;
}
.faq-a-inner { padding: 0 0 22px; font-size: .93rem; color: var(--text2); line-height: 1.8; }
.faq-item.open .faq-a { max-height: 400px; }

/* ===== FAQ Motion (mesmo componente das páginas de serviço, scoped a #faq) ===== */
#faq .faq-list.faq-motion {
  max-width: 820px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 34px;
}
#faq .faq-motion .faq-item {
  border-radius: 30px; border: 1px solid var(--border); background: var(--bgcard);
  box-shadow: 0 1px 2px rgba(0,0,0,.04); margin: 0; overflow: hidden;
  transform: scale(.985); transform-origin: 50% 0%;
  transition: transform .55s cubic-bezier(.22,1.2,.36,1), border-color .4s ease, box-shadow .4s ease, background .4s ease;
}
#faq .faq-motion .faq-item.open {
  transform: scale(1);
  border-color: color-mix(in oklch, var(--acc) 22%, var(--border));
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
#faq .faq-motion:has(.faq-item.open) .faq-item:not(.open):not(:hover) { opacity: .48; transform: scale(.97); }
#faq .faq-motion:hover .faq-item:not(:hover):not(.open) { opacity: .48; transform: scale(.97); }
#faq .faq-motion:hover .faq-item:not(:hover).open { opacity: .82; }
#faq .faq-motion .faq-item:hover {
  border-color: color-mix(in oklch, var(--acc) 32%, var(--border));
  box-shadow: 0 10px 32px rgba(0,0,0,.16); transform: scale(1); opacity: 1;
}
#faq .faq-motion .faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%;
  padding: 20px 24px; background: transparent; border: 0; cursor: pointer; text-align: left;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem); font-weight: 500; line-height: 1.35; color: var(--text);
}
#faq .faq-motion .faq-q:hover { background: transparent; }
#faq .faq-motion .faq-q-text { flex: 1; }
#faq .faq-motion .faq-toggle {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; color: var(--text); background: transparent;
  transition: transform .5s cubic-bezier(.22,1.2,.36,1), background .35s ease, color .35s ease;
}
#faq .faq-motion .faq-item.open .faq-toggle {
  transform: rotate(180deg) scale(1.05);
  background: color-mix(in oklch, var(--acc) 14%, transparent); color: var(--acc);
}
#faq .faq-motion .faq-icon-minus { display: none; }
#faq .faq-motion .faq-item.open .faq-icon-plus { display: none; }
#faq .faq-motion .faq-item.open .faq-icon-minus { display: block; }
#faq .faq-motion .faq-a {
  height: 0; opacity: 0; overflow: hidden; padding: 0; max-height: none;
  transition: height .6s cubic-bezier(.22,1.2,.36,1), opacity .3s ease;
}
#faq .faq-motion .faq-item.open .faq-a { height: var(--faq-h, auto); opacity: 1; }
#faq .faq-motion .faq-a-inner {
  padding: 0 28px 24px; font-size: 1.02rem; line-height: 1.75;
  color: color-mix(in oklch, var(--text) 75%, transparent);
  transform: translateY(-8px); transition: transform .55s cubic-bezier(.22,1.2,.36,1);
}
#faq .faq-motion .faq-item.open .faq-a-inner { transform: translateY(0); }
@media (max-width: 640px) {
  #faq .faq-motion .faq-q { padding: 18px 20px; }
  #faq .faq-motion .faq-a-inner { padding: 0 22px 22px; }
  #faq .faq-motion .faq-toggle { width: 40px; height: 40px; }
}

/* ===== CONTACT ===== */
#contacto { background: var(--bg2); }
.contact-heading {
  text-align: center;
  margin-bottom: 64px;
}
.contact-heading h2 {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 900;
  margin-bottom: 14px;
}
.contact-heading p { font-size: 1.02rem; color: var(--text2); max-width: 480px; margin: 0 auto; }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}
.contact-left { display: flex; flex-direction: column; gap: 14px; }
.contact-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--r14);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}
.contact-card:hover { border-color: rgba(32,136,202,.3); transform: translateY(-2px); }
.contact-card .cc-icon { width: 38px; height: 38px; border-radius: 12px; background: rgba(32,136,202,.1); border: 1px solid rgba(32,136,202,.18); display: grid; place-items: center; color: var(--acc); flex-shrink: 0; }
.contact-card .cc-icon svg { width: 20px; height: 20px; }
.contact-card .cc-label { font-size: .75rem; color: var(--text3); margin-bottom: 2px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.contact-card .cc-val { font-size: .92rem; font-weight: 600; }
.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 18px 28px;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
  border-radius: var(--r50);
  font-weight: 700;
  font-size: 1rem;
  transition: var(--transition);
  border: none;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(37,211,102,.25);
}
.btn-whatsapp:hover { transform: translateY(-3px); box-shadow: 0 12px 36px rgba(37,211,102,.4); }
.btn-whatsapp .btn-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.btn-whatsapp .btn-icon svg { width: 18px; height: 18px; }
.contact-form { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r22); padding: 36px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: .93rem;
  transition: var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--acc);
  box-shadow: 0 0 0 3px rgba(32,136,202,.1);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text3); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group select { cursor: pointer; }
.form-group select option { background: var(--bg2); }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}
.form-check input[type="checkbox"] {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--acc);
}
.form-check label { font-size: .83rem; color: var(--text2); cursor: pointer; }
.form-check label a { color: var(--acc); text-decoration: underline; }
.form-submit .btn { width: 100%; justify-content: center; font-size: 1rem; padding: 16px; }
.form-success {
  display: none;
  text-align: center;
  padding: 32px;
  color: var(--acc);
  font-weight: 600;
  font-size: 1.05rem;
}
.privacy-note { margin-top: 16px; font-size: .78rem; color: var(--text3); text-align: center; }
.privacy-note a { color: var(--acc); text-decoration: underline; }
.error-msg { font-size: .78rem; color: #e05353; margin-top: 5px; display: none; }

/* ===== FOOTER ===== */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 56px;
}
.footer-brand img { height: 42px; margin-bottom: 16px; }
.footer-logo-link { display: inline-block; text-decoration: none; transition: opacity .2s ease; }
.footer-logo-link:hover { opacity: .82; }
/* Telefone do rodapé: número em destaque + indicação de chamada (ASAE) como 2.ª linha subtil */
.footer-phone { display: inline-flex; align-items: flex-start; gap: 8px; }
.footer-phone svg { margin-top: 3px; flex-shrink: 0; }
.footer-phone-txt { display: inline-flex; flex-direction: column; line-height: 1.3; }
.footer-phone-txt small { color: var(--text3); font-size: .68rem; letter-spacing: .01em; margin-top: 2px; }
.cc-note { font-size: .72rem; color: var(--text3); margin-top: 3px; }

/* ===== PÁGINAS LEGAIS ===== */
.legal-page { padding: clamp(120px, 14vh, 180px) 0 clamp(60px, 8vw, 100px); }
.legal-container { max-width: 820px; }
.legal-head { margin-bottom: clamp(28px, 4vw, 44px); }
.legal-eyebrow { display: inline-block; font-family: var(--font-mono, ui-monospace, monospace); font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin-bottom: 10px; }
.legal-head h1 { font-family: var(--font-display); font-size: clamp(2rem, 1rem + 3vw, 3.2rem); font-weight: 900; letter-spacing: -.02em; line-height: 1.05; margin: 0 0 10px; }
.legal-updated { color: var(--text3); font-size: .85rem; }
.legal-body { color: var(--text2); line-height: 1.7; font-size: 1rem; }
.legal-body h2 { color: var(--text); font-family: var(--font-display); font-size: 1.32rem; font-weight: 800; margin: 38px 0 12px; }
.legal-body h3 { color: var(--text); font-size: 1.05rem; font-weight: 700; margin: 22px 0 8px; }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 16px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body a { color: var(--acc); text-decoration: underline; text-underline-offset: 2px; }
.legal-table-wrap { overflow-x: auto; margin: 0 0 16px; }
.legal-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.legal-table th, .legal-table td { border: 1px solid var(--border); padding: 8px 11px; text-align: left; vertical-align: top; }
.legal-table th { background: var(--bg3); color: var(--text); font-weight: 700; }

/* Checkbox de consentimento (modais/formulários) */
.srv-modal-consent { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0; font-size: .82rem; color: var(--text2); line-height: 1.5; }
.srv-modal-consent input { margin-top: 3px; flex-shrink: 0; accent-color: var(--acc); }
.srv-modal-consent a { color: var(--acc); }
.footer-brand p { font-size: .88rem; color: var(--text2); line-height: 1.7; max-width: 300px; }
.footer-col h4 { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a { font-size: .88rem; color: var(--text2); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--acc); }
.footer-contact-item { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--text2); }
.footer-contact-item a { color: var(--text2); transition: var(--transition); }
.footer-contact-item a:hover { color: var(--acc); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: .82rem; color: var(--text3); }
/* Desktop: as duas partes ficam na mesma linha (há um espaço entre os spans no
   HTML). Em mobile passam a bloco, ficando em duas linhas. */
.footer-copy-line { display: inline; }
@media (max-width: 768px) { .footer-copy-line { display: block; } }
.footer-home-link {
  font-size: .82rem;
  color: var(--text3);
  text-decoration: none;
  transition: var(--transition);
  font-weight: 600;
}
.footer-home-link:hover { color: var(--acc); }
.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-legal a { font-size: .82rem; color: var(--text3); transition: var(--transition); text-decoration: none; font-weight: 600; }
.footer-legal a:hover { color: var(--acc); }

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r22);
  max-width: 680px;
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  padding: 44px 44px 44px 48px;
  transform: translateY(20px);
  transition: transform .3s ease;
  position: relative;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in oklch, var(--acc) 45%, transparent) transparent;
}
.modal-box::-webkit-scrollbar { width: 8px; }
.modal-box::-webkit-scrollbar-track { background: transparent; margin: 22px 0; }
.modal-box::-webkit-scrollbar-thumb {
  background: color-mix(in oklch, var(--acc) 40%, transparent);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.modal-box::-webkit-scrollbar-thumb:hover { background: color-mix(in oklch, var(--acc) 60%, transparent); background-clip: padding-box; }
.modal-overlay.open .modal-box { transform: none; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: var(--text2);
  transition: var(--transition);
  background: transparent;
}
.modal-close:hover { border-color: var(--acc); color: var(--acc); }
.modal-box h2 { font-size: 1.6rem; font-weight: 800; margin-bottom: 24px; }
.modal-box h3 { font-size: 1rem; font-weight: 700; margin: 24px 0 8px; color: var(--text); }
.modal-box p, .modal-box li { font-size: .9rem; color: var(--text2); line-height: 1.8; margin-bottom: 8px; }
.modal-box table { width: 100%; border-collapse: collapse; font-size: .82rem; margin: 14px 0 10px; }
.modal-box table th { background: rgba(32,136,202,.12); color: var(--text); font-weight: 700; padding: 8px 10px; text-align: left; border: 1px solid var(--border); }
.modal-box table td { padding: 7px 10px; border: 1px solid var(--border); color: var(--text2); vertical-align: top; }
.modal-box table tr:nth-child(even) td { background: rgba(32,136,202,.04); }
.modal-box ul { padding-left: 18px; list-style: disc; }
.modal-box a { color: var(--acc); text-decoration: underline; }

/* ===== RESPONSIVE ===== */
@media(max-width:1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-text { max-width: 780px; }
  .hero-photo { width: min(560px, 100%); margin: 18px auto 0; }
  .hero-value .hero-photo { justify-content: center; }
  .hero-value .hero-text h1 { max-width: 780px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-photo-wrap { max-width: 400px; margin: 0 auto 40px; }
  .about-stats-box { bottom: -16px; right: -10px; }
  .contact-grid { grid-template-columns: 1fr; }
  .counters-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}
@media(max-width:900px) {
  .p-card.featured { flex-grow: 2; }
}
@media(max-width:1024px) {
  .nav-links { display: none; }
  .nav-right .btn { display: none; }
  .hamburger { display: flex; }
}
/* Telemóveis estreitos: logótipo largo empurrava o hamburger para fora do ecrã (320-390px). */
@media(max-width:480px) {
  #nav .container { padding-left: 14px; padding-right: 14px; }
  #nav .ni { gap: 10px; }
  .nav-logo img { height: 28px; }
  /* Banner de cookies: conteúdo e botões centrados; botões partilham a linha
     ou quebram para duas linhas em ecrãs muito estreitos. */
  #cookie-banner { padding: 16px; justify-content: center; text-align: center; }
  #cookie-banner p { margin-left: auto; margin-right: auto; }
  #cookie-banner .ck-btns { width: 100%; flex-shrink: 1; justify-content: center; }
  #cookie-banner .ck-btns .btn { flex: 1 1 140px; padding: 10px 12px; }
}
@media(max-width:768px) {
  #hero { padding: 120px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-text h1 { font-size: clamp(2.55rem, 13vw, 4.6rem); letter-spacing: -.055em; }
  .hero-proofline { margin-left: auto; margin-right: auto; }
  .hero-btns { justify-content: center; }
  .hero-badges { justify-content: center; }
  .hero-photo { min-height: 470px; margin-top: 32px; max-width: 390px; margin-left: auto; margin-right: auto; }
  .hero-value .hero-photo { min-height: auto; margin-top: 22px; }
  .hero-photo-frame { width: 86%; margin: 0 auto; border-radius: 28px; }
  .hero-diagnostic-card { left: 50%; transform: translateX(-50%); bottom: 8px; width: min(340px, 92%); text-align: left; }
  .float-card { display: none; }
  .about-photo-wrap { max-width: 300px; }
  /* Filtros do portfolio: em mobile deixam de embrulhar num bloco central
     irregular (varias linhas) e passam a uma tira horizontal deslizavel numa
     so linha (chips), com bleed ate as margens do ecra. O filtro activo desliza
     para a vista via JS. */
  .portfolio-filters {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scroll-padding-left: 24px;
    gap: 8px;
    margin-left: -24px;
    margin-right: -24px;
    padding: 4px 24px;
    scrollbar-width: none;
  }
  .portfolio-filters::-webkit-scrollbar { display: none; }
  .pf-btn { flex: 0 0 auto; scroll-snap-align: start; white-space: nowrap; }
  .p-row { flex-direction: column; }
  .p-card.featured, .p-card { flex-grow: 1; min-height: 220px; }
  /* Em modo filtro, os cards de span 1/2/3 forcavam larguras de 33/66/100% (grelha
     de desktop), o que em mobile os encolhia para quadrados minusculos. Aqui todos
     ocupam a largura total, tal como acontece em "Todos". */
  .portfolio-grid.filtering .p-card[data-span="1"],
  .portfolio-grid.filtering .p-card[data-span="2"],
  .portfolio-grid.filtering .p-card[data-span="3"] { flex: 1 0 100%; max-width: 100%; min-height: 220px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; text-align: center; }
  .footer-brand p { margin-left: auto; margin-right: auto; }
  .footer-col { text-align: center; }
  .footer-col ul { align-items: center; }
  .footer-contact-item { justify-content: center; }
  .footer-bottom { flex-direction: column; text-align: center; }
  /* Links legais em 2+2 (evita ficar 3 numa linha e 1 na seguinte, sobretudo em EN). */
  .footer-legal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; justify-items: center; }
  .footer-legal a { text-align: center; }
  .modal-box { padding: 32px 24px; }
  .t-inner { padding: 32px 24px; }
  .about-values { grid-template-columns: 1fr; }
}
@media(max-width:480px) {
  .hero-kicker { font-size: .68rem; letter-spacing: .14em; }
  .hero-badge { font-size: .68rem; padding: 5px 10px; }
  .hero-cinematic .btn { width: 100%; justify-content: center; }
  .hero-photo { min-height: 430px; }
  .hero-diagnostic-card { padding: 16px 17px; }
  .hero-diagnostic-card p { font-size: .86rem; }
  .counters-grid { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr; }
}

/* ===== SERVICES TABS ===== */
.srv-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.srv-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r50);
  border: 1.5px solid var(--border);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text2);
  background: transparent;
  transition: var(--transition);
  cursor: pointer;
}
.srv-tab:hover { color: var(--text); border-color: rgba(32,136,202,.3); }
.srv-tab .tab-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; color: currentColor; opacity: .9; }
.srv-tab .tab-icon svg { width: 18px; height: 18px; }
.srv-tab.active {
  background: var(--acc);
  color: #fff;
  border-color: var(--acc);
}
.srv-panels { position: relative; }
.srv-panel { display: none; }
.srv-panel.active { display: block; }
.srv-panel-header {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 36px;
  padding: 28px 32px;
  background: var(--bgcard);
  border: 1px solid var(--border);
  border-radius: var(--r22);
  border-left: 3px solid var(--acc);
}
.srv-panel-icon { width: 46px; height: 46px; flex-shrink: 0; margin-top: 2px; border-radius: 14px; background: rgba(32,136,202,.1); border: 1px solid rgba(32,136,202,.18); display: grid; place-items: center; color: var(--acc); }
.srv-panel-icon svg { width: 24px; height: 24px; }
.srv-panel-title { font-size: 1.4rem; font-weight: 800; margin-bottom: 8px; }
.srv-panel-desc { font-size: .92rem; color: var(--text2); line-height: 1.7; }
.srv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.srv-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 20px;
  background: var(--bgcard);
  border: 1px solid var(--border);
  border-radius: var(--r14);
  transition: var(--transition);
}
.srv-item:hover {
  border-color: rgba(32,136,202,.3);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(32,136,202,.1);
}
.srv-item-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(32,136,202,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.srv-item:hover .srv-item-icon { background: var(--acc); }
.srv-item-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--acc);
  transition: var(--transition);
}
.srv-item:hover .srv-item-icon svg { stroke: #fff; }
.srv-item-content h4 { font-size: .9rem; font-weight: 700; margin-bottom: 6px; }
.srv-item-content p { font-size: .82rem; color: var(--text2); line-height: 1.6; }
@media(max-width:900px) {
  .srv-grid { grid-template-columns: 1fr 1fr; }
}
@media(max-width:600px) {
  .srv-grid { grid-template-columns: 1fr; }
  .srv-tab { padding: 10px 16px; font-size: .82rem; }
  .srv-panel-header { flex-direction: column; gap: 12px; padding: 20px; }
}

/* ===== SECTION DIVIDER SPACING ===== */
.section-divider > .container > .section-header,
.section-divider > .container > .about-grid,
.section-divider > .container > .contact-heading {
  padding-top: 0;
}

/* ===== PORTFOLIO CARD IMPROVEMENTS ===== */
.p-card { cursor: pointer; }
.p-card-video-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.p-card-video-bg video,
.p-card-video-bg iframe,
.p-card-video-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.p-card-logo-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-bottom: 90px;
}
.p-card-logo-bg img {
  max-width: 65%;
  max-height: 55%;
  object-fit: contain;
  filter: drop-shadow(0 4px 16px rgba(0,0,0,.5));
  position: relative;
  z-index: 1;
}
.p-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.65) 100%);
  z-index: 1;
}
.p-card-center-title {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,.6);
  padding: 0 20px;
}
.p-info { z-index: 3; }

/* Portfolio Modal */
.modal-portfolio-box { max-width: 560px; }
.mp-cat {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--acc);
  margin-bottom: 10px;
}
.mp-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.3;
}
.mp-section { margin-bottom: 20px; }
.mp-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}
.mp-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.mp-service-tag {
  font-size: .8rem;
  font-weight: 600;
  color: var(--acc);
  background: rgba(32,136,202,.1);
  border: 1px solid rgba(32,136,202,.2);
  border-radius: 20px;
  padding: 4px 12px;
}
.mp-desc {
  font-size: .93rem;
  color: var(--text2);
  line-height: 1.8;
}
.mp-url { margin-top: 24px; }

/* Logo card label */
.p-card-logo-label {
  position: relative;
  z-index: 2;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
  margin-top: 14px;
  text-align: center;
  padding: 0 16px;
}

/* ===== QUOTE MODAL ===== */
#quote-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  z-index: 2000; display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
#quote-backdrop.open { opacity: 1; pointer-events: all; }
#quote-modal {
  background: var(--bgcard); border: 1px solid var(--border);
  border-radius: var(--r22); width: 100%; max-width: 780px;
  max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column;
  transform: translateY(24px); transition: transform .3s ease;
  box-shadow: 0 32px 80px rgba(0,0,0,.4);
}
#quote-backdrop.open #quote-modal { transform: translateY(0); }
.qm-header {
  padding: 28px 32px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; background: var(--bgcard); z-index: 1;
  border-radius: var(--r22) var(--r22) 0 0;
}
.qm-header-text h2 { font-size: 1.25rem; font-weight: 700; margin: 0 0 4px; }
.qm-header-text p { font-size: .85rem; color: var(--text2); margin: 0; }
.qm-close { background: none; border: 1px solid var(--border); color: var(--text);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .2s, border-color .2s; }
.qm-close:hover { background: var(--border); }
.qm-progress {
  padding: 16px 32px 0; display: flex; align-items: center; gap: 0;
}
.qm-step-dot {
  display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1;
}
.qm-step-dot:last-child { flex: 0; }
.qm-dot {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: var(--text3);
  transition: background .3s, border-color .3s, color .3s; background: var(--bgcard);
}
.qm-dot.active { border-color: var(--accent); color: var(--accent); }
.qm-dot.done { background: var(--accent); border-color: var(--accent); color: #fff; }
.qm-step-label { font-size: .68rem; color: var(--text3); white-space: nowrap; }
.qm-step-label.active { color: var(--accent); }
.qm-connector { flex: 1; height: 2px; background: var(--border); margin-bottom: 18px;
  transition: background .3s; }
.qm-connector.done { background: var(--accent); }
.qm-body { padding: 28px 32px; flex: 1; }
.qm-step { display: none; }
.qm-step.active { display: block; }
.qm-step-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; }
.qm-step-sub { font-size: .85rem; color: var(--text2); margin: 0 0 22px; }
/* Category cards */
.qm-cats { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.qm-cat-card {
  border: 2px solid var(--border); border-radius: 14px; padding: 18px 16px;
  cursor: pointer; transition: border-color .2s, background .2s;
  display: flex; align-items: flex-start; gap: 14px;
}
.qm-cat-card:hover { border-color: var(--accent); background: rgba(32,136,202,.06); }
.qm-cat-card.selected { border-color: var(--accent); background: rgba(32,136,202,.1); }
.qm-cat-icon {
  width: 40px; height: 40px; border-radius: 10px; background: rgba(32,136,202,.15);
  flex-shrink: 0; color: var(--accent); display: grid; place-items: center;
}
.qm-cat-icon svg { width: 21px; height: 21px; }
.qm-cat-info h4 { font-size: .9rem; font-weight: 700; margin: 0 0 3px; }
.qm-cat-info p { font-size: .78rem; color: var(--text2); margin: 0; }
/* Services checkboxes */
.qm-services { display: flex; flex-direction: column; gap: 10px; }
.qm-svc-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer;
  transition: border-color .2s, background .2s;
}
.qm-svc-item:hover { border-color: var(--accent); background: rgba(32,136,202,.05); }
.qm-svc-item input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.qm-svc-item label { cursor: pointer; font-size: .88rem; flex: 1; }
/* Project step */
.qm-field { margin-bottom: 18px; }
.qm-field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; }
.qm-field textarea, .qm-field input, .qm-field select {
  width: 100%; background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: 10px; padding: 12px 14px; color: var(--text);
  font-family: inherit; font-size: .9rem; transition: border-color .2s;
  resize: vertical;
}
.qm-field textarea:focus, .qm-field input:focus, .qm-field select:focus {
  outline: none; border-color: var(--accent);
}
.qm-field textarea { min-height: 110px; }
.qm-urgency-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.qm-urgency-btn {
  padding: 8px 16px; border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--text2);
  background: none; transition: border-color .2s, color .2s, background .2s;
}
.qm-urgency-btn.sel { border-color: var(--accent); color: var(--accent); background: rgba(32,136,202,.1); }
/* Urgency type buttons */
.qm-urgency-wrap { display: flex; flex-direction: column; gap: 14px; }
.qm-urg-main { display: flex; gap: 12px; }
.qm-urg-type-btn {
  flex: 1; padding: 10px 16px; border: 2px solid var(--border); border-radius: 10px;
  cursor: pointer; font-size: .9rem; font-weight: 700; background: none; color: var(--text2);
  transition: border-color .2s, color .2s, background .2s;
}
.qm-urg-no:hover { border-color: #22c55e; color: #22c55e; }
.qm-urg-no.sel { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.1); }
.qm-urg-yes:hover { border-color: #ef4444; color: #ef4444; }
.qm-urg-yes.sel { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,.1); }
.qm-urg-sub { margin-top: 4px; }
.qm-urg-sublabel { font-size: .8rem; color: var(--text3); margin: 0 0 8px; }
.qm-urg-deadline {
  padding: 7px 14px; border: 1.5px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--text2);
  background: none; transition: border-color .2s, color .2s, background .2s;
}
.qm-urg-deadline:hover { border-color: var(--accent); color: var(--accent); }
.qm-urg-deadline.sel { border-color: var(--accent); color: var(--accent); background: rgba(32,136,202,.1); }
/* Contact step */
.qm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qm-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; }
.qm-check input { width: 16px; height: 16px; accent-color: var(--accent); margin-top: 2px; flex-shrink: 0; }
.qm-check label { font-size: .82rem; color: var(--text2); }
.qm-check label a { color: var(--accent); font-weight: 700; text-decoration: underline; }
/* Summary */
.qm-summary {
  background: rgba(32,136,202,.07); border: 1px solid rgba(32,136,202,.2);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 20px;
}
.qm-summary h4 { font-size: .82rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .07em; margin: 0 0 10px; }
.qm-summary-item { font-size: .82rem; color: var(--text2); padding: 2px 0; }
.qm-summary-item::before { content: "· "; color: var(--accent); }
/* Footer */
.qm-footer {
  padding: 20px 32px 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  position: sticky; bottom: 0; background: var(--bgcard);
  border-radius: 0 0 var(--r22) var(--r22);
}
.qm-btn-back { background: none; border: 1.5px solid var(--border); color: var(--text);
  padding: 10px 20px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: .88rem;
  transition: border-color .2s, background .2s; }
.qm-btn-back:hover { border-color: var(--accent); background: rgba(32,136,202,.06); }
.qm-btn-next { background: var(--accent); color: #fff; border: none;
  padding: 10px 28px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: .9rem;
  transition: opacity .2s, box-shadow .2s; box-shadow: 0 0 0 0 rgba(32,136,202,0); }
.qm-btn-next:hover { opacity: .88; }
.qm-btn-next.final { box-shadow: 0 4px 18px rgba(32,136,202,.55); font-size: .95rem; padding: 12px 36px; }
.qm-err { font-size: .8rem; color: #e05; display: none; }
/* Success */
/* Aviso ao sair (dialogo do proprio site, sobreposto ao modal) */
.qm-confirm {
  position: fixed; inset: 0; z-index: 2100;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(6,10,15,.72);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s ease;
}
/* Enquanto tem [hidden] fica escondido (nao intercepta cliques); ao remover mostra. */
.qm-confirm:not([hidden]) { display: flex; }
.qm-confirm.open { opacity: 1; }
.qm-confirm-box {
  width: min(380px, 100%); text-align: center;
  background: var(--bgcard); border: 1px solid var(--border);
  border-radius: var(--r22); padding: 28px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.qm-confirm-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }
.qm-confirm-text { font-size: .9rem; color: var(--text2); margin: 0 0 20px; line-height: 1.5; }
.qm-confirm-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.qm-confirm-stay, .qm-confirm-leave {
  flex: 1 1 140px; padding: 11px 16px; border-radius: 999px;
  font-family: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.qm-confirm-stay { border: none; background: var(--accent); color: #fff; }
.qm-confirm-stay:hover { filter: brightness(1.08); }
.qm-confirm-leave { border: 1px solid var(--border); background: transparent; color: var(--text2); }
.qm-confirm-leave:hover { border-color: var(--text2); color: var(--text); }

.qm-success { text-align: center; padding: 48px 32px; display: none; }
.qm-success-icon { font-size: 3rem; margin-bottom: 16px; }
.qm-success h3 { font-size: 1.3rem; font-weight: 700; margin: 0 0 8px; }
.qm-success p { color: var(--text2); font-size: .9rem; }
@media(max-width:600px) {
  #quote-backdrop { padding: 0; align-items: flex-end; }
  #quote-modal { max-width: 100%; max-height: 94vh; border-radius: var(--r22) var(--r22) 0 0; }
  .qm-cats { grid-template-columns: 1fr; gap: 10px; }
  .qm-row { grid-template-columns: 1fr; }
  .qm-body { padding: 20px 16px; }
  .qm-header { padding: 18px 16px 14px; }
  .qm-header-text h2 { font-size: 1.1rem; }
  .qm-footer { padding: 14px 16px 18px; }
  .qm-progress { padding: 12px 16px 0; }
  /* Passos: esconder rótulos de texto, ficam só as bolinhas numeradas */
  .qm-step-label { display: none; }
  /* Urgência: os dois botões principais empilham; prazos ocupam a largura toda */
  .qm-urg-main { flex-direction: column; }
  .qm-urg-type-btn { width: 100%; }
  .qm-urgency-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .qm-urg-deadline { width: 100%; }
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch { display:flex; align-items:center; gap:9px; margin-right:16px; }
.lang-btn { font-size:.78rem; font-weight:700; line-height:1; color:var(--text3); text-decoration:none; transition:color .2s; }
.lang-btn:hover, .lang-btn.lang-active { color:var(--accent); }
/* Separador como linha fina de 1px (alinhamento exacto, sem métricas do glifo "|") */
.lang-sep { width:1px; height:11px; background:var(--border); font-size:0; line-height:0; user-select:none; }
.fab-wrap {
  position: fixed; bottom: 28px; right: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  z-index: 900;
}
.fab {
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; text-decoration: none;
  transition: transform .2s, box-shadow .2s, opacity .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.fab:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.4); }

/* WhatsApp */
.fab-wa { background: #25d366; color: #fff; }
.fab-wa:hover { background: #1ebe5d; }

/* Voltar ao topo */
.fab-top {
  background: var(--bgcard); color: var(--text2);
  border: 1.5px solid var(--border);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .2s, box-shadow .2s;
}
.fab-top.visible { opacity: 1; pointer-events: auto; }
.fab-top:hover { color: var(--accent); border-color: var(--accent); }

@media(max-width: 600px) {
  .fab-wrap { bottom: 20px; right: 16px; }
  .fab { width: 46px; height: 46px; }
}

/* ── Page transitions ──────────────────────────────────────────────────────── */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
/* O fade de entrada é feito no #main (e rodapé), NÃO no body. Se fosse no body, a sua
   opacity < 1 durante a animação desativava o backdrop-filter do mega-menu (o body é
   ancestral do #nav). O #main é irmão do #nav, por isso a sua opacity não afeta o vidro. */
#main, body > footer { animation: pageFadeIn .32s ease both; }
@keyframes pageFadeOut {
  to { opacity: 0; }
}
.page-fade-out { animation: pageFadeOut .2s ease both !important; }

/* ── Hero background video ─────────────────────────────────────────────────── */
.hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.12; z-index: 0;
  pointer-events: none;
}

/* ── Portfolio gallery carousel ─────────────────────────────────────────────── */
.mp-gallery-carousel { position:relative; border-radius:10px; overflow:hidden; margin-bottom:4px; }
.mp-gallery-track-wrap { overflow:hidden; border-radius:10px; }
.mp-gallery-track { display:flex; transition:transform .3s ease; }
.mp-gallery-img { min-width:100%; width:100%; height:220px; object-fit:cover; flex-shrink:0; border-radius:10px; }
.mp-gallery-btn {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(0,0,0,.55); color:#fff; border:none; border-radius:50%;
  width:34px; height:34px; font-size:1.4rem; line-height:1;
  cursor:pointer; z-index:2; display:flex; align-items:center; justify-content:center;
  transition:background .15s;
}
.mp-gallery-btn:hover { background:rgba(32,136,202,.85); }
.mp-gallery-prev { left:8px; }
.mp-gallery-next { right:8px; }
.mp-gallery-dots { display:flex; justify-content:center; gap:6px; padding:8px 0 0; }
.mp-gallery-dot { width:7px; height:7px; border-radius:50%; background:var(--border); cursor:pointer; transition:background .2s; }
.mp-gallery-dot.active { background:var(--accent); }

/* ── Responsive video embed (YouTube/Vimeo shortcodes) ──────────────────────── */
.video-embed-wrap {
  position: relative; padding-bottom: 56.25%; height: 0;
  overflow: hidden; border-radius: 10px; margin: 1.5rem 0;
}
.video-embed-wrap iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border-radius: 10px;
}

.srv-tab { gap: 8px; }
.srv-tab .tab-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; color: currentColor; opacity: .9; }
.srv-tab .tab-icon svg { width: 18px; height: 18px; }
.btn-whatsapp { gap: 10px; }
.btn-whatsapp .btn-icon { display: inline-grid; place-items: center; width: 18px; height: 18px; }
.btn-whatsapp .btn-icon svg { width: 18px; height: 18px; }

/* ── Heroes sans (item 7 corrigido) ────────────────────────────────────────────
   Serviços, Portfólio, Blog/Perspetivas e PC Builder mudam apenas o tipo de letra
   para Hanken Grotesk, mantendo a espessura que já tinham (900). Sem gradiente. A
   parte destacada (onde existe) usa o azul do logótipo via .grad base (azul→azul).
   Os heroes serifados (homepage/Sobre) mantêm a Instrument Serif com destaque azul. */
.srv-hero-title,
.portfolio-hero h1,
.blog-hero h1,
.srv-index-hero h1,
.srv-search-hero h1,
.pc-hero h1 {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, sans-serif;
}

/* ═══════════ SERVIÇOS (homepage) — bento desktop + lista editorial mobile ═══
   Desktop: bento assimétrico com Informática & Web em destaque + tile PC Builder.
   Mobile: sem bento — lista editorial (numeração mono, hairlines), PC como CTA. */
.svc-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "tech tech media"
    "tech tech design"
    "consulting pcb pcb";
  gap: 16px;
}
.svc-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: clamp(1.3rem, 1rem + 1vw, 1.9rem);
  background: var(--bgcard);
  border: 1px solid var(--border);
  border-radius: var(--r14, 14px);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  transition: transform .35s var(--ease-out-expo, ease), border-color .35s ease, box-shadow .35s ease;
}
.svc-tile:hover {
  transform: translateY(-4px);
  border-color: color-mix(in oklch, var(--acc) 55%, var(--border));
  box-shadow: 0 16px 44px rgba(0,0,0,.28);
}
.svc-tile-media      { grid-area: media; }
.svc-tile-design     { grid-area: design; }
.svc-tile-tech       { grid-area: tech; }
.svc-tile-consulting { grid-area: consulting; }
.svc-tile-pcb        { grid-area: pcb; }

.svc-tile-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.svc-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--acc) 10%, transparent);
  color: var(--acc);
}
.svc-tile-icon svg { width: 19px; height: 19px; }
.svc-tile-num {
  font-family: var(--font-mono, monospace);
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--text3);
}
.svc-tile-title {
  font-family: var(--font-display, inherit);
  font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0;
}
.svc-tile-intro {
  font-size: .92rem;
  color: var(--text2);
  line-height: 1.55;
  margin: 0;
}
.svc-tile-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.svc-tile-list li {
  font-size: .88rem;
  color: var(--text2);
  padding-left: 16px;
  position: relative;
}
.svc-tile-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .52em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: color-mix(in oklch, var(--acc) 60%, transparent);
}
.svc-tile-cta {
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--font-mono, monospace);
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--acc);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.svc-tile-cta span { transition: transform .3s var(--ease-out-expo, ease); }
.svc-tile:hover .svc-tile-cta span { transform: translateX(4px); }

/* Destaque (Informática & Web): dot-grid de fundo + lista em duas colunas */
.svc-tile-feature {
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.09) 1px, transparent 1px) 0 0 / 30px 30px,
    linear-gradient(160deg, color-mix(in oklch, var(--acc) 10%, var(--bgcard)) 0%, var(--bgcard) 55%);
}
.svc-tile-feature .svc-tile-title { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); }
.svc-tile-feature .svc-tile-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 18px;
}

/* PC Builder: tile especial com contorno em gradiente do acento */
.svc-tile-pcb {
  border-color: color-mix(in oklch, var(--acc) 42%, var(--border));
  background: linear-gradient(120deg, color-mix(in oklch, var(--acc) 14%, var(--bgcard)) 0%, var(--bgcard) 62%);
}
.svc-tile-pcb .svc-tile-num { color: var(--acc); }

.svc-bento-foot { margin-top: 26px; text-align: center; }

/* ── Mobile/tablet: lista editorial premium (sem bento) ───────────────────── */
@media (max-width: 860px) {
  .svc-bento { display: block; }
  .svc-tile {
    background: transparent;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
    padding: 22px 2px;
    display: grid;
    grid-template-columns: 44px 1fr 22px;
    grid-template-areas:
      "num title arrow"
      "num list arrow";
    align-items: start;
    column-gap: 12px;
    row-gap: 6px;
    overflow: visible;
  }
  .svc-tile:hover { transform: none; box-shadow: none; }
  .svc-tile:last-of-type { border-bottom: 1px solid var(--border); }
  .svc-tile-kicker { grid-area: num; flex-direction: column; align-items: flex-start; gap: 6px; }
  .svc-tile-icon { display: none; }
  .svc-tile-num { font-size: .95rem; color: var(--acc); }
  .svc-tile-title { grid-area: title; font-size: 1.35rem; }
  .svc-tile-intro { display: none; }
  /* Inclui o destaque: a regra .svc-tile-feature .svc-tile-list (grid de 2
     colunas no desktop) tem mais especificidade e mantinha o grid em mobile,
     "blockificando" os li e partindo a linha "a · b · c". */
  .svc-tile-list,
  .svc-tile-feature .svc-tile-list { grid-area: list; display: block; }
  .svc-tile-list li {
    display: inline;
    padding-left: 0;
    font-size: .85rem;
    color: var(--text3);
  }
  .svc-tile-list li::before { content: none; }
  .svc-tile-list li + li::before {
    content: '\00B7';
    position: static;
    background: none;
    width: auto;
    height: auto;
    margin: 0 .45em;
    color: var(--text3);
  }
  .svc-tile-cta {
    grid-area: arrow;
    align-self: center;
    margin-top: 0;
    padding-top: 0;
    font-size: 1.1rem;
    font-family: inherit;
  }
  .svc-tile-cta-label { display: none; } /* esconde o texto, fica só a seta */
  /* PC Builder: volta a cartão, como CTA premium no fim da lista */
  .svc-tile-pcb {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: clamp(1.2rem, 5vw, 1.6rem);
    background: linear-gradient(120deg, color-mix(in oklch, var(--acc) 14%, var(--bgcard)) 0%, var(--bgcard) 62%);
    border: 1px solid color-mix(in oklch, var(--acc) 42%, var(--border));
    border-radius: var(--r14, 14px);
  }
  .svc-tile-pcb .svc-tile-kicker { flex-direction: row; align-items: center; }
  .svc-tile-pcb .svc-tile-icon { display: inline-flex; }
  .svc-tile-pcb .svc-tile-intro { display: block; }
  .svc-tile-pcb .svc-tile-cta {
    font-family: var(--font-mono, monospace);
    font-size: .8rem;
    align-self: flex-start;
  }
  .svc-tile-pcb .svc-tile-cta-label { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-tile, .svc-tile-cta span { transition: none; }
}

/* Hero da homepage — a foto (mesma do antigo card) é o FUNDO à direita, com
   máscara à esquerda para o texto ler. Mesma linguagem do hero da Sobre, agora
   em TODOS os browsers. */
.hero-cinematic.hero-value .hero-bg-photo {
  position: absolute;
  top: 0;
  right: 0;
  width: 54%;
  height: 100%;
  object-fit: cover;
  object-position: 62% top;
  z-index: -2;
  pointer-events: none;
  /* Tratamento editorial: quase-monocromático (apanha o azul ambiente do hero
     por baixo) para a foto FUNDIR no fundo escuro em vez de parecer colada. */
  filter: grayscale(.6) saturate(.85) contrast(1.08) brightness(.9);
  /* Dissolve suave à esquerda (para o texto ler) e na base; fade mais gradual =
     melhor fusão com o preto. Duas máscaras combinadas por interseção. */
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.3) 40%, #000 72%),
    linear-gradient(180deg, #000 46%, rgba(0,0,0,.4) 78%, transparent 100%);
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.3) 40%, #000 72%),
    linear-gradient(180deg, #000 46%, rgba(0,0,0,.4) 78%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
@media (max-width: 900px) {
  /* Mobile: em vez de um fantasma ténue atrás do texto, a foto passa a um
     retrato ancorado em baixo, a emergir do preto (o texto fica na metade
     superior, limpa). */
  .hero-cinematic.hero-value .hero-bg-photo {
    width: 100%;
    height: 66%;
    top: auto;
    bottom: 0;
    opacity: .55;
    object-position: center 15%;
    filter: grayscale(.6) saturate(.85) contrast(1.05) brightness(.8);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 42%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.5) 42%, #000 100%);
  }
}

/* Contacto — bloco de garantias de acesso (tom premium: acesso direto, resposta
   pessoal, selectividade). Fica no topo da coluna esquerda, antes dos canais. */
.contact-assure {
  list-style: none;
  margin: 0 0 20px;
  padding: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  border-bottom: 1px solid var(--border);
}
.contact-assure li {
  position: relative;
  padding-left: 22px;
  color: var(--text2);
  font-size: .95rem;
  line-height: 1.5;
}
.contact-assure li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acc);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--acc) 18%, transparent);
}
