/* ============================================================
   Giullia Pontual — Portfólio
   Tokens tirados do Figma (frames de 1920×1080)
   ============================================================ */

:root {
  --ink: #1b1a17;
  --paper: #f2ead6;
  --intro: #ebe9e3;
  --white: #ffffff;
  --grid-line: rgba(145, 148, 153, 0.55);
  --play: #e5482d;

  --mono: "Space Mono", ui-monospace, monospace;
  --sans: "Geist", system-ui, sans-serif;
  --thin: "Nunito", system-ui, sans-serif;

  /* 1px do Figma (frame de 1920) em unidades de viewport */
  --u: calc(100vw / 1920);
  --gutter: calc(131 * var(--u));

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; }

::selection { background: var(--ink); color: var(--paper); }

/* Grade cinza de fundo (160×120 no frame de 1920) */
.grid-bg {
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: calc(160 * var(--u)) calc(120 * var(--u));
  background-position: -1px -1px;
}

/* ============================================================
   Componentes: setas, pílulas, play
   ============================================================ */

/* --- Seta (vetor do Figma, desenhada em SVG para animar) --- */
.arrow {
  --len: calc(162 * var(--u));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max(var(--len), 64px);
  aspect-ratio: 162 / 40;
  color: var(--ink);
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.arrow svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  transition: transform 0.5s var(--ease-spring);
}
.arrow__line {
  stroke-dasharray: 154;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.6s var(--ease-out);
}
.arrow__head { transition: transform 0.45s var(--ease-spring); transform-origin: 0 20px; }

/* hover: a linha se redesenha e a ponta avança, com um respiro */
.arrow:hover .arrow__line,
.arrow:focus-visible .arrow__line { animation: draw 0.7s var(--ease-out); }
.arrow:hover .arrow__head,
.arrow:focus-visible .arrow__head { transform: translateX(-14px) scaleY(1.15); }
.arrow::after {
  content: "";
  position: absolute;
  inset: -40% -15%;
  border-radius: 999px;
  background: currentColor;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
  z-index: -1;
}
.arrow:hover::after { opacity: 0.07; transform: scale(1); }

@keyframes draw {
  0% { stroke-dashoffset: 154; }
  100% { stroke-dashoffset: 0; }
}

/* direções (o vetor original aponta pra esquerda) */
.arrow--right svg { transform: scaleX(-1); }
.arrow--right:hover svg { transform: scaleX(-1) translateX(-10px); }
.arrow--left:hover svg { transform: translateX(-10px); }

/* setas verticais usam um SVG próprio (viewBox 40×162) */
.arrow--down,
.arrow--up { width: max(calc(26 * var(--u)), 18px); aspect-ratio: 40 / 162; }
.arrow--down .arrow__head,
.arrow--up .arrow__head { transform-box: fill-box; transform-origin: center; }
.arrow--down { animation: nudge-down 2.6s var(--ease-out) infinite; }
.arrow--down:hover { animation-play-state: paused; }
.arrow--down:hover svg { transform: translateY(8px); }
.arrow--down:hover .arrow__head { transform: translateY(6px) scaleX(1.2); }
.arrow--up:hover svg { transform: translateY(-8px); }
.arrow--up:hover .arrow__head { transform: translateY(-6px) scaleX(1.2); }

.arrow--light { color: var(--white); }

@keyframes nudge-down {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(10px); }
}

/* --- Pílula (botão "home", títulos) --- */
.pill {
  --pill-fg: var(--ink);
  --pill-bg: var(--paper);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--pill-fg);
  border-radius: 999px;
  padding: 0.12em 1.1em;
  font-family: var(--mono);
  font-style: italic;
  font-size: clamp(16px, calc(37 * var(--u)), 40px);
  line-height: 1.35;
  color: var(--pill-fg);
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease-out), letter-spacing 0.45s var(--ease-out), transform 0.45s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.pill::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: var(--pill-fg);
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-out);
  z-index: -1;
}
a.pill:hover, button.pill:hover,
a.pill:focus-visible, button.pill:focus-visible {
  color: var(--pill-bg);
  letter-spacing: 0.06em;
  transform: translateY(-2px);
}
a.pill:hover::before, button.pill:hover::before,
a.pill:focus-visible::before, button.pill:focus-visible::before { transform: translateY(0); }
.pill:active { transform: scale(0.96); }

.pill--light { --pill-fg: var(--white); --pill-bg: var(--ink); }

.pill--title {
  font-style: normal;
  font-weight: 700;
  font-size: clamp(20px, calc(54.6 * var(--u)), 60px);
  padding: 0.04em 1.1em;
  border-width: 2px;
  text-transform: uppercase;
}

