/* ==========================================================================
   Camila Caetano Lopes · Portfólio — Home
   Estilo minimalista: muito espaço em branco, contraste sóbrio
   e vermelho reservado só para destaques.
   ========================================================================== */

/* ---------- Tokens ----------
   O tema ESCURO é o padrão: mora no :root, então vale mesmo sem JavaScript.
   O claro é a variação, aplicada quando o <html> recebe data-mode="light".
   (Não usamos data-theme: o visualizador de artifacts grava esse atributo
   com o tema dele e sobrescreveria a escolha da pessoa.) */
:root {
  /* Superfícies e texto (tema escuro — padrão) */
  color-scheme: dark;
  --bg: #0e0e10;
  --surface: #17171a;
  --surface-2: #1e1e22;
  --ink: #f4f4f2;
  --text-2: #b6b6be;
  --text-3: #8a8a94;
  --line: #27272c;
  --line-strong: #34343b;

  /* Vermelho: só para destaque, botão principal e acentos */
  --accent: #ff5a6b;
  --accent-hover: #ff7784;
  --accent-soft: rgba(255, 90, 107, .14);
  --on-accent: #1a0509;

  --green: #2fd36f;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 28px -16px rgba(0, 0, 0, .7);
  --shadow-lg: 0 1px 2px rgba(0, 0, 0, .4), 0 28px 50px -24px rgba(0, 0, 0, .8);

  /* Véu vermelho do fundo: no escuro precisa ser mais presente
     para não sumir no preto */
  --tint-1: rgba(255, 90, 107, .13);
  --tint-2: rgba(255, 90, 107, .09);
  --tint-3: rgba(200, 30, 51, .10);
  --grain: .05;

  /* Não mudam com o tema */
  --radius: 18px;
  --radius-lg: 26px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-script: "Pinyon Script", "Snell Roundhand", "Apple Chancery", cursive;
}

/* ---------- Tema claro (variação) ---------- */
:root[data-mode="light"] {
  color-scheme: light;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-2: #f4f4f2;
  --ink: #16161a;
  --text-2: #4a4a52;
  --text-3: #83838d;
  --line: #e7e7e4;
  --line-strong: #d8d8d4;

  --accent: #c81e33;
  --accent-hover: #a81729;
  --accent-soft: rgba(200, 30, 51, .10);
  --on-accent: #ffffff;

  --green: #1a9e50;

  --shadow-sm: 0 1px 2px rgba(20, 20, 26, .05);
  --shadow: 0 1px 2px rgba(20, 20, 26, .04), 0 12px 28px -16px rgba(20, 20, 26, .18);
  --shadow-lg: 0 1px 2px rgba(20, 20, 26, .04), 0 28px 50px -24px rgba(20, 20, 26, .28);

  --tint-1: rgba(200, 30, 51, .10);
  --tint-2: rgba(200, 30, 51, .07);
  --tint-3: rgba(168, 23, 41, .05);
  --grain: .035;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .3s var(--ease), color .3s var(--ease);
}

/* ---------- Textura do fundo ----------
   Camada fixa atrás de todo o conteúdo. São manchas de vermelho bem diluídas,
   com queda suave (o desfoque vem do próprio degradê, sem custo de filter),
   mais um grão fino por cima para o fundo não ficar chapado.
   Para deixar mais ou menos forte, mexa em --tint-1/2/3 e --grain lá no topo. */
.bg-layer {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(38vw 34vw at 6% 0%, var(--tint-1), transparent 68%),
    radial-gradient(32vw 28vw at 96% 12%, var(--tint-2), transparent 66%),
    radial-gradient(44vw 34vw at 82% 56%, var(--tint-3), transparent 70%),
    radial-gradient(36vw 30vw at 2% 82%, var(--tint-2), transparent 68%),
    var(--bg); /* cor de base no fim da pilha: deixa a camada opaca,
                  que é o que faz o grão de cima ter com o que se misturar */
  transition: background .3s var(--ease);
}
.bg-layer::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: var(--grain);
  mix-blend-mode: overlay;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
