/* ═══════════════════════════════════════════════════
   PAULO VEZA — Portfolio
   ═══════════════════════════════════════════════════ */

/* ── Variables ────────────────────────────────────── */
:root {
  --black:      #000000;
  --white:      #ffffff;
  --grey:       rgba(255,255,255,0.45);
  --font:       'Inter', sans-serif;
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --header-h:   48px;
}

/* ── Reset ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button { cursor: pointer; font-family: var(--font); }

/* ── Header ───────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  mix-blend-mode: normal;
}

.logo {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--white);
  transition: opacity 0.2s;
  z-index: 201;
}
.logo:hover { opacity: 0.5; }

.menu-btn {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: var(--white);
  background: none;
  border: none;
  padding: 0;
  transition: opacity 0.2s;
  z-index: 201;
}
.menu-btn:hover { opacity: 0.5; }

/* ── Menu Overlay ─────────────────────────────────── */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--black);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 48px 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}
.menu-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.menu-overlay-inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  margin-bottom: auto;
}

.menu-nav a {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
  transition: opacity 0.2s;
}
.menu-nav a:hover { opacity: 0.4; }

.menu-footer {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 300;
  color: var(--grey);
  letter-spacing: 0.06em;
}

/* ── Hero ─────────────────────────────────────────── */
.hero {
  height: 78vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 0 28px 28px;
  background: var(--black);
}

.hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  gap: 40px;
}

.hero-title {
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
  flex-shrink: 0;
}

.hero-tagline {
  font-size: 13px;
  font-weight: 300;
  color: var(--grey);
  line-height: 1.7;
  max-width: 260px;
  text-align: center;
  flex: 1;
}

.hero-scroll {
  font-size: 11px;
  font-weight: 300;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.08em;
  flex-shrink: 0;
}

/* ── Clients Marquee ──────────────────────────────── */
.clients-section {
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  padding: 28px 0;
  position: relative;
}

.clients-section::before,
.clients-section::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 140px;
  z-index: 2;
  pointer-events: none;
}
.clients-section::before {
  left: 0;
  background: linear-gradient(to right, #000 30%, transparent);
}
.clients-section::after {
  right: 0;
  background: linear-gradient(to left, #000 30%, transparent);
}

.clients-track {
  display: flex;
  width: max-content;
  animation: clients-marquee 35s linear infinite;
}
.clients-track:hover { animation-play-state: paused; }

@keyframes clients-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.clients-logos {
  display: flex;
  align-items: center;
  gap: 72px;
  padding: 0 36px;
}

.client-logo {
  height: 30px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  filter: grayscale(1) contrast(2) invert(1);
  mix-blend-mode: screen;
  opacity: 0.5;
  transition: opacity 0.3s;
}
.client-logo:hover { opacity: 1; }

/* Alok: logo já é branca no fundo preto */
.client-logo--dark {
  filter: grayscale(1) brightness(2);
  mix-blend-mode: screen;
}

/* ── Project List ─────────────────────────────────── */
#project-grid {
  display: block;
}

.project-item {
  position: relative;
  display: block;
  width: 100%;
  height: 60vh;
  overflow: hidden;
  cursor: pointer;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.project-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.project-item:hover .project-cover img {
  transform: scale(1.04);
}

/* Local video preview (hover) */
.preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  animation: fadeInPreview 0.6s ease forwards;
  pointer-events: none;
}

@keyframes fadeInPreview {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Info bar — always visible at bottom */
.project-info-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  z-index: 2;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
}

.project-info-name {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.01em;
}

.project-info-category {
  font-size: 13px;
  font-weight: 300;
  color: var(--grey);
  letter-spacing: 0.01em;
}

.project-info-year {
  font-size: 13px;
  font-weight: 300;
  color: var(--grey);
  letter-spacing: 0.01em;
}

/* ── Footer ───────────────────────────────────────── */
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--grey);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ══════════════════════════════════════════════════
   WORKS PAGE
   ══════════════════════════════════════════════════ */

.works-page {
  padding-top: calc(var(--header-h) + 64px);
  min-height: 100vh;
}

.works-header {
  padding: 0 28px 28px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 3px;
}

.works-title {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--grey);
  text-transform: uppercase;
}

.works-year {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--grey);
}

/* Grid layouts */
#works-grid {
  display: grid !important;
  gap: 3px;
  grid-template-columns: repeat(2, 1fr); /* default: 2 colunas */
}
#works-grid.layout-list  { grid-template-columns: 1fr !important; }
#works-grid.layout-2col  { grid-template-columns: repeat(2, 1fr) !important; }
#works-grid.layout-3col  { grid-template-columns: repeat(3, 1fr) !important; }

.works-item {
  display: block;
  cursor: pointer;
  overflow: hidden;
}

.works-item-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
  position: relative;
  display: block;
}

.works-item-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.works-item:hover .works-item-cover img {
  transform: scale(1.04);
}

/* preview video on works page */
.works-item-cover .preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  opacity: 0;
  animation: fadeInPreview 0.6s ease forwards;
  pointer-events: none;
}

.works-item-info {
  padding: 10px 0 20px;
}
.works-item-name {
  font-size: 13px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.01em;
}