/* --- Botão de play (componente do Figma) --- */
.play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(44px, calc(80 * var(--u)), 88px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--white);
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  transition: transform 0.45s var(--ease-spring), background 0.3s;
  pointer-events: none;
}
.play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 12%;
  border-style: solid;
  border-width: 0.5em 0 0.5em 0.85em;
  border-color: transparent transparent transparent var(--play);
  font-size: clamp(14px, calc(26 * var(--u)), 28px);
  transition: border-color 0.3s;
}
.play::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--white);
  opacity: 0;
}

/* ============================================================
   Barra fixa
   ============================================================ */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(16px, calc(63 * var(--u)), 63px);
  background: rgba(27, 26, 23, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease-out);
}
.topbar.is-visible { transform: translateY(0); }
.topbar.is-visible.is-tucked { transform: translateY(-100%); }
.topbar__name {
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.topbar__nav { display: flex; gap: clamp(14px, 2vw, 32px); }
.topbar__nav a, .topbar__name { position: relative; font-size: 15px; }
.topbar__nav a { font-family: var(--mono); font-style: italic; }
.topbar__nav a::after, .topbar__name::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.topbar__nav a:hover::after, .topbar__name:hover::after { transform: scaleX(1); transform-origin: left; }
.topbar__progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--white);
  transform-origin: left;
  transform: scaleX(0);
}

/* ============================================================
   01 · Reel
   ============================================================ */
.reel {
  background: var(--ink);
  color: var(--white);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.reel__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, calc(63 * var(--u)), 80px);
}
.reel__bar--top { min-height: calc(146 * var(--u)); padding-top: 12px; padding-bottom: 12px; }
.reel__bar--bottom { min-height: calc(116 * var(--u)); padding-top: 14px; padding-bottom: 14px; }
.reel__name {
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(22px, calc(61 * var(--u)), 72px);
  line-height: 1;
}
.reel__role {
  font-family: var(--thin);
  font-weight: 200;
  font-size: clamp(16px, calc(61 * var(--u)), 72px);
  line-height: 1;
  text-align: right;
}
.reel__meta {
  font-family: var(--thin);
  font-weight: 200;
  font-size: clamp(13px, calc(31.6 * var(--u)), 36px);
  min-width: 9ch;
}
.reel__tc { text-align: right; font-variant-numeric: tabular-nums; }

.reel__media {
  position: relative;
  flex: 1;
  min-height: calc(818 * var(--u));
  overflow: hidden;
  background: #000;
}
.reel__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  animation: reel-in 1.6s var(--ease-out) forwards;
}
@keyframes reel-in { to { transform: scale(1); } }


/* ============================================================
   02 · Intro
   ============================================================ */
.intro {
  background-color: var(--intro);
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(120 * var(--u)) 0;
}
.intro__inner {
  width: 100%;
  display: grid;
  grid-template-columns: calc(800 * var(--u)) calc(414 * var(--u));
  justify-content: space-between;
  align-items: start;
  padding-left: calc(230 * var(--u));
  padding-right: calc(254 * var(--u));
  gap: 48px;
}
.intro__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(30px, calc(66 * var(--u)), 76px);
  line-height: 1.2;
  white-space: nowrap;
  margin-bottom: calc(110 * var(--u));
}
.intro__body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(16px, calc(26 * var(--u)), 28px);
  line-height: 1.45;
}
.intro__body p + p { margin-top: 1.4em; }
.intro__side { display: flex; flex-direction: column; align-items: center; gap: calc(70 * var(--u)); }
.intro__phone {
  width: 100%;
  aspect-ratio: 414 / 736;
  border: 2.5px solid var(--ink);
  border-radius: calc(91 * var(--u));
  overflow: hidden;
  background: #ddd;
}
.intro__phone video { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   03 · Projetos (índice)
   ============================================================ */
.projetos {
  position: relative;
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
  min-height: 100svh;
  display: grid;
  place-items: center;
}
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i {
  position: absolute;
  border-radius: 50%;
  background: var(--white);
  opacity: 0.25;
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes twinkle { 50% { opacity: 0.9; transform: scale(1.6); } }

.projetos__stage {
  position: relative;
  width: min(100vw, calc(100svh * 16 / 9));
  aspect-ratio: 16 / 9;
}
.orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  fill: none;
  stroke: var(--white);
  stroke-width: 2;
}
.orbit ellipse {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 2.4s var(--ease-out);
}
.projetos.in .orbit ellipse { stroke-dashoffset: 0; }

.projetos__title {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 4;
  pointer-events: none;
}
.projetos__title h2 {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 100px);
  line-height: 1.1;
  color: #e9e6df;
  transition: opacity 0.4s;
}
.projetos__title p {
  font-family: var(--sans);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(12px, 1.25vw, 24px);
  margin-top: 0.5em;
  opacity: 0.8;
  transition: opacity 0.4s;
}
.projetos__title .now {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(13px, 1.4vw, 26px);
  opacity: 0;
  margin-top: 0.4em;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.45s var(--ease-out);
}

