:root {
  --tinta: #0a0a0a;
  --cinza: #6b6b6b;
  --linha: rgb(0 0 0 / .08);
  --fundo: #fff;
  --verde: #00780e;
  --verde-bg: rgb(79 244 64 / .24);
  --titulo: 'Familjen Grotesk', sans-serif;
  --texto: 'Space Grotesk', sans-serif;
  --lado: clamp(16px, 5vw, 80px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { font: 300 clamp(17px, 1.3vw, 21px)/1.5 var(--texto); color: var(--tinta); background: var(--fundo); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
b { font-weight: 700; }
:focus-visible { outline: 2px solid var(--tinta); outline-offset: 3px; border-radius: 8px; }

/* Títulos: {chaves} em negrito itálico, como no Figma */
.titulo { font: 400 clamp(2.6rem, 6vw, 5.6rem)/1 var(--titulo); letter-spacing: -.02em; }
.titulo em { font-weight: 700; font-style: italic; }
.titulo .palavra { display: inline-block; overflow: clip; padding-block: .1em; margin-block: -.1em; vertical-align: top; }
.palavra > span { display: inline-block; }

/* Moldura: cantos em L no topo de cada seção (os "Vector 1/2" do Figma) */
.moldura { position: relative; border-top: 1px solid var(--linha); }
.moldura::before, .moldura::after { content: ''; position: absolute; top: -1px; width: 34px; height: 34px; border-top: 1.5px solid var(--tinta); }
.moldura::before { left: 0; border-left: 1.5px solid var(--tinta); }
.moldura::after { right: 0; border-right: 1.5px solid var(--tinta); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .8em 1.5em; border-radius: 99px; border: 1.5px solid rgb(0 0 0 / .15);
  font: 500 1rem/1 var(--texto); background: #fff; white-space: nowrap;
  transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease);
}
.btn span { transition: transform .4s var(--ease); }
.btn:hover { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.btn:hover span { transform: translate(2px, -2px); }
.btn:active { transform: scale(.97); }
.btn--escuro { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.btn--escuro:hover { background: #333; border-color: #333; }
.btn--p { padding: .65em 1.2em; font-size: .9rem; }

.badge { display: inline-flex; align-items: center; gap: .6em; padding: .4em 1em .4em .8em; border-radius: 99px; background: var(--verde-bg); color: var(--verde); font-size: .95rem; }
.badge i { width: 12px; height: 12px; border-radius: 50%; background: var(--verde); animation: pulso 2s infinite; }
@keyframes pulso { 50% { box-shadow: 0 0 0 6px rgb(0 120 14 / .15); } }

/* NAV */
.nav {
  position: fixed; z-index: 10; top: 16px; left: 50%; translate: -50% 0;
  display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  padding: 6px 6px 6px 22px; border-radius: 99px; background: rgb(255 255 255 / .85);
  border: 1.5px solid var(--linha); backdrop-filter: blur(12px); box-shadow: 0 8px 24px rgb(0 0 0 / .06);
  font-size: .9rem; font-weight: 400; white-space: nowrap;
}
.nav > a:not(.btn) { transition: opacity .3s; }
.nav > a:not(.btn):hover { opacity: .5; }
.nav__home { font-weight: 500; }
.nav__sep { width: 1px; height: 18px; background: var(--linha); }

main > section, .hero { margin-inline: var(--lado); }

/* HERO */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 2vw; min-height: 100svh; padding-block: 120px 60px; border-top: 0; }
.hero::before, .hero::after { top: 100px; }
.hero__texto { position: relative; z-index: 2; display: grid; gap: 28px; justify-items: start; }
.hero__titulo { font-size: clamp(3rem, 7vw, 7.2rem); line-height: .95; margin-right: -30%; }
.hero__titulo small { font-size: .7em; }
.hero__sub { max-width: 34em; font-size: clamp(1.05rem, 1.5vw, 1.4rem); }
.hero__acoes { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__foto { position: relative; aspect-ratio: 1024 / 986; border-radius: clamp(24px, 3vw, 48px); overflow: hidden; }
.hero__foto img { width: 100%; height: 100%; object-fit: cover; }
/* Lâminas de vidro: faixas com blur por cima da foto, deslocadas por --x (site.js) */
.laminas { position: absolute; inset: 0 55% 0 0; display: flex; }
.laminas i { flex: 1; backdrop-filter: blur(10px); background: linear-gradient(90deg, rgb(255 255 255 / .06), rgb(0 0 0 / .05)); translate: var(--x, 0) 0; }

/* STACK: 4 faixas por categoria. --dur na linha controla a velocidade; --volta inverte o sentido. */
.stack { padding-block: 64px; border-block: 1px solid var(--linha); }
.stack__rotulo { color: var(--cinza); font-size: .9rem; text-align: center; margin-bottom: 40px; }
.stack__linha { display: grid; grid-template-columns: clamp(120px, 13vw, 180px) minmax(0, 1fr); align-items: center; gap: clamp(14px, 2.5vw, 36px); padding-block: 20px; }
.stack__linha + .stack__linha { border-top: 1px solid var(--linha); }
.stack__cat { font: 500 .75rem/1.3 var(--texto); text-transform: uppercase; letter-spacing: .1em; color: var(--cinza); }
.stack__faixa { display: flex; overflow: clip; mask: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.stack ul { display: flex; flex-shrink: 0; list-style: none; animation: faixa var(--dur, 70s) linear infinite; }
.stack__linha--volta ul { animation-direction: reverse; }
.stack__faixa:hover ul, .stack__faixa:focus-within ul { animation-play-state: paused; }
.stack li { display: grid; align-content: center; gap: 5px; padding-inline: clamp(16px, 2.2vw, 40px); }
.stack li b { font: 700 clamp(1.1rem, 1.9vw, 1.9rem)/1 var(--titulo); color: #8c8c8c; white-space: nowrap; transition: color .3s; }
.stack li small { font: 300 .72rem/1.3 var(--texto); color: var(--cinza); opacity: .5; white-space: nowrap; transition: opacity .3s, color .3s; }
.stack li:hover b { color: var(--tinta); }
.stack li:hover small { opacity: 1; color: var(--tinta); }
@keyframes faixa { to { transform: translateX(-100%); } }

/* PROJETOS */
.projetos { padding-block: 140px; border-top: 0; }
.projetos::before, .projetos::after { display: none; }
.projetos > .titulo { text-align: center; margin-bottom: 80px; }
.projetos__lista { display: grid; gap: 6vh; max-width: 1100px; margin-inline: auto; }
.projeto {
  position: sticky; top: calc(90px + var(--i) * 62px);
  display: grid; gap: 28px; padding: 26px clamp(20px, 3vw, 40px) 40px;
  border-radius: 32px; background: var(--cor); border: 3px solid #fff;
  box-shadow: 0 -6px 40px color-mix(in srgb, var(--brilho) 40%, transparent);
  transform-origin: 50% 0; isolation: isolate; --sombra: 0;
}
/* Escurece quando o próximo card cobre (site.js anima --sombra) */
.projeto::after { content: ''; position: absolute; inset: -3px; border-radius: inherit; background: #000; opacity: var(--sombra, 0); pointer-events: none; }
.projeto header { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 2px solid #fff; color: #555; font-size: .95rem; }
.projeto__titulo { display: flex; justify-content: space-between; gap: 32px; }
.projeto__titulo h3 { font: 700 clamp(1.4rem, 2.6vw, 2.4rem)/1.2 var(--titulo); max-width: 22em; }
.projeto__titulo > span { font-size: 2rem; transition: transform .4s var(--ease); }
.projeto__titulo:hover > span { transform: translateX(8px); }
.projeto__numeros { display: flex; flex-wrap: wrap; gap: 16px 80px; }
.projeto__numeros dt { font: 700 clamp(1.6rem, 2.6vw, 2.4rem)/1 var(--titulo); }
.projeto__numeros dd { color: var(--cinza); font-size: .9rem; margin-top: 6px; }
.projeto__tela { position: relative; aspect-ratio: 16 / 7; overflow: hidden; border-radius: 20px; background: rgb(255 255 255 / .7); padding: 14px; display: flex; gap: 6px; }
.projeto__tela i { width: 10px; height: 10px; border-radius: 50%; background: rgb(0 0 0 / .12); }
.projeto__tela span { position: absolute; inset: 0; display: grid; place-items: center; color: rgb(0 0 0 / .3); font-size: .85rem; }
.projeto__tela img { position: absolute; inset: 34px 0 0; width: 100%; height: calc(100% - 34px); object-fit: cover; object-position: top; display: block; }

/* HISTÓRIA */
.historia { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 6vw, 120px); align-items: center; padding-block: 140px; }
.polaroids { position: relative; height: clamp(360px, 42vw, 620px); }
.polaroid { position: absolute; width: 50%; padding: 4% 4% 14%; background: #fff; box-shadow: 0 24px 48px rgb(0 0 0 / .18); rotate: var(--r); }
.polaroid:first-child { left: 2%; top: 14%; }
.polaroid:last-child { left: 46%; top: 4%; }
.polaroid::before { content: ''; position: absolute; top: -12px; left: 50%; translate: -50% 0; width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #666, #111); z-index: 1; }
.polaroid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; filter: grayscale(1) contrast(1.1); }
.historia__texto { display: grid; gap: 32px; justify-items: start; }
.acende { display: grid; gap: 1.4em; font-size: clamp(1.05rem, 1.5vw, 1.4rem); color: var(--cinza); }
.acende b { color: var(--tinta); font-weight: 500; }

/* SERVIÇOS */
.servicos { display: grid; justify-items: center; gap: 44px; padding-block: 140px; }
.servicos > .titulo { text-align: center; }
.abas { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.aba { font: 500 .9rem/1 var(--texto); padding: .8em 1.3em; border-radius: 99px; border: 0; background: #f2f2f2; color: var(--tinta); cursor: pointer; transition: background .3s, color .3s; }
.aba:hover { background: #e4e4e4; }
.aba[aria-pressed="true"] { background: var(--tinta); color: #fff; }
.planos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; width: 100%; }
.plano {
  display: grid; align-content: start; gap: 20px; padding: clamp(28px, 3vw, 44px); border-radius: 32px;
  background: linear-gradient(#f7f7f7, #e6e6e6); color: var(--tinta);
  transition: background .5s, color .5s, translate .5s var(--ease);
}
.plano__icone { width: 40px; height: 40px; border: 2px solid currentColor; border-radius: 50%; }
.plano h3 { font: 700 clamp(1.4rem, 2vw, 2rem)/1.15 var(--titulo); }
.plano h3 em { font-weight: 400; }
.plano > p:not(.plano__preco) { color: var(--cinza); font-size: .95rem; transition: color .5s; }
.plano__preco { display: grid; gap: 4px; }
.plano__preco small { font-size: .8rem; color: var(--cinza); transition: color .5s; }
.plano__preco strong { font: 700 clamp(2.4rem, 4vw, 3.8rem)/1 var(--titulo); letter-spacing: -.02em; }
.plano .btn { background: var(--tinta); color: #fff; border-color: var(--tinta); }
.plano ul { list-style: none; }
.plano li { padding-block: 14px; border-bottom: 1.5px solid rgb(0 0 0 / .1); font-size: .95rem; transition: border-color .5s; }
.plano li::before { content: '✓  '; }
.plano.ativo { background: #141414; color: #fff; translate: 0 -12px; }
.plano.ativo > p:not(.plano__preco), .plano.ativo .plano__preco small { color: #b3b3b3; }
.plano.ativo .btn { background: #fff; color: var(--tinta); border-color: #fff; }
.plano.ativo li { border-color: rgb(255 255 255 / .12); }

/* CTA + RODAPÉ */
.cta { display: grid; justify-items: center; gap: 40px; padding-block: 160px 120px; text-align: center; }
.cta__titulo { font-size: clamp(3rem, 8vw, 7.5rem); }
.rodape { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-inline: var(--lado); padding-block: 32px; border-top: 1px solid var(--linha); color: var(--cinza); font-size: .9rem; }
.rodape a:hover { color: var(--tinta); }

/* Celular */
@media (max-width: 900px) {
  .hero, .historia { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; }
  .hero__titulo { margin-right: 0; }
  .planos { grid-template-columns: 1fr; }
  .plano.ativo { translate: none; }
  .nav > a:not(.btn):not(.nav__home), .nav__sep { display: none; }
  .projeto { top: calc(80px + var(--i) * 40px); }
  .projeto__titulo > span { display: none; }
  .stack__linha { grid-template-columns: 1fr; gap: 10px; }
  .stack__cat br { display: none; }
  .stack__faixa { mask: linear-gradient(90deg, #000 88%, transparent); }
  .stack li { padding-inline: 0 clamp(20px, 6vw, 40px); }
  .stack li small { white-space: normal; max-width: 22ch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stack ul, .badge i { animation: none; }
  .stack__faixa { mask: none; overflow: visible; }
  .stack ul[aria-hidden] { display: none; }
  .stack ul { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; flex-shrink: 1; row-gap: 16px; }
  .stack li { padding-inline: 0 clamp(20px, 3vw, 44px); }
  .stack li small { opacity: .8; white-space: normal; }
}
