/* V3V Agência Criativa — site institucional
   Tokens do Manual de Marca V3V v1.0 */
:root {
  --bg: #050505;
  --paper: #0E0F0D;
  --ink: #F7F7F2;
  --muted: #8D9089;
  --lime: #B7FF00;
  --lime-ink: #0A1400;
  --cyan: #66D9FF;
  --amber: #FFB547;
  --line: rgba(247, 247, 242, .12);
  --radius: 4px;

  --f-display: "Fraunces", Georgia, serif;
  --f-text: "Manrope", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;
  --f-poster: "Anton", "Impact", sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--lime); color: var(--lime-ink); }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--lime); color: var(--lime-ink); padding: 8px 14px; border-radius: var(--radius);
}
.skip:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }

/* Grão 4–6% */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Rótulo com traço ---------- */
.label {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 24px;
  font-family: var(--f-mono); font-size: 12px; font-weight: 500;
  letter-spacing: .13em; text-transform: uppercase; color: var(--lime);
}
.label::before { content: ""; width: 26px; height: 1px; background: currentColor; flex: none; }
.label .num { color: var(--ink); }

.label--plain { color: var(--muted); margin: 0; font-size: 11px; }
.label--plain::before { display: none; }

/* ---------- Tipografia ---------- */
.title, .hero__title {
  font-family: var(--f-display); font-weight: 300; letter-spacing: -.025em;
  line-height: 1.02; margin: 0;
}
.title em, .hero__title em {
  font-style: italic; font-weight: 600; color: var(--lime);
}
.title { font-size: clamp(38px, 6vw, 76px); }

.section__intro { color: var(--muted); }
.section__intro { font-size: 18px; max-width: 58ch; margin: 24px 0 0; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  font-family: var(--f-text); font-weight: 700; font-size: 15px; text-decoration: none;
  border-radius: var(--radius); border: 1px solid transparent; cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn span { font-family: var(--f-mono); font-weight: 500; letter-spacing: -.1em; }
.btn--lime { background: var(--lime); color: var(--lime-ink); }
.btn--lime:hover { transform: translateY(-2px); background: #c6ff3a; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- Topo ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  padding: 14px var(--gutter);
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.topbar.is-scrolled { background: rgba(5, 5, 5, .86); backdrop-filter: blur(12px); border-color: var(--line); }
.brand img { width: 84px; height: auto; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  text-decoration: none; color: var(--muted); transition: color .2s;
}
.nav a:hover, .nav a.is-active { color: var(--ink); }
.nav a.is-active::before { content: "• "; color: var(--lime); }

.menu-toggle {
  display: none; margin-left: auto; width: 44px; height: 44px;
  background: none; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.menu-toggle span { width: 18px; height: 1.5px; background: var(--ink); transition: transform .25s; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.menu-mobile {
  position: fixed; inset: 0; z-index: 45; background: var(--bg);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  padding: 96px var(--gutter) 40px;
}
.menu-mobile[hidden] { display: none; }
.menu-mobile a {
  font-family: var(--f-display); font-weight: 300; font-size: 42px; text-decoration: none;
  display: flex; align-items: baseline; gap: 16px; padding: 6px 0; border-bottom: 1px solid var(--line);
}
.menu-mobile a span { font-family: var(--f-mono); font-size: 12px; color: var(--lime); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; display: flex; align-items: flex-end;
  padding: 140px 0 72px; position: relative;
}
.hero::after { /* fio de horizonte */
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0; height: 1px; background: var(--line);
}
.hero > .wrap { position: relative; z-index: 2; }

/* Reel de fundo: escurecido para o texto ler bem e o preto continuar dominante */
.hero__media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--bg); }
.hero__video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 1.2s ease; }
.hero__video.is-ready { opacity: 1; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(5,5,5,.75) 0%, rgba(5,5,5,.45) 30%, rgba(5,5,5,.62) 62%, rgba(5,5,5,.96) 100%),
    linear-gradient(90deg, rgba(5,5,5,.6) 0%, rgba(5,5,5,0) 65%);
}

.hero__title { font-size: clamp(54px, 11vw, 168px); max-width: 11ch; }
.hero__foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end;
  margin-top: clamp(32px, 5vw, 64px);
}
.hero__lead { font-size: clamp(18px, 1.8vw, 21px); color: var(--muted); max-width: 52ch; margin: 0; }
.hero__lead::first-line { color: var(--ink); }

