/* MG Web · base comum da home (site/index.html) e das páginas de projeto
   (trabalhos/<projeto>/index.html): tokens, tipografia, navegação, botões,
   rodapé e o vocabulário de movimento (data-rv, data-mask, data-par).
   O movimento só existe com html.js; sem JS, tudo aparece no lugar. */

:root {
  --bg: #0A0B0D;
  --bg-2: #111317;
  --bg-3: #181B20;
  --paper: #ECEBE7;
  --ink: #0A0B0D;
  --fg: #F1F0EC;
  --fg-2: #A9AFB8;
  --fg-3: #737A84;
  --ink-2: #4E545D;
  --line: rgba(241, 240, 236, .12);
  --line-2: rgba(241, 240, 236, .22);
  --line-ink: rgba(10, 11, 13, .14);
  --accent: #2F57DA;
  --accent-h: #2649B8;
  --accent-c: #8FA6F0;
  --wm: #4E77F0;

  --wrap: 1360px;
  --gut: clamp(20px, 4.4vw, 56px);
  --sect: clamp(96px, 12vw, 176px);
  --r: 4px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-c); outline-offset: 3px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gut) * 2); margin: 0 auto; padding: 0 var(--gut); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- tipografia ----------------------------------------------------
   Uma família só (a da marca), hierarquia por escala, peso e cor.
   display > h2 > h3 > lead > corpo > label/meta. */
.display { font-size: clamp(44px, 6.6vw, 108px); font-weight: 500; letter-spacing: -.048em; line-height: .95; text-wrap: balance; }
.h2 { font-size: clamp(36px, 4.6vw, 76px); font-weight: 500; letter-spacing: -.042em; line-height: .98; text-wrap: balance; }
.h3 { font-size: clamp(26px, 2.6vw, 42px); font-weight: 500; letter-spacing: -.032em; line-height: 1.04; text-wrap: balance; }
.h4 { font-size: clamp(20px, 1.6vw, 24px); font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.lead { font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: var(--fg-2); max-width: 34em; text-wrap: pretty; }
.body { color: var(--fg-2); line-height: 1.65; text-wrap: pretty; }
.label { display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.label b { font-weight: 600; color: var(--fg); letter-spacing: .08em; }
.label i { font-style: normal; color: var(--accent-c); }
.tags { display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-3); }
.tags li + li::before { content: "/"; margin: 0 10px; color: var(--line-2); }

/* ---------- botões e links ---------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 52px; padding: 0 26px; border-radius: 2px; border: 1px solid transparent;
  font-size: 15px; font-weight: 500; letter-spacing: -.005em; white-space: nowrap; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent:hover { background: var(--accent-h); }
.btn--light { background: var(--fg); color: var(--ink); }
.btn--light:hover { background: #fff; }
.btn--line { border-color: var(--line-2); color: var(--fg); }
.btn--line:hover { border-color: var(--fg); }
.btn--ink { background: var(--ink); color: var(--fg); }
.btn--ink:hover { background: #22262C; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.arrow { width: 22px; height: 10px; flex: none; transition: transform .35s var(--ease); }
a:hover > .arrow, a:hover .arrow { transform: translateX(5px); }
.more { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--line-2); transition: border-color .3s var(--ease); }
.more:hover { border-color: var(--fg); }
.more--sub { color: var(--fg-2); border-color: transparent; }
.more--sub:hover { color: var(--fg); border-color: var(--line-2); }

/* ---------- navegação ----------------------------------------------------
   Discreta sobre o topo; ao rolar ganha fundo, um desfoque leve e um fio. */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease); border-bottom: 1px solid transparent; }
