/* =========================================================
   MABG — site institucional
   Paleta tirada do logo: aço escovado + filete dourado
   ========================================================= */
:root {
  --grafite: #0b0b0c;      /* fundo */
  --aco: #17171a;          /* superfícies */
  --prata: #c9ccd1;        /* texto principal */
  --brilho: #f1f2f4;       /* realce metálico */
  --ouro: #d4a12a;         /* acento */
  --ouro-claro: #f2c14e;
  --cinza: #7d7a73;        /* texto secundário */

  --f-display: "Unbounded", system-ui, sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --metal: linear-gradient(100deg, #8d9096 0%, #f1f2f4 22%, #a6a9af 38%, #e4e6e9 55%, #7b7e84 72%, #d9dbdf 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--grafite); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--grafite);
  color: var(--prata);
  font-family: var(--f-body);
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--ouro-claro); outline-offset: 4px; border-radius: 4px; }
.mono { font-family: var(--f-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; }
.eyebrow { color: var(--ouro); margin-bottom: 2rem; display: flex; align-items: center; gap: 0.8rem; }
.eyebrow::before { content: ""; width: 32px; height: 1px; background: var(--ouro); }

/* ---------- Abertura ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100; background: var(--grafite);
  display: grid; place-content: center; gap: 28px; justify-items: center;
}
.loader__mark { width: min(260px, 60vw); opacity: 0; }
.loader__bar { width: min(260px, 60vw); height: 2px; background: #222; overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #8a6414, var(--ouro-claro), var(--ouro)); transform: scaleX(0); transform-origin: left; }

/* ---------- Cena 3D + granulado ---------- */
#cena { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grao 1s steps(4) infinite;
}
@keyframes grao { 0%{transform:translate(0,0)} 25%{transform:translate(-3%,2%)} 50%{transform:translate(2%,-3%)} 75%{transform:translate(-2%,-1%)} }

main, .footer { position: relative; z-index: 2; }

/* ---------- Navegação ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px var(--gutter);
  transition: background .4s, padding .4s;
}
.nav.is-solid { background: rgba(11,11,12,.72); backdrop-filter: blur(14px); padding-block: 12px; }
.nav__logo img { height: 22px; width: auto; }
.nav__links { display: flex; gap: 36px; font-size: 0.92rem; }
.nav__links a, .nav__cta { position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: var(--ouro); transform: scaleX(0); transform-origin: right; transition: transform .45s cubic-bezier(.7,0,.2,1);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  font-size: 0.85rem; padding: 10px 18px; border: 1px solid rgba(212,161,42,.5); border-radius: 999px;
  color: var(--ouro-claro); transition: background .3s, color .3s;
}
.nav__cta:hover { background: var(--ouro); color: #111; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; padding: 120px var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero__words {
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.1rem, 9.4vw, 11rem); line-height: 0.92; letter-spacing: -0.03em;
  display: flex; flex-direction: column; margin-top: auto;
}
.w { display: block; overflow: hidden; padding-bottom: 0.04em; }
/* contorno: deixa o escudo 3D aparecer por trás */
.w--1, .w--3 { color: transparent; -webkit-text-stroke: 1.5px rgba(201,204,209,.55); }
.w--2 { align-self: flex-end; }
.w--2 .ch {
  background: var(--metal); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brilho 6s ease-in-out infinite;
}
@keyframes brilho { 0%,100%{background-position:0% 0} 50%{background-position:100% 0} }
.ch { display: inline-block; will-change: transform; }
.pal { display: inline-block; white-space: nowrap; }
/* no hero o escudo fica NA FRENTE do texto; depois volta para trás */
body.cena-frente #cena { z-index: 3; }

