/* Obscure Tropics — paleta tirada da logo */
:root {
  --bg: #0a0809;
  --bg-2: #120e10;
  --cream: #fbe4be;
  --cream-dim: rgba(251, 228, 190, .62);
  --cyan: #79dec7;
  --magenta: #bf4a8e;
  --hot: #ff2fa0;          /* rosa vivo do contorno da logo */
  --hot-deep: #c60178;
  --line: rgba(251, 228, 190, .14);
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Inter", system-ui, sans-serif;
  --mono: "Space Mono", ui-monospace, monospace;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--cyan); }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
::selection { background: var(--hot); color: var(--bg); }

/* ---------- Overlays ---------- */
.grain {
  position: fixed; inset: -128px; pointer-events: none; z-index: 90; opacity: .045;
  background-size: 128px 128px;
  will-change: transform; contain: strict;
  animation: grain .6s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 17% { transform: translate(-37px, 21px); } 33% { transform: translate(52px, -44px); }
  50% { transform: translate(-18px, 63px); } 67% { transform: translate(71px, 9px); } 83% { transform: translate(-60px, -30px); }
}
.scanlines { /* linhas de TV: textura de 3 px repetida, camada própria e parada */
  position: fixed; inset: 0; pointer-events: none; z-index: 89;
  background-image: linear-gradient(to bottom, rgba(0,0,0,.22) 1px, transparent 1px);
  background-size: 100% 3px;
  transform: translateZ(0); contain: strict;
}
.sweep { /* faixa de interferência que desce a tela */
  position: fixed; left: 0; right: 0; top: 0; height: 18vh; z-index: 88; pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(121,222,199,.05), transparent);
  transform: translateY(-20vh);
  animation: sweep 7s linear infinite;
  will-change: transform; contain: strict;
}
@keyframes sweep { to { transform: translateY(120vh); } }

/* ---------- Cursor ---------- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none;
  width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  border: 1px solid var(--cyan);
  display: grid; place-items: center;
  opacity: 0; /* aparece só quando o mouse se mexe */
  transition: opacity .3s, width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background .35s, border-color .35s;
}
.cursor.is-on { opacity: 1; }
.cursor__label { opacity: 0; font-size: 10px; color: var(--bg); transition: opacity .2s; }
.cursor.is-play { width: 84px; height: 84px; margin: -42px 0 0 -42px; background: var(--hot); border-color: var(--hot); }
.cursor.is-play .cursor__label { opacity: 1; }
.cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; border-color: var(--hot); }
@media (hover: none) { .cursor { display: none; } }

/* ---------- Glitch da logo ---------- */
.glitch-img { position: relative; }
.glitch-img img { position: relative; z-index: 1; width: 100%; height: auto; }
.glitch-img::before, .glitch-img::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: var(--src) center / contain no-repeat;
  opacity: 0; pointer-events: none;
}
.glitch-img::before { filter: drop-shadow(-6px 0 0 var(--cyan)) hue-rotate(-20deg); animation: glitchA 4.2s steps(1) infinite; }
.glitch-img::after  { filter: drop-shadow(6px 0 0 var(--hot)) hue-rotate(20deg);  animation: glitchB 4.2s steps(1) infinite; }
@keyframes glitchA {
  0%, 86%, 100% { opacity: 0; transform: none; clip-path: none; }
  87% { opacity: .9; transform: translate(-8px, 0); clip-path: inset(38% 0 48% 0); }
  89% { opacity: .9; transform: translate(10px, 0); clip-path: inset(12% 0 70% 0); }
  91% { opacity: .9; transform: translate(-4px, 0); clip-path: inset(60% 0 22% 0); }
  93% { opacity: 0; }
}
@keyframes glitchB {
  0%, 87%, 100% { opacity: 0; transform: none; clip-path: none; }
  88% { opacity: .85; transform: translate(9px, 0); clip-path: inset(44% 0 40% 0); }
  90% { opacity: .85; transform: translate(-12px, 0); clip-path: inset(20% 0 64% 0); }
  92% { opacity: .85; transform: translate(5px, 0); clip-path: inset(72% 0 10% 0); }
  94% { opacity: 0; }
}