/* ---------- Seções ---------- */
.section { padding: clamp(88px, 12vw, 160px) 0; border-bottom: 1px solid var(--line); }
.section--paper { background: var(--paper); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.section__head--wide { max-width: 900px; margin-bottom: clamp(48px, 6vw, 80px); }

/* Método */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: s; }
.step { border-top: 1px solid var(--line); padding-top: 28px; position: relative; }
.step::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); }
.step__n { font-family: var(--f-mono); font-size: 12px; color: var(--muted); letter-spacing: .12em; }
.step h3 { font-family: var(--f-display); font-weight: 400; font-size: 26px; line-height: 1.15; margin: 12px 0; }
.step p { color: var(--muted); margin: 0; font-size: 16px; }

/* Setores */
/* Números e diferenciais (seção de clientes): cards com painel + rodapé */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; }
.bcard { grid-column: span 4; display: flex; flex-direction: column; padding: 6px; border-radius: 16px; background: #131512; border: 1px solid var(--line); transition: border-color .25s, transform .25s; }
.bcard--wide { grid-column: span 6; }
.bcard:nth-child(n+3) { grid-column: span 3; }
.bcard:hover { border-color: rgba(183,255,0,.35); transform: translateY(-2px); }
.bcard__panel { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 170px; padding: 28px 22px; border-radius: 11px; background: #0b0c0a; border: 1px solid rgba(247,247,242,.05); }
.bcard--wide .bcard__panel { min-height: 210px; }
.bcard__big { margin: 0; font-family: var(--f-display); font-weight: 600; color: var(--lime); font-size: clamp(40px, 4.6vw, 68px); line-height: 1; letter-spacing: -.02em; }
.bcard--wide .bcard__big { font-size: clamp(56px, 6.6vw, 104px); }
.bcard__big { white-space: nowrap; }
.bcard__big em { font-size: .5em; font-style: italic; color: inherit; }
.bcard--text .bcard__big { font-size: clamp(20px, 1.9vw, 27px); }
.bcard--text .bcard__big em { font-size: 1em; }
.bcard__sub { margin: 0; max-width: 30ch; color: var(--muted); font-size: 14px; line-height: 1.45; }
.bcard__tag { margin: 0; padding: 12px 12px 8px; font-family: var(--f-text); font-weight: 600; font-size: 13px; color: var(--ink); display: flex; justify-content: space-between; }
.bcard__tag::after { content: "↗"; color: var(--lime); opacity: .7; }

/* Contato */
.contact { border-bottom: 0; }

.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 40px); display: grid; gap: 22px; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field label {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 8px;
}
.field input[type="text"], .field textarea {
  width: 100%; background: var(--bg); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; font: inherit; font-size: 16px; resize: vertical; transition: border-color .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lime); }
.field .is-invalid { border-color: #ff6b5b !important; }
.form__hint { margin: 0; font-size: 13px; color: var(--muted); }

/* Rodapé */
.footer { border-top: 1px solid var(--line); padding: 48px 0; }
.footer__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__inner p { margin: 0; color: var(--muted); font-size: 14px; }
.footer__inner p:nth-of-type(1) { font-family: var(--f-display); font-style: italic; color: var(--ink); font-size: 18px; }
.footer__meta { margin-left: auto !important; font-family: var(--f-mono); font-size: 12px !important; letter-spacing: .06em; }

/* WhatsApp flutuante */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--lime); color: var(--lime-ink);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.06); }

/* Revelação na rolagem */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .topbar .btn--sm { margin-left: auto; }
  .menu-toggle { display: flex; margin-left: 0; }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 48px; }
  .bcard, .bcard--wide, .bcard:nth-child(n+3) { grid-column: span 6; }
  
  
  
}
@media (max-width: 820px) {
  .grid-2, .hero__foot { grid-template-columns: 1fr; }
  
  
  
  
  
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .topbar { gap: 12px; }
  .topbar .btn--sm { display: none; }
  .menu-toggle { margin-left: auto; }
  .hero { padding-top: 120px; }
  
  .steps { grid-template-columns: 1fr; }
  .bcard, .bcard--wide, .bcard:nth-child(n+3) { grid-column: span 12; }
  
  
  
  .footer__meta { margin-left: 0 !important; }
  
  
  .wa-float { width: 52px; height: 52px; right: 16px; bottom: 16px; }
}