h1, h2, h3, p { margin: 0; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3 { font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 10px; }

.container { width: 100%; max-width: 980px; margin-inline: auto; padding-inline: 24px; }

/* Palavras em destaque */
.accent { color: var(--accent); }
.muted { color: var(--text-3); }
/* Pinyon Script tem altura-x pequena, por isso sobe um pouco o corpo
   e ganha respiro nas laterais para as curvas não encostarem no texto ao lado. */
.script {
  font-family: var(--font-script);
  font-weight: 400;
  letter-spacing: 0;
  font-size: 1.38em;
  line-height: .9;
  padding: 0 .1em 0 .04em;
  position: relative;
  top: .05em;
}

/* ---------- Brilho que acompanha o mouse ----------
   O JS escreve --mx/--my com a posição do ponteiro dentro do elemento
   e o degradê radial segue esse ponto. Sem hover (toque), nada acontece. */
.glow { position: relative; isolation: isolate; overflow: hidden; }
.glow::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(
    var(--glow-size, 120px) circle at var(--mx, 50%) var(--my, 50%),
    var(--glow, var(--accent-soft)), transparent 70%
  );
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.glow:hover::before { opacity: 1; }

.icon {
  width: 1em; height: 1em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}

.skip-link {
  position: absolute; left: 24px; top: -64px; z-index: 100;
  padding: 12px 20px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 15px;
  transition: top .2s;
}
.skip-link:focus { top: 16px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  padding-top: 20px; padding-bottom: 20px;
  transition: padding .3s var(--ease);
}
/* O fundo da barra ocupa a janela inteira, não só a largura do container */
.topbar::before {
  content: ""; position: absolute; z-index: -1;
  top: 0; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  opacity: 0;
  transition: opacity .3s, border-color .3s;
}
.topbar.is-stuck::before { opacity: 1; border-bottom-color: var(--line); }
.topbar.is-stuck { padding-top: 14px; padding-bottom: 14px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand-mark {
  width: 11px; height: 11px; border-radius: 50%;
  border: 2.5px solid var(--accent);
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: scale(1.25); }

.nav { display: flex; gap: 6px; margin-left: 12px; }
.nav a {
  padding: 8px 14px; border-radius: 999px;
  font-size: 15.5px; font-weight: 500; color: var(--text-2);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }

.topbar-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Troca de idioma */
.lang-btn {
  height: 38px; padding: 3px; border-radius: 999px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
}
.lang-btn span {
  min-width: 34px; height: 30px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center;
  color: var(--text-3);
  transition: background .25s var(--ease), color .25s;
}
.lang-btn span.on { background: var(--ink); color: var(--bg); }
.lang-btn:hover span:not(.on) { color: var(--ink); }

/* WhatsApp no topo: sempre à mão, em todas as páginas */
.wa-top {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 16px 0 12px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  --glow: rgba(255, 255, 255, .42); --glow-size: 90px;
  transition: background .25s, transform .3s var(--ease);
}
.wa-top:hover { background: var(--accent-hover); transform: translateY(-1px); }
.wa-top .ic-wa { width: 18px; height: 18px; }
.menu .menu-wa { display: flex; align-items: center; gap: 10px; margin-top: 4px; color: var(--accent); font-weight: 600; }
.menu .menu-wa .ic-wa { width: 20px; height: 20px; }

/* Botões redondos (tema e menu) */
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color .25s, transform .3s var(--ease);
}
.icon-btn:hover { border-color: var(--line-strong); transform: translateY(-1px); }

.theme-btn svg {
  width: 17px; height: 17px;
  fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
  grid-area: 1 / 1;
  transition: opacity .25s, transform .4s var(--ease);
}
/* Padrão (escuro): aparece a lua. No tema claro, troca pelo sol. */
.theme-btn .ic-sun { opacity: 0; transform: rotate(60deg) scale(.6); }
.theme-btn .ic-moon { opacity: 1; transform: none; }
:root[data-mode="light"] .theme-btn .ic-sun { opacity: 1; transform: none; }
:root[data-mode="light"] .theme-btn .ic-moon { opacity: 0; transform: rotate(-60deg) scale(.6); }

/* Menu (só no mobile) */
.menu-btn { display: none; gap: 4.5px; grid-auto-flow: row; place-content: center; }
.menu-btn span {
  display: block; width: 15px; height: 1.8px; border-radius: 2px;
  background: var(--ink);
  transition: transform .3s var(--ease), opacity .2s;
}
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.2px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.1px) rotate(-45deg); }