/* ---------- Loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
  display: grid; place-items: center; align-content: center; gap: 18px;
  transition: clip-path 1s var(--ease);
  clip-path: inset(0 0 0 0);
}
.loader__logo { width: min(160px, 40vw); animation: flicker 1.4s steps(2) infinite; }
.loader__count { font-size: 14px; color: var(--cyan); }
.loader__label { color: var(--cream-dim); font-size: 10px; }
body.is-ready .loader { clip-path: inset(0 0 100% 0); }
@keyframes flicker { 0%, 100% { opacity: 1; } 47% { opacity: .55; } 50% { opacity: .9; } }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  background: linear-gradient(to bottom, rgba(10,8,9,.75), rgba(10,8,9,0));
}
.nav__brand { display: flex; align-items: center; gap: 10px; }
.nav__logo { width: 34px; height: 34px; object-fit: contain; }
.nav__links { display: flex; gap: clamp(14px, 3vw, 36px); }
.nav__links a { position: relative; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
@media (max-width: 640px) {
  .nav__brand span { display: none; }
  .nav__links { gap: 14px; font-size: 10px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  overflow: hidden; text-align: center; padding: 120px var(--gutter) 80px;
}
.hero__video {
  position: absolute; inset: -4%; width: 108%; height: 108%; object-fit: cover;
  filter: saturate(.75) contrast(1.05) brightness(.55);
  transform: scale(1.05);
}
.hero__shade {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(10,8,9,.25) 0%, rgba(10,8,9,.85) 70%, var(--bg) 100%),
    linear-gradient(to bottom, rgba(198,1,120,.10), rgba(121,222,199,.06));
}
.hero__inner { position: relative; z-index: 2; display: grid; justify-items: center; gap: 18px; }
.hero__logo { width: clamp(150px, 22vw, 260px); animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.035) rotate(-1.5deg); filter: drop-shadow(0 0 28px rgba(255,47,160,.35)); } }
.hero__kicker { color: var(--cyan); margin: 6px 0 0; }
.hero__title {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(44px, 9vw, 132px); line-height: .95; letter-spacing: -.01em;
}
.hero__title em { color: var(--hot); }
.rotator { display: inline-block; min-width: 3ch; }
.rotator.is-out { animation: rotOut .35s var(--ease) forwards; }
.rotator.is-in  { animation: rotIn .5s var(--ease) forwards; }
@keyframes rotOut { to { opacity: 0; transform: translateY(-40%) skewX(-12deg); filter: blur(6px); } }
@keyframes rotIn  { from { opacity: 0; transform: translateY(40%) skewX(12deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.hero__scroll {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 2;
  display: grid; justify-items: center; gap: 10px; color: var(--cream-dim); font-size: 10px;
}
.hero__scroll-bar { width: 1px; height: 48px; background: var(--line); position: relative; overflow: hidden; }
.hero__scroll-bar::after {
  content: ""; position: absolute; left: 0; top: -50%; width: 100%; height: 50%;
  background: var(--cyan); animation: drip 1.8s var(--ease) infinite;
}
@keyframes drip { to { top: 100%; } }

/* Linhas que sobem (hero e contato) */
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.split { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.is-ready .hero .split, .contact.is-in .split { transform: none; }
.hero .line:nth-child(2) .split, .contact .line:nth-child(2) .split { transition-delay: .12s; }

/* ---------- Marquee ---------- */
.marquee {
  border-block: 1px solid var(--line); overflow: hidden; white-space: nowrap;
  padding: 18px 0; background: var(--bg-2);
}
.marquee__track { display: inline-flex; gap: 28px; animation: marquee 32s linear infinite; }
.marquee i { color: var(--hot); font-style: normal; }
.marquee span:nth-of-type(3n+2) { color: var(--cyan); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(90px, 14vw, 180px) var(--gutter); position: relative; }
.section__head { display: grid; gap: 14px; margin-bottom: clamp(40px, 6vw, 80px); }
.section__num { color: var(--cyan); margin: 0; }
.section__title {
  margin: 0; font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 6vw, 88px); line-height: 1; max-width: 16ch;
}
.section__title em { color: var(--hot); }