/* =========================================================
   EFEITOS (referências React Bits, adaptadas ao preto + lime)
   ========================================================= */

/* Fundos animados em canvas: ficam atrás do conteúdo da seção */
.fx-host { position: relative; isolation: isolate; overflow: hidden; }
.fx-host > .wrap, .fx-host > .ccar { position: relative; z-index: 1; }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }
.fx--grid { opacity: .9; }

/* ---------- Bastidores: túnel de fotos guiado pela rolagem ---------- */
.passage { position: relative; height: 400vh; background: var(--bg); border-bottom: 1px solid var(--line); }
.passage__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; perspective: 700px; perspective-origin: 50% 50%; }
.passage__world { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.passage__world img {
  position: absolute; left: 50%; top: 50%; width: 34vw; max-width: 520px; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: 6px; opacity: .9;
  filter: saturate(.85) contrast(1.05) brightness(.85);
  box-shadow: 0 0 0 1px rgba(247,247,242,.08);
}
.passage__sticky::before { /* fios de perspectiva, como no corredor da referência */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(5,5,5,.0) 0%, rgba(5,5,5,.0) 8%, rgba(5,5,5,.9) 9%, rgba(5,5,5,0) 30%),
    radial-gradient(circle at 50% 50%, transparent 40%, rgba(5,5,5,.75) 100%);
}
.passage__copy {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center; width: min(92vw, 760px); pointer-events: none;
}
.passage__copy .label { justify-content: center; }
.passage__title {
  margin: 0; font-family: var(--f-display); font-weight: 300; line-height: 1.05;
  font-size: clamp(34px, 5.4vw, 76px); text-shadow: 0 2px 30px rgba(5,5,5,.9);
}
.passage__title em { font-style: italic; font-weight: 600; color: var(--lime); }
.passage__copy { transition: opacity .3s linear; }
.passage__rings { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; opacity: 0; pointer-events: none; }
.passage__logo {
  position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(60vw, 420px); height: auto; opacity: 0; z-index: 3; pointer-events: none; transition: opacity .3s linear;
}

/* ---------- Clientes: carrossel côncavo (parede curva) ---------- */
.ccar { position: relative; z-index: 1; margin-top: 8px; }
.ccar__bg { z-index: 0; }
/* o fundo do contato continua por trás do rodapé (um só canvas, sem emenda) */
#contato { overflow: visible; }
#contato > .fx { bottom: auto; height: calc(100% + var(--rodape, 0px)); }
.footer { position: relative; z-index: 1; }
.prova__bg { bottom: auto; height: var(--prova-topo, 100%); }
.trail { position: relative; isolation: isolate; }
.trail__bg { z-index: 0; }
.trail > :not(.trail__bg) { position: relative; z-index: 1; }
.ccar__sticky > :not(.ccar__bg) { position: relative; z-index: 1; }
.ccar__ring {
  list-style: none; margin: 0; padding: 0; position: relative;
  height: clamp(300px, 30vw, 380px); perspective: 1100px; perspective-origin: 50% 50%;
  touch-action: pan-y; cursor: grab; user-select: none;
}

.ccar__card {
  position: absolute; left: 50%; top: 50%;
  width: clamp(200px, 22vw, 280px); aspect-ratio: 4 / 5;
  margin-left: calc(clamp(200px, 22vw, 280px) / -2); margin-top: calc(clamp(200px, 22vw, 280px) * -0.625);
  border-radius: 14px; overflow: hidden; border: 1px solid var(--line);
  background: linear-gradient(160deg, #141612 0%, #0a0b09 70%);
  display: grid; place-items: center; backface-visibility: hidden;
  transition: transform .9s cubic-bezier(.2,.7,.2,1), opacity .9s ease, filter .9s ease, border-color .4s;
  will-change: transform;
}
.ccar__card.is-active { border-color: rgba(183, 255, 0, .5); }

.ccar__logo { position: relative; z-index: 1; width: calc(var(--w) * 1.05); max-width: 78%; height: auto; }

.ccar__sector {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 16px; text-align: center;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.ccar__card.is-active .ccar__sector { color: var(--lime); }

@media (max-width: 560px) {
  
  .passage { height: 240vh; }
  .passage__world img { width: 58vw; }
}
@media (prefers-reduced-motion: reduce) {
  .passage { height: auto; }
  .passage__sticky { position: relative; height: auto; padding: 120px 0; perspective: none; }
  .passage__world { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 var(--gutter); transform: none !important; }
  .passage__world img { position: static; width: 100%; transform: none !important; }
  .passage__copy { position: relative; transform: none; left: auto; top: auto; margin: 0 auto 40px; }
}

/* ---------- Clientes v2: gira com a rolagem, logo colorido no centro/hover ---------- */
/* "clip" corta como o hidden, mas não quebra o position: sticky */
.fx-host { overflow: clip; }
.ccar { height: calc(var(--n, 15) * 22vh + 100vh); margin-top: 24px; }
.ccar__sticky {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; justify-content: center; overflow: hidden;
}
.ccar__label { width: 100%; max-width: var(--max); margin: 0 auto 28px; padding: 0 var(--gutter); }
.ccar__ring { cursor: default; touch-action: auto; }
.ccar__card { transition: opacity .25s linear, filter .25s linear, border-color .35s ease, background-color .35s ease; cursor: default; }
.ccar__logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -58%); transition: opacity .35s ease; }
.ccar__logo--cor { opacity: 0; }

