/* ============ Tokens ============ */
:root {
  --black: #070708;
  --graphite: #141416;
  --graphite-2: #1d1d20;
  --line: rgba(255, 255, 255, 0.12);
  --muted: rgba(255, 255, 255, 0.55);
  --white: #f2f2f0;
  --sans: "Outfit", system-ui, sans-serif;
  --display: "Italiana", Georgia, serif;
  --serif: "Instrument Serif", Georgia, serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
html.lenis, html.lenis body { height: auto; }
body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.5;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--white); color: var(--black); }

/* Grão de filme sutil por cima de tudo */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  opacity: 0.06; mix-blend-mode: overlay;
  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='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 20px;
}
.section-title {
  font-size: clamp(40px, 7vw, 104px); font-weight: 400; line-height: 0.95; letter-spacing: -0.03em;
}

/* ============ Progress + Nav ============ */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; background: var(--white); transform-origin: left; transform: scaleX(0); }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 84px;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 var(--gutter);
}
.nav__logo { font-weight: 600; letter-spacing: 0.35em; font-size: 13px; text-transform: uppercase; }
.nav__links {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 22px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
}
.nav__links i { width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.35); }
.nav__links a { position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
/* Botão do menu: contorno fino, texto que "rola" no hover e ícone de seta */
.nav__cta {
  display: inline-flex; align-items: center; gap: 14px;
  padding: 5px 5px 5px 20px; border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(10, 10, 12, 0.35);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease);
}
.nav__cta-text { display: block; height: 1.3em; line-height: 1.3em; overflow: hidden; }
.roll { display: flex; flex-direction: column; transition: transform 0.6s var(--ease); }
.nav__cta-icon {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; color: #000; transition: transform 0.6s var(--ease);
}
.nav__cta-icon svg { width: 15px; height: 15px; transition: transform 0.6s var(--ease); }
.nav__cta:hover { border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.06); }
.nav__cta:hover .roll { transform: translateY(-50%); }
.nav__cta:hover .nav__cta-icon svg { transform: rotate(45deg); }
@media (max-width: 768px) { .nav__links { display: none; } }

/* ============ Placeholder de mídia ============ */
/* Troque o conteúdo de .media por <img> ou <video> com object-fit: cover */
.media {
  position: relative; width: 100%; height: 100%; overflow: hidden;
  background:
    radial-gradient(120% 80% at 70% 30%, var(--g1, #333) 0%, transparent 60%),
    linear-gradient(160deg, var(--g1, #333), var(--g2, #000));
}
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media__ph {
  position: absolute; left: 16px; bottom: 14px;
  font-size: 10px; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,255,255,0.35);
}

/* ============ Featured (scroll horizontal) ============ */
.featured__pin { height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.featured__head { padding: 0 var(--gutter); margin-bottom: 48px; }
.featured__track { display: flex; gap: 32px; padding: 0 var(--gutter); width: max-content; }
.fcard { width: clamp(300px, 42vw, 720px); cursor: pointer; }
.fcard .media { aspect-ratio: 16 / 10; height: auto; border-radius: 4px; }
.fcard .media::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.35); transition: opacity 0.7s var(--ease); }
.fcard:hover .media::after { opacity: 0; }
.fcard__info { display: flex; align-items: baseline; gap: 20px; padding-top: 18px; border-top: 1px solid var(--line); margin-top: 18px; }
.fcard__info span { font-size: 11px; color: var(--muted); }
.fcard__info h3 { font-size: clamp(20px, 2vw, 30px); font-weight: 400; flex: 1; }
.fcard__info p { font-size: 12px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

@media (max-width: 768px) {
  .featured__pin { height: auto; padding: 15vh 0; }
  .featured__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; scrollbar-width: none; }
  .featured__track::-webkit-scrollbar { display: none; }
  .fcard { width: 82vw; flex-shrink: 0; scroll-snap-align: center; }
}

/* ============ Gallery ============ */
.gallery { padding: 20vh var(--gutter); }
.gallery__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-bottom: 56px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  padding: 10px 18px; border: 1px solid var(--line); border-radius: 100px;
  font-size: 12px; letter-spacing: 0.08em; color: var(--muted); transition: all 0.4s var(--ease);
}
.filters button:hover { color: var(--white); border-color: rgba(255,255,255,0.4); }
.filters button.is-active { background: var(--white); color: var(--black); border-color: var(--white); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 22vw; gap: 16px; }
.tile { position: relative; overflow: hidden; cursor: pointer; border-radius: 4px; transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.tile--tall { grid-row: span 2; }
.tile--wide { grid-column: span 2; }
.tile .media { transition: transform 1.2s var(--ease), filter 1.2s var(--ease); filter: grayscale(0.6) brightness(0.8); }
.tile:hover .media { transform: scale(1.06); filter: grayscale(0) brightness(1); }
.tile figcaption {
  position: absolute; left: 20px; right: 20px; bottom: 18px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 18px; transform: translateY(12px); opacity: 0; transition: all 0.6s var(--ease);
}
.tile figcaption span { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.tile:hover figcaption { transform: none; opacity: 1; }
.tile.is-hidden { display: none; }

@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; } }
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; grid-auto-rows: 72vw; }
  .tile--wide { grid-column: auto; } .tile--tall { grid-row: auto; }
  .tile figcaption { opacity: 1; transform: none; }
}

