/* Site pessoal do Pedro Gabriel — página de links (index) e portfólio.
   Uma coluna preta de até 576 px no centro, a foto borrada em volta. */

:root {
  --coluna: 576px;
  --pad: 24px;
  --texto-2: rgba(255, 255, 255, .72);
  --texto-3: rgba(255, 255, 255, .5);
  --linha: rgba(255, 255, 255, .12);
  --linha-forte: rgba(255, 255, 255, .3);
  --superficie: #0d0d0f;
  --whats: #25d366;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* O preto fica no html: se o modo escuro forçado pintar o html, o body
   deixa de propagar o fundo e cobriria a .fundo. */
html { background: #000; color-scheme: dark; }

body {
  color: #fff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

img, video, svg { display: block; }
a { color: inherit; }

/* A foto do topo em 27 px, esticada e borrada atrás da coluna.
   Esticada ela já sai difusa: o blur curto só termina o serviço. */
.fundo {
  position: fixed;
  inset: -10%;
  background: url(assets/foto/fundo.webp) center / cover;
  filter: blur(60px) saturate(1.3);
  opacity: .6;
  z-index: 0;
}

.coluna {
  position: relative;
  z-index: 1;
  width: min(100%, var(--coluna));
  margin: 0 auto;
  min-height: 100vh;
  background: #000;
}

/* ---------- Barra que entra ao rolar ---------- */
.barra {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translate(-50%, -100%);
  width: min(100%, var(--coluna));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--pad);
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform .25s ease;
  z-index: 10;
}
.barra.visivel { transform: translate(-50%, 0); }
.barra__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.barra__nome { font-size: 16px; font-weight: 700; letter-spacing: .2px; }

/* ---------- Topo com a foto ---------- */
.hero { position: relative; aspect-ratio: 4 / 5; }
.hero__foto { width: 100%; height: 100%; object-fit: cover; }
/* A camisa preta embaixo emenda no degradê: o nome assenta sobre ela. */
.hero__sombra {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, .55) 70%, #000 97%);
}
.hero__texto {
  position: absolute;
  inset: auto 0 0;
  padding: 0 var(--pad) 14px;
  text-align: center;
}

.nome {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -.3px;
  line-height: 1.15;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.selo { width: 24px; height: 24px; flex: none; }
.barra .selo { width: 16px; height: 16px; margin-left: -6px; }
.arroba { font-size: 14px; font-weight: 500; color: var(--texto-2); margin-top: 4px; }

/* ---------- Corpo ---------- */
.corpo { padding: 12px var(--pad) 32px; }

.redes { display: flex; justify-content: center; gap: 26px; margin: 10px 0 16px; }
.redes__botao {
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .85);
  transition: opacity .15s ease, transform .15s ease;
}
.redes__botao:hover { opacity: .6; transform: translateY(-1px); }
.redes__botao svg { width: 23px; height: 23px; }

.bio { text-align: center; font-size: 15px; line-height: 1.55; margin: 0 0 20px; color: rgba(255, 255, 255, .9); }
.bio strong { font-weight: 800; color: #fff; }

/* ---------- Cartões de link ---------- */
.links { display: grid; gap: 12px; }

.link {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px 18px;
  border: 1px solid var(--linha);
  border-radius: 16px;
  background: var(--superficie);
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.link:hover { transform: translateY(-2px); border-color: var(--linha-forte); }
.link:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* Imagem de fundo escurecida à esquerda, para o texto branco ler */
.link__fundo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.link:has(.link__fundo)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(0, 0, 0, .9) 38%, rgba(0, 0, 0, .45) 100%);
}
.link--portfolio .link__fundo { object-position: 60% 30%; filter: brightness(.7); }

/* Cartão da shift: preto e branco, como a marca. Duas linhas da faixa do
   motion correndo em sentidos opostos, apagadas para a marca ler por cima. */
.link--shift { background: #0e0e10; }
.link--shift::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, #0e0e10 30%, rgba(14, 14, 16, .55) 70%, rgba(14, 14, 16, .2));
}
.faixa {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1;
  white-space: nowrap;
}
.faixa span { display: block; width: max-content; animation: faixa 38s linear infinite; }
.faixa span:first-child { color: rgba(255, 255, 255, .16); }
.faixa span:last-child {
  color: #0e0e10;
  background: rgba(255, 255, 255, .16);
  padding: 2px 0;
  animation-direction: reverse;
}
@keyframes faixa { from { transform: translateX(0); } to { transform: translateX(-33.333%); } }

.link__texto { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.link__texto small { font-size: 13px; color: var(--texto-2); line-height: 1.35; }
.link__titulo { font-size: 19px; font-weight: 800; letter-spacing: -.1px; line-height: 1.15; }
/* Largura explícita (24 x 2228/809): sem ela o SVG estica na coluna e centraliza o desenho. */
.link__marca { height: 24px; width: 66px; align-self: flex-start; color: #fff; }

.link__seta { width: 20px; height: 20px; flex: none; margin-left: auto; color: rgba(255, 255, 255, .55); }

.link__icone {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--whats);
  color: #fff;
}
.link__icone svg { width: 27px; height: 27px; }
.link--whats { background: linear-gradient(90deg, #0d0d0f 55%, rgba(37, 211, 102, .14)); }

/* ---------- Rodapé ---------- */
.rodape {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, .4);
}
.rodape__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--texto-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: color .15s ease;
}
.rodape__cta:hover { color: #fff; }
.rodape__cta svg { width: 15px; height: 15px; }
.rodape__cta strong { color: #fff; font-weight: 700; }

/* =================================================================
   Portfólio
   ================================================================= */

.p-topo {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linha);
}
.p-topo__linha {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px var(--pad) 10px;
}
.p-voltar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: -8px;
  border-radius: 50%;
  color: #fff;
  transition: background .15s ease;
}
.p-voltar:hover { background: rgba(255, 255, 255, .1); }
.p-voltar svg { width: 20px; height: 20px; transform: scaleX(-1); }
.p-topo__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.p-topo__nome { display: flex; flex-direction: column; line-height: 1.2; }
.p-topo__nome strong { font-size: 15px; font-weight: 700; }
.p-topo__nome span { font-size: 12px; color: var(--texto-3); }

/* Abas das categorias: rolam de lado no celular se faltar espaço */
.abas {
  display: flex;
  gap: 6px;
  padding: 0 var(--pad) 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.abas::-webkit-scrollbar { display: none; }
.aba {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--linha);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--texto-2);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.aba:hover { color: #fff; border-color: var(--linha-forte); }
.aba[aria-current="true"] { background: #fff; border-color: #fff; color: #000; }

.p-corpo { padding: 22px var(--pad) 36px; }

/* Com JS, só a categoria escolhida aparece; sem JS, todas em sequência. */
.js .secao:not(.ativa) { display: none; }
.secao + .secao { margin-top: 40px; }
.js .secao + .secao { margin-top: 0; }

.secao__titulo { font-size: 24px; font-weight: 800; letter-spacing: -.3px; }
.secao__sub { font-size: 14px; color: var(--texto-2); margin: 4px 0 18px; line-height: 1.45; }

/* ---------- Programação ---------- */
.projetos { display: grid; gap: 16px; }
.projeto {
  border: 1px solid var(--linha);
  border-radius: 16px;
  overflow: hidden;
  background: var(--superficie);
}
.projeto__tela { position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-bottom: 1px solid var(--linha); }
.projeto__tela img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.projeto__info { padding: 16px 18px 18px; }
.projeto__nome { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; }
.projeto__tipo {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  color: var(--texto-2);
}
.projeto__desc { font-size: 14px; line-height: 1.5; color: var(--texto-2); margin-top: 6px; }
.projeto__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.projeto__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.projeto__link svg { width: 14px; height: 14px; }

/* ---------- Vídeos (grade de reels, 3 colunas como no Instagram) ---------- */
.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.reel {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.reel img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.reel:hover img { transform: scale(1.04); }
.reel:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.reel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent);
  pointer-events: none;
}
.reel__play {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  z-index: 1;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6));
}
.reel__info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 8px 9px 9px; }
.reel__titulo { display: block; font-size: 12.5px; font-weight: 700; line-height: 1.2; }
.reel__meta { display: block; font-size: 11px; color: var(--texto-2); margin-top: 3px; }