/* card do centro (ou com o mouse em cima): fundo claro e logo nas cores reais da marca */
.ccar__card.is-active, .ccar__card:hover { background: #F7F7F2; border-color: var(--lime); }
.ccar__card.is-active .ccar__logo--branca, .ccar__card:hover .ccar__logo--branca { opacity: 0; }
.ccar__card.is-active .ccar__logo--cor, .ccar__card:hover .ccar__logo--cor { opacity: 1; }

.ccar__card.is-active .ccar__sector, .ccar__card:hover .ccar__sector { color: #4a4d46; }

@media (max-width: 560px) { .ccar { height: calc(var(--n, 15) * 16vh + 100vh); } }
@media (prefers-reduced-motion: reduce) {
  .ccar { height: auto; }
  .ccar__sticky { position: relative; height: auto; padding: 40px 0; }
}
/* formulário levemente translúcido para os anéis aparecerem por trás */
.contact .form { background: rgba(14, 15, 13, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ---------- Projetos ---------- */
.projects { overflow: clip; }
.projects .section__head { margin-bottom: 28px; }

/* ---------- Página de projeto ---------- */
.pj__hero { padding: 130px 0 0; }
.pj__back { display: inline-block; margin-bottom: 36px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.pj__back:hover { color: var(--lime); }
.pj__tags { margin: 0 0 14px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.pj__title { margin: 0; font-family: var(--f-display); font-weight: 300; letter-spacing: -.025em; line-height: 1; font-size: clamp(48px, 9vw, 128px); }
.pj__lead { margin: 22px 0 0; max-width: 46ch; font-size: clamp(18px, 1.8vw, 22px); color: var(--muted); }
.pj__cover { margin: clamp(40px, 6vw, 72px) auto 0; max-width: 1440px; padding: 0 var(--gutter); }
.pj__fig { margin: 0; overflow: hidden; border-radius: 10px; background: var(--paper); cursor: zoom-in; }
.pj__fig img { width: 100%; height: auto; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.pj__fig:hover img { transform: scale(1.02); }
.pj__ficha { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 40px 0 0; border-top: 1px solid var(--line); }
.pj__ficha div { padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); }
.pj__ficha dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.pj__ficha dd { margin: 0; font-size: 15px; line-height: 1.5; }
.pj__block { padding: clamp(72px, 9vw, 120px) 0 0; }
.pj__text { max-width: 900px; }
.pj__h2 { margin: 0 0 18px; font-family: var(--f-display); font-weight: 300; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.06; letter-spacing: -.02em; }
.pj__h2 em { font-style: italic; font-weight: 600; color: var(--lime); }
.pj__text > p:not(.label) { margin: 0; max-width: 62ch; font-size: clamp(17px, 1.5vw, 19px); color: #c9cbc4; line-height: 1.65; }
.pj__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.pj__pair:has(> :only-child) { grid-template-columns: 1fr; }
.pj__gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 40px; }
.pj__gallery .pj__fig:nth-child(3n+1) { grid-column: span 2; }
.pj__colors { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pj__swatch { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; }
.pj__swatch i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(247,247,242,.2); }
.pj__swatch code { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.pj__next { margin-top: clamp(88px, 10vw, 140px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pj__next-link { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto auto; column-gap: 32px; padding-top: 48px; padding-bottom: 48px; text-decoration: none; position: relative; }
.pj__next-link .label { grid-column: 1; margin-bottom: 14px; }
.pj__next-title { grid-column: 1; font-family: var(--f-display); font-weight: 300; font-size: clamp(36px, 6vw, 88px); line-height: 1; transition: color .25s; }
.pj__next-cat { grid-column: 1; margin-top: 12px; font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pj__next-link img { grid-column: 2; grid-row: 1 / 4; width: clamp(110px, 14vw, 180px); aspect-ratio: 4/5; object-fit: cover; border-radius: 10px; transition: transform .4s; }
.pj__next-link:hover .pj__next-title { color: var(--lime); }
.pj__next-link:hover img { transform: rotate(-3deg) scale(1.04); }
.pj__cta { padding: clamp(72px, 9vw, 120px) 0; text-align: center; }
.pj__cta .title { margin-bottom: 32px; }
.pj-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.pj-reveal.is-in { opacity: 1; transform: none; }
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(5,5,5,.94); display: grid; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lightbox__close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--ink); font-size: 26px; cursor: pointer; }
@media (max-width: 820px) {
  .pj__ficha { grid-template-columns: 1fr 1fr; }
  .pj__pair, .pj__gallery { grid-template-columns: 1fr; }
  .pj__gallery .pj__fig:nth-child(3n+1) { grid-column: auto; }
}
@media (max-width: 1080px) { .page-projeto .topbar .btn--sm { margin-left: auto; } }

/* Projetos e Clientes emendados: sem linha divisória e com menos espaço entre eles */
#projetos { border-bottom: 0; padding-bottom: clamp(36px, 4vw, 56px); }
#prova { padding-top: clamp(36px, 4vw, 56px); }

/* ---------- Projetos: mosaico de ponta a ponta com card que vira ---------- */
.projects .section__head { margin-bottom: clamp(28px, 4vw, 48px); }
.mosaic { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
.mosaic__row { display: flex; gap: 8px; }
.mosaic__row--a { height: clamp(220px, 23vw, 400px); }
.mosaic__row--a .tile:nth-child(1), .mosaic__row--a .tile:nth-child(3) { flex: 2; }
.mosaic__row--a .tile:nth-child(2) { flex: 3; }
.mosaic__row--b { height: clamp(220px, 20vw, 360px); }
.mosaic__row--b .tile { flex: 1; }
.mosaic__row--c { height: clamp(160px, 13vw, 240px); }
.mosaic__row--c .tile { flex: 1; }
/* home: a última fileira passa os projetos de lado a cada 5 s */
.mosaic__row--rotate { overflow: hidden; }
.mosaic__track { display: flex; gap: 8px; flex: 1 1 100%; min-width: 0; height: 100%; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.mosaic__row--c.mosaic__row--rotate .tile { flex: 0 0 calc((100% - 32px) / 5); }
.tile { position: relative; display: block; min-width: 0; perspective: 1400px; text-decoration: none; color: var(--ink); border-radius: 14px; }
.tile__inner { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.2,.7,.2,1); }
.tile__face { position: absolute; inset: 0; border-radius: 14px; overflow: hidden; -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.tile__front img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }

.tile__back {
  transform: rotateY(180deg); background: #0e0f0d; border: 1px solid rgba(183,255,0,.45);
  display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: clamp(16px, 2vw, 28px);
}
/* verso: a mesma imagem da frente, borrada e escurecida, por trás do texto */
.tile__bg { position: absolute; inset: -24px; width: calc(100% + 48px); height: calc(100% + 48px); object-fit: cover; filter: blur(14px) brightness(.38) saturate(1.1); transform: scale(1.04); z-index: 0; pointer-events: none; }
.tile__back::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(5,5,5,.15) 0%, rgba(5,5,5,.75) 100%); }
.tile__back > :not(.tile__bg) { position: relative; z-index: 1; }
.tile__title { font-family: var(--f-display); font-weight: 300; font-size: clamp(22px, 2.2vw, 36px); line-height: 1.05; }
.tile__text { color: #c9cbc4; font-size: clamp(13px, 1vw, 15px); line-height: 1.5; max-width: 46ch;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile__cta { margin-top: 4px; font-weight: 700; font-size: 14px; color: var(--lime); }
.tile:hover .tile__inner, .tile:focus-visible .tile__inner { transform: rotateY(180deg); }
.tile:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
/* cards pequenos (linha de 5): texto mais enxuto */
.mosaic__row--c .tile__text { -webkit-line-clamp: 2; }
.mosaic__row--c .tile__title { font-size: clamp(18px, 1.6vw, 26px); }
.tile--wait { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.tile--wait.is-in { opacity: 1; transform: none; }
/* telas de toque: sem virar; nome visível sobre a foto e o toque abre o projeto */
@media (hover: none) {
  .tile:hover .tile__inner { transform: none; }
  
}
@media (max-width: 820px) {
  .mosaic__row { height: auto !important; flex-wrap: wrap; }
  .mosaic__row .tile { flex: 1 1 calc(50% - 4px) !important; aspect-ratio: 16 / 11; }
  .mosaic__row--a .tile:nth-child(2) { flex-basis: 100% !important; }
}
@media (max-width: 480px) { .mosaic__row .tile { flex-basis: 100% !important; } }
@media (prefers-reduced-motion: reduce) { .tile__inner { transition: none; } }
.mosaic__row--c .tile__back { gap: 6px; padding: 14px 16px; }
.mosaic__row--c .tile__text { font-size: 12.5px; line-height: 1.4; -webkit-line-clamp: 2; }
.mosaic__row--c .tile__cta { font-size: 13px; margin-top: 2px; }
.tile__name { display: none; }
@media (hover: none) {
  .tile__front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(5,5,5,.85)); }
  .tile__name { display: block; position: absolute; z-index: 1; left: 14px; right: 14px; bottom: 44px; font-family: var(--f-display); font-weight: 300; font-size: 24px; line-height: 1.1; color: var(--ink); }
  
}
.mosaic__more { position: relative; z-index: 1; display: flex; justify-content: center; margin-top: clamp(28px, 3vw, 44px); }
.page-projetos .projects { padding-top: 130px; border-bottom: 0; }

/* ---------- Trajetória: faixas contínuas de marcas que já passaram pela V3V ---------- */
.trail { position: relative; z-index: 1; padding-top: clamp(24px, 4vw, 56px); padding-bottom: clamp(88px, 12vw, 160px); margin-bottom: calc(-1 * clamp(88px, 12vw, 160px)); }
.trail__title {
  margin: 0 0 clamp(24px, 3vw, 36px); font-family: var(--f-display); font-weight: 300;
  font-size: clamp(26px, 3vw, 40px); line-height: 1.1; color: var(--muted);
}
.trail__title em { font-style: italic; font-weight: 600; color: var(--lime); }
.trail__row {
  overflow: hidden; padding: 6px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.trail__track {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; width: max-content;
  animation: trailMove var(--dur, 70s) linear infinite;
}
.trail__row--rev .trail__track { animation-direction: reverse; }
.trail:hover .trail__track { animation-play-state: paused; }
.trail--js .trail__track { animation: none; }
.trail--js .trail__row { cursor: grab; touch-action: pan-y; user-select: none; }
.trail--js .trail__row.is-dragging { cursor: grabbing; }
@keyframes trailMove { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 7px)); } }
.trail__item {
  flex: none; width: clamp(110px, 9.5vw, 140px); aspect-ratio: 1; border-radius: 12px;
  background: #121311; border: 1px solid rgba(247,247,242,.05);
  display: grid; place-items: center; padding: 18px;
  transition: background .3s ease, border-color .3s ease;
}
.trail__item img { max-width: 100%; max-height: 62%; object-fit: contain; opacity: .7; transition: opacity .3s; }
.trail__item span {
  font-family: var(--f-text); font-weight: 700; font-size: 14px; line-height: 1.2; text-align: center;
  color: rgba(247,247,242,.72); letter-spacing: -.01em; transition: color .3s;
}

.trail__item:hover { background: #191b17; border-color: rgba(183,255,0,.35); }
.trail__item:hover img { opacity: 1; }
.trail__item:hover span { color: var(--ink); }
@media (prefers-reduced-motion: reduce) {
  .trail__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; padding: 0 var(--gutter); }
  .trail__track [aria-hidden="true"] { display: none; }
  .trail__row { -webkit-mask-image: none; mask-image: none; }
  .trail__row + .trail__row { display: contents; }
}
/* mosaico sem etiqueta de categoria na foto; no toque, o nome fica rente à base */
@media (hover: none) { .tile__name { bottom: 16px; } }