/* ============ About ============ */
.about {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 120px); align-items: center;
  padding: 20vh var(--gutter); border-top: 1px solid var(--line);
}
.about__media { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; }
.about__media .media { height: 120%; }
.about__text .section-title { margin-bottom: 32px; font-size: clamp(36px, 5vw, 76px); }
.about__text > p:not(.eyebrow) { color: var(--muted); max-width: 46ch; font-size: 17px; margin-bottom: 48px; }
.stats { display: flex; gap: clamp(24px, 4vw, 64px); }
.stats strong { display: block; font-size: clamp(36px, 4vw, 56px); font-weight: 400; letter-spacing: -0.03em; }
.stats strong::after { content: "+"; color: var(--muted); }
.stats span { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }

/* ============ Services ============ */
.services { padding: 20vh var(--gutter); background: rgba(20, 20, 22, 0.45); backdrop-filter: blur(2px); }
.services__list { list-style: none; }
.services__list li {
  display: flex; align-items: baseline; gap: clamp(16px, 4vw, 64px);
  padding: clamp(20px, 3vw, 40px) 0; border-bottom: 1px solid var(--line);
  position: relative; transition: padding 0.6s var(--ease);
}
.services__list li:first-child { border-top: 1px solid var(--line); }
.services__list span { font-size: 12px; color: var(--muted); }
.services__list h3 { font-size: clamp(26px, 5vw, 80px); font-weight: 400; letter-spacing: -0.03em; line-height: 1; transition: transform 0.6s var(--ease), color 0.6s; }
.services__list li:hover h3 { transform: translateX(24px); font-family: var(--serif); font-style: italic; }
.services__list:hover li:not(:hover) h3 { color: rgba(255,255,255,0.25); }

/* ============ Contact ============ */
.contact { min-height: 100vh; padding: 20vh var(--gutter); display: flex; flex-direction: column; justify-content: center; }
.contact__title { font-size: clamp(48px, 10vw, 180px); font-weight: 400; line-height: 0.95; letter-spacing: -0.04em; margin-bottom: 64px; }
/* Contatos em lista editorial: linha inteira clicável, preenchimento branco no hover */
.contact__list { list-style: none; border-top: 1px solid var(--line); }
.clink {
  position: relative; display: grid; grid-template-columns: 56px 1fr auto 52px; align-items: center;
  gap: clamp(16px, 3vw, 40px); padding: clamp(20px, 2.6vw, 34px) clamp(8px, 1.5vw, 24px);
  border-bottom: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: color 0.6s var(--ease);
}
.clink::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--white);
  transform: scaleY(0); transform-origin: bottom; transition: transform 0.6s var(--ease);
}
.clink__idx { font-size: 11px; letter-spacing: 0.2em; color: var(--muted); transition: color 0.6s var(--ease); }
.clink__label {
  font-size: clamp(28px, 4.2vw, 64px); font-weight: 300; letter-spacing: -0.03em; line-height: 1;
  transition: transform 0.6s var(--ease);
}
.clink__meta {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  transition: color 0.6s var(--ease);
}
.clink__arrow {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line); transition: transform 0.6s var(--ease), border-color 0.6s var(--ease);
}
.clink__arrow svg { transition: transform 0.6s var(--ease); }
.clink:hover { color: var(--black); }
.clink:hover::before { transform: scaleY(1); }
.clink:hover .clink__idx, .clink:hover .clink__meta { color: rgba(0, 0, 0, 0.55); }
.clink:hover .clink__label { transform: translateX(14px); }
.clink:hover .clink__arrow { border-color: rgba(0, 0, 0, 0.25); }
.clink:hover .clink__arrow svg { transform: rotate(45deg); }
@media (max-width: 640px) {
  .clink { grid-template-columns: 28px 1fr 44px; }
  .clink__meta { display: none; }
  .clink__arrow { width: 44px; height: 44px; }
}