.nav.is-on { background: rgba(10, 11, 13, .78); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 76px; transition: height .4s var(--ease); }
.nav.is-on .nav__in { height: 64px; }
.wm { display: inline-block; padding: 12px 0; font-size: 21px; white-space: nowrap; line-height: 1; }
.wm i { font-style: normal; color: var(--wm); }
.wm b { font-weight: 600; letter-spacing: -.03em; }
.wm span { font-weight: 400; letter-spacing: -.02em; }
.nav__links { display: flex; align-items: center; gap: 34px; }
.nav__links a:not(.btn) { position: relative; font-size: 14px; color: var(--fg-2); transition: color .25s var(--ease); }
.nav__links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--fg); transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s var(--ease); }
.nav__links a:not(.btn):hover, .nav__links a.is-cur { color: var(--fg); }
.nav__links a:not(.btn):hover::after, .nav__links a.is-cur::after { transform: scaleX(1); }
.nav__links .btn { margin-left: 6px; }
.nav__menu { display: none; align-items: center; gap: 10px; background: none; border: 0; padding: 10px 0; cursor: pointer; font-size: 14px; }
.nav__menu i { position: relative; width: 20px; height: 8px; }
.nav__menu i::before, .nav__menu i::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .35s var(--ease), top .35s var(--ease); }
.nav__menu i::before { top: 0; }
.nav__menu i::after { top: 6.5px; }
.menu-open .nav__menu i::before { top: 3.25px; transform: rotate(45deg); }
.menu-open .nav__menu i::after { top: 3.25px; transform: rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; padding: 96px var(--gut) calc(28px + env(safe-area-inset-bottom)); background: var(--bg); visibility: hidden; opacity: 0; transition: opacity .35s var(--ease), visibility 0s .35s; }
.menu-open .menu { visibility: visible; opacity: 1; transition: opacity .35s var(--ease); }
.menu nav a { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.menu nav a span { font-size: 12px; color: var(--fg-3); letter-spacing: .12em; }
.menu__foot { margin-top: auto; display: grid; gap: 10px; }
.menu-open { overflow: hidden; }

@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav__menu { display: inline-flex; }
  .nav__in, .nav.is-on .nav__in { height: 64px; }
}

/* ---------- rodapé ------------------------------------------------------ */
.foot { border-top: 1px solid var(--line); padding: 56px 0 calc(40px + env(safe-area-inset-bottom)); color: var(--fg-2); font-size: 14px; }
.foot__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; padding-bottom: 48px; }
.foot__cols { display: flex; gap: clamp(40px, 7vw, 120px); flex-wrap: wrap; }
.foot__col { display: grid; gap: 10px; align-content: start; }
.foot__col .label { margin-bottom: 6px; }
.foot__col a { transition: color .2s var(--ease); }
.foot__col a:hover { color: var(--fg); }
.foot__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--fg-3); }

/* ---------- movimento ----------------------------------------------------
   data-rv: sobe 24px e aparece. data-mask: a imagem abre de dentro para fora
   e desacelera o zoom. --d atrasa (em segundos). Só com html.js. */
.js [data-rv] { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .9s var(--ease-out) var(--d, 0s), transform 1.1s var(--ease-out) var(--d, 0s); }
.js [data-rv].in { opacity: 1; transform: none; }
.js [data-mask] { clip-path: inset(10% 6% 10% 6%); transition: clip-path 1.4s var(--ease-out) var(--d, 0s); }
.js [data-mask] img { transform: scale(1.14); transition: transform 1.8s var(--ease-out) var(--d, 0s); }
.js [data-mask].in { clip-path: inset(0 0 0 0); }
.js [data-mask].in img { transform: scale(1); }
.js .lines > span { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.js .lines > span > span { display: block; transform: translate3d(0, 105%, 0); transition: transform 1.2s var(--ease-out) calc(var(--d, 0s) + var(--i, 0) * .09s); }
.js .lines.in > span > span { transform: none; }
[data-par] { will-change: transform; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-rv], .js [data-mask], .js [data-mask] img, .js .lines > span > span { opacity: 1; transform: none; clip-path: none; transition: none; }
  [data-par] { will-change: auto; transform: none !important; }
}
