@font-face {
  font-family: "Brunson";
  src: url("../assets/fonts/Brunson.ttf") format("truetype");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --bg: #0a0a0f;
  --surface: #121219;
  --surface-2: #1a1a23;
  --line: #262632;
  --text: #f3f2f7;
  --muted: #8e8c9d;
  --accent: #ff6a3d;

  --maxw: 1200px;
  --font-display: "Brunson", "Unbounded", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- Gatinho que atravessa o fundo ---------- */
.cat-walk {
  position: fixed;
  left: -280px;
  bottom: 12vh;
  width: 220px;
  z-index: -1;
  opacity: 0.07;
  pointer-events: none;
  animation: cat-cross 34s linear infinite;
}
.cat-bob { animation: cat-bob 0.45s ease-in-out infinite alternate; }
.cat-leg { transform-origin: 50% 0%; animation: cat-step 0.45s ease-in-out infinite alternate; }
.cat-leg-2, .cat-leg-3 { animation-direction: alternate-reverse; }
.cat-tail { transform-origin: 26px 52px; animation: cat-tail 1.6s ease-in-out infinite alternate; }

@keyframes cat-cross {
  0% { transform: translateX(0); }
  30% { transform: translateX(calc(100vw + 300px)); }
  100% { transform: translateX(calc(100vw + 300px)); }
}
@keyframes cat-bob { to { transform: translateY(-4px); } }
@keyframes cat-step { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
@keyframes cat-tail { from { transform: rotate(-8deg); } to { transform: rotate(10deg); } }


.container { width: min(var(--maxw), 100% - 32px); margin-inline: auto; }
.section { padding: 120px 0; }
.section-tight { padding: 40px 0 120px; }

.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 32px;
}
.sub-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 40px 0 16px;
}

/* ---------- Media + placeholder ---------- */
.media { position: relative; overflow: hidden; background: var(--surface-2); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255, 255, 255, 0.025) 14px 28px),
    var(--surface-2);
}
.ph svg { width: 28px; height: 28px; opacity: 0.6; }
.ph code { font-size: 0.7rem; opacity: 0.6; word-break: break-all; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  padding: 0; /* a arte vai de ponta a ponta da tela */
}
.hero-art {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: #472d4d; /* mesma cor do fundo fixo */
}
/* todas as camadas ocupam a mesma área, então ficam alinhadas entre si */
.hero-bg,
.hero-plane {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}
/* avisa o navegador para preparar as camadas na placa de vídeo */
.hero-in .hero-plane { will-change: transform, opacity; }
.hero-done .hero-plane { will-change: auto; }

/* ---------- Entrada da primeira tela ----------
   montanhas -> árvores -> lua, e o texto entrando junto no meio da sequência */
@keyframes rise {
  from { opacity: 0; transform: translateY(var(--rise, 40px)); }
  to { opacity: 1; transform: none; }
}
@keyframes appear {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* tudo começa escondido e só entra quando as camadas terminam de carregar */
.l-mountains,
.l-trees,
.l-moon,
.hero-title .letter,
.hero-year,
.hero-roles li,
.hero-nav a {
  opacity: 0;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(0.22, 0.7, 0.25, 1);
}

.hero-in .l-mountains { --rise: 70px; animation: rise 1s 0.1s both; }
.hero-in .l-trees { --rise: 90px; animation: rise 1s 0.45s both; }
.hero-in .l-moon { --rise: 26px; animation: rise 0.9s 0.9s both; }

.hero-in .hero-title .letter { --rise: 0.5em; animation: rise 0.7s calc(0.6s + var(--i) * 0.045s) both; }
.hero-in .hero-year { --rise: 20px; animation: rise 0.7s 1.05s both; }

/* o gatinho sobe junto com a linha de texto */
.hero-in .hero-roles li { --rise: 24px; animation: rise 0.7s calc(1.15s + var(--i) * 0.07s) both; }

/* os botões do menu só aparecem, sem se mexer */
.hero-in .hero-nav a { animation: appear 0.9s 1.3s both; }

@media (prefers-reduced-motion: reduce) {
  .l-mountains,
  .l-trees,
  .l-moon,
  .hero-title .letter,
  .hero-year,
  .hero-roles li,
  .hero-nav a { animation: none; opacity: 1; }
}

/* camada do texto, por cima da arte */
.hero-layer {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: clamp(20px, 3.5vw, 46px) clamp(20px, 4vw, 60px);
}

.hero-nav {
  display: flex;
  justify-content: flex-end;
  gap: clamp(12px, 3.5vw, 56px);
}
.hero-nav a {
  font-family: var(--font-display);
  font-size: clamp(0.78rem, 1.5vw, 1.5rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  transition: color 0.2s;
}
.hero-nav a:hover { color: var(--accent); }

.hero-center {
  align-self: center;
  justify-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* o ano encosta na direita do título */
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 11.5vw, 11rem);
  line-height: 0.82;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: #fff;
}
.hero-title .letter { display: inline-block; }
.hero-year {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.8vw, 2.7rem);
  line-height: 1;
  margin-top: 0.12em;
  margin-right: 0.1em;
  color: #fff;
}

