/* O layout do Figma tem 2560px de largura: 1rem = 10px do design,
   então a página escala proporcionalmente à largura da janela. */
html {
  font-size: calc(100vw / 256);
  scroll-padding-top: 14rem;
}

:root {
  --blue: #0900ff;
  --green: #4bff6f;
  --black: #000;
  --bg: #fff;      /* fundo da página */
  --fg: #000;      /* texto, bordas de pílulas e botões */
  --rule: #d9d9d9;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Inter Display", "Inter", system-ui, sans-serif;

  --margin: 28rem;
  --gap: 1.5rem;   /* espaço entre imagens: 15px no layout (era 30px; reduzido a pedido do usuário) */
  --text-label: max(11px, 1.6rem);
  --text-body: max(14px, 2.3rem);
}

/* Modo escuro: ligado pelo botão do menu (data-theme no <html>, guardado em localStorage).
   O Figma só tem a versão clara; a paleta escura é adaptação nossa. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a0a0a;
  --fg: #fff;
  --rule: #2b2b2b;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  transition: background-color 0.4s, color 0.4s;
  font-family: var(--sans);
  font-size: var(--text-body);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h2, p, ul, figure, blockquote { margin: 0; padding: 0; }
ul { list-style: none; }

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

/* ---------- Header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 11.95rem;
  padding: 0 var(--margin);
  background: rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(100px);
  backdrop-filter: blur(100px);
  transition: background-color 0.3s;
}
.header.is-scrolled { background: rgba(0, 0, 0, 0.55); }

.header__logo { margin-right: auto; }
.header__logo img { width: 36.917rem; height: auto; }

.nav { display: flex; align-items: center; gap: 1.463rem; }
.nav__link {
  display: flex;
  align-items: center;
  height: 4.227rem;
  padding: 0 2.754rem;
  border-radius: 4.467rem;
  color: #fff;
  font-size: max(9px, 1.377rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 0.25s;
}
.nav__link:hover { background: rgba(255, 255, 255, 0.15); }
.nav__link.is-active { background: var(--blue); }

.header__toggle { display: none; }

/* Botão de tema: círculo de 37px no Figma, encostado na margem direita */
.theme-toggle {
  flex: none;
  display: grid;
  place-items: center;
  width: max(26px, 3.72rem);
  height: max(26px, 3.72rem);
  margin-left: 3.3rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(105, 105, 105, 0.2);
  cursor: pointer;
  transition: background-color 0.25s;
}
.theme-toggle:hover { background: rgba(105, 105, 105, 0.45); }
.theme-toggle__icon {
  grid-area: 1 / 1;
  width: 60.3%;
  height: auto;
  transition: filter 0.6s, opacity 0.3s, transform 0.4s;
}
.theme-toggle__icon--sun { width: 65.75%; opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle__icon--sun { opacity: 1; transform: none; }
[data-theme="dark"] .theme-toggle__icon--moon { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* Banner de fundo claro: logo e menu em preto (só enquanto o header está sobre o banner) */
.header__logo img, .nav__link { transition: filter 0.6s, color 0.6s, background-color 0.25s; }
.header.on-light:not(.is-scrolled) .header__logo img { filter: brightness(0); }
.header.on-light-nav:not(.is-scrolled) .nav__link:not(.is-active) { color: var(--black); }
.header.on-light-nav:not(.is-scrolled) .nav__link:not(.is-active):hover { background: rgba(0, 0, 0, 0.08); }
.header.on-light-nav:not(.is-scrolled) .header__toggle span { background: var(--black); }
.header.on-light-nav:not(.is-scrolled) .theme-toggle__icon { filter: brightness(0); }

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

.hero {
  position: relative;
  height: 123.68rem;
  background: var(--rule);
  overflow: hidden;
}
.hero__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero__slide.is-active { opacity: 1; }
.hero__dots {
  position: absolute;
  /* sem transform aqui: ele isolaria a mesclagem das barrinhas com o banner */
  inset: auto 0 4.15rem 0;
  display: flex;
  justify-content: center;
  gap: 1.33rem;
}
.hero__dot {
  width: 5.15rem;
  height: 0.915rem;
  padding: 0;
  border: max(0.5px, 0.07rem) solid #fff;
  border-radius: 2.6rem;
  background: none;
  opacity: 0.49;
  mix-blend-mode: screen;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s;
}
.hero__dot.is-active { background: #e7e7e7; border-color: #e7e7e7; }
/* em banner claro o modo "screen" apagaria as barrinhas: ficam pretas, sem mesclagem */
.hero.on-light .hero__dot { border-color: var(--black); mix-blend-mode: normal; }
.hero.on-light .hero__dot.is-active { background: var(--black); }

/* ---------- Blocos comuns ---------- */

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: 3.885rem;
  margin-inline: auto;
  padding: 0 3rem;
  border: max(0.5px, 0.0646rem) solid var(--fg);
  border-radius: 4.105rem;
  font-size: var(--text-label);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill--small { margin-inline: 0; }
/* no modo escuro as vinhetas ficam em cinza (texto e contorno), a pedido do usuário */
[data-theme="dark"] .pill { border-color: #8a8a8a; color: #8a8a8a; }

.button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43.665rem;
  height: 8.646rem;
  border: max(0.5px, 0.0804rem) solid transparent;
  border-radius: 1.373rem;
  font-family: var(--serif);
  font-size: max(16px, 3.4334rem);
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: transform 0.25s, filter 0.25s, background-color 0.25s, color 0.25s;
}
.button:hover { transform: translateY(-0.3rem); }
.button--primary { background: var(--blue); color: #fff; margin-inline: auto; }
.button--green { background: var(--green); color: var(--black); }
.button--green, .button--outline {
  height: 10.123rem;
  border-radius: 1.608rem;
  font-size: max(18px, 4.0198rem);
}
.button--green { width: 42.214rem; }
.button--outline { width: 51.122rem; }
.button--outline { border-color: var(--fg); }
/* hover: todos os botões ficam azuis com texto branco */
.button:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

.tile {
  aspect-ratio: 985 / 556.875;
  border-radius: 1.3rem;
  overflow: hidden;
}
.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.08);
  transition: transform 0.6s ease;
}
.tile:hover img { transform: scale(1.13); }
/* card com página de projeto: o link cobre a imagem inteira */
.tile a { display: block; width: 100%; height: 100%; }
.tile--feature { aspect-ratio: 2000 / 1130.71; margin-top: var(--gap); }
.tile--full img { transform: none; }
.tile--full:hover img { transform: scale(1.04); }

/* hover nos projetos: véu azul (--blue a 70%) e vinheta: "+ detalhes do projeto" nos cards com case, "disponível em breve" nos outros */
.tile { position: relative; }
.tile::before,
.tile::after {
  position: absolute;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.tile::before { content: ""; inset: 0; background: var(--blue); z-index: 1; }
.tile::after {
  content: "disponível em breve";
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 31.398rem;
  height: 4.7975rem;
  border: max(0.5px, 0.0646rem) solid #fff;
  border-radius: 4.1047rem;
  color: #fff;
  font-size: 1.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tile:has(> a)::after { content: "+ detalhes do projeto"; }
.tile:hover::before { opacity: 0.7; }
.tile:hover::after { opacity: 1; }

.section--ruled { border-top: 1px solid var(--rule); }

/* ---------- Barra de logotipos ---------- */

.logos {
  display: flex;
  align-items: center;
  height: 18.63rem;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.logos__track {
  display: flex;
  align-items: center;
  width: max-content;
  margin: 0;
  padding: 0;
  list-style: none;
  animation: logos-scroll 20s linear infinite;
}
.logos:hover .logos__track { animation-play-state: paused; }
.logos__track li { flex: none; margin-right: 7.9rem; }
.logos__track img {
  display: block;
  width: calc(var(--w) * var(--logo-scale, 1));
  height: auto;
}
/* os logos são pretos: no modo escuro viram brancos */
[data-theme="dark"] .logos__track img { filter: invert(1); }
/* a lista está duplicada: -50% volta exatamente ao início, sem salto */
@keyframes logos-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .logos__track { animation: none; } }

/* ---------- Projetos ---------- */

.projects { padding: 9.24rem var(--margin) 10.6rem; }
.projects .grid { margin-top: 6.68rem; }
.projects .button { margin-top: 10.6rem; }

/* ---------- Key visual ---------- */

.keyvisual { padding: 10.73rem 0 0; }

/* Palco dos 4 quadros: 3 pequenos em cima e 1 grande embaixo (2000 × 1130,7), com 1,5rem entre eles.
   Os pequenos ocupam a mesma largura do grande (28rem a 228rem), alinhados nas duas bordas:
   (200 − 2 × 1,5) ÷ 3 = 65,667rem de largura, na mesma proporção do grande.
   Cada quadro é posicionado pelo data-slot; quando o JS avança os slots, a transição faz o
   revezamento em sentido horário: esquerda → centro → direita → grande → esquerda. */
.kv-stage { position: relative; height: 151.696rem; margin-top: 7.07rem; }
.kv-card {
  --kv-ease: 1.1s cubic-bezier(0.7, 0, 0.2, 1);
  position: absolute;
  top: 0;
  width: 65.6667rem;
  height: 37.125rem;
  aspect-ratio: auto;
  transition: left var(--kv-ease), top var(--kv-ease), width var(--kv-ease), height var(--kv-ease);
}
.kv-card[data-slot="0"] { left: 28rem; z-index: 1; }
.kv-card[data-slot="1"] { left: 95.1667rem; }
.kv-card[data-slot="2"] { left: 162.3333rem; }
.kv-card[data-slot="3"] { left: 28rem; top: 38.625rem; width: 200rem; height: 113.071rem; z-index: 2; }
@keyframes kv-fade { from { opacity: 0; } }

/* ---------- Frase de compromisso ---------- */

.statement {
  padding: 21.42rem var(--margin) 9.72rem;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.09;
}
.statement__lead {
  display: block;
  font-size: max(15px, 5.05rem);
}
.statement__em {
  display: block;
  font-family: var(--serif);
  font-style: normal;
  font-size: max(26px, 10.285rem);
  color: var(--blue);
}

/* ---------- Serviços ---------- */

.services { padding: 11.7rem var(--margin) 11.1rem; text-align: center; }
/* entrada em cascata (classes aplicadas por script.js nas seções Serviços e Sobre) */
.reveal .reveal-item {
  opacity: 0;
  translate: 0 6rem;
  transition: opacity 0.9s ease calc(var(--i) * 0.18s),
    translate 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) calc(var(--i) * 0.18s),
    transform 0.25s, filter 0.25s, background-color 0.25s, color 0.25s;
}
.reveal.is-in .reveal-item { opacity: 1; translate: 0 0; }
.services__list {
  display: grid;
  gap: 9.4rem;
  margin: 8.44rem 0 11.44rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: max(34px, 9.8449rem);
  line-height: 1;
  letter-spacing: 0.01em;
}

.services__list a { color: inherit; transition: color 0.25s; }
.services__list a:hover,
.services__list a:focus-visible { color: var(--blue); }

/* ---------- Clientes ---------- */

.clients { padding: 10.12rem 0 7.7rem; border-bottom: 1px solid var(--rule); }

.carousel {
  --w: 28.52rem;   /* lado do card */
  --g: 9.5rem;     /* espaço entre cards */
  --m: 4.136rem;   /* moldura do card ativo */
  position: relative;
  height: calc(var(--w) + 2 * var(--m));
  margin-top: 7.1rem;
  overflow: hidden;
}
/* Moldura fixa no centro: os cards deslizam por dentro dela */
.carousel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: calc(var(--w) + 2 * var(--m));
  height: 100%;
  border-radius: 5rem;
  background: rgba(217, 217, 217, 0.5);
  transform: translateX(-50%);
}
[data-theme="dark"] .carousel::before { background: rgba(255, 255, 255, 0.1); }
[data-theme="dark"] .client:not(.is-active)::after { background: #3d3d3d; }
.carousel__track { position: absolute; inset: var(--m) 0 auto 50%; }
/* Cada card é posicionado pela distância (--d) até o card em destaque;
   --s (-1, 0 ou 1) abre o espaço da moldura ao redor do destaque. */
.client {
  position: absolute;
  top: 0;
  left: calc(var(--w) / -2);
  width: var(--w);
  height: var(--w);
  padding: 0;
  border: 0;
  border-radius: 2rem;
  background: none;
  cursor: pointer;
  transform: translateX(calc(var(--d) * (var(--w) + var(--g)) + var(--s) * var(--m)));
  transition: transform 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}
.client.is-wrapping { transition: none; }
.client::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #bebebe;
  transition: background-color 0.5s 0.2s;
}
.client img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  /* alguns PNGs exportados pelo Figma vêm esticados; preencher o quadrado devolve a proporção do layout */
  object-fit: fill;
  filter: grayscale(1);
  transition: filter 0.5s 0.2s;
}
/* foto mais alta que o card: recortada como no layout */
.client--crop img { object-fit: cover; object-position: 0 6%; }
.client.is-active { cursor: default; }
.client.is-active::after { background: var(--blue); }
.client.is-active img { filter: none; }

.testimonial { margin-top: 3.95rem; text-align: center; transition: opacity 0.3s; }
.testimonial.is-changing { opacity: 0; }
.testimonial__name {
  font-family: var(--serif);
  font-size: max(24px, 3.9734rem);
  line-height: 1;
  text-transform: uppercase;
}
.testimonial__role {
  margin-top: 0.4rem;
  font-size: max(11px, 1.8734rem);
  line-height: 1.65;
  text-transform: uppercase;
}
.testimonial__quote {
  width: max(260px, 33.1rem);
  /* reserva 5 linhas: clientes sem depoimento não fazem a página pular */
  min-height: calc(1.55em * 5);
  margin: 2.4rem auto 0;
  font-size: max(13px, 2rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
}

/* ---------- Sobre ---------- */

.about {
  display: grid;
  grid-template-columns: 78.04rem 83rem;
  gap: 3rem;
  padding: 11.75rem 0 0 48.46rem;
}
.about__photo {
  width: 100%;
  aspect-ratio: 780.4 / 1172.44;
  border-radius: 2rem;
  object-fit: cover;
  object-position: bottom;
}
.about__name {
  margin-top: 5.12rem;
  font-family: var(--serif);
  font-size: max(30px, 8.352rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.about__text {
  display: grid;
  gap: 1.74em;
  max-width: 80.1rem;
  margin-top: 5rem;
  line-height: 1.74;
}

/* ---------- Contato ---------- */

.contact { padding: 14.56rem var(--margin) 13.36rem; }
.contact__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.412rem;
  margin-top: 5.6rem;
}
.contact__actions .button--green { justify-self: end; }

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

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8.64rem;
  height: 27.16rem;
  border-block: 1px solid var(--rule);
}
.social__handle {
  flex: 1;
  font-size: max(11px, 2.0154rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.social__handle:first-child { text-align: right; }
.social__handle:hover { color: var(--blue); }
.social__symbol { width: 11.32rem; height: auto; }

/* assinatura G.Nascimento ocupa a largura toda; fio azul de 3rem fecha a página */
.footer { border-bottom: 3rem solid var(--blue); }
.footer__signature { margin-top: 13.36rem; }
.footer__signature img { display: block; width: 100%; height: auto; }
[data-theme="dark"] .footer__signature img { filter: invert(1); }

.footer__bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 3.03rem 5.14rem;
  font-size: max(10px, 1.7734rem);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.footer__bar > :last-child { justify-self: end; }
.footer__links { display: flex; gap: 14.8rem; }
.footer__bar a:hover { color: var(--blue); }

/* ---------- Página de projeto (projeto.html) ---------- */

/* Sem banner atrás, o header fica sobre o fundo da página enquanto ela está no topo:
   no modo claro, logo, menu e ícones ficam pretos. Depois de rolar vale o .is-scrolled. */
:root:not([data-theme="dark"]) .header--page:not(.is-scrolled) .header__logo img,
:root:not([data-theme="dark"]) .header--page:not(.is-scrolled) .theme-toggle__icon { filter: brightness(0); }
:root:not([data-theme="dark"]) .header--page:not(.is-scrolled) .nav__link:not(.is-active) { color: var(--black); }
:root:not([data-theme="dark"]) .header--page:not(.is-scrolled) .nav__link:not(.is-active):hover { background: rgba(0, 0, 0, 0.08); }
:root:not([data-theme="dark"]) .header--page:not(.is-scrolled) .header__toggle span { background: var(--black); }

/* Modo resumido (Figma "Case Small"): uma coluna, imagens em largura total.
   Modo completo (Figma "Case Full"): duas colunas de 985px, texto à esquerda e imagens à direita. */
.case {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 19.89rem var(--margin) 0;
}
.case[data-mode="full"] { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3rem; }
.case[data-mode="full"] .case__head { grid-column: 1 / -1; }

.case__title {
  margin: 3.1rem 0 2.4rem;
  font-family: var(--serif);
  font-size: max(30px, 8.352rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.01em;
}

/* créditos entre dois fios (preto a 30% no Figma) */
.case__meta {
  display: grid;
  gap: 1.3rem;
  padding: 3.65rem 0 3.5rem;
  border-block: 1px solid var(--rule);
  border-block-color: color-mix(in srgb, var(--fg) 30%, transparent);
  font-size: var(--text-label);
  line-height: 1.2;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.case__meta strong { font-weight: 700; }

.case__toggle {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-top: 4.02rem;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: var(--text-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}
.case__toggle-icon {
  display: grid;
  place-items: center;
  width: max(22px, 3.29rem);
  height: max(22px, 3.29rem);
  border-radius: 50%;
  background: rgba(110, 110, 110, 0.2);
  transition: transform 0.4s, background-color 0.25s;
}
.case__toggle-icon img { width: 73%; height: auto; }
.case__toggle:hover .case__toggle-icon { background: rgba(110, 110, 110, 0.4); }
/* aberto: o + gira e vira × */
.case__toggle[aria-expanded="true"] .case__toggle-icon { transform: rotate(45deg); }
[data-theme="dark"] .case__toggle-icon img { filter: invert(1); }

.case__about { max-width: 97.64rem; margin-top: 4.51rem; line-height: 1.739; }
.case__about h2 { font-size: inherit; font-weight: 700; text-transform: uppercase; }
.case__about p + h2 { margin-top: 1.739em; }

.case__gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 4.82rem;
}
.case__shot { aspect-ratio: 2000 / 1131; border-radius: 1.3rem; overflow: hidden; }
.case__shot--wide { grid-column: 1 / -1; }
.case__shot img { width: 100%; height: 100%; object-fit: cover; }
.case[data-mode="full"] .case__gallery { grid-template-columns: minmax(0, 1fr); align-content: start; margin-top: 0; }
.case[data-mode="full"] .case__shot--wide { grid-column: auto; }

/* botões de contato sem a vinheta; no Figma o respiro acima é menor no modo completo */
.contact--case { padding-top: 14.58rem; }
.contact--case .contact__actions { margin-top: 0; }
.case[data-mode="full"] + .contact--case { padding-top: 10.46rem; }

/* ---------- Menu acima do banner ---------- */

/* O banner começa onde a barra de menu termina. Atrás da barra fica um reflexo da faixa
   superior do banner atual, que o desfoque do header transforma no efeito translúcido. */
.menu-acima .hero { --bar: 11.95rem; margin-top: var(--bar); overflow: visible; }
.hero__backdrop {
  position: absolute;
  inset: calc(-1 * var(--bar)) 0 auto 0;
  height: var(--bar);
  overflow: hidden;
}
.hero__backdrop .hero__slide {
  inset: auto 0 0 0;
  height: 123.68rem;
  transform: scaleY(-1);
}

/* ---------- Menu compacto ---------- */

/* O menu do layout ocupa quase toda a largura útil em 2560px; em telas menores ele aperta e depois vira hambúrguer */
@media (max-width: 1700px) {
  .header { padding: 0 4rem; }
  .theme-toggle { margin-left: 2rem; }
  .nav__link { padding: 0 1.8rem; font-size: max(9px, 1.6rem); }
}

@media (max-width: 1000px) {
  .header__toggle {
    display: grid;
    align-content: center;
    gap: 7px;
    width: 44px;
    height: 100%;
    padding: 0 8px;
    border: 0;
    background: none;
    cursor: pointer;
  }
  .header__toggle span { height: 2px; background: #fff; transition: transform 0.25s; }
  .header__toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .header__toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.92);
  }
  .nav.is-open { display: flex; }
  /* no menu hambúrguer o botão de tema fica na barra, antes do hambúrguer */
  .theme-toggle { order: 1; width: 36px; height: 36px; margin: 0 6px 0 0; }
  .header__toggle { order: 2; }
  .nav__link { height: 44px; padding: 0 28px; border-radius: 44px; font-size: 13px; }
  .header.on-light-nav:not(.is-scrolled) .nav__link:not(.is-active) { color: #fff; }
  :root:not([data-theme="dark"]) .header--page:not(.is-scrolled) .nav__link:not(.is-active) { color: #fff; }
}

/* ---------- Mobile ---------- */

@media (max-width: 800px) {
  html { font-size: calc(100vw / 100); scroll-padding-top: 18rem; }

  :root {
    --margin: 5rem;
    --gap: 3rem;   /* no celular o espaço entre imagens continua 3rem; 1,5rem ficaria apertado */
    --text-label: 2.8rem;
    --text-body: 4rem;
  }

  .header { height: 16rem; }
  .menu-acima .hero { --bar: 16rem; }
  .hero__backdrop .hero__slide { height: 120rem; }
  .header__logo img { width: 46rem; }
  .hero { height: 120rem; }
  .hero__dot { width: 6rem; height: 1.4rem; }
  .hero__dots { gap: 2rem; bottom: 5rem; }

  .pill { height: 7.6rem; padding: 0 5rem; border-radius: 7.6rem; }
  .tile::after { width: 70rem; height: 10rem; border-radius: 10rem; font-size: 3.2rem; }
  .button, .button--green, .button--outline { width: 100%; height: 16rem; border-radius: 2.8rem; font-size: 6rem; }
  .tile { border-radius: 2.4rem; }

  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .logos { --logo-scale: 1.7; height: 24rem; }
  .logos__track li { margin-right: 10rem; }
  .logos__track { animation-duration: 13.3s; }
  .projects { padding-top: 12rem; padding-bottom: 14rem; }
  .projects .grid { margin-top: 8rem; }
  .projects .button { margin-top: 8rem; }

  .keyvisual { padding-top: 12rem; }
  /* uma coluna: os 4 quadros têm o mesmo tamanho e descem uma casa; o de baixo reaparece no topo */
  .kv-stage { height: 212.52rem; margin-top: 8rem; }
  .kv-card, .kv-card[data-slot="3"] { left: var(--margin); width: 90rem; height: 50.88rem; }
  .kv-card[data-slot="0"] { left: var(--margin); top: 0; }
  .kv-card[data-slot="1"] { left: var(--margin); top: 53.88rem; }
  .kv-card[data-slot="2"] { left: var(--margin); top: 107.76rem; }
  .kv-card[data-slot="3"] { top: 161.64rem; }
  .kv-card.is-wrapping { transition: none; animation: kv-fade 0.9s; }

  .statement { padding: 16rem var(--margin) 4rem; }
  .statement__lead { font-size: 4.6rem; }
  .statement__em { font-size: 8.6rem; }
  .services { padding-block: 16rem 14rem; }
  .services__list { gap: 6rem; margin-block: 9rem 11rem; font-size: 11rem; }

  .clients { padding-block: 14rem 12rem; }
  .carousel { --w: 44rem; --g: 6rem; --m: 5rem; margin-top: 8rem; }
  .client { border-radius: 4rem; }
  .carousel::before { border-radius: 8rem; }
  .testimonial { margin-top: 6rem; }
  .testimonial__name { font-size: 8rem; }
  .testimonial__role { font-size: 3.2rem; }
  .testimonial__quote { width: auto; margin: 4rem var(--margin) 0; font-size: 4rem; }

  .about { grid-template-columns: 1fr; gap: 8rem; padding: 14rem var(--margin) 0; }
  .about__photo { border-radius: 4rem; }
  .about__name { margin-top: 5rem; font-size: 9.4rem; }
  .about__text { max-width: none; margin-top: 5rem; }

  .contact { padding-block: 16rem 14rem; }

  /* página de projeto: sempre uma coluna; no modo completo o texto vem antes das imagens */
  .case, .case[data-mode="full"] { grid-template-columns: minmax(0, 1fr); padding-top: 26rem; }
  .case__title { margin: 5rem 0; font-size: 12rem; }
  .case__meta { gap: 2.4rem; padding: 6rem 0; }
  .case__toggle { gap: 3rem; margin-top: 6rem; }
  .case__toggle-icon { width: 7rem; height: 7rem; }
  .case__about { max-width: none; margin-top: 7rem; }
  .case__gallery, .case[data-mode="full"] .case__gallery { grid-template-columns: minmax(0, 1fr); margin-top: 8rem; }
  .case__shot--wide { grid-column: auto; }
  .case__shot { border-radius: 2.4rem; }
  .contact--case, .case[data-mode="full"] + .contact--case { padding-top: 14rem; }
  .contact__actions { grid-template-columns: 1fr; gap: 4rem; margin-top: 8rem; }

  .social { flex-direction: column; gap: 5rem; height: auto; padding-block: 9rem; }
  .social__handle { flex: none; font-size: 3rem; }
  .social__symbol { order: -1; width: 18rem; }

  .footer__signature { margin-top: 9rem; }
  .footer__bar {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 5rem;
    padding: 7rem var(--margin) 8rem;
    font-size: 3rem;
  }
  .footer__bar > :last-child { justify-self: center; }
  .footer__links { gap: 8rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