.menu {
  position: absolute; right: 24px; top: 72px;
  min-width: 210px; padding: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  transform-origin: top right;
  animation: pop .26s var(--ease);
}
.menu[hidden] { display: none; }
.menu a { padding: 12px 14px; border-radius: 12px; font-size: 16px; font-weight: 500; transition: background .2s; }
.menu a:hover { background: var(--surface-2); }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-6px); } }

/* ---------- Hero ---------- */
.hero { padding-top: 84px; padding-bottom: 96px; }

.eyebrow {
  display: inline-block;
  font-size: 14.5px; font-weight: 500; letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 30px;
}

.hero-title {
  font-size: clamp(2.5rem, 6.4vw, 4.1rem);
  line-height: 1.08;
}
.hero-title .line { display: block; text-wrap: balance; }

.hero-p {
  margin-top: 30px;
  max-width: 54ch;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-2);
  text-wrap: pretty;
}

.hero-tags {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 30px;
}
.hero-tags li {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  background: var(--surface);
  --glow: var(--accent-soft);
  --glow-size: 72px;
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.hero-tags li:hover {
  border-color: var(--line-strong);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: var(--ink);
  transform: translateY(-1px);
}

.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 42px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px;
  font-size: 16px; font-weight: 600;
  white-space: nowrap;
  transition: transform .3s var(--ease), background .25s, box-shadow .3s var(--ease), border-color .25s, color .25s;
}
.btn .icon { font-size: 17px; transition: transform .35s var(--ease); }

/* Sobre o vermelho o brilho é um clarão branco; sobre as superfícies claras,
   é o próprio vermelho da marca. */
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 10px 24px -14px var(--accent);
  --glow: rgba(255, 255, 255, .42);
  --glow-size: 130px;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 16px 30px -14px var(--accent); }

.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  --glow: var(--accent-soft);
  --glow-size: 120px;
}
.btn-ghost:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.btn-ghost:hover .icon { transform: translateY(2px); }

.ic-wa { width: 20px; height: 20px; flex-shrink: 0; }
.wa-bubble { fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; }
.wa-phone { fill: currentColor; }

/* Botão discreto dentro das linhas de contato */
.ghost-btn {
  display: inline-flex; align-items: center; gap: 7px;
  flex-shrink: 0;
  min-height: 38px; padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: border-color .25s, color .25s, background .25s;
}
.ghost-btn .icon { font-size: 15px; }
.ghost-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ghost-btn.is-done { color: var(--green); border-color: var(--green); background: transparent; }

/* ---------- Chip e cabeçalho de seção ---------- */
.chip {
  display: inline-block;
  padding: 6px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px; font-weight: 600; letter-spacing: .01em;
  color: var(--text-2);
}

.section-head { margin-bottom: 44px; }
.section-head h2 {
  margin-top: 18px;
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  max-width: 18ch;
  text-wrap: balance;
}
.section-p { margin-top: 16px; max-width: 48ch; font-size: 17px; color: var(--text-2); }

/* ---------- Projetos ---------- */
.projects { padding-top: 40px; padding-bottom: 96px; }

.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; }

.project {
  display: block;
  transition: transform .5s var(--ease);
}
.project:hover { transform: translateY(-4px); }