.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  padding: 28px var(--gutter); border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted); letter-spacing: 0.05em;
}

/* ============ Lightbox ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(5,5,6,0.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  padding: var(--gutter); opacity: 0; visibility: hidden; transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage { width: min(1400px, 100%); aspect-ratio: 16 / 9; max-height: 75vh; transform: scale(0.94); transition: transform 0.8s var(--ease); }
.lightbox.is-open .lightbox__stage { transform: none; }
.lightbox__stage .media { border-radius: 4px; }
.lightbox__caption { text-align: center; }
.lightbox__caption h3 { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 32px; }
.lightbox__caption p { font-size: 11px; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); }
.lightbox__close { position: absolute; top: 24px; right: var(--gutter); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }

/* Estado inicial das animações (só quando o JS carregou) */
.js .reveal-up { opacity: 0; transform: translateY(40px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal-up { opacity: 1; transform: none; }
}

/* ============ Experiência 3D ============ */
.exp { position: relative; height: 800vh; }
.exp__stage {
  --col: calc((100vw - 2 * var(--gutter)) / 4);
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  /* fallback se WebGL ou o modelo falharem */
  background:
    radial-gradient(45% 45% at 68% 42%, rgba(255, 255, 255, 0.08), transparent 70%),
    radial-gradient(40% 40% at 20% 80%, rgba(255, 255, 255, 0.04), transparent 70%),
    #030303;
}
.exp__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s var(--ease); }
.exp__canvas.is-ready { opacity: 1; }

.exp__grid { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.exp__hline { position: absolute; left: 0; right: 0; top: 84px; height: 1px; background: rgba(255, 255, 255, 0.08); }
.vline {
  position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.07);
  left: calc(var(--gutter) + (100% - 2 * var(--gutter)) * var(--i) / 4);
}
.vline i {
  position: absolute; left: -1.5px; width: 4px; height: 4px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.6);
  animation: travel var(--d, 10s) linear infinite var(--dir, normal);
  animation-delay: var(--delay, 0s);
}
@keyframes travel { from { top: -2%; } to { top: 102%; } }