.hero-roles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(10px, 4.5vw, 72px);
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(0.62rem, 1.5vw, 1.5rem);
  text-transform: uppercase;
  color: #fff;
}
.role-logo img { width: clamp(34px, 4vw, 58px); height: auto; }

/* ---------- Past works ---------- */
/* sem overflow aqui: era ele que cortava a borda do card ao crescer */
.works-box { overflow: visible; }
/* linha branca com as pontas se apagando, com as abas encaixadas nela */
.tabs {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 0; /* as abas encostam na linha, sem folga */
  margin-bottom: 22px;
  overflow: hidden; /* garante que nenhuma aba passe da linha */
}
.tabs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  z-index: 2; /* a linha fica por cima das abas */
  /* começa cheia na esquerda e só some na ponta direita */
  /* 1px cheio, sem meio pixel: é o que mantém o encaixe nas abas.
     A finura vem da cor, não da altura. */
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0, rgba(255, 255, 255, 0.85) 85%, transparent 100%);
}
.tab {
  height: 46px; /* altura redonda: evita meio pixel sobrando embaixo */
  display: inline-flex;
  align-items: center;
  padding: 0 22px;
  margin-bottom: -1px; /* a aba desce até dentro da linha, sem fresta */
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-bottom: 0; /* encosta na linha */
  border-radius: 0;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.tab:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.7); }
.tab[aria-selected="true"] { background: #fff; border-color: #fff; color: var(--bg); }

.works-scroll {
  height: min(760px, 78svh);
  overflow-y: auto;
  /* chegando no fim da caixa, a rolagem continua na página */
  overscroll-behavior: auto;
  /* espaço para o card crescer no hover sem ser cortado */
  padding: 22px;
  /* a barra fica na borda direita da seção, não sobrando para fora */
  margin: -22px 0 -22px -22px;
  /* uma única barra de rolagem, na direita */
  scrollbar-width: thin;
  scrollbar-color: #3a3a47 transparent;
  scrollbar-gutter: stable;
}
.works-scroll::-webkit-scrollbar { width: 10px; }
.works-scroll::-webkit-scrollbar-track { background: transparent; }
.works-scroll::-webkit-scrollbar-thumb { background: #3a3a47; border-radius: 10px; }
.works-scroll::-webkit-scrollbar-thumb:hover { background: #4a4a59; }
.works-scroll::-webkit-scrollbar { display: none; }

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.card {
  position: relative;
  display: block;
  width: 100%;
  text-align: left;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease;
}
.card-media { aspect-ratio: 3 / 2; background: var(--surface); }
/* borda branca no hover + degradê escuro por fora, sem zoom na imagem */
button.card {
  cursor: zoom-in;
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s ease;
}
button.card:hover,
button.card:focus-visible {
  transform: scale(1.06);
  z-index: 2;
  box-shadow: 0 0 34px 14px rgba(7, 7, 11, 0.9), 0 30px 70px rgba(0, 0, 0, 0.75);
}
/* a borda fica por dentro da imagem: não invade o vizinho nem some na rolagem */
button.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 2px solid #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
button.card:hover::after,
button.card:focus-visible::after { opacity: 1; }
.card-media img { transition: none; }

.card-title { display: none; }

/* modelos com .obj: blur leve e a mensagem no hover */
button.card:not(.has-3d) { cursor: default; }
.card-hint {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}
button.card:not(.has-3d) .card-hint { display: none; }
.has-3d:hover .card-hint,
.has-3d:focus-visible .card-hint { opacity: 1; }
.has-3d .card-media img { transition: filter 0.28s ease; }
.has-3d:hover .card-media img,
.has-3d:focus-visible .card-media img { filter: blur(3px) brightness(0.62); }

.card-empty .card-media { background: #101017; }
.card-empty .ph { background: #101017; opacity: 0.5; }

.more {
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 48px;
  text-align: center;
}
.more-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 8vw, 4.5rem);
  line-height: 1;
  color: var(--accent);
}
.more-label { font-size: 1.2rem; color: var(--muted); }

/* ---------- Games ---------- */
.games-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 32px;
}
.big-stat {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(4.5rem, 16vw, 11rem);
  line-height: 0.85;
  letter-spacing: -0.05em;
  color: var(--accent);
}
.big-stat-label { margin-top: 12px; color: var(--muted); font-size: 1.1rem; }
.track-controls { display: flex; gap: 8px; }
.round-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.round-btn:hover { background: var(--text); color: var(--bg); }
.round-btn svg { width: 20px; height: 20px; }

.games-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px max(16px, (100% - var(--maxw)) / 2) 16px;
  scroll-padding-inline: max(16px, (100% - var(--maxw)) / 2);
  scrollbar-width: none;
}
.games-track::-webkit-scrollbar { display: none; }
.game { flex: 0 0 clamp(250px, 32vw, 380px); scroll-snap-align: start; }
.game-media { aspect-ratio: 16 / 9; border-radius: 16px; border: 1px solid var(--line); }
a.game:hover .game-media img { transform: scale(1.05); }
.game-title { display: block; margin-top: 10px; font-weight: 500; }

/* jogadores ativos no canto da thumb */
.ccu {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  background: rgba(8, 8, 12, 0.78);
  backdrop-filter: blur(6px);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  color: #eafff4;
}
.ccu svg { width: 15px; height: 15px; color: #2ee07a; }

/* ---------- About ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
/* moldura menor e mais vertical, com o sticker colado por cima */
.about-figure { position: relative; width: min(100%, 380px); }
.about-photo { aspect-ratio: 5 / 8; border-radius: 20px; }
.about-sticker {
  position: absolute;
  /* sombra curta só para dar o volume de adesivo colado */
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45));
  pointer-events: none;
}
.about-sticker.s1 { right: -7%; bottom: -6%; width: 54%; transform: rotate(-9deg); }
.about-sticker.s2 { left: -9%; top: -5%; width: 40%; transform: rotate(8deg); }
.about-text { display: grid; gap: 16px; color: var(--muted); font-size: 1.05rem; max-width: 66ch; }
.about-text strong { color: var(--text); font-weight: 600; }

