/* ═══════════════════════════════════════════
   24K Film — Main Stylesheet
   ═══════════════════════════════════════════ */

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

:root {
  --bg: #000;
  --bg-secondary: #111;
  --text: #fff;
  --text-secondary: #999;
  --accent: #b8962e;
  --overlay: rgba(0, 0, 0, 0.5);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ═══════ HEADER ═══════ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  transition: background 0.3s;
}

.header--solid {
  background: var(--bg);
  border-bottom: 1px solid #1a1a1a;
}

.logo {
  z-index: 101;
}

.logo img {
  height: 55px;
  width: auto;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-link {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  opacity: 0.6;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  opacity: 1;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ═══════ HERO / REEL ═══════ */

.hero {
  position: relative;
  width: 100%;
  height: 75vh;
  overflow: hidden;
  background: #080808;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-video iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: 177.78vh;
  height: 56.25vw;
  transform: translate(-50%, -50%);
  border: none;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35) 0%,
    transparent 25%,
    transparent 75%,
    rgba(0,0,0,0.6) 100%
  );
  pointer-events: none;
}

/* ═══════ DESCRIPTION ═══════ */

.description {
  padding: 80px 40px 60px;
  max-width: 900px;
}

.description h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 18px;
  line-height: 1.2;
}

.description p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-secondary);
  max-width: 720px;
}

/* ═══════ PORTFOLIO ═══════ */

.portfolio {
  padding: 0 40px 80px;
}

.portfolio-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 6px;
  color: var(--accent);
  margin-bottom: 28px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
}

/* Project Card */
.project-card {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  cursor: pointer;
  background: #0a0a0a;
  display: block;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              filter 0.5s ease;
}

.project-card:hover img {
  transform: scale(1.06);
  filter: brightness(0.35);
}

.project-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card-title {
  font-size: 16px;
  font-weight: 500;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
  line-height: 1.5;
}

.project-card-category {
  position: absolute;
  bottom: 14px;
  left: 14px;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.4s ease;
  color: var(--accent);
}

.project-card:hover .project-card-category {
  opacity: 1;
}

/* ═══════ INFO SECTION ═══════ */

.info-section {
  padding: 80px 40px;
  border-top: 1px solid #1a1a1a;
}

.info-section h2 {
  font-size: 22px;
  margin-bottom: 24px;
  font-weight: 600;
}

.info-section p {
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-size: 14px;
}

.info-section a {
  color: var(--accent);
  transition: opacity 0.3s;
}

.info-section a:hover {
  opacity: 0.7;
}

/* ═══════ FOOTER ═══════ */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  border-top: 1px solid #1a1a1a;
  font-size: 11px;
  color: var(--text-secondary);
}

.footer a {
  color: var(--text-secondary);
  transition: color 0.3s;
}

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

.footer-left,
.footer-center,
.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

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

.project-page {
  padding-top: 130px;
  padding-bottom: 100px;
  min-height: 100vh;
}

.project-info {
  padding: 0 40px;
  margin-bottom: 50px;
  max-width: 800px;
}

.project-title {
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 14px;
  line-height: 1.3;
}

.project-title strong {
  font-weight: 700;
}

.project-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.project-credits {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 12px;
}

.project-credits .credit-line {
  color: var(--text-secondary);
}

.project-produced {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.project-video {
  padding: 0 40px;
  max-width: 1100px;
}

.project-video .video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.project-video .video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ═══════ LOADING ═══════ */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  color: var(--text-secondary);
  font-size: 13px;
  letter-spacing: 1px;
  grid-column: 1 / -1;
}

/* ═══════ ANIMATIONS ═══════ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card {
  opacity: 0;
  animation: fadeInUp 0.5s ease forwards;
}

.project-card:nth-child(1)  { animation-delay: 0.05s; }
.project-card:nth-child(2)  { animation-delay: 0.10s; }
.project-card:nth-child(3)  { animation-delay: 0.15s; }
.project-card:nth-child(4)  { animation-delay: 0.20s; }
.project-card:nth-child(5)  { animation-delay: 0.25s; }
.project-card:nth-child(6)  { animation-delay: 0.30s; }
.project-card:nth-child(7)  { animation-delay: 0.35s; }
.project-card:nth-child(8)  { animation-delay: 0.40s; }
.project-card:nth-child(9)  { animation-delay: 0.45s; }
.project-card:nth-child(10) { animation-delay: 0.50s; }
.project-card:nth-child(11) { animation-delay: 0.55s; }
.project-card:nth-child(12) { animation-delay: 0.60s; }

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

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

@media (max-width: 900px) {
  .nav {
    gap: 18px;
  }
  .nav-link {
    font-size: 10px;
    letter-spacing: 1.5px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 16px 20px;
  }

  .logo img {
    height: 40px;
  }

  .nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 100;
  }

  .nav.open {
    display: flex;
  }

  .nav-link {
    font-size: 15px;
    letter-spacing: 3px;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    height: 45vh;
  }

  .description {
    padding: 40px 20px 30px;
  }

  .description h1 {
    font-size: 22px;
  }

  .portfolio {
    padding: 0 0 40px;
  }

  .portfolio-label {
    padding-left: 20px;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .project-card-title {
    font-size: 14px;
    letter-spacing: 2px;
  }

  .info-section {
    padding: 40px 20px;
  }

  .footer {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    text-align: center;
  }

  .project-page {
    padding-top: 90px;
  }

  .project-info,
  .project-video {
    padding: 0 20px;
  }

  .project-title {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .hero {
    height: 35vh;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    gap: 10px;
  }
}

/* ═══════ SITE CREDIT ═══════ */

.site-credit {
  text-align: center;
  padding: 10px 20px 14px;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: #444;
  background: var(--bg);
}

.site-credit a {
  color: #555;
  transition: color 0.3s;
}

.site-credit a:hover {
  color: var(--accent);
}

/* ═══════ CLIENTS SECTION ═══════ */

.clients-section {
  padding: 60px 40px 80px;
  border-top: 1px solid #1a1a1a;
}

.clients-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 6px;
  color: var(--accent);
  margin-bottom: 40px;
  text-align: center;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 30px 40px;
  align-items: center;
  justify-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.client-logo:hover {
  opacity: 0.9;
}

.client-logo img {
  max-height: 45px;
  max-width: 100%;
  width: auto;
  filter: brightness(0) invert(1);
  object-fit: contain;
}

/* ═══════ PROJECT GALLERY ═══════ */

.project-gallery {
  padding: 40px 40px 0;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.project-gallery .gallery-image {
  overflow: hidden;
  background: #0a0a0a;
}

.project-gallery .gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  transition: transform 0.5s ease;
  cursor: pointer;
}

.project-gallery .gallery-image img:hover {
  transform: scale(1.03);
}

/* Multi-video spacing */
.project-video .video-wrapper + .video-wrapper {
  margin-top: 24px;
}

/* Rich text description support */
.project-description p {
  margin-bottom: 8px;
}

.project-description strong,
.project-description b {
  font-weight: 600;
  color: var(--text);
}

.description p p {
  margin-bottom: 6px;
}

.description p strong,
.description p b {
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 768px) {
  .clients-section {
    padding: 40px 20px 50px;
  }

  .clients-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .client-logo img {
    max-height: 35px;
  }

  .project-gallery {
    padding: 20px 20px 0;
    grid-template-columns: 1fr;
    gap: 3px;
  }
}