.thumb {
  position: absolute;
  z-index: 2;
  display: block;
  overflow: hidden;
  background: #222;
  transform: translate(var(--px, 0), var(--py, 0));
  transition:
    transform 0.6s var(--ease-spring),
    filter 0.5s var(--ease-out),
    opacity 0.5s,
    box-shadow 0.5s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out);
}
.thumb__label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.8em 0.9em 0.6em;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(11px, 0.95vw, 18px);
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-out);
}
.thumb__label--static {
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: clamp(14px, 1.5vw, 28px);
  text-transform: none;
  background: rgba(0, 0, 0, 0.25);
  transform: none;
}

/* hover nas miniaturas: a escolhida cresce, as outras escurecem */
.projetos__stage:has(.thumb:hover) .thumb:not(:hover) { filter: grayscale(0.7) brightness(0.45); }
.projetos__stage:has(.thumb:hover) .projetos__title h2,
.projetos__stage:has(.thumb:hover) .projetos__title p:not(.now) { opacity: 0.15; }
.thumb:hover, .thumb:focus-visible {
  z-index: 5;
  transform: translate(var(--px, 0), var(--py, 0)) scale(1.12) rotate(var(--tilt, -1.5deg));
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--white);
}
.thumb:hover img { transform: scale(1.08); }
.thumb:hover .thumb__label { transform: translateY(0); }

/* ============================================================
   04 · Cases
   ============================================================ */
.case { position: relative; }

/* Capa */
.cover { background: var(--paper); }
.cover__bar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  padding: calc(53 * var(--u)) clamp(16px, calc(80 * var(--u)), 96px) calc(40 * var(--u));
  gap: 12px;
}
.cover__bar > .pill:first-child { justify-self: start; margin-top: calc(15 * var(--u)); }
.cover__bar > .arrow { justify-self: end; margin-top: calc(22 * var(--u)); }
.cover__heading { display: flex; flex-direction: column; align-items: center; gap: calc(26 * var(--u)); text-align: center; }
.cover__year {
  font-family: var(--mono);
  font-size: clamp(14px, calc(36 * var(--u)), 40px);
}
.cover__media {
  position: relative;
  aspect-ratio: 1920 / 818;
  overflow: hidden;
  background: #111;
}
.cover__media img,
.cover__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(var(--zoom, 1.08));
  transition: transform 0.2s linear;
}
.cover__media--type {
  display: grid;
  place-items: center;
  background: var(--paper);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}
.cover__media--type img { opacity: 0.18; filter: grayscale(1) contrast(1.1); mix-blend-mode: multiply; }
.cover__type {
  position: relative;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(32px, calc(110 * var(--u)), 130px);
  line-height: 1.15;
  text-align: center;
  max-width: 12ch;
}
.cover__type small {
  display: block;
  margin-top: 0.6em;
  font-size: 0.22em;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.05em;
}

/* Ficha */
.ficha { padding: calc(140 * var(--u)) var(--gutter) calc(120 * var(--u)); }
.slide {
  display: grid;
  grid-template-columns: minmax(0, 590fr) minmax(0, 942fr);
  gap: calc(170 * var(--u));
  align-items: center;
}
.slide + .slide { margin-top: calc(160 * var(--u)); }
.slide--reverse { grid-template-columns: minmax(0, 942fr) minmax(0, 590fr); }
.slide--reverse .slide__text { order: 2; }
.slide--full { grid-template-columns: 1fr; }
.slide--top { grid-template-columns: 1fr; align-items: start; gap: calc(110 * var(--u)); }
.slide--top .slide__text { display: grid; grid-template-columns: 712fr 485fr; gap: calc(260 * var(--u)); align-items: start; }

.slide__text { display: flex; flex-direction: column; gap: calc(28 * var(--u)); }
.slide--top .slide__text--split { display: contents; }

.info dt {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(13px, calc(22 * var(--u)), 24px);
  line-height: 1.38;
}
.info dd {
  margin: 0 0 calc(26 * var(--u));
  font-family: var(--sans);
  font-size: clamp(15px, calc(26 * var(--u)), 28px);
  line-height: 1.38;
  white-space: pre-line;
}
.info dd:last-child { margin-bottom: 0; }
.info--story dd { margin-bottom: calc(40 * var(--u)); }