/* dados rápidos */
.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: -16px 0 22px;
}
.about-facts li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* programas favoritos */
.software { margin-top: 34px; }
.software-label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.software-list { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; }
.soft {
  position: relative;
  display: grid;
  place-items: center;
  transition: transform 0.2s;
  outline: none;
}
.soft img {
  width: 42px;
  height: 42px;
  opacity: 0.92; /* cores originais dos programas */
  transition: opacity 0.2s;
}
.soft:hover,
.soft:focus-visible { transform: translateY(-4px) scale(1.06); }
.soft:hover img,
.soft:focus-visible img { opacity: 1; }

/* o nome aparece ao passar o mouse */
.soft-name {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 10px;
  border-radius: 8px;
  background: #fff;
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.soft:hover .soft-name,
.soft:focus-visible .soft-name { opacity: 1; transform: translateX(-50%) translateY(0); }
/* os gatos: duas fotos instantâneas, paradas, ao lado do texto */
.about-left { display: grid; align-content: start; }
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 30px;
}
.cat {
  width: 168px;
  padding: 9px 9px 0;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
  /* leve inclinação fixa, uma para cada lado */
  transform: rotate(calc(var(--i) * 6deg - 3deg));
}
.cat-media { aspect-ratio: 1; border-radius: 2px; background: #efeef2; }
.cat-media .ph { background: #efeef2; color: #8b8794; }
.cat-media .ph code { display: none; }
.cat figcaption {
  padding: 12px 2px 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #1b1520;
}

/* ---------- Contacts ---------- */
.contact-lead { color: var(--muted); font-size: 1.1rem; margin: -12px 0 32px; }
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.contact {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color 0.2s, transform 0.2s;
}
a.contact:hover { border-color: var(--accent); transform: translateY(-3px); }
.contact-label { font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); }
.contact-value { font-size: 1.1rem; font-weight: 600; overflow-wrap: anywhere; }
.contact-arrow { position: absolute; top: 20px; right: 22px; color: var(--muted); }
a.contact:hover .contact-arrow { color: var(--accent); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
.footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer a:hover { color: var(--text); }

/* ---------- Aviso de site em obras ---------- */
.wip {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none; /* só um aviso: não atrapalha cliques */
  opacity: 0.9;
}
.wip img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}
.wip-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
}
.wip-text { text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9); }

@media (max-width: 560px) {
  .wip { bottom: 10px; }
  .wip img { width: 28px; height: 28px; }
  .wip-text { font-size: 0.72rem; }
}

/* ---------- Lightbox ---------- */
.lightbox {
  margin: auto;
  width: min(1500px, 94vw);
  height: min(860px, 86svh);
  max-width: none;
  max-height: none;
  padding: 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: visible;
}
.lightbox::backdrop {
  background: radial-gradient(circle at 50% 45%, rgba(40, 20, 12, 0.5), rgba(4, 4, 7, 0.94) 70%);
  backdrop-filter: blur(10px);
  animation: fade-in 0.18s linear;
}
.lightbox[open] { animation: fade-in 0.18s linear; }
@keyframes fade-in { from { opacity: 0; } }

/* palco do 3D */
.lb-stage {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.lb-3d { width: 100%; height: 100%; }
.lb-3d canvas { display: block; cursor: grab; }
.lb-3d canvas:active { cursor: grabbing; }
.lb-3d-status {
  position: absolute;
  max-width: 60ch;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* botões sobre o palco */
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #c9c7d2;
  font-size: 2rem;
  line-height: 1;
  outline: none;
  transition: color 0.2s, transform 0.2s;
}
.lightbox-close:hover,
.lightbox-close:focus-visible { color: #fff; transform: scale(1.12); }


/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; }
  .section { padding: 88px 0; }
}
@media (max-width: 760px) {
  .works-grid { grid-template-columns: 1fr; }
  button.card:hover { transform: none; box-shadow: none; }
}
@media (max-width: 520px) {
  .hero { padding: 10px; }
  .hero-media { border-radius: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint svg { animation: none; }
  .media img { transition: none; }
  .cat-walk { display: none; }
}