.hero__foot { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-top: 48px; }
.hero__lead { max-width: 30ch; color: var(--prata); font-size: clamp(1rem, 1.3vw, 1.2rem); }
.hero__scroll { color: var(--cinza); display: flex; align-items: center; gap: 12px; }
.hero__scroll i { width: 1px; height: 48px; background: linear-gradient(var(--ouro), transparent); animation: desce 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes desce { 0%{transform:scaleY(0)} 50%{transform:scaleY(1)} 100%{transform:scaleY(1);opacity:0} }

/* ---------- Faixa ---------- */
.marquee {
  border-block: 1px solid rgba(212,161,42,.25); padding: 22px 0; overflow: hidden;
  background: rgba(11,11,12,.6); backdrop-filter: blur(4px);
}
.marquee__track { display: flex; gap: 48px; width: max-content; align-items: center; will-change: transform; }
.marquee__track span {
  font-family: var(--f-display); font-weight: 300; font-size: clamp(1.6rem, 4vw, 3.4rem);
  text-transform: uppercase; letter-spacing: 0.02em; color: var(--prata);
}
.marquee__track b { color: var(--ouro); font-size: 1.2rem; font-weight: 400; }

/* ---------- Manifesto ---------- */
.manifesto { padding: clamp(120px, 22vh, 240px) var(--gutter); max-width: 1500px; }
.manifesto__text {
  font-family: var(--f-display); font-weight: 500; font-size: clamp(1.7rem, 4.6vw, 4.6rem);
  line-height: 1.12; letter-spacing: -0.02em;
}
.manifesto__text .wd { color: rgba(201,204,209,.14); transition: color .2s; }
.manifesto__text .wd.on { color: var(--brilho); }
.manifesto__text .wd.ouro.on { color: var(--ouro-claro); }

/* ---------- Serviços ---------- */
.servicos { position: relative; }
.servicos__pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 56px; padding: 100px 0; overflow: hidden; }
.servicos__head { padding-inline: var(--gutter); }
.big {
  font-family: var(--f-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.2rem, 7vw, 7rem); line-height: 0.95; letter-spacing: -0.03em; color: var(--brilho);
}
.big em { font-style: normal; color: transparent; -webkit-text-stroke: 1.5px var(--ouro); }
.servicos__track { display: flex; gap: 24px; padding-inline: var(--gutter); width: max-content; will-change: transform; }
.card {
  width: min(78vw, 440px); min-height: 360px; padding: 36px 32px;
  background: linear-gradient(160deg, rgba(36,36,40,.82), rgba(17,17,19,.9));
  border: 1px solid rgba(201,204,209,.12); border-radius: 18px; backdrop-filter: blur(6px);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: border-color .4s, transform .5s cubic-bezier(.2,.8,.2,1);
}
.card::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(500px circle at var(--mx, 50%) var(--my, 0%), rgba(212,161,42,.18), transparent 40%);
  opacity: 0; transition: opacity .4s;
}
.card:hover { border-color: rgba(212,161,42,.55); transform: translateY(-6px); }
.card:hover::before { opacity: 1; }
.card__tag { color: var(--ouro); }
.card h3 {
  font-family: var(--f-display); font-weight: 500; font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  line-height: 1.05; color: var(--brilho); margin-top: auto; margin-bottom: 16px; letter-spacing: -0.02em;
}
.card p { color: #a9a6a0; max-width: 32ch; }

/* ---------- Método ---------- */
.metodo { padding: clamp(120px, 20vh, 220px) var(--gutter); }
.passos { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid rgba(201,204,209,.15); }
.passo { padding: 36px 28px 36px 0; border-right: 1px solid rgba(201,204,209,.1); position: relative; }
.passo + .passo { padding-left: 28px; }
.passo:last-child { border-right: 0; }
.passo::before { content: ""; position: absolute; top: -1px; left: 0; height: 2px; width: 100%; background: var(--ouro); transform: scaleX(var(--p, 0)); transform-origin: left; }
.passo__n { color: var(--ouro); }
.passo h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.3rem, 2vw, 1.9rem); color: var(--brilho); margin: 56px 0 14px; }
.passo p { color: #a9a6a0; }

/* ---------- Contato ---------- */
.contato { min-height: 90svh; padding: 120px var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.contato__title {
  font-family: var(--f-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.2rem, 8.6vw, 10rem); line-height: 0.92; letter-spacing: -0.04em; color: var(--brilho);
  overflow: hidden; padding-bottom: .05em;
}
.contato__mail {
  align-self: flex-start; margin-top: 40px; position: relative;
  font-family: var(--f-display); font-weight: 300; font-size: clamp(1.1rem, 3vw, 2.6rem); color: var(--ouro-claro);
  word-break: break-all;
}
.contato__mail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--ouro);
  transform: scaleX(.25); transform-origin: left; transition: transform .6s cubic-bezier(.7,0,.2,1);
}
.contato__mail:hover::after { transform: scaleX(1); }