.project-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  transition: border-color .35s, box-shadow .5s var(--ease);
}
.project:hover .project-media { border-color: var(--line-strong); box-shadow: var(--shadow-lg); }

/* Proporções aceitas no campo "ratio" de projetos.js */
.project-media.r-4x3  { aspect-ratio: 4 / 3; }
.project-media.r-16x9 { aspect-ratio: 16 / 9; }
.project-media.r-3x2  { aspect-ratio: 3 / 2; }
.project-media.r-4x5  { aspect-ratio: 4 / 5; }

.project-media > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s var(--ease);
}
.project:hover .project-media > img { transform: scale(1.04); }

/* Placeholder: espaço reservado para a imagem que você vai inserir */
.placeholder {
  display: grid; place-items: center; gap: 12px;
  width: 100%; height: 100%;
  color: var(--text-3);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
  transition: color .3s;
}
.project:hover .placeholder { color: var(--accent); }
.placeholder svg {
  width: 30px; height: 30px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.placeholder span {
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
}

.project-tag {
  position: absolute; z-index: 2; top: 14px; left: 14px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}

.project-info {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 4px 0;
}
.project-info h3 { font-size: 20px; letter-spacing: -0.025em; }
.project-info p { margin-top: 5px; font-size: 14.5px; color: var(--text-3); }

.arrow {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  font-size: 15px; color: var(--text-2);
  transition: transform .4s var(--ease), background .3s, color .3s, border-color .3s;
}
.project:hover .arrow { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: rotate(45deg); }

/* ---------- Contato ---------- */
.contact { padding-bottom: 100px; }

.contact-card {
  padding: 52px 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.contact-card h2 {
  margin-top: 18px;
  font-size: clamp(1.9rem, 4.4vw, 2.7rem);
  max-width: 20ch;
  text-wrap: balance;
}
.contact-actions { margin-top: 32px; }


.contact-list {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.contact-row {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-ic {
  flex-shrink: 0;
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface-2);
  color: var(--text-2);
}
.contact-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.contact-ic svg.is-filled { fill: currentColor; stroke: none; }

.contact-data { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.contact-label { font-size: 13px; font-weight: 500; color: var(--text-3); }
.contact-value {
  font-size: 16.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .25s;
}
.contact-value:hover { color: var(--accent); }

/* ---------- Rodapé ---------- */
.footer {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  padding-top: 32px; padding-bottom: 44px;
  border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--text-3);
}
.to-top { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; transition: color .25s; }
.to-top:hover { color: var(--accent); }
.to-top .icon { font-size: 15px; transition: transform .35s var(--ease); }
.to-top:hover .icon { transform: translateY(-3px); }

/* ---------- Aviso de "copiado" ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  transform: translate(-50%, 14px);
  padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.toast[hidden] { display: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Animação ao rolar ---------- */
.js .reveal { opacity: 0; transform: translateY(16px); }
.js .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

/* ==========================================================================
   Página de projeto (projeto.html)
   ========================================================================== */
.case { padding-bottom: 40px; }

.case-hero { padding-top: 56px; padding-bottom: 40px; }
.back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 500; color: var(--text-3);
  transition: color .25s;
}
.back .icon { font-size: 16px; transition: transform .35s var(--ease); }
.back:hover { color: var(--ink); }
.back:hover .icon { transform: translateX(-3px); }
.case-eyebrow {
  margin-top: 40px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
}
.case-title { margin-top: 14px; font-size: clamp(2.8rem, 7.5vw, 5rem); line-height: 1; letter-spacing: -0.045em; }
.case-sub { margin-top: 22px; max-width: 60ch; font-size: 19px; line-height: 1.6; color: var(--text-2); text-wrap: pretty; }

.case-meta {
  margin: 44px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.case-meta div { padding: 18px 20px 0 0; }
.case-meta dt { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.case-meta dd { margin: 6px 0 0; font-size: 15.5px; font-weight: 500; }

/* Imagens clicáveis */
.shot {
  position: relative; display: block; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line);
  cursor: zoom-in;
}
.shot.r-16x9 { aspect-ratio: 16 / 9; }
.shot.r-4x3  { aspect-ratio: 4 / 3; }
.shot.r-4x5  { aspect-ratio: 4 / 5; }
.shot.r-3x2  { aspect-ratio: 3 / 2; }
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.shot:hover img { transform: scale(1.015); }
.shot-zoom {
  position: absolute; right: 14px; bottom: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(10, 10, 14, .6); color: #fff; font-size: 18px;
  backdrop-filter: blur(10px);
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s var(--ease);
}
.shot:hover .shot-zoom, .shot:focus-visible .shot-zoom { opacity: 1; transform: none; }
.case-cover .shot { border-radius: 28px; }

/* Seções de texto: rótulo à esquerda, conteúdo à direita */
.case-sec {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px;
  padding-top: 88px;
}
.case-sec-l { padding-top: 6px; }
.case-sec-r h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); max-width: 20ch; text-wrap: balance; }
.case-sec-r > p { margin-top: 18px; max-width: 62ch; font-size: 17.5px; line-height: 1.7; color: var(--text-2); text-wrap: pretty; }

.case-steps { margin-top: 28px; display: grid; gap: 0; }
.case-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 22px 0; border-top: 1px solid var(--line); }
.case-steps li:last-child { border-bottom: 1px solid var(--line); }
.case-steps h3 { font-size: 18px; letter-spacing: -0.02em; }
.case-steps p { margin-top: 6px; font-size: 16px; line-height: 1.65; color: var(--text-2); max-width: 62ch; }
.blk-n { font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 3px; }