.exp__progress {
  position: absolute; right: var(--gutter); top: 50%; transform: translate(50%, -50%);
  display: flex; flex-direction: column; gap: 10px;
}
.exp__progress span { width: 2px; height: 34px; border-radius: 2px; overflow: hidden; background: rgba(255, 255, 255, 0.15); }
.exp__progress b { display: block; height: 100%; background: #fff; transform-origin: top; transform: scaleY(0); }

/* Capítulos */
.chapter { position: absolute; inset: 0; z-index: 3; pointer-events: none; visibility: hidden; opacity: 0; }
.chapter.is-active { visibility: visible; opacity: 1; }
.chapter__inner { position: absolute; }
.chapter__title {
  font-family: var(--display); font-weight: 400; font-size: clamp(52px, 8.4vw, 150px);
  line-height: 0.98; letter-spacing: 0; color: #fff;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
}
.chapter__title .ln { display: block; }
.word { display: inline-block; white-space: nowrap; }
.ch { display: inline-block; will-change: transform, filter, opacity; }
.chapter p { font-size: clamp(14px, 1.1vw, 17px); line-height: 1.7; color: rgba(255, 255, 255, 0.75); max-width: 32ch; }

.chapter--1 .chapter__inner { left: var(--gutter); bottom: 8vh; }
.chapter__cols { display: flex; gap: 0; margin-top: 4vh; }
.chapter__cols p { width: var(--col); padding-right: 2.4vw; }
.chapter--2 .chapter__inner { left: calc(var(--gutter) + var(--col) + 2vw); bottom: 10vh; }
.chapter__aside { position: absolute; left: calc(var(--gutter) + var(--col) * 3 + 2vw); bottom: 12vh; }
.chapter__img {
  position: absolute; left: calc(var(--gutter) + 2vw); top: 120px;
  width: min(20vw, 32vh); aspect-ratio: 1; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.12);
}
.chapter__img .media { height: 100%; }
.chapter__img--tall { aspect-ratio: 3 / 4; width: min(18vw, 30vh); }
.chapter__img--right { left: auto; right: calc(var(--gutter) + 4vw); }
.chapter--3 .chapter__inner { left: calc(var(--gutter) + var(--col) * 2 + 2vw); bottom: 12vh; }
.chapter--3 .chapter__body { margin-top: 3vh; }
.chapter--4 .chapter__inner { left: calc(var(--gutter) + var(--col) + 2vw); bottom: 10vh; }
.chapter--4 .chapter__body { margin-top: 3vh; }

@media (max-width: 768px) {
  .vline--sub, .exp__progress { display: none; }
  .chapter__inner, .chapter--2 .chapter__inner, .chapter--3 .chapter__inner, .chapter--4 .chapter__inner {
    left: var(--gutter); right: var(--gutter); bottom: 7vh;
  }
  .chapter__title { font-size: clamp(44px, 14vw, 72px); }
  .chapter__cols { display: block; margin-top: 2.5vh; }
  .chapter__cols p { width: auto; padding: 0; }
  .chapter__p2 { display: none; }
  .chapter__aside { left: var(--gutter); right: var(--gutter); bottom: 7vh; transform: translateY(100%); }
  .chapter--2 .chapter__inner { bottom: calc(7vh + 110px); }
  .chapter__img { width: 42vw; left: var(--gutter); top: 104px; }
  .chapter__img--tall { width: 34vw; }
  .chapter__img--right { left: auto; right: var(--gutter); }
}

/* ============ Cursor ============ */
.cursor { display: none; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.cursor__dot, .cursor__ring { position: fixed; left: 0; top: 0; border-radius: 50%; }
.cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; }
.cursor__ring {
  width: 36px; height: 36px; margin: -18px 0 0 -18px; border: 1px solid rgba(255, 255, 255, 0.6);
  transition: width 0.4s var(--ease), height 0.4s var(--ease), margin 0.4s var(--ease), background 0.4s;
}
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; background: rgba(255, 255, 255, 0.08); }

/* ============ Intro (vídeo do logo) ============ */
html.is-intro { overflow: hidden; }
.intro {
  position: fixed; inset: 0; z-index: 150; background: #000;
  transition: opacity 0.9s ease, visibility 0.9s ease;
}
.intro__video { width: 100%; height: 100%; object-fit: cover; display: block; }
.intro.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
html:not(.is-intro) .intro:not(.is-done) { display: none; } /* sem JS: não trava o site */
.intro__skip {
  position: absolute; right: 32px; bottom: 28px;
  font: 400 10px/1 var(--sans); letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55); background: none; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 999px; padding: 10px 18px;
  transition: color 0.3s, border-color 0.3s;
}
.intro__skip:hover { color: #fff; border-color: rgba(255, 255, 255, 0.6); }
@media (max-width: 768px) { .intro__skip { right: 20px; bottom: 24px; } }

/* ============ Fundo de faixas de luz (bends.js) ============ */
.bends { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }

/* ============ Vídeos do portfólio ============ */
.tile video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox__stage .media video { object-fit: contain; background: #000; }
.lightbox__stage.is-portrait { aspect-ratio: 9 / 16; width: auto; height: 75vh; max-width: 100%; }

/* ============ Galeria de fotos na tela cheia ============ */
.lightbox__stage .media img { object-fit: contain; }
.lightbox__nav {
  position: absolute; top: 50%; translate: 0 -50%; display: none; place-items: center;
  width: 56px; height: 56px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 10, 12, 0.4); color: #fff; transition: border-color 0.4s, background 0.4s;
}
.lightbox__nav:hover { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.08); }
.lightbox__nav--prev { left: var(--gutter); }
.lightbox__nav--next { right: var(--gutter); }
.lightbox.has-gallery .lightbox__nav { display: grid; }
.lightbox__count { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 0.25em; color: var(--muted); }
.lightbox__stage.is-portrait:has(img) { aspect-ratio: 3 / 4; }
@media (max-width: 640px) {
  .lightbox__nav { width: 44px; height: 44px; top: auto; bottom: 28px; translate: none; }
}