/* Reveal genérico */
.reveal-up { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal-up.is-in { opacity: 1; transform: none; }

/* ---------- Work ---------- */
.work__grid {
  display: grid; gap: clamp(16px, 2.4vw, 32px);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 760px) { .work__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) {
  .work__grid { grid-template-columns: repeat(5, 1fr); }
  .card:nth-child(even) { margin-top: 90px; } /* grade em degraus */
}
.card { cursor: none; }
@media (hover: none) { .card { cursor: pointer; } }
.reveal-card { opacity: 0; transform: translateY(60px) scale(.97); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
.reveal-card.is-in { opacity: 1; transform: none; }
.card__media {
  position: relative; aspect-ratio: 9 / 16; overflow: hidden; background: var(--bg-2);
  border: 1px solid var(--line);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s var(--ease), border-color .4s;
}
.card__media img, .card__media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: opacity .5s, transform 1.2s var(--ease), filter .6s;
}
.card__media img { filter: saturate(.7) brightness(.85); }
.card__media video { opacity: 0; }
.card:hover .card__media { border-color: var(--hot); }
.card:hover .card__media img { transform: scale(1.06); }
.card.is-playing .card__media video { opacity: 1; }
.card__media::after { /* sangria ciano/magenta no hover */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  box-shadow: inset 4px 0 0 rgba(121,222,199,.55), inset -4px 0 0 rgba(255,47,160,.55);
}
.card:hover .card__media::after { opacity: 1; }
.card__meta { display: flex; justify-content: space-between; margin-top: 14px; color: var(--cream-dim); font-size: 10px; }
.card__title { margin: 6px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(24px, 2.2vw, 32px); line-height: 1.05; }

/* ---------- About ---------- */
.manifesto {
  margin: 0; font-family: var(--serif); font-size: clamp(30px, 4.6vw, 68px); line-height: 1.12; max-width: 26ch;
}
.manifesto .w { opacity: .14; transition: opacity .3s, color .3s; }
.manifesto .w.on { opacity: 1; }
.manifesto .w.accent.on { color: var(--cyan); font-style: italic; }
.about__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px;
  margin-top: clamp(60px, 8vw, 120px); border-top: 1px solid var(--line); padding-top: 32px;
}
.fact { display: grid; gap: 8px; }
.fact__num { font-family: var(--serif); font-size: clamp(56px, 7vw, 104px); line-height: 1; color: var(--hot); }
.fact .mono { color: var(--cream-dim); }

/* ---------- Process ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.step { border-top: 1px solid var(--line); padding: 28px 24px 28px 0; position: relative; }
.step::before {
  content: ""; position: absolute; top: -1px; left: 0; height: 1px; width: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--hot)); transform: scaleX(0); transform-origin: left;
  transition: transform 1.2s var(--ease) .2s;
}
.step.is-in::before { transform: scaleX(1); }
.step:nth-child(2) { transition-delay: .1s; } .step:nth-child(3) { transition-delay: .2s; } .step:nth-child(4) { transition-delay: .3s; }
.step__n { color: var(--hot); }
.step h3 { font-family: var(--serif); font-weight: 400; font-size: 40px; margin: 10px 0 8px; }
.step p { margin: 0; color: var(--cream-dim); max-width: 28ch; }

/* ---------- Contact ---------- */
.contact { text-align: center; display: grid; justify-items: center; gap: 28px; padding-bottom: clamp(120px, 16vw, 220px); }
.contact__title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 11vw, 168px); line-height: .92; }
.contact__title em { color: var(--hot); }
.contact__links { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.pill {
  font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  padding: 16px 28px; border-radius: 999px; background: var(--cream); color: var(--bg);
  transition: background .3s, color .3s, transform .3s var(--ease);
  display: inline-block;
}
.pill:hover { background: var(--hot); color: var(--cream); }
.pill--ghost { background: transparent; color: var(--cream); border: 1px solid var(--line); }
.pill--ghost:hover { border-color: var(--cyan); background: transparent; color: var(--cyan); }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 24px var(--gutter); border-top: 1px solid var(--line); color: var(--cream-dim); font-size: 10px;
}
.footer__clock { color: var(--cyan); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150; background: rgba(10,8,9,.94);
  display: grid; place-items: center; padding: 64px 16px 24px;
  animation: lbIn .5s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes lbIn { from { opacity: 0; clip-path: inset(50% 0 50% 0); } to { opacity: 1; clip-path: inset(0); } }
.lightbox__video { max-height: calc(100svh - 110px); width: auto; aspect-ratio: 9 / 16; background: #000; }
.lightbox__close {
  position: absolute; top: 18px; right: var(--gutter); background: none; border: 0; color: var(--cream); cursor: pointer;
}
.lightbox__close:hover { color: var(--hot); }
.lightbox__title { position: absolute; top: 20px; left: var(--gutter); margin: 0; color: var(--cyan); }

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .split, .reveal-up, .reveal-card { transform: none !important; opacity: 1 !important; }
  .manifesto .w { opacity: 1; }
  .hero__video { display: none; }
}