/* Blocos visuais */
.blk { padding-top: 96px; }
.blk-head { max-width: 680px; }
.blk-head h2 { margin-top: 16px; font-size: clamp(1.8rem, 4vw, 2.5rem); text-wrap: balance; }
.blk-head p { margin-top: 14px; font-size: 17px; line-height: 1.65; color: var(--text-2); text-wrap: pretty; }
.blk-media { margin-top: 32px; }

.blk-steps { margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.blk-steps li, .blk-grid figcaption, .rules li { display: flex; gap: 12px; align-items: flex-start; }
.blk-steps b, .blk-grid figcaption b, .rules b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.blk-steps span:not(.blk-n), .blk-grid figcaption span:not(.blk-n), .rules span:not(.blk-n) { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }

.cmp { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cmp-item { margin: 0; }
.cmp-tag {
  display: inline-block; margin-bottom: 12px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text-2);
}
.cmp-tag.depois { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.cmp-item ul { margin-top: 16px; display: grid; gap: 10px; }
.cmp-item li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.cmp-item li i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; margin-top: 1px; }
.cmp-item li i .icon { stroke-width: 2.6; }
.cmp-item li i.antes { background: var(--surface-2); color: var(--text-3); }
.cmp-item li i.depois { background: var(--accent-soft); color: var(--accent); }

/* Página inteira (bloco "pagina") */
.pv { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; align-items: start; }
.pv.is-single { grid-template-columns: minmax(0, 1fr); }
.pv figure { margin: 0; position: relative; }
.pv-desk { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); }
.pv-bar { height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.pv-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.pv-bar span { margin: 0 auto; width: 40%; height: 18px; border-radius: 6px; background: var(--bg); }
.pv-scroll { height: 640px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; background: #fff; }
.pv-scroll img { display: block; width: 100%; }
.pv-mob { border: 8px solid #1a1a1f; border-radius: 36px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.pv-mob .pv-scroll { height: 658px; }
.pv-open {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px; border-radius: 999px;
  background: rgba(10, 10, 14, .72); color: #fff;
  font-size: 12.5px; font-weight: 600; backdrop-filter: blur(8px);
  transition: background .2s;
}
.pv-open:hover { background: var(--accent); color: var(--on-accent); }
.pv-mob .pv-open { right: 50%; transform: translateX(50%); bottom: 14px; }
.pv-mob .pv-open span { display: none; }
.pv-hint { margin-top: 12px; font-size: 13.5px; color: var(--text-3); }

.blk-grid { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; }
.blk-grid figure { margin: 0; }
.blk-grid figcaption { margin-top: 16px; padding: 0 4px; }

.blk-table { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow-x: auto; background: var(--surface); }
.blk-table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.blk-table th, .blk-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.5; }
.blk-table thead th { font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); background: var(--surface-2); }
.blk-table tbody tr:last-child > * { border-bottom: 0; }
.blk-table tbody th { font-weight: 600; white-space: nowrap; }
.blk-table td { color: var(--text-2); }
.blk-table td:last-child { color: var(--ink); }

.tk { margin-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; }
.tk-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.tk-k { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.tk-group { margin-top: 20px; }
.tk-group > b { font-size: 14px; font-weight: 600; }
.tk-group ul { margin-top: 10px; display: grid; gap: 8px; }
.tk-group li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 13.5px; }
.tk-sw { width: 28px; height: 28px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .25); }
.tk-group code { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; }
.tk-h { font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 12px; color: var(--text-3); }
.tk-type { margin-top: 14px; }
.tk-type li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tk-type li:last-child { border: 0; }
.tk-tn b { display: block; font-size: 14px; font-weight: 600; }
.tk-tn span { font-size: 12.5px; color: var(--text-3); }
.tk-ts { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; letter-spacing: -0.02em; }

