/*
Theme Name: Marco Bergonzi Minimal
Author: Marco Bergonzi
Description: Tema portfolio dark minimale ispirato a Lou Escobar.
Version: 3.2
*/

:root {
  --bg: #0b0b0b;
  --surface: #141414;
  --text: #f2f2f2;
  --muted: #888888;
  --border: #222222;
  --gap: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  background-color: #0b0b0b !important;
  color: #f2f2f2 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: 0 3vw;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.25s ease;
}

a:hover {
  opacity: 0.65;
}

/* Transizione pagina */
main {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1), transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-loaded main {
  opacity: 1;
  transform: translateY(0);
}

body.page-leaving main {
  opacity: 0;
  transform: translateY(-8px);
}

/* Header fisso minimale stile Lou Escobar */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  position: relative;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.brand-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}

.main-nav a {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current-cat a {
  color: var(--text);
  opacity: 1;
}

/* Titolo gigante sezione (STILL / FILMS) */
.section-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 9vw, 120px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 36px;
}

/* --- SEZIONE STILL (Mosaico senza scritte) --- */
.still-mosaic {
  columns: 3 300px;
  column-gap: var(--gap);
  margin-bottom: 90px;
}

.still-item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  cursor: pointer;
  overflow: hidden;
  background: var(--surface);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.still-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.still-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), filter 0.4s ease;
}

.still-item:hover img {
  transform: scale(1.025);
  filter: brightness(0.88);
}

/* --- SEZIONE FILM (Scorrimento verticale dal basso verso l'alto stile Lou Escobar) --- */
.film-grid {
  display: flex;
  flex-direction: column;
  gap: 64px;
  max-width: 1080px;
  margin: 0 auto 100px;
}

.film-card {
  width: 100%;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.film-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.film-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface);
  position: relative;
}

.film-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

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

.film-title {
  margin-top: 12px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  transition: color 0.3s ease;
}

.film-card:hover .film-title {
  color: #ffffff;
}

/* Pagina Singola / About / Scheda Film */
.single-content {
  max-width: 820px;
  margin: 20px 0 110px;
}

.single-content h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.single-content p {
  margin-bottom: 18px;
  color: #cccccc;
  font-size: 14px;
  line-height: 1.65;
}

.single-content iframe,
.single-content video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 24px 0;
  border: 0;
}

/* Lightbox stile Lou Escobar */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(11, 11, 11, 0.86);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  transform: scale(0.92);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.lightbox.active img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  font-size: 36px;
  font-weight: 200;
  cursor: pointer;
  background: none;
  border: none;
  color: #ffffff;
  line-height: 1;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 768px) {
  .still-mosaic {
    columns: 2 160px;
  }
  .film-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .brand-sub {
    display: none;
  }
}

@media (max-width: 480px) {
  .still-mosaic {
    columns: 1;
  }
  .site-header {
    padding: 20px 0 22px;
  }
  .main-nav ul {
    gap: 18px;
  }
  .lightbox-close {
    top: 16px;
    right: 20px;
  }
}

/* Layout Pagina About (Testo a sinistra + Foto in formato originale allineata a destra) */
.about-layout {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 80px;
  width: 100%;
  margin: 20px 0 110px;
}

.about-text {
  flex: 1;
  max-width: 680px;
}

.about-text h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.about-text p {
  margin-bottom: 18px;
  color: #cccccc;
  font-size: 14px;
  line-height: 1.65;
}

.about-contact {
  margin-top: 48px;
}

.about-contact h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 48px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.about-contact a {
  color: var(--text);
  font-size: 14px;
}

.about-photo {
  margin-left: auto;
  flex-shrink: 0;
  max-width: 380px;
}

.about-photo img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  .about-layout {
    flex-direction: column;
    gap: 32px;
  }
  .about-photo {
    margin-left: 0;
    max-width: 100%;
  }
}


/* --- LANDING PAGE HERO A SCHERMO INTERO --- */
.landing-hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 175px);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 40px;
  margin-bottom: 24px;
  overflow: hidden;
  background: var(--surface);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.78;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.72;
  transform: scale(1.03);
  transition: transform 8s ease-out;
}

body.page-loaded .hero-bg {
  transform: scale(1);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 3vw;
}

.hero-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(64px, 11vw, 150px);
  font-weight: 400;
  line-height: 0.88;
  letter-spacing: 0.02em;
  color: #ffffff;
  text-transform: uppercase;
}

.hero-sub {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.hero-scroll {
  position: absolute;
  bottom: 24px;
  right: 3vw;
  z-index: 2;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.7);
}

.landing-works {
  padding-top: 20px;
}

.landing-section-header {
  margin-top: 20px;
}


/* --- LANDING PAGE A FILO SCHERMO SU 3 LATI (DESTRO, SINISTRO, SOTTO) SENZA SCROLL --- */
body.home,
body.front-page {
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.home .site-header,
body.front-page .site-header {
  padding: 24px 3vw 28px;
  margin-bottom: 0;
  flex-shrink: 0;
}

body.home main,
body.front-page main {
  flex: 1;
  display: flex;
  width: 100%;
  overflow: hidden;
}

body.home .landing-hero,
body.front-page .landing-hero {
  width: 100%;
  height: 100%;
  min-height: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
