/* =========================================================
   PHONO FILMES — Estilo inspirado em iconoclast.tv
   Minimalista, preto/branco, tipografia grande, sem ruído.
   ========================================================= */

/* -------- Fontes --------
   Texto/menu: Avenir Next (peso normal vem do .ttc)
   Texto leve: Avenir Light
   Títulos grandes: Radiate Sans Extrabold Expanded
*/
@font-face {
  font-family: "AvenirNext";
  src: url("../assets/fonts/Avenir%20Next.ttc"),
       url("../assets/fonts/Avenir.ttc");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "AvenirNext";
  src: url("../assets/fonts/Avenir%20Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "RadiateSans";
  src: url("../assets/fonts/radiate-sans-extrabold-expanded.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: rgba(255, 255, 255, 0.55);
  --hairline: rgba(255, 255, 255, 0.18);
  --accent: #fff;

  --font-sans: "AvenirNext", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: "RadiateSans", "AvenirNext", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --pad-x: clamp(18px, 3vw, 40px);
  --pad-y: clamp(14px, 1.6vw, 22px);

  --nav-height: 120px;
  --sub-nav-height: 44px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 15px;
  line-height: 1.4;
}

a {
  color: inherit;
  text-decoration: none;
}

ul { list-style: none; margin: 0; padding: 0; }

button {
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

img, svg, video { display: block; max-width: 100%; }

/* =========================================================
   Header / Navegação principal
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad-x);
  z-index: 50;
  background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0) 100%);
  transition: height 320ms cubic-bezier(.2,.7,.2,1), background 320ms ease, backdrop-filter 320ms ease;
}

.site-header.scrolled {
  height: 80px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-transform: uppercase;
  opacity: 0.95;
  transition: opacity 180ms ease;
  text-decoration: none;
  line-height: 1;
}

.logo:hover { opacity: 1; }

.logo-main {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.logo-sub {
  font-family: var(--font-sans);
  font-size: clamp(10px, 0.95vw, 12px);
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1;
  opacity: 0.85;
}

/* Motion no lugar do texto do logo */
.logo:has(.logo-video) {
  align-items: center;
  gap: 0;
}

.logo-video {
  display: block;
  height: 92px;
  width: auto;
  pointer-events: none;
  transition: height 320ms cubic-bezier(.2,.7,.2,1);
}

.site-header.scrolled .logo-video {
  height: 50px;
}

/* Motion no lugar do título do projeto na home */
.title-motion {
  display: block;
  height: clamp(36px, 5.5vw, 72px);
  width: auto;
  margin: 0;
}

/* Tighter gap quando o título é motion (não tem line-height de texto) */
.project-title:has(.title-motion) {
  line-height: 1;
  margin-bottom: -10px;
}

.main-nav ul {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
  justify-content: center;
}

.main-nav a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
  opacity: 0.65;
  transition: opacity 180ms ease;
}

.main-nav a:hover,
.main-nav a.is-active {
  opacity: 1;
}

.contact-link {
  justify-self: end;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-link:hover { opacity: 0.7; }

/* =========================================================
   Showcase (hero) — vídeo grande + título do projeto
   ========================================================= */
.showcase {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.showcase-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.video-frame {
  position: absolute;
  inset: 0;
  background: #0a0a0a;
  overflow: hidden;
}

.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

/* Camada de leve escurecimento para legibilidade do título */
.video-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 30%),
    linear-gradient(to top,    rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 35%);
  pointer-events: none;
}

.showcase-meta {
  position: absolute;
  left: var(--pad-x);
  bottom: clamp(100px, 14vh, 160px);
  z-index: 3;
  max-width: min(80vw, 720px);
}

.project-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 3.4vw, 44px);
  line-height: 0.95;
  letter-spacing: -0.01em;
  font-weight: 800;
  text-transform: uppercase;
}

.project-director {
  margin: 8px 0 0;
  font-size: clamp(14px, 1.1vw, 16px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.play-button {
  position: absolute;
  right: var(--pad-x);
  bottom: clamp(100px, 14vh, 160px);
  z-index: 3;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--fg);
  background: rgba(0, 0, 0, 0.25);
  display: grid;
  place-items: center;
  transition: background 200ms ease, transform 200ms ease;
}

.play-button svg {
  width: 22px;
  height: 22px;
  fill: var(--fg);
  transform: translateX(2px);
}

.play-button:hover {
  background: var(--fg);
  transform: scale(1.05);
}

.play-button:hover svg { fill: var(--bg); }

/* =========================================================
   Paginador numerado (01 02 03 ...)
   ========================================================= */
.project-pager {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 18px var(--pad-x) 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
  border-top: none;
}

.project-pager ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 2vw, 28px);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.project-pager button {
  font: inherit;
  color: var(--muted);
  letter-spacing: 0.12em;
  padding: 4px 0;
  position: relative;
  transition: color 180ms ease;
}

.project-pager button:hover {
  color: var(--fg);
}

.project-pager button.is-active {
  color: var(--fg);
}

.project-pager button.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--fg);
}

/* =========================================================
   Footer minimalista
   ========================================================= */
.site-footer {
  padding: 18px var(--pad-x);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: right;
}

.site-footer a:hover { color: var(--fg); }

/* =========================================================
   Páginas internas (Diretores / Projetos / Contato)
   ========================================================= */
.page-main {
  padding: calc(var(--nav-height) + 60px) var(--pad-x) 80px;
  min-height: 100vh;
}

.page-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 84px);
  line-height: 0.9;
  letter-spacing: -0.01em;
  margin: 0 0 60px;
  font-weight: 800;
  text-transform: uppercase;
}

/* Grid de diretores / projetos */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: clamp(20px, 2.5vw, 36px);
}

.card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0a0a0a;
}

.card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #111;
}

.card-thumb img,
.card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms ease;
}

.card:hover .card-thumb img,
.card:hover .card-thumb video {
  transform: scale(1.04);
}

.card-meta {
  padding: 14px 2px 4px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.card-sub {
  margin: 4px 0 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Página de contato */
.contact {
  max-width: 720px;
}

.contact h2 {
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 500;
  margin: 0 0 6px;
}

.contact p,
.contact a {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.4;
}

.contact .contact-block {
  margin-bottom: 36px;
}

.contact a:hover { opacity: 0.6; }

/* =========================================================
   Responsivo
   ========================================================= */
@media (max-width: 720px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }
  .main-nav { display: none; }
  .showcase-meta { bottom: 110px; }
  .play-button {
    width: 52px;
    height: 52px;
    bottom: 110px;
  }
}

/* Pequeno fade-in inicial */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.showcase-meta,
.play-button,
.project-pager {
  animation: fadeIn 700ms ease both;
}

.showcase-meta { animation-delay: 100ms; }
.play-button   { animation-delay: 200ms; }
.project-pager { animation-delay: 300ms; }