.code { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #0b0b0f; }
.code-bar { display: flex; align-items: center; gap: 4px; padding: 8px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: #121217; }
.code-tab { height: 34px; padding: 0 14px; border-radius: 8px; font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 13px; color: #9b9ba6; }
.code-tab[aria-selected="true"] { background: rgba(255, 255, 255, .08); color: #f4f4f2; }
.code-dl { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: #ff8a96; transition: background .2s; }
.code-dl:hover { background: rgba(255, 90, 107, .12); }
.code-pane { margin: 0; padding: 22px 24px; overflow-x: auto; font-family: ui-monospace, 'SF Mono', Consolas, monospace; font-size: 13.5px; line-height: 1.65; color: #d6d6de; }

.inv { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.inv-g { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.inv-g > b { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 600; }
.inv-g > b span { font-size: 13px; font-weight: 600; color: var(--accent); font-variant-numeric: tabular-nums; }
.inv-g ul { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.inv-g li { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }

.rules { margin-top: 32px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.rules li { padding: 20px 0; border-top: 1px solid var(--line); }

/* Números, medição e aprendizados */
.case-sec-r > .case-note { margin-top: 12px; font-size: 14.5px; color: var(--text-3); }
.stats { margin-top: 26px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.stat strong { font-size: clamp(1.9rem, 4vw, 2.5rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--accent); white-space: nowrap; }
.stat span { font-size: 14.5px; line-height: 1.5; color: var(--text-2); }

.metrics { margin-top: 26px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.metrics li { padding: 18px 0; border-top: 1px solid var(--line); }
.metrics b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.metrics span { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.55; color: var(--text-2); }

.case-sec-r > .case-quote { margin-top: 20px; max-width: 34ch; font-size: clamp(1.35rem, 2.6vw, 1.75rem); line-height: 1.45; letter-spacing: -0.02em; font-weight: 500; color: var(--ink); text-wrap: pretty; }

/* Próximo projeto */
.case-next {
  margin-top: 104px;
  display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; gap: 28px; align-items: center;
  padding: 14px 28px 14px 14px;
  border: 1px solid var(--line); border-radius: 28px; background: var(--surface);
  transition: border-color .3s, transform .5s var(--ease);
}
.case-next:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.case-next:hover .arrow { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: translateX(3px); }
.case-next-img { display: block; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: var(--surface-2); }
.case-next-img img { width: 100%; height: 100%; object-fit: cover; }
.case-next-label { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.case-next strong { display: block; margin-top: 6px; font-size: clamp(1.6rem, 3.4vw, 2.2rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.1; }
.case-next-cat { display: block; margin-top: 6px; font-size: 14.5px; color: var(--text-2); }

.case ~ .contact { padding-top: 104px; }

/* Galeria */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  padding: 64px 80px;
  background: rgba(6, 6, 9, .92);
  backdrop-filter: blur(8px);
  animation: fade .25s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.lb-fig { margin: 0; width: 100%; height: 100%; display: grid; place-items: center; }
.lb-fig img { max-width: 100%; max-height: 100%; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .1); color: #fff; font-size: 20px;
  transition: background .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox.is-single .lb-prev, .lightbox.is-single .lb-next { display: none; }
.lb-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; }

/* ---------- Responsivo ---------- */
@media (max-width: 820px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .hero { padding-top: 60px; padding-bottom: 72px; }
  .contact-card { padding: 40px 28px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .container { padding-inline: 20px; }
  .menu { right: 20px; }

  .hero { padding-top: 46px; padding-bottom: 60px; }
  .hero-p { font-size: 17px; margin-top: 24px; }
  .hero-cta { margin-top: 34px; gap: 10px; }
  .hero-cta .btn { flex: 1 1 100%; }

  .projects { padding-bottom: 72px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .section-head { margin-bottom: 34px; }

  .contact-card { padding: 32px 22px; }
  .contact-actions .btn { width: 100%; }

  /* Linha de contato empilha, mas o botão continua fácil de tocar */
  .contact-row { flex-wrap: wrap; }
  .contact-data { width: calc(100% - 56px); }
  .contact-row .ghost-btn { margin-left: 56px; }

  .footer { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* Página de projeto: tablet e celular */
@media (max-width: 820px) {
  .case-sec { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-top: 72px; }
  .case-sec-l { padding-top: 0; }
  .blk { padding-top: 76px; }
  .case-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 8px; }
  .tk { grid-template-columns: minmax(0, 1fr); }
  .pv { grid-template-columns: minmax(0, 1fr); }
  .pv-scroll { height: 520px; }
  .pv-mob { width: 260px; justify-self: center; }
  .pv-mob .pv-scroll { height: 520px; }
  .inv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .blk-steps { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .lightbox { padding: 72px 16px; }
  .lb-prev, .lb-next { top: auto; bottom: 14px; transform: none; }
}

@media (max-width: 620px) {
  .wa-top { width: 38px; padding: 0; justify-content: center; }
  .wa-top span { display: none; }
  .topbar-tools { gap: 6px; }
  .case-hero { padding-top: 36px; }
  .case-eyebrow { margin-top: 28px; }
  .case-sub { font-size: 17px; }
  .case-cover .shot { border-radius: 20px; }
  .cmp, .blk-grid, .stats, .metrics, .rules, .inv { grid-template-columns: minmax(0, 1fr); }
  .cmp { gap: 36px; }
  .stat strong { white-space: normal; }
  .tk-card { padding: 20px; }
  .tk-type li { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .case-next { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 12px 12px 22px; }
  .case-next-body { padding: 0 8px; }
  .case-next .arrow { display: none; }
  .case ~ .contact { padding-top: 80px; }
  /* Tabelas viram cartões empilhados no celular */
  .blk-table thead { display: none; }
  .blk-table table, .blk-table tbody, .blk-table tr, .blk-table th, .blk-table td { display: block; width: 100%; }
  .blk-table tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .blk-table tbody tr:last-child { border-bottom: 0; }
  .blk-table th, .blk-table td { padding: 2px 0; border: 0; }
  .blk-table tbody th { white-space: normal; margin-bottom: 6px; }
  .blk-table td::before { content: attr(data-l) ": "; font-weight: 600; color: var(--text-3); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
}