/* View toggle */
.view-toggle {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(20,20,20,0.92);
  backdrop-filter: blur(12px);
  border-radius: 100px;
  padding: 8px 14px;
  z-index: 100;
  border: 1px solid rgba(255,255,255,0.1);
}

.view-toggle-label {
  font-size: 12px;
  font-weight: 300;
  color: var(--grey);
  margin-right: 8px;
  letter-spacing: 0.04em;
}

.view-btn {
  background: none;
  border: none;
  padding: 6px 8px;
  color: var(--grey);
  border-radius: 50px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
}
.view-btn:hover { color: var(--white); }
.view-btn.active {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}
.view-btn svg { display: block; }

/* ══════════════════════════════════════════════════
   PROJECT PAGE
   ══════════════════════════════════════════════════ */

.project-page {
  padding-top: var(--header-h);
  min-height: 100vh;
  background: var(--black);
}

.project-header {
  padding: 52px 28px 36px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--grey);
  margin-bottom: 24px;
  transition: color 0.2s;
}
.back-link:hover { color: var(--white); }
.back-arrow { font-size: 14px; }

.project-page-title {
  font-size: clamp(32px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
}
.project-page-title span {
  color: rgba(255,255,255,0.35);
}

.project-meta {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}
.project-meta-item {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--grey);
  text-transform: uppercase;
}

/* Video section */
.video-section {
  padding: 48px 28px;
}
.video-section-title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--grey);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 560px), 1fr));
  gap: 16px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #111;
  border-radius: 4px;
  overflow: hidden;
}
.video-wrapper.wide {
  aspect-ratio: 16 / 9;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #111;
  color: var(--grey);
}
.video-placeholder svg { opacity: 0.3; }
.video-placeholder p {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Photo section */
.photo-section {
  padding: 48px 28px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.photo-section-title {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--grey);
  text-transform: uppercase;
  margin-bottom: 24px;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.photo-grid-item {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: zoom-in;
  background: #111;
}
.photo-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.photo-grid-item:hover img { transform: scale(1.04); }

/* Credits section */
.credits-section {
  padding: 48px 28px 64px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 64px;
}

.credits-meta {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.credits-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.credits-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}

.credits-value {
  font-size: 14px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.01em;
}

.credits-about {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255,255,255,0.55);
  line-height: 1.8;
  margin-top: 4px;
}

.credits-crew {
  display: flex;
  flex-direction: column;
}

.credits-crew-heading {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  margin-bottom: 20px;
}

.credits-crew-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.credits-crew-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.credits-crew-name {
  font-size: 14px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.01em;
}

.credits-crew-role {
  font-size: 12px;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.04em;
}

@media (max-width: 640px) {
  .credits-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ── Lightbox ─────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.lightbox.active {
  opacity: 1;
  pointer-events: all;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 2px;
  user-select: none;
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 28px;
  font-size: 22px;
  color: var(--grey);
  cursor: pointer;
  transition: color 0.2s;
  background: none;
  border: none;
  line-height: 1;
}
.lightbox-close:hover { color: var(--white); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--grey);
  font-size: 32px;
  cursor: pointer;
  padding: 16px;
  transition: color 0.2s;
  line-height: 1;
}
.lightbox-nav:hover { color: var(--white); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.12em;
  color: var(--grey);
}

/* ══════════════════════════════════════════════════
   ABOUT PAGE
   ══════════════════════════════════════════════════ */

.about-page {
  padding-top: var(--header-h);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--black);
}

.about-image {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow: hidden;
}
.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  padding: 72px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.about-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.22em;
  color: var(--grey);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.about-name {
  font-size: clamp(32px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--white);
  margin-bottom: 32px;
}

.about-bio {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255,255,255,0.6);
  max-width: 480px;
  margin-bottom: 48px;
}

.about-contact {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about-contact-label {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: var(--grey);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.about-contact a {
  font-size: 14px;
  font-weight: 300;
  color: var(--white);
  letter-spacing: 0.04em;
  transition: opacity 0.2s;
}
.about-contact a:hover { opacity: 0.45; }

/* ══════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .hero-title { font-size: clamp(48px, 12vw, 80px); }
  .hero-right { max-width: 240px; }

  .project-item { height: 50vh; }
  .project-info-bar { padding: 16px 20px; }
  .project-info-name,
  .project-info-category,
  .project-info-year { font-size: 12px; }

  .project-header { padding: 36px 20px 28px; }
  .video-section, .photo-section { padding: 32px 20px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }

  .about-page { grid-template-columns: 1fr; }
  .about-image {
    position: relative;
    height: 60vw;
    min-height: 280px;
  }
  .about-content { padding: 48px 24px; }
}

@media (max-width: 600px) {
  .hero { padding: 0 20px 24px; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-tagline { text-align: left; max-width: 100%; flex: none; }
  .hero-scroll { align-self: flex-start; }

  .project-item { height: 44vh; }
  .project-info-category { display: none; }

  .menu-nav a { font-size: clamp(36px, 12vw, 56px); }
  .videos-grid { grid-template-columns: 1fr; }
}