/* ---------- Flyers: uma série por cliente, rolando de lado ---------- */
.serie + .serie { margin-top: 26px; }
.serie__topo { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.serie__nome { font-size: 16px; font-weight: 800; }
.serie__desc { font-size: 13px; color: var(--texto-2); margin-top: 2px; }
.serie__conta { flex: none; font-size: 12px; color: var(--texto-3); }

.tira {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 calc(var(--pad) * -1);
  padding: 0 var(--pad) 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .2) transparent;
}
.peca {
  flex: none;
  height: 250px;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: #111;
  cursor: zoom-in;
  scroll-snap-align: start;
  scroll-margin-left: var(--pad);
}
.peca img { height: 100%; width: auto; transition: transform .3s ease; }
.peca:hover img { transform: scale(1.03); }
.peca:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* ---------- Visualizador (vídeo e imagem) ---------- */
.visor {
  border: 0;
  padding: 0;
  margin: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  background: rgba(0, 0, 0, .94);
  color: #fff;
}
.visor::backdrop { background: rgba(0, 0, 0, .8); }
.visor[open] { display: grid; place-items: center; }
.visor__palco {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 56px 12px 64px;
  touch-action: pan-y;
}
.visor__palco img,
.visor__palco video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  background: #000;
}
.visor__fechar,
.visor__nav {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--linha);
  background: rgba(20, 20, 22, .8);
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}
.visor__fechar:hover,
.visor__nav:hover { background: rgba(60, 60, 64, .9); }
.visor__fechar { top: 12px; right: 12px; }
.visor__fechar svg, .visor__nav svg { width: 20px; height: 20px; }
.visor__nav { top: 50%; transform: translateY(-50%); }
.visor__nav--ant { left: 12px; }
.visor__nav--ant svg { transform: scaleX(-1); }
.visor__nav--prox { right: 12px; }
.visor__nav[hidden] { display: none; }
.visor__legenda {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--texto-2);
  padding: 0 70px;
}

@media (max-width: 420px) {
  :root { --pad: 16px; }
  .nome { font-size: 30px; }
  .link__titulo { font-size: 18px; }
  .peca { height: 210px; }
  .visor__nav { top: auto; bottom: 8px; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .faixa span { animation: none; }
}