/* ---------- Área do colaborador ---------- */
.colab { padding: 0 var(--gutter) clamp(100px, 16vh, 180px); }
.colab__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid rgba(201,204,209,.15); }
.colab__item {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 10px 24px;
  padding: 36px 0; border-bottom: 1px solid rgba(201,204,209,.15); transition: padding .4s, background .4s;
}
.colab__item + .colab__item { border-left: 1px solid rgba(201,204,209,.15); padding-left: 32px; }
.colab__item .mono { color: var(--cinza); grid-column: 1; }
.colab__item strong { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.4rem, 3vw, 2.6rem); color: var(--brilho); grid-column: 1; }
.colab__item .arrow { grid-column: 2; grid-row: 1 / 3; align-self: center; font-size: 2rem; color: var(--ouro); transition: transform .4s; padding-right: 24px; }
.colab__item:hover .arrow { transform: translateX(10px); }
.colab__item:hover strong { color: var(--ouro-claro); }

/* ---------- Rodapé ---------- */
.footer { padding: 48px var(--gutter); border-top: 1px solid rgba(201,204,209,.1); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--grafite); }
.footer__logo { width: 120px; }
.footer p { color: var(--cinza); }

/* ---------- Menu do celular ---------- */
.nav__menu { display: none; }
.menu {
  position: fixed; inset: 0; z-index: 45; background: rgba(11,11,12,.97); backdrop-filter: blur(10px);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 110px var(--gutter) 40px;
}
.menu[hidden] { display: none; }
.menu__links { display: flex; flex-direction: column; gap: 6px; }
.menu__links a {
  font-family: var(--f-display); font-weight: 700; text-transform: uppercase; letter-spacing: -0.02em;
  font-size: clamp(1.9rem, 9vw, 3rem); line-height: 1.15; color: var(--brilho);
  padding: 8px 0; border-bottom: 1px solid rgba(201,204,209,.1);
}
.menu__links a:last-child { color: var(--ouro-claro); }
.menu__foot { display: flex; gap: 28px; color: var(--cinza); }
.menu__foot a { color: var(--prata); padding: 8px 0; }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav { gap: 12px; }
  .nav__cta { display: none; }  /* já está dentro do menu */
  .nav__menu {
    display: grid; place-content: center; gap: 7px; width: 44px; height: 44px;
    background: none; border: 1px solid rgba(201,204,209,.25); border-radius: 50%; cursor: pointer;
  }
  .nav__menu span { display: block; width: 18px; height: 1.5px; background: var(--brilho); transition: transform .35s cubic-bezier(.7,0,.2,1); }
  .nav__menu[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
  .nav__menu[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

  /* fora do hero o escudo vira pano de fundo discreto, para não brigar com o texto */
  #cena { transition: opacity .6s; }
  body:not(.cena-frente) #cena { opacity: .28; }

  .hero { padding-top: 96px; }
  .hero__words { font-size: clamp(2.1rem, 10.2vw, 5rem); }
  .hero__foot { flex-direction: column; align-items: flex-start; margin-top: 32px; }
  .manifesto { padding-block: 96px; }
  .servicos__pin { padding: 72px 0; gap: 36px; }
  .servicos__track { flex-direction: column; width: auto; gap: 14px; }
  .card { width: 100%; min-height: 0; padding: 28px 24px; }
  .card h3 { margin-top: 40px; }
  .metodo { padding-block: 72px; }
  .contato { min-height: 0; padding-block: 40px 64px; }
  .contato__mail { margin-top: 28px; }
  .colab { padding-bottom: 72px; }
  .passos { grid-template-columns: 1fr 1fr; }
  .passo:nth-child(2) { border-right: 0; }
  .passo:nth-child(3) { padding-left: 0; }
  .colab__grid { grid-template-columns: 1fr; }
  .colab__item + .colab__item { border-left: 0; padding-left: 0; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 520px) {
  .passos { grid-template-columns: 1fr; }
  .passo, .passo + .passo { padding-left: 0; border-right: 0; }
  .passo h3 { margin-top: 24px; }
  .nav__cta { padding: 8px 14px; font-size: .78rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .manifesto__text .wd { color: var(--brilho); }
}