/* Botão "Descer": pula a experiência e vai direto aos trabalhos */
.exp__skip {
  position: absolute; left: 50%; bottom: 26px; z-index: 5;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 7px 7px 7px 20px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(10, 10, 12, 0.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; text-decoration: none; font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  transform: translateX(-50%); transition: background .35s, border-color .35s, color .35s, opacity .6s;
}
.exp__skip i {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: #fff; color: #0a0a0c; overflow: hidden;
}
.exp__skip svg { animation: skipBob 1.8s ease-in-out infinite; }
.exp__skip:hover { background: #fff; border-color: #fff; color: #0a0a0c; }
.exp__skip:hover i { background: #0a0a0c; color: #fff; }
@keyframes skipBob { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
html.is-intro .exp__skip { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .exp__skip svg { animation: none; } }

/* Marca d'água "© RP Films" sobre fotos e vídeos abertos */
.lightbox__stage { position: relative; }
.lightbox__wm {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 255, 255, 0.7); font-size: 11px; font-weight: 600; letter-spacing: 0.24em; text-transform: uppercase;
  pointer-events: none; user-select: none; white-space: nowrap;
}
.lightbox__stage img, .lightbox__stage video, .tile img, .tile video { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }

/* Inclinar em 3D (ver script.js) + brilho que segue o mouse */
.is-tilting { transition: transform 0.18s ease-out, opacity 0.5s var(--ease) !important; transform-style: preserve-3d; will-change: transform; z-index: 2; }
.tile::before, .fcard .media::before {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, 0.14), transparent 55%);
}
.tile.is-tilting::before, .fcard .media.is-tilting::before { opacity: 1; }
.tile, .fcard .media { transition: transform 0.45s ease-out, opacity 0.5s var(--ease); }

/* "Vamos conversar": pulsa enquanto o mouse está em cima */
.nav__cta:hover { animation: ctaPulse 2s ease-in-out infinite; }
@keyframes ctaPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.28); }
  50% { transform: scale(1.04); box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
}
@media (prefers-reduced-motion: reduce) { .nav__cta:hover { animation: none; } }

/* ---------- Celular / Safari ---------- */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; } /* sem zoom de toque duplo */
html.lb-open, html.lb-open body { overflow: hidden; }                /* site parado atrás do lightbox */
.lightbox { overscroll-behavior: contain; }
.lightbox__close { z-index: 6; display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 768px) {
  .lightbox { padding: calc(72px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); gap: 16px; }
  .lightbox__close {
    top: calc(16px + env(safe-area-inset-top)); right: 16px;
    padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(20, 20, 22, 0.8); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  }
  .lightbox__close b { font-size: 15px; }
  .lightbox__stage { max-height: 62dvh; }
  .lightbox__stage.is-portrait { height: 62dvh; }
  .lightbox__caption h3 { font-size: 26px; }
}