.slide__media { display: flex; flex-direction: column; gap: calc(28 * var(--u)); }
.slide__media--row { flex-direction: row; align-items: stretch; }
.slide__media--row > .media { flex: var(--grow, 1) 1 0; }
.slide__media--gallery {
  display: grid;
  grid-template-columns: 671fr 465fr 416fr;
  grid-template-rows: 1fr 1fr;
  gap: calc(20 * var(--u));
}
.slide__media--gallery .media--tall { grid-row: 1 / span 2; aspect-ratio: auto; }
.slide__media--mixed {
  display: grid;
  grid-template-columns: 531fr 734fr;
  grid-template-rows: auto auto;
  gap: calc(30 * var(--u));
}
.slide__media--mixed .media--tall { grid-row: 1 / span 2; aspect-ratio: auto; }

.media {
  position: relative;
  overflow: hidden;
  background: #d9d2c0;
  isolation: isolate;
}
.media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease-out), filter 0.6s; }
.media--wide { aspect-ratio: 16 / 9; }
.media--strip { aspect-ratio: 708 / 255; }
.media--tall { aspect-ratio: 531 / 797; }
.media--photo { aspect-ratio: var(--ratio, 3 / 2); }

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0 solid var(--ink);
  transition: border-width 0.35s var(--ease-out);
  pointer-events: none;
}
.media:hover img { transform: scale(1.05); }
.media:hover::after { border-width: 6px; }

.media--video { cursor: pointer; }
.media--video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(27, 26, 23, 0);
  transition: background 0.4s;
  z-index: 1;
  pointer-events: none;
}
.media--video .play { z-index: 2; }
.media--video:hover::before { background: rgba(27, 26, 23, 0.25); }
.media--video:hover .play { transform: translate(-50%, -50%) scale(1.18); }
.media--video:hover .play::after { animation: ring 1.2s var(--ease-out) infinite; }
.media--video:hover .play::before { border-left-color: var(--ink); }
@keyframes ring {
  from { opacity: 0.9; transform: scale(1); }
  to { opacity: 0; transform: scale(1.8); }
}

/* Navegação entre cases (setas + home) */
.case__nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: calc(50 * var(--u)) clamp(16px, calc(80 * var(--u)), 96px) calc(70 * var(--u));
  gap: 12px;
}
.case__nav > :first-child { justify-self: start; }
.case__nav > :last-child { justify-self: end; }
.case__nav .arrow { display: inline-flex; gap: 14px; }
.case__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--mono);
  font-size: clamp(12px, calc(20 * var(--u)), 22px);
  text-transform: uppercase;
}
.case__nav-link span { transition: transform 0.45s var(--ease-out), opacity 0.3s; opacity: 0.55; }
.case__nav-link:hover span { opacity: 1; }
.case__nav-link--prev:hover span { transform: translateX(-6px); }
.case__nav-link--next:hover span { transform: translateX(6px); }
.case__nav-link:hover .arrow--left svg { transform: translateX(-10px); }
.case__nav-link:hover .arrow--right svg { transform: scaleX(-1) translateX(-10px); }
.case__nav-link:hover .arrow__line { animation: draw 0.7s var(--ease-out); }
.case__nav-link:hover .arrow__head { transform: translateX(-14px) scaleY(1.15); }

.case + .case .cover { border-top: 1.5px solid var(--ink); }

/* ============================================================
   Rodapé
   ============================================================ */
.footer {
  background: var(--ink);
  color: var(--white);
  padding: calc(160 * var(--u)) clamp(16px, calc(63 * var(--u)), 80px) 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(48 * var(--u));
  text-align: center;
}
.footer__kicker {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(26px, calc(72 * var(--u)), 84px);
  line-height: 1.15;
}
.footer__mail { font-size: clamp(16px, calc(32 * var(--u)), 36px); margin-bottom: calc(120 * var(--u)); }
.footer__bottom {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--thin);
  font-weight: 300;
  font-size: 14px;
  opacity: 0.8;
}

