/* Digital BX: estilos de todas as paginas. Estrutura inspirada na beans.agency. */

:root {
  --ink: #17150f;
  --paper: #faf6ee;
  --red: #c00000;
  --graphite: #5b554b;
  --bg: #faf6ee;
  --fg: var(--ink);
  --muted: var(--graphite);
  --accent: var(--red);

  /* curvas da skill de animacao: entradas com ease-out forte, mudancas no ecra com ease-in-out forte */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --col-left: 240px;
  --col-right: 64px;
}

body.is-dark { --fg: var(--paper); --muted: rgba(250, 246, 238, .72); --accent: var(--paper); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-optical-sizing: auto;
  color: var(--fg);
  background-color: var(--bg);
  transition: background-color 700ms var(--ease-in-out), color 700ms var(--ease-in-out);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

/* ---------- navegacao fixa ---------- */

.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 48px;
  pointer-events: none;
  /* faixa com a cor da seccao, para o texto nao passar por baixo do logotipo */
  background-color: var(--bg);
  transition: background-color 700ms var(--ease-in-out);
}
.top a, .top button { pointer-events: auto; }
.top-logo { position: relative; display: block; width: 132px; }
.top-logo img { width: 100%; transition: opacity 400ms ease; }
.top-logo .logo-branco { position: absolute; inset: 0; margin: auto; opacity: 0; }
body.is-dark .top-logo .logo-cor { opacity: 0; }
body.is-dark .top-logo .logo-branco { opacity: 1; }
.top-cta {
  border: 0; cursor: pointer; font-family: inherit;
  padding: 13px 22px;
  background: var(--ink); color: var(--paper);
  border-radius: 4px;
  font-size: 14px; font-weight: 700; letter-spacing: .02em; text-decoration: none;
  transition: background-color 300ms ease, color 300ms ease;
}
body.is-dark .top-cta { background: var(--paper); color: var(--ink); }

/* ---------- menu do topo (computador) e hamburguer (telemovel) ---------- */

.top-nav { display: flex; gap: 30px; margin-left: auto; margin-right: 30px; }
.top-nav a { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--fg); transition: color 300ms ease; }
.top-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .35em; }
.menu-btn { display: none; pointer-events: auto; position: relative; z-index: 2; width: 44px; height: 44px; margin-left: 10px; border: 0; border-radius: 50%; background: transparent; color: var(--fg); cursor: pointer; }
.menu-btn-linhas { position: absolute; left: 11px; right: 11px; top: 50%; height: 10px; transform: translateY(-50%); }
.menu-btn-linhas span { position: absolute; left: 0; right: 0; height: 2px; border-radius: 1px; background: currentColor; transition: transform 300ms var(--ease-out), top 300ms var(--ease-out); }
.menu-btn-linhas span:first-child { top: 0; }
.menu-btn-linhas span:last-child { top: 8px; }
body.menu-aberto .menu-btn-linhas span:first-child { top: 4px; transform: rotate(45deg); }
body.menu-aberto .menu-btn-linhas span:last-child { top: 4px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 49; display: flex; flex-direction: column; justify-content: space-between;
  padding: 160px 24px 36px; background: var(--ink); overflow-y: auto; color: var(--paper);
  opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease-out), visibility 0s linear 300ms;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-out); }