/* Top bar some ao descer e volta ao subir (ver script.js) */
.nav { transition: translate 0.6s var(--ease); }
.nav.nav--hidden { translate: 0 -110%; }
.nav::before {
  content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; pointer-events: none; opacity: 0;
  background: linear-gradient(to bottom, rgba(5, 5, 6, 0.9), rgba(5, 5, 6, 0.6) 60%, rgba(5, 5, 6, 0));
  transition: opacity 0.5s ease;
}
.nav.nav--solid::before { opacity: 1; } /* fundo escuro quando volta por cima do conteúdo */

/* Celular: a 1ª parte (capítulos) pede bem menos rolagem para avançar o vídeo e as frases */
@media (max-width: 768px) { .exp { height: 400vh; } }

/* ---------- Portfólio em fileiras: fotos em cima, vídeos embaixo ---------- */
.grid-group + .grid-group { margin-top: clamp(48px, 6vw, 88px); }
.grid-group.is-hidden { display: none; }
.grid-label {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
  font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted);
}
.grid-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.grid.grid--row { grid-template-columns: repeat(3, 1fr); grid-auto-rows: auto; }
.grid--row .tile { aspect-ratio: 4 / 5; }
@media (max-width: 520px) {
  /* no celular cada fileira vira um carrossel de arrastar para o lado */
  .grid.grid--row {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter); scrollbar-width: none;
    touch-action: pan-x pan-y;
  }
  .grid.grid--row::-webkit-scrollbar { display: none; }
  .grid--row .tile { flex: 0 0 78%; scroll-snap-align: start; }
  .grid--row .tile.is-hidden { display: none; }
}

/* Sobre: logo da RP Films */
.about__media { background: #000; }
.about__media img { -webkit-user-drag: none; user-select: none; }

/* Filtros do portfólio: crescem no hover, afundam ao apertar e dão um "pop" ao ficar ativos */
.filters button {
  transition: color .4s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease),
              transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease;
  will-change: transform;
}
@media (hover: hover) {
  /* mesmo pulso do botão "Vamos conversar" */
  .filters button:hover { animation: filterPulse 2s ease-in-out infinite; border-color: rgba(255,255,255,0.6); }
  @keyframes filterPulse {
    0%, 100% { transform: scale(1.06); box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.28); }
    50% { transform: scale(1.1); box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
  }
}
.filters button:active { animation: none; transform: scale(0.92); transition-duration: .12s; }
.filters button.is-popping { animation: filterPop .45s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes filterPop {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.14); }
  100% { transform: scale(1.06); }
}
@media (hover: none) { @keyframes filterPop { 0% { transform: scale(.92); } 55% { transform: scale(1.1); } 100% { transform: scale(1); } } }

@media (prefers-reduced-motion: reduce) { .filters button:hover { animation: none; } }

/* Quadros ainda sem conteúdo: "Em breve" no centro */
.media__soon {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-style: italic;
  font-size: clamp(26px, 2.6vw, 40px); letter-spacing: 0.02em; color: rgba(255, 255, 255, 0.55);
  pointer-events: none;
}
.tile:has(.media__soon) { cursor: default; }

/* Celular: frases sobem para não ficarem atrás do botão "Descer" */
@media (max-width: 768px) {
  .exp__skip { bottom: calc(18px + env(safe-area-inset-bottom)); }
  .chapter__inner, .chapter--1 .chapter__inner, .chapter--2 .chapter__inner, .chapter--3 .chapter__inner, .chapter--4 .chapter__inner {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .chapter__aside { bottom: calc(120px + env(safe-area-inset-bottom)); }
  .chapter--2 .chapter__inner { bottom: calc(120px + 110px + env(safe-area-inset-bottom)); }
}

/* Celular: menos espaço vazio entre "Em destaque" e "Portfólio" */
@media (max-width: 768px) {
  .featured__pin { padding: 12vh 0 5vh; }
  .gallery { padding-top: 7vh; }
  .gallery__head { margin-bottom: 32px; }
}

/* Celular/tablet (sem mouse): fotos e vídeos do portfólio sempre com cor e brilho total,
   já que não existe "passar o mouse" — e sem o zoom grudado depois de tocar */
@media (hover: none) {
  .tile .media, .tile:hover .media { filter: none; transform: none; }
}