/* ============================================================
   Lightbox, toast, cursor
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 72px 16px 24px;
  background: rgba(27, 26, 23, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__frame {
  width: min(1400px, 100%, calc((100svh - 120px) * 16 / 9));
  aspect-ratio: 16 / 9;
  background: #000;
  transform: scale(0.94);
  transition: transform 0.5s var(--ease-spring);
}
.lightbox.is-open .lightbox__frame { transform: scale(1); }
.lightbox__frame iframe, .lightbox__frame video { width: 100%; height: 100%; border: 0; }
.lightbox__close { position: absolute; top: 18px; right: 18px; font-size: 16px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 110;
  padding: 10px 20px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  border: 1.5px solid var(--paper);
  font-family: var(--mono);
  font-style: italic;
  font-size: 14px;
  transform: translate(-50%, calc(100% + 40px));
  visibility: hidden;
  transition: transform 0.5s var(--ease-spring), visibility 0.5s;
  pointer-events: none;
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; }

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 120;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--white);
  mix-blend-mode: difference;
  pointer-events: none;
  display: none;
  place-items: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out), opacity 0.3s;
}
.cursor__label {
  font-family: var(--mono);
  font-style: italic;
  font-size: 13px;
  color: var(--ink);
  opacity: 0;
  transition: opacity 0.2s;
}
.cursor.is-big { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.cursor.is-label { width: 84px; height: 84px; margin: -42px 0 0 -42px; mix-blend-mode: normal; background: var(--paper); }
.cursor.is-label .cursor__label { opacity: 1; }
.cursor.is-hidden { opacity: 0; }

@media (hover: hover) and (pointer: fine) {
  .cursor { display: grid; }
}

/* ============================================================
   Revelação no scroll
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--delay, 0s);
}
.reveal.in { opacity: 1; transform: none; }

.projetos .thumb { opacity: 0; }
.projetos.in .thumb { opacity: 1; transition-delay: var(--delay, 0s), 0s, var(--delay, 0s), 0s; }

/* ============================================================
   Responsivo
   ============================================================ */
