/* =========================================================
   Portfolio — Black / White
   ========================================================= */

:root {
  --black: #0a0a0a;
  --white: #f2f2ee;
  --bg: var(--black);
  --fg: var(--white);
  --muted: rgba(242, 242, 238, .55);
  --line: rgba(242, 242, 238, .14);

  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-body: "Inter", system-ui, sans-serif;
  --f-serif: "Instrument Serif", Georgia, serif;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.76, 0, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

/* reserva o espaço da barra de rolagem: nada "pula" quando o preloader libera o scroll */
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-body);
  font-weight: 300;
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: 0; }
::selection { background: var(--fg); color: var(--bg); }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }

/* Grain overlay */
body::after {
  content: "";
  position: fixed; inset: -50%;
  z-index: 90; pointer-events: none;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  opacity: .05;
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-5%, 4%); }
  40% { transform: translate(4%, -6%); }
  60% { transform: translate(-3%, 7%); }
  80% { transform: translate(6%, -2%); }
}

/* ---------- Logo ---------- */
.logo-mark { width: 34px; height: 34px; stroke: currentColor; stroke-width: 3; stroke-linecap: square; flex: none; }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 200;
  color: var(--white);
  display: grid; place-items: center;
}
.preloader__bg { position: absolute; inset: 0; background: var(--black); }
.preloader__inner { position: relative; }
.preloader__logo { will-change: transform; }
.preloader__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.preloader__logo { width: 96px; height: 96px; stroke-width: 2; }
.preloader__logo path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.preloader__count { font-family: var(--f-display); font-size: 14px; letter-spacing: .2em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 150;
  width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: #fff;
  mix-blend-mode: difference; pointer-events: none;
  display: grid; place-items: center;
  transition: width .4s var(--ease-out), height .4s var(--ease-out), margin .4s var(--ease-out);
}
.cursor__label { font-family: var(--f-display); font-size: 13px; color: #000; opacity: 0; transition: opacity .2s; text-transform: uppercase; letter-spacing: .08em; }
.cursor.is-hover { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.cursor.is-view { width: 88px; height: 88px; margin: -44px 0 0 -44px; mix-blend-mode: normal; }
.cursor.is-view .cursor__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ---------- Header ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 20px max(var(--gutter), calc((100% - 1440px) / 2 + var(--gutter)));
  color: #fff; mix-blend-mode: difference;
  transition: transform .7s var(--ease);
}
.header.is-hidden { transform: translateY(-110%); }
.header__logo { display: flex; align-items: center; gap: 12px; font-family: var(--f-display); font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.nav { display: flex; gap: 36px; }
.nav__link { font-family: var(--f-display); font-size: 14px; overflow: hidden; display: block; height: 1.4em; line-height: 1.4; }
.nav__link span { display: block; position: relative; transition: transform .5s var(--ease); }
.nav__link span::after { content: attr(data-text); position: absolute; left: 0; top: 100%; }
.nav__link:hover span { transform: translateY(-100%); }
.menu-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; position: relative; cursor: pointer; }
.menu-toggle span { position: absolute; left: 8px; right: 8px; height: 1.5px; background: currentColor; transition: transform .4s var(--ease); }
.menu-toggle span:first-child { top: 16px; }
.menu-toggle span:last-child { top: 23px; }
.menu-open .menu-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  --b-fg: var(--bg); --b-bg: var(--fg);
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 32px; border-radius: 100px;
  border: 1px solid var(--fg); background: var(--b-bg); color: var(--b-fg);
  font-family: var(--f-display); font-size: 15px; font-weight: 500;
  cursor: pointer; overflow: hidden; isolation: isolate;
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bg); border-radius: 50%;
  transform: translateY(101%) scale(1.2);
  transition: transform .6s var(--ease), border-radius .6s var(--ease);
}
.btn span { position: relative; transition: color .4s var(--ease); }
.btn:hover::before { transform: translateY(0) scale(1.2); border-radius: 0; }
.btn:hover span { color: var(--fg); }
.btn--ghost { --b-bg: transparent; --b-fg: var(--fg); }
.btn--ghost::before { background: var(--fg); }
.btn--ghost:hover span { color: var(--bg); }
.btn--sm { height: 42px; padding: 0 22px; font-size: 14px; border-color: #fff; background: transparent; color: #fff; }
.btn--sm::before { background: #fff; }
.btn--sm:hover span { color: #000; }
.btn--light { --b-bg: var(--fg); --b-fg: var(--bg); }

.link-line { position: relative; display: inline-block; }
.link-line::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .6s var(--ease);
}
.link-line:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Common ---------- */
.eyebrow { font-family: var(--f-display); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.eyebrow__item { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow__item + .eyebrow__item::before { content: "·"; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fg); position: relative; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: ping 1.8s var(--ease-out) infinite; }
@keyframes ping { to { transform: scale(3); opacity: 0; } }

.section { position: relative; padding: clamp(96px, 14vw, 200px) 0; background: var(--bg); color: var(--fg); }
.invert { --bg: var(--white); --fg: var(--black); --muted: rgba(10, 10, 10, .55); --line: rgba(10, 10, 10, .14); }
.section__head { display: flex; gap: 16px; align-items: center; padding-bottom: 20px; margin-bottom: clamp(40px, 6vw, 80px); border-bottom: 1px solid var(--line); font-family: var(--f-display); font-size: 13px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.section__index { color: var(--fg); }

.title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(40px, 6.4vw, 104px); line-height: .98; letter-spacing: -.04em;
  max-width: 14ch;
}
.title em { font-size: 1.08em; }
.title--xl { font-size: clamp(44px, 8.6vw, 148px); max-width: 13ch; }

.split .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .word > span { display: inline-block; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.veil {
  position: fixed; inset: 0; z-index: 180; pointer-events: none;
  background: var(--black); opacity: 0;
  transition: opacity .65s cubic-bezier(.4, 0, .2, 1);
}
.veil.is-on { opacity: 1; pointer-events: auto; transition-duration: .4s; }

.tag { transition: color .5s var(--ease), border-color .5s var(--ease); font-size: 12px; font-family: var(--f-display); padding: 5px 12px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px 0 32px; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at 70% 40%, transparent 30%, var(--black) 85%); }
.hero__content, .hero__meta { position: relative; z-index: 2; }
.hero__eyebrow { margin-bottom: 28px; }
.hero__title {
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(36px, 10.8vw, 184px); line-height: .92; letter-spacing: -.05em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line__inner { display: block; }
.hero__title em { font-size: 1.06em; }
.hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: 40px; flex-wrap: wrap; }
.hero__intro { max-width: 440px; color: var(--muted); font-size: clamp(16px, 1.25vw, 19px); }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero__meta { display: flex; justify-content: space-between; margin-top: 64px; padding-top: 20px; border-top: 1px solid var(--line); font-family: var(--f-display); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.hero__meta { align-items: center; }
.hero__scroll { display: flex; align-items: center; gap: 10px; }

/* Rotator de tecnologias (flip 3D) */
.rotator { display: inline-flex; align-items: center; gap: 12px; }
.rotator__window {
  display: inline-grid; justify-items: center;
  height: 34px; padding: 0 16px; border: 1px solid var(--line); border-radius: 100px;
  overflow: hidden; perspective: 300px;
}
.rotator__item {
  grid-area: 1 / 1; align-self: center;
  color: var(--fg); font-size: 15px; letter-spacing: -.01em; text-transform: none; white-space: nowrap;
  opacity: 0; transform: translateY(70%) rotateX(-90deg);
  transform-origin: 50% 50% -12px; backface-visibility: hidden;
  transition: transform .8s var(--ease), opacity .5s var(--ease);
}
.rotator__item.is-active { opacity: 1; transform: none; }
.rotator__item.is-out { opacity: 0; transform: translateY(-70%) rotateX(90deg); }
.hero__scroll i { width: 1px; height: 28px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 50%; background: var(--fg); animation: scrollLine 1.8s var(--ease) infinite; }
@keyframes scrollLine { from { transform: translateY(-100%); } to { transform: translateY(200%); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 28px 0; background: var(--black); }
.marquee__track { display: flex; width: max-content; animation: marquee 32s linear infinite; will-change: transform; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee__group { display: flex; align-items: center; gap: 40px; padding-right: 40px; font-family: var(--f-display); font-size: clamp(28px, 4vw, 56px); font-weight: 500; letter-spacing: -.03em; white-space: nowrap; }
.marquee__group span:nth-child(4n+3) { font-family: var(--f-serif); font-style: italic; font-weight: 400; }
.marquee__sep { font-size: .4em; color: var(--muted); }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(32px, 6vw, 120px); align-items: end; }
.about__text p { color: var(--muted); font-size: clamp(16px, 1.25vw, 20px); }
.about__text p + p { margin-top: 1.2em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(64px, 9vw, 140px); border-top: 1px solid var(--line); }
.stat { padding: 32px 24px 0 0; display: flex; flex-direction: column; gap: 8px; }
.stat + .stat { border-left: 1px solid var(--line); padding-left: 24px; }
.stat__value { font-family: var(--f-display); font-size: clamp(48px, 7vw, 112px); font-weight: 500; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--muted); font-size: 14px; }

/* ---------- Services ---------- */
.services .title { margin-bottom: clamp(40px, 6vw, 80px); }
.services__list { border-top: 1px solid var(--line); }
.service {
  position: relative; display: grid; grid-template-columns: 80px 1fr 1fr 48px; gap: 24px; align-items: start;
  padding: 36px 0; border-bottom: 1px solid var(--line); isolation: isolate;
  transition: color .5s var(--ease);
}
.service::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); }
.service:hover { color: var(--bg); }
/* deslocamento só visual (transform), sem mudar o tamanho da linha */
.service__num, .service__title { transition: transform .6s var(--ease); }
.service:hover .service__num, .service:hover .service__title { transform: translateX(16px); }
.service:hover::before { transform: scaleY(1); transform-origin: top; }
.service:hover .tag { color: var(--bg); border-color: rgba(242, 242, 238, .3); }
.service:hover .service__body p { color: rgba(242, 242, 238, .7); }
.service__num { font-family: var(--f-display); font-size: 14px; padding-top: 10px; }
.service__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(28px, 3.4vw, 52px); line-height: 1; letter-spacing: -.035em; }
.service__body p { color: var(--muted); margin-bottom: 16px; transition: color .5s; }
.service__arrow { font-size: 28px; justify-self: end; transition: transform .6s var(--ease); }
.service:hover .service__arrow { transform: rotate(45deg); }

/* ---------- Projects ---------- */
.projects .title { margin-bottom: clamp(40px, 6vw, 80px); }
.projects__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(48px, 6vw, 96px) clamp(24px, 3vw, 48px); }
.project:nth-child(even) { margin-top: clamp(0px, 12vw, 180px); }
.project { display: block; }
.project__link { display: block; }
@media (hover: hover) and (pointer: fine) { a.project__link { cursor: none; } }
.project__media { position: relative; aspect-ratio: 4 / 3.2; border-radius: 6px; overflow: hidden; background: #141414; transform-style: preserve-3d; will-change: transform; }
.project__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.2s var(--ease-out); filter: grayscale(1); }
.project:hover .project__media img { transform: scale(1); }
.project__cover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 3vw, 36px); background: radial-gradient(circle at 30% 20%, #262626, #0d0d0d 70%); transition: transform 1.2s var(--ease-out); transform: scale(1.04); }
.project:hover .project__cover { transform: scale(1); }
.project__cover-num { font-family: var(--f-display); font-size: 14px; color: var(--muted); }
.project__cover-title { font-family: var(--f-serif); font-style: italic; font-size: clamp(40px, 5.5vw, 88px); line-height: .95; position: relative; z-index: 1; transform: translateZ(40px); }
.project__cover-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%); -webkit-mask-image: radial-gradient(circle at 70% 30%, #000, transparent 70%); opacity: .6; }
.project__info { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 24px; gap: 16px; }
.project__title { font-family: var(--f-display); font-weight: 500; font-size: clamp(24px, 2.4vw, 36px); letter-spacing: -.03em; line-height: 1.1; }
.project__type { color: var(--muted); font-size: 14px; margin-top: 4px; }
.project__arrow { font-size: 24px; width: 48px; height: 48px; flex: none; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; transition: background .5s var(--ease), color .5s var(--ease), transform .6s var(--ease); }
.project:hover .project__arrow { background: var(--fg); color: var(--bg); transform: rotate(45deg); }
.project__text { color: var(--muted); margin: 12px 0 16px; max-width: 48ch; }

.projects__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 48px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 80px); }
.projects__head .title { margin-bottom: 0; }
.projects__intro { max-width: 380px; color: var(--muted); }
.project__badge {
  position: absolute; top: 16px; right: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 100px;
  background: rgba(10, 10, 10, .6); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font-family: var(--f-display); font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
.project__badge .dot { width: 6px; height: 6px; }
.project.is-soon .project__cover { opacity: .55; }

/* ---------- Capa com telas reais (navegador + celular) ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.project__media.has-shots { background: radial-gradient(120% 90% at 15% 0%, #2b2b2b, #0c0c0c 62%); }
.project__stage { position: absolute; inset: 0; overflow: hidden; }
.project__stage::before { /* grade sutil ao fundo */
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(242,242,238,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(242,242,238,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 30% 25%, #000, transparent 75%); mask-image: radial-gradient(circle at 30% 25%, #000, transparent 75%);
}
.project__stage .project__cover-num { position: absolute; top: clamp(14px, 2.2vw, 22px); left: clamp(16px, 2.6vw, 26px); z-index: 1; }

.mock-browser {
  position: absolute; left: 7%; top: 15%; width: 100%; margin: 0; /* sai pela borda direita */
  border-radius: 10px; overflow: hidden; background: #fff;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform 1.1s var(--ease-out);
}
.mock-browser__bar { display: flex; align-items: center; gap: 5px; height: clamp(16px, 2vw, 24px); padding: 0 10px; background: #e9e9e4; }
.mock-browser__bar i { width: 7px; height: 7px; border-radius: 50%; background: #c6c6c0; flex: none; }
.mock-browser__bar b {
  margin-left: 8px; padding: 1px 10px; border-radius: 6px; background: #fff; color: #8a8a84;
  font: 500 clamp(8px, .75vw, 10px)/1.6 var(--f-body); letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%;
}
.mock-phone {
  position: absolute; right: 6%; bottom: -9%; width: 23%; margin: 0;
  aspect-ratio: 520 / 1125; padding: 5px; border-radius: clamp(14px, 2vw, 22px);
  background: #0a0a0a; border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: -18px 30px 60px rgba(0, 0, 0, .6);
  transition: transform 1.1s var(--ease-out);
}
.mock-phone::before { content: ""; position: absolute; top: 9px; left: 50%; width: 26%; height: 5px; border-radius: 5px; background: #0a0a0a; transform: translateX(-50%); z-index: 1; }
/* as telas aparecem nítidas e coloridas (o filtro P&B vale só para imagens avulsas) */
.project__media.has-shots img { display: block; width: 100%; height: auto; transform: none; filter: none; transition: none; }
.project__media picture, .case picture { display: contents; }
.mock-phone img { height: 100% !important; object-fit: cover; object-position: top; border-radius: clamp(10px, 1.5vw, 17px); }
.project:hover .mock-browser { transform: translateY(-3%); }
.project:hover .mock-phone { transform: translateY(-7%) rotate(-1.5deg); }
.project.is-soon .project__stage { opacity: .55; }
@media (max-width: 760px) {
  .mock-browser { left: 6%; width: 104%; top: 17%; }
  .mock-phone { width: 26%; right: 5%; }
}
@media (hover: none) { .project:hover .mock-browser, .project:hover .mock-phone { transform: none; } }
.project__login { font-size: 13px; color: var(--muted); margin-top: 16px; font-family: var(--f-display); overflow-wrap: anywhere; }
.project__login span { color: var(--fg); margin-right: 6px; }
.project__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 100px;
  font-family: var(--f-display); font-size: 14px;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s;
}
.pill--solid { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.pill.is-disabled { color: var(--muted); border-style: dashed; }
@media (hover: hover) {
  .pill:not(.is-disabled):hover { background: var(--fg); color: var(--bg); border-color: var(--fg); }
  .pill--solid:hover { background: transparent; color: var(--fg); }
}

/* ---------- Contact ---------- */
.contact .title { margin-bottom: clamp(48px, 7vw, 100px); }
.contact__grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(48px, 8vw, 140px); }
.form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.hp { position: absolute; left: -9999px; }
.field { position: relative; width: 100%; padding-top: 22px; }
.field input, .field textarea, .field select {
  width: 100%; background: transparent; border: 0; border-bottom: 1px solid var(--line);
  padding: 10px 0 14px; font-size: 18px; outline: none; resize: vertical; border-radius: 0;
  transition: border-color .4s;
}
.field select { appearance: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230a0a0a' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 4px center; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--fg); }
.field label { position: absolute; left: 0; top: 32px; color: var(--muted); pointer-events: none; transition: transform .4s var(--ease), font-size .4s var(--ease); transform-origin: left; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field label.is-static { transform: translateY(-30px); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.field.has-error input, .field.has-error textarea { border-color: #c0392b; }
.form .btn { margin-top: 28px; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 20px; font-size: 14px; color: var(--muted); line-height: 1.5; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--fg); }
.consent a { color: var(--fg); text-decoration: underline; }
.consent.has-error { color: #c0392b; }
.form__status { min-height: 1.6em; font-size: 15px; margin-top: 8px; }
.form__status.is-error { color: #c0392b; }
.btn.is-loading { pointer-events: none; opacity: .6; }

.contact__side { display: flex; flex-direction: column; gap: 40px; }
.contact__label { display: block; font-family: var(--f-display); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 8px; }
.contact__big { font-family: var(--f-display); font-size: clamp(19px, 2vw, 30px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.socials { display: flex; flex-direction: column; gap: 6px; font-family: var(--f-display); font-size: 20px; }

/* ---------- Página legal ---------- */
.legal-page { overflow: auto; }
.legal { max-width: 820px; padding-top: 64px; padding-bottom: 96px; }
.legal__back { display: inline-block; margin-bottom: 48px; font-family: var(--f-display); font-size: 14px; }
.legal .title { margin: 12px 0 32px; font-size: clamp(40px, 6vw, 80px); }
.legal h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; letter-spacing: -.02em; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--muted); }
.legal strong { color: var(--fg); font-weight: 500; }
.legal ul { padding-left: 20px; display: grid; gap: 6px; list-style: disc; }
.legal a { text-decoration: underline; }

/* ---------- Página de projeto (estudo de caso) ---------- */
.case-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 24px; padding-bottom: 24px; font-family: var(--f-display); font-size: 14px; }
.case-top__logo { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 500; }
.case-top__logo .logo-mark { width: 34px; height: 34px; }
.case { max-width: 1180px; padding-top: clamp(24px, 5vw, 56px); padding-bottom: 72px; }
.case__crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; font-size: 13px; color: var(--muted); }
.case__crumbs a:hover { color: var(--fg); }
.case__title { margin: 14px 0 22px; font-size: clamp(40px, 6.4vw, 92px); max-width: 16ch; }
.case__title em { display: block; font-size: .5em; line-height: 1.1; color: var(--muted); margin-top: 10px; }
.case__lead { max-width: 62ch; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; color: var(--muted); }
.case__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.case__login { margin-top: 16px; }
.case__shots { position: relative; margin: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px); padding-right: clamp(40px, 12vw, 150px); }
.case__desk { margin: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08); }
.case__desk img { display: block; width: 100%; height: auto; }
.case__phone { position: absolute; right: 0; bottom: -8%; width: clamp(110px, 21%, 230px); margin: 0; padding: 5px; aspect-ratio: 520 / 1125; border-radius: clamp(14px, 2vw, 24px); background: #0a0a0a; border: 1px solid rgba(255, 255, 255, .22); box-shadow: -18px 30px 60px rgba(0, 0, 0, .6); overflow: hidden; }
.case__phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: clamp(10px, 1.5vw, 18px); }
.case__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); }
.case h2 { font-family: var(--f-display); font-weight: 500; font-size: 22px; letter-spacing: -.02em; margin-bottom: 16px; }
.case__side h2:not(:first-child) { margin-top: 36px; }
.case__side p { color: var(--muted); line-height: 1.6; }
.case__list { list-style: none; display: grid; }
.case__list li { position: relative; padding: 16px 0 16px 34px; border-top: 1px solid var(--line); line-height: 1.5; }
.case__list li:last-child { border-bottom: 1px solid var(--line); }
.case__list li::before { content: "✦"; position: absolute; left: 4px; top: 16px; color: var(--muted); font-size: 13px; }
.case__cta { margin-top: clamp(64px, 9vw, 120px); padding: clamp(28px, 5vw, 56px); border: 1px solid var(--line); border-radius: 24px; }
.case__cta .title { font-size: clamp(32px, 4.6vw, 64px); margin-bottom: 14px; }
.case__cta p { color: var(--muted); max-width: 56ch; }
.case__pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.case__pager a { display: grid; gap: 4px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; transition: border-color .4s var(--ease); }
.case__pager a:last-child { text-align: right; }
.case__pager a:hover { border-color: var(--fg); }
.case__pager small { color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.case__pager strong { font-family: var(--f-display); font-size: 22px; font-weight: 500; }
.case__pager span { color: var(--muted); font-size: 14px; }
.case-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 28px; padding-bottom: 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.project__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) {
  .case__grid, .case__pager { grid-template-columns: minmax(0, 1fr); }
  .case__pager a:last-child { text-align: left; }
  .case__shots { padding-right: 56px; }
}

/* ---------- Footer ---------- */
.footer { background: var(--black); padding: clamp(48px, 8vw, 96px) 0 28px; overflow: hidden; }
.footer__big {
  font-family: var(--f-display); font-weight: 600; letter-spacing: -.06em; line-height: .8;
  font-size: clamp(80px, 24vw, 400px); text-align: center;
  color: transparent; -webkit-text-stroke: 1px rgba(242, 242, 238, .35);
  user-select: none;
}
.footer__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__brand .logo-mark { width: 24px; height: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .about__grid, .contact__grid { grid-template-columns: 1fr; }
  .service { grid-template-columns: 48px 1fr 32px; }
  .service__body { grid-column: 2 / 3; }
  .service__arrow { grid-row: 1; grid-column: 3; }
}

@media (max-width: 760px) {
  .header__cta { display: none; }
  .menu-toggle { display: block; color: #fff; z-index: 2; }
  .nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; gap: 12px; padding: 0 var(--gutter);
    background: #000; clip-path: inset(0 0 100% 0);
    transition: clip-path .8s var(--ease);
  }
  .menu-open .nav { clip-path: inset(0 0 0 0); }
  .menu-open .header { mix-blend-mode: normal; }
  .nav__link { font-size: 44px; height: 1.2em; line-height: 1.2; letter-spacing: -.03em; }
  .header__logo { z-index: 2; }
  .projects__grid { grid-template-columns: 1fr; }
  .project:nth-child(even) { margin-top: 0; }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .stat { padding-bottom: 24px; }
  .hero__meta > .hero__role, .hero__meta > .hero__scroll { display: none; }
  .hero__meta { justify-content: center; margin-top: 40px; }
  .service { grid-template-columns: 1fr 32px; gap: 12px; padding: 28px 0; }
  .service__num { grid-column: 1; padding: 0; }
  .service__title { grid-column: 1; }
  .service__body { grid-column: 1 / -1; }
  .service__arrow { grid-row: 1 / 3; grid-column: 2; }
  .btn { height: 52px; padding: 0 26px; }
}

/* Tablet: header mais compacto */
@media (min-width: 761px) and (max-width: 1080px) {
  .nav { gap: 22px; }
  .header { gap: 16px; }
}

/* Celulares pequenos */
@media (max-width: 760px) {
  .stat { flex-direction: row; align-items: baseline; justify-content: space-between; gap: 16px; padding: 20px 0; }
  .stat__value { font-size: clamp(40px, 13vw, 56px); }
  .stat__label { text-align: right; }
  .projects__intro { max-width: none; }
  .hero { padding-top: 96px; }
  .eyebrow { font-size: 11px; }
}
@media (max-width: 380px) {
  .hero__actions { width: 100%; }
  .hero__actions .btn { flex: 1; padding: 0 16px; }
  .header__logo span { display: none; }
}

/* Celular deitado / telas baixas */
@media (max-height: 520px) and (orientation: landscape) {
  .hero { padding-top: 88px; }
  .hero__title { font-size: clamp(36px, 7vw, 96px); }
  .hero__meta { margin-top: 28px; }
  .header { padding-top: 14px; padding-bottom: 14px; }
  .header__cta { display: none; }
}

/* Telas de toque: sem estados de hover "grudados" */
@media (hover: none) {
  .service:hover { color: inherit; }
  .service:hover .service__num, .service:hover .service__title { transform: none; }
  .service:hover::before { transform: scaleY(0); }
  .service:hover .tag { color: var(--muted); border-color: var(--line); }
  .service:hover .service__body p { color: var(--muted); }
  .service:hover .service__arrow { transform: none; }
  .btn:hover::before { transform: translateY(101%) scale(1.2); border-radius: 50%; }
  .btn:hover span { color: inherit; }
  .btn:active { opacity: .8; }
  .project:hover .project__cover { transform: scale(1.04); }
}

/* ---------- Reduced motion ---------- */
/* Sem deslocamentos: tudo vira fade de opacidade/cor (nada "pula" na tela) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-property: opacity, color, background-color, border-color, visibility !important;
  }
  /* preloader suave: logo já desenhada, tudo em fade */
  .preloader { transition: opacity .8s ease; }
  .preloader.is-done { opacity: 0; pointer-events: none; }
  .preloader__logo path { stroke-dashoffset: 0; }
  .preloader__inner { opacity: 0; transition: opacity .7s ease; }
  .preloader__inner.is-visible { opacity: 1; }
  /* faixa de tecnologias continua passando, mais devagar */
  .marquee__track { animation: marquee 60s linear infinite !important; }

  .service::before { transform: none; opacity: 0; transition-duration: .5s; }
  .service:hover::before { transform: none; opacity: 1; }
  .service:hover .service__num, .service:hover .service__title,
  .service:hover .service__arrow, .project:hover .project__arrow { transform: none; }

  .btn::before { transform: none; border-radius: 0; opacity: 0; }
  .btn:hover::before { transform: none; opacity: 1; }

  .nav__link:hover span { transform: none; opacity: .6; }
  .link-line::after { transform: none; opacity: 0; }
  .link-line:hover::after { transform: none; opacity: 1; }

  .header.is-hidden { transform: none; opacity: 0; pointer-events: none; }
  .rotator__item, .rotator__item.is-out { transform: none; }
  .project__media img, .project__cover, .project:hover .project__media img, .project:hover .project__cover { transform: none !important; }

  .rm-fade { opacity: 0; transition: opacity .9s ease !important; }
  .rm-fade.is-in { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 760px) {
  .nav { clip-path: none; opacity: 0; visibility: hidden; transition-duration: .4s; }
  .menu-open .nav { opacity: 1; visibility: visible; }
}
