/* ============ Base ============ */
:root {
  --bg: #090909;
  --bg-card: #141414;
  --text: #f2f2f2;
  --muted: #8a8a8a;
  --line: #1f1f1f;
  --accent: #ffffff;
  --wa: #25d366;
  --gutter: clamp(20px, 5vw, 96px);
  --gap: 4px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Manrope", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
main { flex: 1; }

/* ============ Header ============ */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px var(--gutter) 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: .02em;
}
.brand img { height: 46px; width: auto; }
.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
@media (max-width: 600px) { .brand span { display: none; } }

/* nav: categorias + Sobre, com sublinhado fino */
.site-nav { display: flex; flex-wrap: wrap; gap: 6px 26px; justify-content: flex-end; }
.site-nav a {
  position: relative;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 0;
  transition: color .2s;
}
.site-nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--text); }
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }
.site-nav .sep { width: 1px; height: 14px; background: #2a2a2a; align-self: center; }
@media (max-width: 600px) {
  .site-header { padding-top: 22px; padding-bottom: 20px; }
  .site-nav { gap: 4px 16px; }
  .site-nav a { font-size: 11px; letter-spacing: .1em; }
  .site-nav .sep { display: none; }
}

/* ============ Página inicial: espaço antes do grid ============ */
#work { padding-top: 18px; }

/* ============ Seções / Grid ============ */
.section {
  width: min(100% - 2 * var(--gutter), 1440px);
  margin: 0 auto;
  padding: 0 0 48px;
  scroll-margin-top: 90px;
}
.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.section-title small {
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--muted);
  text-transform: none;
}
.empty {
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 28px;
  text-align: center;
  font-size: 14px;
}

/* Grid "justificado": o JS (main.js) agrupa os cards em linhas e dá a cada
   linha UMA altura, de modo que vertical (3:4) e horizontal (16:9) fiquem
   lado a lado com a mesma altura, colados e preenchendo a largura. */
.grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 var(--gap);
}
/* item = card + legenda. O JS define a largura do item e a altura do card. */
.item { flex: 0 0 auto; margin: 0 0 22px; }
.card { display: block; height: 220px; } /* altura de fallback antes do JS */
.card.tall { aspect-ratio: 3 / 4; }
.card.wide { aspect-ratio: 16 / 9; }
.card.image { aspect-ratio: 4 / 5; }
.caption {
  margin: 10px 2px 0;
  font-size: 12px;
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .25s;
}
.item:hover .caption { color: var(--text); }

/* animação de entrada (fade + subida) ao rolar */
.item { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.item.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .item { opacity: 1; transform: none; transition: none; }
}

/* ============ Card ============ */
.card {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
  border-radius: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .82;                       /* capa levemente escurecida em repouso */
  transition: transform .6s ease, opacity .4s ease;
}
.card:hover img, .card.is-previewing img, .card:focus-visible img { opacity: 1; transform: scale(1.03); }
.card.is-playing img { opacity: 0; }

/* iframe do preview: posicionado pelo JS para "cobrir" o card */
.card .preview {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s ease;
}
.card.is-playing .preview { opacity: 1; }

.card .badge {
  position: absolute; top: 12px; left: 12px;
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: #fff; background: rgba(0,0,0,.5);
  padding: 4px 8px; border-radius: 3px;
  opacity: 0; transition: opacity .3s;
}
.card:hover .badge, .card.is-previewing .badge { opacity: 1; }

/* ============ Lightbox ============ */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
}
.lightbox.open { display: flex; }
.lightbox .player {
  position: relative;
  width: min(100%, calc((100vh - 120px) * var(--ratio)));
  aspect-ratio: var(--ratio);
  max-height: calc(100vh - 120px);
  background: #000;
}
.lightbox iframe, .lightbox img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lightbox img { object-fit: contain; }
.lightbox .lb-title {
  position: absolute; left: 0; right: 48px; bottom: -36px;
  font-size: 13px; color: var(--muted);
}
.lightbox .close {
  position: absolute; top: 18px; right: 22px;
  background: none; border: 0; color: #fff;
  font-size: 30px; line-height: 1; cursor: pointer; opacity: .7;
}
.lightbox .close:hover { opacity: 1; }
body.no-scroll { overflow: hidden; }

/* ============ Sobre ============ */
.about {
  width: min(100% - 2 * var(--gutter), 980px);
  margin: 0 auto;
  padding: clamp(24px, 6vh, 72px) 0 64px;
  min-height: calc(100vh - 220px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about .intro {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
}
/* texto ocupa a mesma altura da foto: título no topo, parágrafos distribuídos */
.about .text { display: flex; flex-direction: column; justify-content: center; }
.about h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.15;
  margin: 0 0 22px;
}
.about p { font-size: 16px; line-height: 1.7; color: #c8c8c8; margin: 0 0 18px; max-width: 58ch; }
.about p strong { color: var(--text); font-weight: 600; }

/* lista curta de ferramentas / serviços */
.about .tools {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.about .tools li + li::before { content: "·"; margin: 0 10px; color: #444; }

/* foto com moldura fina e afastada */
.about .photo {
  aspect-ratio: 3 / 4;
  width: 100%;
  padding: 16px;
  border: 1px solid #2a2a2a;
  background: transparent;
}
.about .photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* contato: e-mail e WhatsApp na mesma linha */
.about .contact {
  margin-top: clamp(36px, 6vh, 64px);
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 36px;
}
.about .contact .label {
  flex-basis: 100%;
  text-align: center;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted);
}
.about .contact .email {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: underline;
  text-underline-offset: 7px;
  text-decoration-thickness: 1px;
  text-decoration-color: #555;
  transition: text-decoration-color .2s;
}
.about .contact .email:hover { text-decoration-color: var(--text); }
.btn-wa {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--wa); color: #06220f;
  font-weight: 700; font-size: 15px;
  padding: 13px 28px; border-radius: 999px;
  transition: transform .2s, filter .2s;
}
.btn-wa:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-wa svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 700px) {
  .about { min-height: 0; }
  .about .intro { grid-template-columns: 1fr; }
  .about .photo { max-width: 300px; margin: 0 auto; }
  .about h1 { text-align: center; }
  .about p { text-align: center; margin-left: auto; margin-right: auto; }
  .about .tools { justify-content: center; }
}

/* ============ Footer ============ */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid #1a1a1a;
  padding: 48px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  font-size: 12px;
  color: var(--muted);
}
.back-top {
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--muted);
  transition: color .2s;
}
.back-top:hover { color: var(--text); }
.social {
  display: flex;
  gap: 36px;
  align-items: center;
}
.social a {
  color: #7a7a7a;
  display: inline-flex;
  transition: color .2s, transform .2s;
}
.social a:hover { color: var(--text); transform: translateY(-1px); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.site-footer .copy { color: #555; }