@media (max-width: 900px) {
  :root { --u: calc(100vw / 1100); --gutter: 20px; }

  .reel { min-height: auto; }
  .reel__media { min-height: 0; aspect-ratio: 4 / 5; flex: none; }
  .reel__bar--top { flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 22px; padding-bottom: 18px; }
  .reel__role { text-align: left; }
  .reel__bar--bottom { min-height: 84px; }

  .intro { min-height: auto; padding: 72px 0; }
  .intro__inner { grid-template-columns: 1fr; padding: 0 20px; gap: 48px; }
  .intro__title { margin-bottom: 28px; white-space: normal; font-size: 28px; }
  .intro__side { width: min(300px, 75vw); margin: 0 auto; gap: 36px; }
  .intro__phone { border-radius: 52px; }

  .projetos { min-height: auto; padding: 80px 20px 60px; display: block; }
  .projetos__stage { width: 100%; aspect-ratio: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .orbit { display: none; }
  .projetos__title { position: static; transform: none; grid-column: 1 / -1; margin-bottom: 18px; }
  .thumb { position: relative; left: auto !important; top: auto !important; width: auto !important; height: auto !important; aspect-ratio: 16 / 10; transform: none; }
  .thumb:first-of-type { grid-column: 1 / -1; }
  .thumb__label { transform: none; }
  .thumb:hover, .thumb:focus-visible { transform: scale(1.02); }

  .cover__bar { grid-template-columns: auto 1fr auto; padding-top: 20px; padding-bottom: 20px; }
  .cover__bar > .pill:first-child, .cover__bar > .arrow { margin-top: 4px; }
  .cover__media { aspect-ratio: 16 / 10; }

  .ficha { padding: 48px 20px 32px; }
  .slide, .slide--reverse, .slide--top { grid-template-columns: 1fr; gap: 28px; }
  .slide--top .slide__text { grid-template-columns: 1fr; gap: 28px; }
  .slide + .slide { margin-top: 56px; }
  .slide--reverse .slide__text { order: 0; }
  .slide__media { gap: 14px; }
  .slide__media--row { flex-direction: column; }
  .slide__media--gallery, .slide__media--mixed { grid-template-columns: 1fr 1fr; grid-template-rows: auto; gap: 12px; }
  .slide__media--gallery .media--wide, .slide__media--mixed .media--wide, .slide__media--mixed .media--photo { grid-column: 1 / -1; }
  .slide__media--gallery .media--tall, .slide__media--mixed .media--tall { grid-row: auto; aspect-ratio: 531 / 797; }
  .slide__media--mixed .media--tall { grid-column: 1 / -1; }
  .info dd { margin-bottom: 16px; }

  .case__nav { grid-template-columns: 1fr auto 1fr; padding: 24px 20px 36px; }
  .case__nav-link span { display: none; }
  .arrow { width: 56px; }
  .arrow--down { width: 18px; }

  .footer { padding-top: 96px; gap: 28px; }
  .footer__links { margin-bottom: 64px; }
  .footer__bottom { font-size: 12px; }
  .topbar__name, .topbar__nav a { font-size: 13px; }
}

@media (max-width: 520px) {
  .projetos__stage { grid-template-columns: 1fr; }
  .pill--title { font-size: 17px; padding: 0.1em 0.8em; }
  .cover__bar .pill:first-child { font-size: 14px; padding: 0.1em 0.8em; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .projetos .thumb { opacity: 1; transform: none; }
}

/* ---------- YouTube: fundo das capas e player na página ---------- */
.yt-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s;
  container-type: size;
}
.yt-bg.is-on { opacity: 1; }
.yt-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, 177.78cqh);
  aspect-ratio: 16 / 9;
  border: 0;
  /* corta a barra de título e o logo do YouTube */
  transform: translate(-50%, -50%) scale(1.2);
}
.cover__media .yt-bg, .reel__media .yt-bg { z-index: 1; }
.media--playing { background: #000; }
.media--playing::after { display: none; }
.media--playing iframe, .media--playing video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ============================================================
   Refino visual · v2
   Base creme + grafite, com referências de set de filmagem:
   visor de câmera, REC, letreiros correndo, granulação.
   ============================================================ */
:root { --rec: #e5482d; }

/* granulação de filme por cima de tudo */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 90;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); }
  80% { transform: translate(3%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ---------- Texto que rola nos botões ---------- */
.roll { display: inline-block; overflow: hidden; vertical-align: top; line-height: inherit; }
.roll__in {
  display: inline-block;
  position: relative;
  transition: transform 0.55s var(--ease-out);
}
.roll__in::after {
  content: attr(data-t);
  position: absolute;
  left: 0;
  top: 100%;
  white-space: nowrap;
}
a:hover > .roll .roll__in,
button:hover > .roll .roll__in,
a:focus-visible > .roll .roll__in { transform: translateY(-100%); }
.topbar__nav a::after, .topbar__name::after { display: none; }

/* ímã: o JS mexe em "translate", que soma com as animações existentes */
.pill, .arrow, .badge { transition-property: color, letter-spacing, transform, translate; translate: 0 0; }
.pill:is(a, button), .arrow, .badge { transition: color 0.35s var(--ease-out), transform 0.45s var(--ease-spring), translate 0.5s var(--ease-out); }

/* pílulas: preenchimento vem com cantos que se abrem, sem esticar as letras */
a.pill:hover, button.pill:hover,
a.pill:focus-visible, button.pill:focus-visible { letter-spacing: normal; transform: none; }
.pill::before { transform: translateY(101%) scaleX(0.6); border-radius: 50% 50% 0 0 / 100% 100% 0 0; transition: transform 0.5s var(--ease-out), border-radius 0.5s var(--ease-out); }
a.pill:hover::before, button.pill:hover::before,
a.pill:focus-visible::before, button.pill:focus-visible::before { transform: none; border-radius: inherit; }
.pill:is(a, button) { box-shadow: 0 0 0 0 var(--pill-fg); transition: color 0.35s var(--ease-out), box-shadow 0.45s var(--ease-out), translate 0.5s var(--ease-out); }
.pill:is(a, button):hover { box-shadow: 4px 4px 0 0 var(--rec); }

/* ---------- Reel: visor de câmera ---------- */
.viewfinder {
  position: absolute;
  inset: clamp(14px, 2.4vw, 40px);
  pointer-events: none;
  z-index: 2;
}
.viewfinder i {
  position: absolute;
  width: clamp(18px, 2.6vw, 44px);
  aspect-ratio: 1;
  border: 0 solid rgba(255, 255, 255, 0.85);
}
.viewfinder i:nth-child(1) { left: 0; top: 0; border-width: 2px 0 0 2px; }
.viewfinder i:nth-child(2) { right: 0; top: 0; border-width: 2px 2px 0 0; }
.viewfinder i:nth-child(3) { left: 0; bottom: 0; border-width: 0 0 2px 2px; }
.viewfinder i:nth-child(4) { right: 0; bottom: 0; border-width: 0 2px 2px 0; }
.rec {
  position: absolute;
  top: clamp(4px, 0.6vw, 10px);
  left: clamp(30px, 3.6vw, 62px);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(11px, 0.9vw, 15px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
}
.rec::before {
  content: "";
  width: 0.75em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--rec);
  box-shadow: 0 0 12px var(--rec);
  animation: blink 1.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.reel__name { letter-spacing: -0.01em; }

/* ---------- Letreiro correndo ---------- */
.marquee, .footer__marquee {
  overflow: hidden;
  white-space: nowrap;
  user-select: none;
}
.marquee {
  background: var(--paper);
  color: var(--ink);
  border-block: 1.5px solid var(--ink);
  padding: 0.55em 0;
  font-family: var(--mono);
  font-weight: 700;
  font-style: italic;
  text-transform: uppercase;
  font-size: clamp(15px, 1.7vw, 30px);
}
.marquee__track { display: inline-flex; animation: marquee 28s linear infinite; }
.marquee__track span { padding-right: 0.4em; }
.marquee b, .footer__marquee b { color: var(--rec); font-weight: 400; display: inline-block; animation: spin 6s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Intro ---------- */
.mark { font-style: normal; position: relative; white-space: nowrap; }
.mark::after {
  content: "";
  position: absolute;
  left: -0.08em;
  right: -0.08em;
  bottom: 0.08em;
  height: 0.32em;
  background: var(--rec);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease-out) 0.5s;
}
.intro__title { position: relative; z-index: 0; }
.intro__title.in .mark::after { transform: scaleX(1); }

.intro__phone { position: relative; box-shadow: 14px 16px 0 var(--ink); }
.intro__tag {
  position: absolute;
  top: 4.5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(10px, 0.75vw, 13px);
  white-space: nowrap;
}
.intro__tag i { width: 7px; aspect-ratio: 1; border-radius: 50%; background: var(--rec); animation: blink 1.4s steps(1) infinite; }

/* selo giratório "ver projetos" */
.badge {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(110px, calc(190 * var(--u)), 190px);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.badge::before {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 50%;
  background: var(--ink);
  transform: scale(0);
  transition: transform 0.55s var(--ease-spring);
}
.badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  animation: spin 14s linear infinite;
}
.badge__ring text {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  fill: currentColor;
}
.badge__arrow {
  position: relative;
  width: 11%;
  height: auto;
  aspect-ratio: 40 / 162;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 5;
  stroke-linecap: round;
  transition: transform 0.5s var(--ease-spring), stroke 0.3s;
}
.badge:hover::before, .badge:focus-visible::before { transform: scale(1); }
.badge:hover .badge__arrow, .badge:focus-visible .badge__arrow { stroke: var(--paper); transform: translateY(6px); }
.badge:hover .badge__arrow .arrow__line { animation: draw 0.7s var(--ease-out); stroke-dasharray: 154; }
.badge:hover .badge__ring { animation-duration: 4s; }

/* ---------- Projetos ---------- */
.thumb__num {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(27, 26, 23, 0.7);
  color: var(--paper);
  font-family: var(--mono);
  font-size: clamp(10px, 0.7vw, 13px);
  transition: background 0.3s, transform 0.4s var(--ease-spring);
}
.thumb:hover .thumb__num { background: var(--rec); transform: scale(1.15); }
.thumb:hover, .thumb:focus-visible { box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--paper), 10px 10px 0 2px var(--rec); }

/* ---------- Capa do case ---------- */
.cover__media::after {
  content: "";
  position: absolute;
  inset: clamp(12px, 2vw, 34px);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  pointer-events: none;
  z-index: 2;
}

/* fichas: mídias ganham sombra deslocada no hover em vez de moldura */
.media::after { display: none; }
.media { transition: transform 0.5s var(--ease-spring), box-shadow 0.5s var(--ease-out); }
.media:hover { transform: translate(-4px, -4px); box-shadow: 8px 8px 0 var(--ink); }
.media--video:hover { box-shadow: 8px 8px 0 var(--rec); }
.media--playing:hover { transform: none; box-shadow: none; }
.info dt { display: flex; align-items: center; gap: 0.6em; }
.info dt::before { content: ""; width: 0.55em; height: 2px; background: var(--rec); }

/* ---------- Próximo projeto ---------- */
.next {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 32px;
  padding: clamp(40px, 7vw, 120px) clamp(16px, calc(80 * var(--u)), 96px);
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  isolation: isolate;
}
.next__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.15);
  filter: grayscale(1) contrast(1.1);
  transition: opacity 0.6s var(--ease-out), transform 1.2s var(--ease-out), filter 0.8s;
  z-index: -1;
}
.next::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(27, 26, 23, 0.9), rgba(27, 26, 23, 0.35));
  opacity: 0;
  transition: opacity 0.6s;
  z-index: -1;
}
.next__kicker {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-style: italic;
  font-size: clamp(12px, 1vw, 18px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.next__kicker i { width: 9px; aspect-ratio: 1; border-radius: 50%; background: var(--rec); }
.next__title {
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(30px, 6vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  transition: transform 0.7s var(--ease-out), color 0.4s;
}
.next__arrow .arrow, .next__arrow { color: var(--paper); }
.next__arrow svg {
  width: clamp(64px, 9vw, 162px);
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 4;
  stroke-linecap: round;
  transform: scaleX(-1);
  transition: transform 0.6s var(--ease-spring);
}
.next__arrow .arrow__line { stroke-dasharray: 154; }
.next:hover .next__img { opacity: 1; transform: scale(1); filter: none; }
.next:hover::before { opacity: 1; }
.next:hover .next__title { transform: translateX(clamp(8px, 1.5vw, 28px)); }
.next:hover .next__arrow svg { transform: scaleX(-1) translateX(-18px); }
.next:hover .next__arrow .arrow__line { animation: draw 0.7s var(--ease-out); }

/* ---------- Rodapé ---------- */
.footer { padding-top: calc(110 * var(--u)); overflow: hidden; }
.footer__marquee {
  width: 100vw;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(48px, 9vw, 170px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--paper);
}
.footer__marquee .marquee__track { animation-duration: 22s; }
.footer__marquee b { -webkit-text-stroke: 0; }
.footer__kicker {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.footer__mail {
  font-size: clamp(18px, calc(40 * var(--u)), 44px);
  padding: 0.35em 1.4em;
  font-style: normal;
  margin-bottom: 0;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: calc(120 * var(--u));
}
.footer__links .pill { font-size: clamp(14px, calc(22 * var(--u)), 24px); padding: 0.4em 1.2em; }
.pill--light:is(a, button):hover { box-shadow: 5px 5px 0 0 var(--rec); }

@media (max-width: 900px) {
  .viewfinder { inset: 12px; }
  .badge { width: 120px; }
  .intro__phone { box-shadow: 10px 12px 0 var(--ink); }
  .next { grid-template-columns: 1fr; }
  .next__arrow { justify-self: end; }
  .media:hover { transform: none; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  body::after { animation: none; }
  .marquee__track { animation: none; }
}

/* ---------- Projetos em órbita (desktop) ---------- */
@media (min-width: 901px) {
  .projetos__stage { cursor: grab; touch-action: pan-y; user-select: none; }
  .projetos__stage:active { cursor: grabbing; }
  .orbit { z-index: 0; stroke-opacity: 0.45; stroke-width: 1.5; }
  .projetos__title { z-index: 3; }
  .projetos__title h2 { text-shadow: 0 6px 40px rgba(0, 0, 0, 0.8); }
  .thumb {
    left: 50%;
    top: 50%;
    width: 21%;
    aspect-ratio: 16 / 9;
    will-change: transform;
    transition: filter 0.5s var(--ease-out), opacity 0.5s, box-shadow 0.5s var(--ease-out);
  }
  .thumb:hover, .thumb:focus-visible { box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--paper), 10px 10px 0 2px var(--rec); }
  .projetos__stage:has(.thumb:hover) .thumb:not(:hover) { filter: none; }
}

/* ---------- Títulos das fichas com mais peso que o corpo ---------- */
.info dt {
  font-size: clamp(18px, calc(34 * var(--u)), 38px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 0.35em;
}
.info dt::before { width: 0.7em; height: 3px; flex: none; }
.info dd { font-weight: 300; }
.info--story dt { font-size: clamp(20px, calc(40 * var(--u)), 44px); }
@media (max-width: 900px) {
  .info dt { font-size: 20px; }
  .info--story dt { font-size: 22px; }
}

/* ---------- Destaques em vermelho no topo dos projetos ---------- */
.cover__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5em 1.1em;
  font-family: var(--mono);
  font-size: clamp(13px, calc(26 * var(--u)), 30px);
}
.cover__meta .cover__year { font-size: inherit; }
.cover__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.22em 0.9em;
  border-radius: 999px;
  background: var(--rec);
  color: var(--paper);
  font-style: italic;
  font-weight: 700;
  font-size: 0.82em;
  letter-spacing: 0.02em;
  transform: rotate(-2deg);
  box-shadow: 3px 3px 0 var(--ink);
}
.cover__tag::before {
  content: "";
  width: 0.55em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  animation: blink 1.4s steps(1) infinite;
}
.cover__count { color: var(--rec); font-weight: 700; }
.cover__count small { font-size: 0.6em; font-weight: 400; color: var(--ink); opacity: 0.55; }
.cover__heading { gap: calc(30 * var(--u)); }
.pill--title { box-shadow: 6px 6px 0 var(--rec); }
.cover__media .rec {
  z-index: 3;
  top: calc(clamp(12px, 2vw, 34px) + clamp(10px, 1.2vw, 20px));
  left: calc(clamp(12px, 2vw, 34px) + clamp(12px, 1.4vw, 24px));
}
@media (max-width: 900px) {
  .cover__meta { font-size: 13px; }
  .cover__media .rec { top: 22px; left: 26px; }
}
