/* =========================================================
   DIMITRI ABRAMOV — PORTFÓLIO
   Dark, editorial, expansivo. Tipografia: Anton + Inter Tight.
   ========================================================= */
:root {
  --bg: #0a0a0b;
  --ink: #ecebe7;
  --mute: #8b8b92;
  --line: rgba(236, 235, 231, .14);
  --wa: #25d366;
  --ff-display: "Anton", "Impact", sans-serif;
  --ff-body: "Inter Tight", system-ui, sans-serif;
  --pad: clamp(18px, 3.2vw, 56px);
  --ease: cubic-bezier(.215, .61, .355, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: clip; }

body {
  background: var(--bg); color: var(--ink);
  font-family: var(--ff-body); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.is-loading { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.label { font-family: var(--ff-body); font-weight: 500; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mute); margin: 0; }
.giant { font-family: var(--ff-display); font-weight: 400; text-transform: uppercase; font-size: clamp(64px, 13vw, 260px); line-height: .96; letter-spacing: -.005em; margin: 0; }
::selection { background: var(--ink); color: var(--bg); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* ---------- letras (revelação do preset Flip) ---------- */
.word { display: inline-block; white-space: nowrap; }
.cw { display: inline-block; overflow: hidden; vertical-align: top; padding: .22em 0 .14em; margin: -.22em 0 -.14em; }
.ch { display: inline-block; }
.is-revealed .cw { overflow: visible; }

/* ---------- grain ---------- */
.grain {
  position: fixed; inset: -50%; z-index: 9000; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain { 0%{transform:translate(0,0)} 20%{transform:translate(-3%,2%)} 40%{transform:translate(2%,-4%)} 60%{transform:translate(-4%,-1%)} 80%{transform:translate(3%,3%)} 100%{transform:translate(0,0)} }

/* ---------- abertura ---------- */
.intro { position: fixed; inset: 0; z-index: 9500; background: var(--bg); display: grid; place-items: center; }
.intro__line { width: min(280px, 50vw); height: 1px; background: var(--line); overflow: hidden; }
.intro__line i { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }

/* ---------- cursor ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 9400; pointer-events: none; mix-blend-mode: difference; }
.cursor__dot, .cursor__ring { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); }
.cursor__dot { width: 6px; height: 6px; background: #fff; }
.cursor__ring { width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.6); display: grid; place-items: center; transition: width .45s var(--ease), height .45s var(--ease), background .3s, border-color .3s; }
.cursor__label { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #000; opacity: 0; transition: opacity .2s; }
.cursor.is-hover .cursor__ring { width: 86px; height: 86px; background: #fff; border-color: #fff; }
.cursor.is-hover .cursor__label { opacity: 1; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }
@media (hover: hover) and (pointer: fine) { body, a, button { cursor: none; } }

/* ---------- topbar + burger ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad); pointer-events: none;
  transform: translateY(-120%); opacity: 0; transition: transform .8s var(--ease), opacity .6s;
}
.topbar.is-visible, body.menu-open .topbar { transform: none; opacity: 1; }
.topbar > * { pointer-events: auto; }
.topbar__mark { display: block; mix-blend-mode: difference; transition: opacity .3s; }
.topbar__mark img { display: block; height: 40px; width: auto; }
.topbar__mark:hover { opacity: .75; }
.burger {
  width: 58px; height: 58px; border-radius: 50%;
  background: rgba(20,20,22,.55); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  transition: background .3s;
}
.burger:hover { background: rgba(236,235,231,.12); }
.burger span { display: block; width: 20px; height: 1.5px; background: var(--ink); transition: transform .5s var(--ease), opacity .3s, width .3s, margin .3s; }
.burger span:nth-child(2) { width: 13px; margin-left: 7px; }
.burger:hover span:nth-child(2) { width: 20px; margin-left: 0; }
body.menu-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.menu { position: fixed; inset: 0; z-index: 7900; background: #0d0d0f; clip-path: circle(0% at 100% 0%); visibility: hidden; }
.menu__inner { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: 110px var(--pad) var(--pad); }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list li { overflow: hidden; border-top: 1px solid var(--line); }
.menu__list li:last-child { border-bottom: 1px solid var(--line); }
.menu__list a {
  display: flex; align-items: baseline; gap: 2vw; padding: 1.4vh 0;
  font-family: var(--ff-display); text-transform: uppercase; font-size: clamp(44px, 10vh, 130px); line-height: 1;
  transition: padding-left .5s var(--ease);
}
.menu__list a small { font-family: var(--ff-body); font-size: 12px; font-weight: 500; letter-spacing: .14em; color: var(--mute); }
.menu__list a:hover { padding-left: 3vw; }
.menu__list a span { display: inline-block; }
.menu__foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.menu__foot a:hover { color: var(--ink); }

/* ---------- HERO ---------- */
.hero { position: relative; height: 100vh; height: 100svh; }
.hero__stage { position: relative; height: 100%; overflow: hidden;
  background: radial-gradient(55% 60% at 50% 52%, rgba(150,152,176,.17), transparent 70%), var(--bg); }
.hero__photo {
  position: absolute; left: 0; right: 0; bottom: -4vh; bottom: -4svh; z-index: 2; margin: 0 auto;
  height: 108vh; height: 108svh; width: auto; max-width: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
          mask-image: linear-gradient(to bottom, #000 70%, transparent 97%);
}
.hero__name { position: absolute; inset: 0; margin: 0; font-weight: 400; pointer-events: none; }
/* nome: canvas em tela cheia, texto em arco em volta do corpo */
.hero__word { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; }
.hero__word--top { z-index: 3; }
.hero__word--bottom { z-index: 3; }
/* botão de WhatsApp fixo: pílula no topo, círculo só com o ícone depois do scroll */
.hero__wa {
  position: fixed; z-index: 7500; left: var(--pad); bottom: 5vh; bottom: 5svh;
  display: inline-flex; align-items: center; gap: 11px; padding: 16px 24px 16px 19px; border-radius: 99px;
  font-size: 15px; font-weight: 500; letter-spacing: .01em; color: var(--ink); white-space: nowrap;
  background: rgba(20,20,22,.55); border: 1px solid rgba(236,235,231,.24);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: background .35s, border-color .35s, padding .6s var(--ease), gap .6s var(--ease), left .7s var(--ease), translate .7s var(--ease);
}
.hero__wa svg { width: 20px; height: 20px; color: var(--ink); flex: none; opacity: .92; }
.hero__wa span { display: inline-block; max-width: 240px; overflow: hidden; transition: max-width .6s var(--ease), opacity .35s; }
.hero__wa.is-compact { padding: 16px; gap: 0; }
.hero__wa.is-compact span { max-width: 0; opacity: 0; }
body.menu-open .hero__wa { opacity: 0; pointer-events: none; }
.hero__wa:hover { background: rgba(236,235,231,.13); border-color: rgba(236,235,231,.45); }
.hero__cue { position: absolute; z-index: 4; right: var(--pad); bottom: 5vh; bottom: 5svh; display: flex; align-items: center; gap: 12px; }
.hero__cue i { display: block; width: 44px; height: 1px; background: var(--mute); transform-origin: left; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0% { transform: scaleX(0); } 60% { transform: scaleX(1); } 100% { transform: scaleX(1); opacity: 0; } }

/* ---------- MANIFESTO ---------- */
.manifesto { position: relative; height: 240vh; }
.manifesto__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 5vh; padding: 0 var(--pad); }
.manifesto__text { margin: 0; max-width: 17ch; font-weight: 500; letter-spacing: -.04em; font-size: clamp(38px, 6.6vw, 128px); line-height: .98; }
.manifesto__text strong { font-weight: 600; }
.manifesto__text .w { opacity: .12; }

/* ---------- WORK ---------- */
.work__stage { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.work__intro { position: absolute; inset: 0; padding: 12vh var(--pad) var(--pad); display: flex; flex-direction: column; justify-content: space-between; }
.work__intro .giant { font-size: clamp(90px, 21vw, 420px); }
.work__intro-sub { align-self: flex-end; }

.work-item { position: absolute; inset: 0; overflow: hidden; background: #000; clip-path: inset(0 0% 0 100%); }
.work-item__bg { position: absolute; inset: 0; will-change: transform; }
.work-item__bg video { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.work-item__shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(8,8,9,.95) 0%, rgba(8,8,9,.86) 32%, rgba(8,8,9,.45) 55%, rgba(8,8,9,0) 74%), linear-gradient(to top, rgba(8,8,9,.92) 0%, rgba(8,8,9,.55) 30%, transparent 58%); }
.work-item__dim { position: absolute; inset: 0; z-index: 3; background: rgba(8,8,9,.8); opacity: 0; pointer-events: none;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.work-item__content { position: absolute; left: var(--pad); bottom: 16vh; z-index: 4; width: min(720px, 86vw); }
.work-item__content .label { color: #c9c9ce; }
.work-item__title { margin: 14px 0 18px; font-family: var(--ff-display); font-weight: 400; text-transform: uppercase; font-size: clamp(56px, 7.8vw, 150px); line-height: .92; text-shadow: 0 2px 30px rgba(0,0,0,.65); }
.work-item__desc { margin: 0 0 28px; max-width: 44ch; font-size: clamp(16px, 1.2vw, 19px); line-height: 1.55; color: #deddd8; transition: opacity .4s; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.work-item.is-open .work-item__desc { opacity: 0; }
.work-item__visit {
  position: absolute; right: var(--pad); bottom: 9vh; z-index: 6;
  display: inline-flex; gap: 8px; align-items: center; min-height: 40px; padding: 9px 16px; border-radius: 99px;
  border: 1px solid rgba(236,235,231,.4); font-size: 13px; font-weight: 500;
  background: rgba(10,10,11,.45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .3s, color .3s;
}
.work-item__visit:hover { background: var(--ink); color: var(--bg); }
.work-item__cards { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.work-item__card {
  position: absolute; top: 44%; width: 18vw; aspect-ratio: 4 / 5;
  margin-left: -9vw; margin-top: calc(-9vw * 1.25);
  padding: .35em; background: rgba(236,235,231,.9); box-shadow: 0 30px 80px rgba(0,0,0,.6);
  visibility: hidden;
}
.work-item__card img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.work-item__card:nth-child(1) { left: 36%; } .work-item__card:nth-child(2) { left: 52%; }
.work-item__card:nth-child(3) { left: 68%; } .work-item__card:nth-child(4) { left: 84%; }
.work__counter { position: absolute; right: calc(var(--pad) + 4px); top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.work__counter i { display: block; width: 2px; height: 22px; background: rgba(236,235,231,.25); transition: background .4s, height .4s; }
.work__counter i.is-active { background: var(--ink); height: 40px; }

.btn {
  display: inline-flex; align-items: center; gap: 12px; min-height: 54px; padding: 16px 28px; border-radius: 99px;
  background: var(--ink); color: var(--bg); font-weight: 500; font-size: 16px; will-change: transform;
}
.btn em { font-style: normal; }
.btn span { display: inline-block; transition: transform .4s var(--ease); }
.btn:hover span { transform: translate(2px, -2px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid rgba(236,235,231,.35); }
.btn--wa { background: rgba(236,235,231,.06); color: var(--ink); border: 1px solid rgba(236,235,231,.3); }
.btn--wa svg { flex: none; width: 18px; height: 18px; }
.btn--wa:hover { background: rgba(236,235,231,.13); }

/* ---------- SERVICES ---------- */
.services { position: relative; padding: 18vh var(--pad) 14vh; }
.services__head { display: flex; flex-direction: column; gap: 24px; margin-bottom: 8vh; }
.services__head .giant { font-size: clamp(64px, 11vw, 220px); line-height: 1.16; }
.services__list { list-style: none; margin: 0; padding: 0; }
.service {
  position: relative; display: grid; grid-template-columns: 70px 1.3fr 1fr; align-items: center; gap: 24px;
  padding: 3.2vh 0; border-top: 1px solid var(--line); isolation: isolate;
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service::before { content: ""; position: absolute; inset: 0; background: rgba(236,235,231,.05); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); z-index: -1; }
.service:hover::before { transform: scaleY(1); }
.service__t { margin: 0; font-family: var(--ff-display); font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 5vw, 92px); line-height: .95; transition: transform .6s var(--ease); }
.service:hover .service__t { transform: translateX(1.2vw); }
.service__d { margin: 0; color: #bdbcb7; font-size: clamp(15px, 1.15vw, 18px); max-width: 42ch; }

/* ---------- ABOUT (persianas) ---------- */
.about { position: relative; height: 520vh; }
.about__layers { position: sticky; top: 0; width: 100%; height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
.layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.about__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,11,.92) 0%, rgba(10,10,11,.55) 42%, transparent 70%); pointer-events: none; }
.about__texts { position: absolute; inset: 0; }
.txt { position: absolute; left: var(--pad); top: 13vh; width: min(640px, 52vw); clip-path: inset(100% 0 0 0); transform: translateY(40px); }
.txt h2 { margin: 18px 0 28px; font-family: var(--ff-display); font-weight: 400; text-transform: uppercase; font-size: clamp(52px, 7vw, 136px); line-height: .9; }
.txt__body { font-size: clamp(16px, 1.25vw, 20px); line-height: 1.6; color: #cfcec9; max-width: 46ch; margin: 0; }
.txt__body strong { color: var(--ink); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 130px 1fr; column-gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); }
.timeline li span { grid-row: span 2; padding-top: 4px; }
.timeline b { font-weight: 500; font-size: clamp(16px, 1.3vw, 21px); }
.timeline i { font-style: normal; color: var(--mute); font-size: 14px; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; max-width: 580px; }
.tags li { padding: 10px 16px; border: 1px solid var(--line); border-radius: 99px; font-size: 14px; background: rgba(255,255,255,.03); }
.progress-bar { position: absolute; bottom: 0; left: 0; right: 0; padding: 32px var(--pad); display: flex; gap: 14px; z-index: 5; }
.segment { flex: 1; height: 2px; background: rgba(255,255,255,.18); overflow: hidden; position: relative; }
.fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--ink); }

/* ---------- CONTACT ---------- */
.contact { position: relative; min-height: 100vh; padding: 12vh var(--pad) 0; display: flex; flex-direction: column; overflow: hidden;
  background: radial-gradient(70% 50% at 50% 40%, rgba(150,152,176,.10), transparent 70%), var(--bg); }
.contact__big { margin: 4vh 0 0; display: flex; flex-direction: column; font-family: var(--ff-display); font-weight: 400; text-transform: uppercase; font-size: clamp(64px, 12.5vw, 240px); line-height: .9; }
.contact__line { display: block; }
.contact__line--2 { align-self: flex-end; }
.contact__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; margin: 6vh 0 8vh; }
.contact__lead { margin: 0; max-width: 22ch; font-size: clamp(24px, 2.6vw, 44px); line-height: 1.12; letter-spacing: -.03em; font-weight: 500; }
.contact__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.footer { margin-top: auto; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 26px 0; border-top: 1px solid var(--line); }
.footer a:hover { color: var(--ink); }

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 900px) {
  .grain { display: none; }
  .burger { width: 52px; height: 52px; }
  .menu__inner { padding-top: 96px; }
  .topbar__mark img { height: 34px; }
  .menu__foot { flex-direction: column; gap: 10px; }

  .hero__photo { height: 84vh; height: 84svh; bottom: 6vh; bottom: 6svh; }
  .hero__wa { left: 50%; translate: -50% 0; bottom: 5vh; bottom: 5svh; gap: 9px; padding: 10px 16px 10px 13px; font-size: 13px; }
  .hero__wa svg { width: 16px; height: 16px; }
  .hero__wa.is-compact { left: calc(100% - var(--pad) - 48px); translate: 0 0; padding: 15px; }
  .hero__wa.is-compact svg { width: 18px; height: 18px; }
  .hero__cue { display: none; }

  .manifesto { height: 200vh; }
  .manifesto__text { font-size: clamp(34px, 9.5vw, 64px); max-width: none; }

  .work__intro .giant { font-size: 30vw; }
  .work-item__shade { background: linear-gradient(to top, rgba(8,8,9,.97) 0%, rgba(8,8,9,.92) 42%, rgba(8,8,9,.6) 62%, rgba(8,8,9,.12) 84%); }
  .work-item__content { left: var(--pad); right: var(--pad); width: auto; bottom: 5vh; bottom: 5svh; }
  .work-item__title { font-size: clamp(42px, 12.5vw, 84px); margin: 10px 0 12px; }
  .work-item__desc { font-size: 15px; margin-bottom: 18px; }
  .work-item__visit { top: 88px; bottom: auto; right: var(--pad); }
  .work-item__card { width: 42vw; margin-left: -21vw; margin-top: calc(-21vw * 1.25); top: 30%; }
  .work-item__card:nth-child(1) { left: 28%; } .work-item__card:nth-child(2) { left: 72%; }
  .work-item__card:nth-child(3) { left: 30%; top: 44%; } .work-item__card:nth-child(4) { left: 70%; top: 44%; }
  .work__counter { display: none; }
  .btn { padding: 14px 22px; font-size: 15px; }

  .services { padding: 12vh var(--pad) 10vh; }
  .service { grid-template-columns: 34px 1fr; gap: 10px 14px; padding: 2.6vh 0; }
  .service__t { font-size: clamp(30px, 9vw, 48px); }
  .service:hover .service__t { transform: none; }
  .service__d { grid-column: 2; font-size: 15px; }

  .about { height: 420vh; }
  .txt { width: auto; right: var(--pad); top: 11vh; }
  .txt h2 { font-size: clamp(44px, 12vw, 72px); margin: 14px 0 20px; }
  .txt__body { font-size: 15px; }
  .about__shade { background: linear-gradient(180deg, rgba(10,10,11,.95) 0%, rgba(10,10,11,.8) 42%, rgba(10,10,11,0) 72%); }
  .timeline li { grid-template-columns: 1fr; padding: 10px 0; }
  .timeline li span { grid-row: auto; }
  .tags li { font-size: 13px; padding: 8px 13px; }
  .progress-bar { padding: 22px var(--pad); }

  .contact { padding-top: 12vh; }
  .contact__big { font-size: clamp(56px, 18vw, 130px); }
  .contact__row { flex-direction: column; align-items: flex-start; gap: 28px; }
  .contact__actions { width: 100%; flex-direction: column; }
  .contact__actions .btn { width: 100%; justify-content: center; }
  .footer { flex-direction: column; gap: 8px; }
}
@media (max-width: 520px) {
  .menu__list a { font-size: clamp(40px, 8vh, 72px); }
}
@media (prefers-reduced-motion: reduce) { .grain, .hero__cue i { animation: none; } }