.menu-links { display: grid; gap: 6px; }
.menu-links a {
  font-size: clamp(38px, 11vw, 56px); line-height: 1.1; font-weight: 800; letter-spacing: -.035em; text-decoration: none;
  transform: translate3d(0, 16px, 0); opacity: 0; transition: transform 500ms var(--ease-out), opacity 500ms var(--ease-out);
}
.menu.is-open .menu-links a { transform: none; opacity: 1; }
.menu.is-open .menu-links a:nth-child(2) { transition-delay: 40ms; }
.menu.is-open .menu-links a:nth-child(3) { transition-delay: 80ms; }
.menu.is-open .menu-links a:nth-child(4) { transition-delay: 120ms; }
.menu.is-open .menu-links a:nth-child(5) { transition-delay: 160ms; }
.menu-links a[aria-current="page"] { color: #f2c9bf; }
.menu-foot { display: grid; gap: 6px; font-size: 16px; font-weight: 600; color: rgba(250, 246, 238, .72); }
.menu-foot a { text-decoration: none; }
/* com o menu aberto o cabecalho fica sobre fundo escuro */
body.menu-aberto .top { background-color: var(--ink); }
body.menu-aberto .top-logo .logo-cor { opacity: 0; }
body.menu-aberto .top-logo .logo-branco { opacity: 1; }
body.menu-aberto .menu-btn { color: var(--paper); }
body.menu-aberto .top-cta { background: var(--paper); color: var(--ink); }

.foot-nav { display: grid; gap: 4px; margin-top: 36px; }
.foot-nav a { font-size: 15px; font-weight: 700; text-decoration: none; color: var(--muted); transition: color 300ms ease; }
@media (hover: hover) and (pointer: fine) {
  .top-nav a:hover { color: var(--red); }
  body.is-dark .top-nav a:hover, .foot-nav a:hover { color: #f2c9bf; }
}

/* ---------- cartoes de servicos (inicio e pagina de servicos) ---------- */

.svc-cards-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.svc-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 56px 32px; margin-top: 72px; }
.page-intro + .svc-cards-sec { padding-top: 20px; }
.page-intro + .svc-cards-sec .svc-cards { margin-top: 0; }
.svc-card { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.svc-card-img { display: block; overflow: hidden; aspect-ratio: 4 / 5; border-radius: 18px; background: #f1ece2; }
.svc-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.svc-card-icone { display: grid; place-items: center; background: var(--tone); }
.svc-card-icone .svc-icon { width: 38%; height: auto; }
.svc-card-icone .svc-icon .c-main { fill: var(--paper); }
.svc-card-title { margin-top: 20px; font-size: clamp(26px, 2.2vw, 34px); line-height: 1.05; font-weight: 800; letter-spacing: -.03em; }
.svc-card-text { margin-top: 10px; font-size: 16px; line-height: 1.5; color: var(--graphite); }
.svc-card-btn {
  align-self: flex-start; margin-top: 18px; padding: 10px 16px; border: 1.5px solid var(--red); border-radius: 999px;
  color: var(--red); font-size: 14px; font-weight: 700; transition: background-color 250ms ease, color 250ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .svc-card:hover .svc-card-img img { transform: scale(1.04); }
  .svc-card:hover .svc-card-btn { background: var(--red); color: var(--paper); }
}

/* ---------- paginas interiores: introducao, portfolio, quem somos, contacto ---------- */

.page-intro { padding-top: 190px; padding-bottom: 80px; }
.page-intro .lead { max-width: 30em; }
.cases-pagina { padding-top: 40px; }
.cases-mais { display: inline-block; margin-top: 24px; text-decoration: none; }
.team-pagina { padding-top: 190px; }
.contact-pagina { padding-top: 180px; }
.contact-h1 { font-size: clamp(56px, 7vw, 110px); }
.contact-pagina .lead { max-width: 26em; margin-top: 28px; color: rgba(250, 246, 238, .78); }
.contact-form-wrap { max-width: 520px; margin-top: 36px; scroll-margin-top: 120px; }
.contact-pagina .contact-side .follow { margin-top: 30px; }
.contact-pagina .contact-side .follow:first-child { margin-top: 12px; }
.contact-line { display: block; margin-top: 6px; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.35; font-weight: 600; text-decoration: none; color: var(--paper); }

.side-nav {
  position: fixed; left: 56px; bottom: 124px; z-index: 50;
  display: grid; gap: 4px;
}
.side-nav a {
  font-size: 13px; font-weight: 700; text-decoration: none;
  color: var(--muted);
  transition: color 300ms ease;
}
.side-nav a.is-active { color: var(--fg); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- WhatsApp: canto inferior direito, verde oficial (unica excecao a paleta) ---------- */

.wa-float {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: #25d366; color: #fff;
  box-shadow: 0 10px 28px rgba(23, 21, 15, .22);
  transition: transform 200ms var(--ease-out), background-color 200ms ease;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) { .wa-float:hover { background: #1da851; transform: scale(1.05); } }

/* ---------- painel «Fala connosco», gaveta que abre da direita como o «Say hello» da Beans ---------- */

.hello { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.hello.is-open { pointer-events: auto; }
.hello-overlay {
  position: absolute; inset: 0; background: rgba(192, 120, 104, .55);
  opacity: 0; transition: opacity 400ms var(--ease-out);
}
.hello.is-open .hello-overlay { opacity: 1; }
.hello-panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(480px, 100%);
  display: flex; flex-direction: column;
  padding: 100px 52px 40px; overflow-x: hidden; overflow-y: auto;
  background: var(--ink); color: var(--paper);
  transform: translate3d(100%, 0, 0);
  transition: transform 520ms var(--ease-drawer);
}
.hello.is-open .hello-panel { transform: none; }
.hello-close {
  position: absolute; top: -22px; right: -22px; width: 136px; height: 136px; border-radius: 50%;
  border: 0; cursor: pointer; background: #f2c9bf; color: var(--ink);
  font-family: inherit; font-size: 16px; font-weight: 700;
  padding: 22px 22px 0 0;
  transform: scale(.85); opacity: 0;
  transition: transform 500ms var(--ease-out) 120ms, opacity 300ms var(--ease-out) 120ms;
}
.hello.is-open .hello-close { transform: none; opacity: 1; }
.hello-title { font-size: clamp(48px, 5vw, 64px); line-height: .95; font-weight: 800; letter-spacing: -.04em; }
.hello-form { display: grid; margin-top: 44px; }
.hello-form input, .hello-form textarea {
  width: 100%; padding: 16px 0; border: 0; border-bottom: 1px solid rgba(250, 246, 238, .2); border-radius: 0;
  background: transparent; color: var(--paper); font: 500 17px/1.4 inherit; font-family: inherit;
  resize: vertical; transition: border-color 200ms ease;
}
.hello-form ::placeholder { color: rgba(250, 246, 238, .55); }
.hello-form input:focus, .hello-form textarea:focus { outline: none; border-bottom-color: #f2c9bf; }
.hello-send {
  display: flex; justify-content: space-between; align-items: center; margin-top: 36px; padding: 15px 18px;
  border: 0; cursor: pointer; background: var(--paper); color: var(--ink);
  font-family: inherit; font-size: 15px; font-weight: 700;
  transition: background-color 200ms ease;
}
.hello-send svg { width: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform 200ms var(--ease-out); }
.hello-send:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .hello-send:hover { background: #f2c9bf; }
  .hello-send:hover svg { transform: translateX(3px); }
}
/* preenchimento automatico do Chrome: mantem o fundo escuro do painel em vez do azul-claro */
.hello-form input:-webkit-autofill, .hello-form input:-webkit-autofill:hover, .hello-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--paper); caret-color: var(--paper);
  -webkit-box-shadow: 0 0 0 1000px var(--ink) inset; box-shadow: 0 0 0 1000px var(--ink) inset;
  transition: background-color 9999s ease-out;
}
/* reCAPTCHA «Não sou um robô»: espaco reservado para a caixa nao empurrar o botao quando carrega */
.captcha { min-height: 78px; margin-top: 22px; }
/* avisos junto de cada campo (site.js e lp.js) */
.campo-erro { margin-top: 8px; font-size: 13.5px; line-height: 1.4; font-weight: 600; color: var(--red); }
.hello-form .campo-erro { color: #f2c9bf; }
.hello-form input.is-invalid, .hello-form textarea.is-invalid { border-bottom-color: #f2c9bf; }
.captcha.is-invalid > div { outline: 2px solid #f2c9bf; outline-offset: 3px; border-radius: 3px; }
.quiz .captcha.is-invalid > div { outline-color: var(--red); }
.hello-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hello-send:disabled { opacity: .6; cursor: wait; }
.hello-note { margin-top: 14px; font-size: 13px; line-height: 1.45; color: rgba(250, 246, 238, .6); }
.hello-note a { color: rgba(250, 246, 238, .85); }
.hello-status { min-height: 1.4em; margin-top: 14px; font-size: 14px; color: #f2c9bf; }
.hello-foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: auto; padding-top: 40px; }
.hello-foot .socials { margin-top: 0; }
.hello-contacts { display: grid; gap: 2px; text-align: right; font-size: 14px; color: rgba(250, 246, 238, .7); }
.hello-contacts a { text-decoration: none; }


/* ---------- aviso de cookies: canto inferior esquerdo, recusar com o mesmo peso que aceitar ---------- */

.cookies {
  position: fixed; left: 24px; bottom: 24px; z-index: 90;
  width: min(400px, calc(100% - 48px)); padding: 20px 22px;
  background: var(--ink); color: var(--paper); border-radius: 8px;
  box-shadow: 0 16px 40px rgba(23, 21, 15, .25);
  opacity: 0; transform: translate3d(0, 16px, 0);
  transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out);
}
.cookies.is-open { opacity: 1; transform: none; }
.cookies p { font-size: 14px; line-height: 1.5; color: rgba(250, 246, 238, .82); }
.cookies strong { color: var(--paper); }
.cookies a { color: var(--paper); }
.cookies-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.cookies-actions button {
  padding: 12px 10px; border-radius: 4px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700;
  border: 1px solid var(--paper); background: transparent; color: var(--paper);
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.cookies-actions button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .cookies-actions button:hover { background: var(--paper); color: var(--ink); } }
.cookie-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }

/* ---------- paginas interiores: privacidade, obrigado, 404 ---------- */

.page { min-height: 70svh; padding-top: 200px; }
.page .lead { margin-top: 32px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 44px; }
.page-actions .btn-primary { text-decoration: none; display: inline-block; }
.legal { max-width: 46em; margin-top: 88px; }
.legal h2 { margin-top: 56px; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.legal p, .legal li { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.legal ul { padding-left: 1.2em; list-style: disc; }
.legal li { margin-top: 8px; }
.legal strong { color: var(--fg); }
.legal .legal-meta { margin-top: 64px; font-size: 14px; }
.contact.contact-mini { padding-top: 72px; }
.contact-mini .contact-bottom { margin-top: 0; }

/* ---------- logotipo grande a encher o fundo do rodape (como a Confetti) ---------- */

.rodape-logo { margin: 120px calc(40px - var(--col-right)) 0 calc(40px - var(--col-left)); }
.rodape-logo img { width: 100%; height: auto; }
.contact-mini .rodape-logo { margin-top: 0; margin-bottom: 40px; }
.rodape-logo + .contact-bottom { margin: 40px calc(40px - var(--col-right)) 0 calc(40px - var(--col-left)); }

/* ---------- quem somos: a nossa historia ---------- */

.historia { padding: 200px 48px 140px; }
.historia-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.historia-kicker { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.historia .big { margin-top: 18px; }
.historia-nome { margin-top: 26px; font-size: clamp(22px, 2vw, 30px); line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
.historia-nome em { font-style: normal; color: var(--red); }
.historia-corpo { display: grid; gap: 20px; max-width: 36em; margin-top: 44px; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.55; }
.historia-corpo a { text-decoration-thickness: 1.5px; text-underline-offset: .2em; }
.historia-fotos { position: sticky; top: 140px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.historia-foto-b { margin-top: 90px; }
.historia-foto img { aspect-ratio: 3 / 4; object-fit: cover; object-position: center 20%; border-radius: 999px 999px 18px 18px; background: var(--tone); }
.historia-foto figcaption { display: grid; gap: 2px; margin-top: 14px; font-size: 15px; }
.historia-foto figcaption span { color: var(--muted); }

/* ---------- estrutura ---------- */

section { position: relative; padding: 160px var(--col-right) 160px var(--col-left); }
.col { max-width: 1140px; }

.big { font-size: clamp(44px, 5.7vw, 84px); line-height: .98; font-weight: 800; letter-spacing: -.035em; }
.huge { font-size: clamp(64px, 10vw, 152px); line-height: .9; font-weight: 800; letter-spacing: -.045em; }
.statement { font-size: clamp(32px, 3.4vw, 50px); line-height: 1.05; font-weight: 700; letter-spacing: -.025em; }
.big em, .huge em, .statement em { font-style: normal; color: var(--accent); }

.lead { max-width: 34em; margin-top: 40px; font-size: clamp(19px, 1.6vw, 23px); line-height: 1.4; font-weight: 500; }
.small { max-width: 30em; margin-top: 44px; font-size: 17px; line-height: 1.45; font-weight: 600; }
.method .small, .sectors .small { margin: 0 0 28px; }

.link-big { color: var(--accent); text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }

/* linhas de titulo que sobem de dentro de uma mascara */
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line > span { display: block; }

/* ---------- 1. topo ---------- */

.hero {
  min-height: 100svh; display: grid; align-content: center;
  padding-top: 140px; padding-bottom: 170px; overflow: hidden;
}
.hero-copy { position: relative; z-index: 2; max-width: 740px; }
.hero-title { font-size: clamp(46px, 5.6vw, 82px); line-height: .95; font-weight: 800; letter-spacing: -.045em; }
.hero-sub { max-width: 28em; margin-top: 30px; font-size: clamp(19px, 1.55vw, 23px); line-height: 1.4; font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 26px; margin-top: 40px; }
.btn-primary {
  border: 0; cursor: pointer; font-family: inherit;
  padding: 17px 26px; border-radius: 4px; background: var(--red); color: var(--paper);
  font-size: 16px; font-weight: 700;
  transition: background-color 200ms ease, transform 160ms var(--ease-out);
}
.btn-primary:active { transform: scale(.97); }
.btn-link { font-size: 16px; font-weight: 700; text-underline-offset: .22em; }
@media (hover: hover) and (pointer: fine) { .btn-primary:hover { background: #8f0000; } }

/* Palavra que troca: o proto.js poe a atual em .is-current e a que sai em .is-leaving.
   Transicoes (e nao keyframes) porque a sequencia tem tempos diferentes: o «ti» fica mais tempo. */
.rotator { display: inline-grid; vertical-align: baseline; clip-path: inset(-.1em -.2em -.24em -.2em); color: var(--red); }
/* a que sai desvanece a meio do caminho, para nao se ler a passar por cima do «para» */
.rotator > span { grid-area: 1 / 1; white-space: nowrap; opacity: 0; transform: translateY(135%); transition: transform 700ms var(--ease-in-out), opacity 350ms ease; }
.rotator > span.is-current { opacity: 1; transform: translateY(0); }
.rotator > span.is-leaving { opacity: 0; transform: translateY(-135%); }
/* Sem JS a pagina nunca fica com o titulo incompleto */
:root:not(.motion) .rotator > span:first-child { opacity: 1; transform: none; }

/* Duas colunas de paginas reais em movimento constante (linear, porque e movimento continuo) */
.hero-work {
  position: absolute; top: 0; bottom: 0; right: var(--col-right); z-index: 1;
  width: min(27vw, 380px); display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
.work-col { animation: work-up 42s linear infinite; }
.work-col.down { animation-name: work-down; }
.work-col img { width: 100%; margin-bottom: 18px; border-radius: 14px; box-shadow: 0 16px 38px rgba(23, 21, 15, .13); }
@keyframes work-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes work-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }

/* Faixa de marcas ao fundo do topo, como os logotipos logo a abrir na Social Animals */
.logo-strip {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; overflow: hidden;
  padding: 20px 0; background: var(--paper); border-top: 1px solid rgba(23, 21, 15, .1);
}
.logo-track { display: flex; width: max-content; animation: logos 60s linear infinite; }
.logo-track img, .logo-copy img { height: 52px; width: auto; margin-right: 48px; }
.logo-copy { display: flex; }
@keyframes logos { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) {
  .hero-work:hover .work-col, .logo-strip:hover .logo-track { animation-play-state: paused; }
}

/* ---------- 2. equipa ---------- */

.people { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12%; margin-top: 110px; }
.person-b { margin-top: 220px; }
.person-photo { background: var(--tone); padding: 28px 28px 0; }
.person-photo img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 20%; }
.person figcaption { display: grid; gap: 2px; margin-top: 16px; font-size: 15px; }
.person figcaption span { color: var(--muted); }

/* ---------- 5. percurso ---------- */

.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 64px; margin-top: 88px; max-width: 900px; }
.story-item .num { display: block; font-size: clamp(56px, 6vw, 88px); font-weight: 800; letter-spacing: -.04em; line-height: 1; color: var(--accent); }
.story-item p { margin-top: 14px; font-size: 19px; line-height: 1.45; }
.story-wide { grid-column: 1 / -1; }
.story-wide p { font-size: clamp(21px, 1.9vw, 27px); line-height: 1.35; font-weight: 500; }

/* ---------- 6. casos ---------- */

.cases .huge { margin-bottom: 96px; }
.case {
  display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr); gap: 56px;
  padding: 44px 0 72px; border-top: 1px solid rgba(23, 21, 15, .14);
}
.case h3 { font-size: clamp(26px, 2.3vw, 34px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.case dl { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 22px 0 26px; }
.case dt { font-size: 13px; font-weight: 700; }
.case dd { margin-top: 3px; font-size: 14px; color: var(--muted); }
.case p { font-size: 17px; line-height: 1.55; color: var(--muted); }
.case-link { display: inline-block; margin-top: 22px; font-size: 15px; font-weight: 700; }
.case-img { display: block; overflow: hidden; border-radius: 6px; align-self: start; }
.case-img img { transition: transform 700ms var(--ease-out); }
/* Caso com separadores (PT Clinic): imagem por cima, nomes das secoes por baixo */
.case-tabs { align-self: start; min-width: 0; }
.case-tabs-imgs { overflow: hidden; border-radius: 6px; }
.case-tabs-imgs img[hidden] { display: none; }
.case-tabs-grupo { margin-top: 16px; }
.case-tabs-rotulo { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.case-tabs-bar {
  display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid rgba(23, 21, 15, .14);
}
.case-tabs-bar::-webkit-scrollbar { display: none; }
.case-tabs-bar button {
  flex: none; padding: 10px 0; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent;
  background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.case-tabs-bar button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.case-tabs-bar button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) {
  .case-img:hover img { transform: scale(1.03); }
  .top-cta:hover { background: var(--red); }
  .side-nav a:hover { color: var(--fg); }
}

/* Caso No Pain Box: perfil ao lado do texto, carrossel para deslizar e fila de bastidores */
.npb-profile { justify-self: center; align-self: start; width: min(100%, 300px); }
.npb-profile img { width: 100%; }
.npb-gallery { grid-column: 1 / -1; margin-top: 16px; }
.npb-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.npb-head p { font-size: 15px; font-weight: 700; }
.npb-arrows { display: flex; gap: 10px; }
.npb-arrows button {
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(23, 21, 15, .25); background: transparent; color: var(--ink);
  font: 700 18px/1 inherit; font-family: inherit;
  transition: background-color 200ms ease, color 200ms ease, transform 160ms var(--ease-out);
}
.npb-arrows button:active { transform: scale(.94); }
.npb-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 32px) / 3); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline-offset: 4px;
}
.npb-strip::-webkit-scrollbar { display: none; }
.npb-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; scroll-snap-align: start; }
.npb-behind { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.npb-behind img { width: 100%; aspect-ratio: 9 / 14; object-fit: cover; border-radius: 10px; }
.npb-behind figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
@media (hover: hover) and (pointer: fine) {
  .npb-arrows button:hover { background: var(--ink); color: var(--paper); }
}

/* ---------- 7. metodo ---------- */

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 96px; }
.steps li { padding-top: 26px; border-top: 2px solid var(--ink); }
.steps h3 { font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.steps p { margin-top: 12px; font-size: 16px; line-height: 1.5; color: var(--muted); }

/* ---------- 8. servicos ---------- */

.services-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: 64px; max-width: none; }
.services-grid .big { position: sticky; top: 140px; align-self: start; }
.service-list { display: grid; grid-template-columns: 1fr 1fr; gap: 88px 64px; }
.service-list h3 { margin-top: 22px; font-size: clamp(24px, 2vw, 30px); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
.service-list p { margin-top: 12px; max-width: 24em; font-size: 17px; line-height: 1.5; color: var(--muted); }

/* Icones geometricos, como os da Beans: duas cores, formas simples, movimento continuo e lento.
   Movimento constante e decorativo: animacao CSS (corre fora da thread principal), so arranca quando o servico entra no ecra. */
.svc-icon { width: 60px; height: 60px; overflow: visible; }
.svc-icon .c-main { fill: #f2c9bf; }
.svc-icon .c-accent { fill: #e5392c; }
.svc-icon * { transform-box: fill-box; transform-origin: center; animation-play-state: paused; }
.is-in .svc-icon * { animation-play-state: running; }

.icon-pie .slice { animation: slice 2.6s var(--ease-in-out) infinite alternate; }
@keyframes slice { from { transform: translate(0, 0); } to { transform: translate(4px, -4px); } }

.icon-pair .square { animation: turn 3.2s var(--ease-in-out) infinite; }
.icon-pair .dot-a { animation: pulse 2.4s var(--ease-in-out) infinite alternate; }
.icon-pair .dot-b { animation: pulse 2.4s var(--ease-in-out) 1.2s infinite alternate; }
@keyframes turn { from { transform: rotate(0deg); } to { transform: rotate(90deg); } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(.72); } }

.icon-orbit .orbit { transform-box: view-box; transform-origin: 32px 35px; animation: orbit 5s linear infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }

.icon-bars .bar { transform-origin: bottom; animation: rise 1.8s var(--ease-in-out) infinite alternate; }
.icon-bars .bar-2 { animation-delay: .3s; }
.icon-bars .bar-3 { animation-delay: .6s; }
@keyframes rise { from { transform: scaleY(1); } to { transform: scaleY(.55); } }

.icon-shapes .bob { animation: bob 2.2s var(--ease-in-out) infinite alternate; }
.icon-shapes .tri { animation: tilt 3s var(--ease-in-out) infinite alternate; }
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(8px); } }
@keyframes tilt { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }

/* ---------- 9 e 10. setores e contacto ---------- */

.sectors .lead { max-width: 30em; }
.contact { padding-bottom: 56px; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, .8fr); gap: 64px; max-width: none; }
.contact-main { display: grid; justify-items: start; }
.contact-big { font-size: clamp(30px, 3.4vw, 50px); line-height: 1.02; font-weight: 700; letter-spacing: -.03em; text-decoration: none; }
.brief { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; text-decoration: none; }
.brief-text {
  padding: 0 8px 4px; background: #f2c9bf; color: var(--ink);
  font-size: clamp(30px, 3.4vw, 50px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em;
}
.brief-arrow {
  display: grid; place-items: center; width: clamp(40px, 3.6vw, 56px); aspect-ratio: 1; border-radius: 50%;
  background: #f2c9bf; color: var(--ink);
  transition: transform 300ms var(--ease-out);
}
.brief-arrow svg { width: 50%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.contact-place { font-size: clamp(22px, 1.9vw, 28px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; }
.follow { margin-top: 48px; font-size: 14px; font-weight: 700; }
.socials { display: flex; gap: 18px; margin-top: 20px; }
.socials a { display: block; width: 26px; color: var(--paper); transition: color 300ms ease; }
.socials svg { display: block; width: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; }
.socials svg .fill { fill: currentColor; stroke: none; }
.contact-bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; max-width: none;
  margin-top: 160px; font-size: 13px; font-weight: 600; color: var(--muted);
}
@media (hover: hover) and (pointer: fine) {
  .brief:hover .brief-arrow { transform: translate(3px, -3px); }
  .socials a:hover { color: #f2c9bf; }
}

/* ---------- movimento ---------- */
/* So corre com JS ativo (classe .motion no html), para a pagina nunca ficar vazia se o script falhar. */

.motion [data-lines] .line > span { transform: translate3d(0, 105%, 0); transition: transform 1000ms var(--ease-out); }
.motion [data-lines].is-in .line > span { transform: none; }
.motion [data-lines] .line:nth-child(2) > span { transition-delay: 70ms; }
.motion [data-lines] .line:nth-child(3) > span { transition-delay: 140ms; }
.motion [data-lines] .line:nth-child(4) > span { transition-delay: 210ms; }
.motion [data-lines] .line:nth-child(5) > span { transition-delay: 280ms; }

.motion [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); transition: opacity 900ms var(--ease-out), transform 900ms var(--ease-out); }
.motion [data-reveal].is-in { opacity: 1; transform: none; }

.motion [data-clip] { clip-path: inset(100% 0 0 0); transition: clip-path 1200ms var(--ease-out), transform 700ms var(--ease-out); }
.motion .is-in [data-clip] { clip-path: inset(0 0 0 0); }


/* Reduzir movimento: fica so a opacidade, sem deslocacoes nem flutuacao */
@media (prefers-reduced-motion: reduce) {
  .svc-icon *, .work-col, .logo-track { animation: none !important; }
  .rotator > span { transform: none; transition: none; }
  .rotator > span:first-child { opacity: 1; }
  .rotator > span:not(:first-child) { display: none; }
  .hello-panel { transform: none; opacity: 0; transition: opacity 250ms ease; }
  .hello.is-open .hello-panel { opacity: 1; }
  .hello-close { transform: none; }
  .motion [data-lines] .line > span,
  .motion [data-reveal] { transform: none; }
  .motion [data-clip] { clip-path: none; }
  .motion [data-lines] .line > span { opacity: 0; transition: opacity 400ms ease; }
  .motion [data-lines].is-in .line > span { opacity: 1; }
  .motion [data-reveal] { transition: opacity 400ms ease; }
  body { transition: none; }
}

/* ---------- telemovel ---------- */

@media (max-width: 900px) {
  :root { --col-left: 22px; --col-right: 22px; }
  section { padding-top: 112px; padding-bottom: 112px; }
  .top { padding: 14px 18px; }
  .top-logo { width: 104px; }
  .top-cta { padding: 10px 14px; font-size: 13px; }
  .side-nav { display: none; }
  .top-nav { display: none; }
  .top-cta { margin-left: auto; }
  .menu-btn { display: block; }
  .svc-cards { grid-template-columns: 1fr 1fr; gap: 40px 14px; margin-top: 48px; }
  .svc-card-title { font-size: 22px; margin-top: 14px; }
  .svc-card-text { font-size: 14px; }
  .svc-card-btn { font-size: 13px; padding: 8px 12px; }
  .page-intro { padding-top: 150px; padding-bottom: 48px; }
  .team-pagina, .contact-pagina { padding-top: 150px; }
  .historia { padding: 150px 22px 96px; }
  .historia-grid { grid-template-columns: 1fr; gap: 56px; }
  .historia-fotos { position: static; gap: 12px; }
  .historia-foto-b { margin-top: 48px; }
  .rodape-logo { margin-top: 72px; margin-left: 0; margin-right: 0; }
  .hero { min-height: 0; align-content: start; padding-top: 150px; padding-bottom: 120px; }
  .rotator { display: grid; width: max-content; }
  .hero-work { position: relative; top: auto; bottom: auto; right: auto; width: 100%; height: 380px; margin-top: 48px; overflow: hidden; }
  .logo-track img, .logo-copy img { height: 40px; margin-right: 32px; }
  .people { grid-template-columns: 1fr; gap: 56px; margin-top: 64px; }
  .person-b { margin-top: 0; }
  .story-grid { grid-template-columns: 1fr; gap: 40px; margin-top: 56px; }
  .case { grid-template-columns: 1fr; gap: 28px; padding-bottom: 56px; }
  .case-img, .case-tabs { order: -1; }
  .npb-strip { grid-auto-columns: 72%; }
  .npb-behind { grid-template-columns: 1fr 1fr; }
  .npb-behind figure:last-child { grid-column: 1 / -1; }
  .npb-behind figure:last-child img { aspect-ratio: 16 / 12; object-position: center 30%; }
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 22px; margin-top: 56px; }
  .services-grid { grid-template-columns: 1fr; gap: 56px; }
  .services-grid .big { position: static; }
  .service-list { grid-template-columns: 1fr; gap: 56px; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .contact-bottom { margin-top: 88px; }
  .wa-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .cookies { left: 12px; right: 12px; bottom: 12px; width: auto; }
  body.has-cookies .wa-float { opacity: 0; pointer-events: none; }
  .page { padding-top: 150px; }
  .legal { margin-top: 56px; }
  .hello-panel { padding: 92px 24px 28px; }
  .hello-close { width: 112px; height: 112px; font-size: 15px; }
  .hello-foot { flex-direction: column; align-items: flex-start; }
  .hello-contacts { text-align: left; }
  .btn-primary { padding: 15px 20px; }
}

/* telemovel estreito: cartoes de servicos numa coluna */
@media (max-width: 560px) {
  .svc-cards { grid-template-columns: 1fr; gap: 48px; }
  .svc-card-title { font-size: 28px; }
  .svc-card-text { font-size: 16px; }
  .svc-card-btn { font-size: 14px; padding: 10px 16px; }
}
