/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --border: #1a1a1a;
  --text: #ffffff;
  --muted: #666666;
  --accent: #cc0000;
  --font: 'Space Grotesk', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
}

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

/* ===========================
   Navigation
   =========================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 56px;
  border-bottom: 1px solid var(--accent);
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(8px);
}

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

.nav-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  flex-shrink: 0;
}

.nav-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}

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

.nav-socials {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: 24px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
}

.nav-socials .social-link {
  display: flex;
  align-items: center;
  color: var(--muted);
  transition: color 0.2s;
}

.nav-socials .social-link:hover {
  color: var(--text);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  background: var(--bg);
}

/* Grain canvas */
#grain-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.08;
}

/* Video background */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* Dark gradient overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.01) 100%);
  z-index: 1;
}

/* Hero content */
.hero-content {
  position: absolute;
  bottom: 6vh;
  left: 5vw;
  z-index: 3;
  display: flex;
  flex-direction: column;
  max-width: 70vw;
}

.hero-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 20px;
}

.hero-name {
  font-family: 'Inter', sans-serif;
  font-size: clamp(40px, min(12vw, 13vh), 185px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.9;
  color: white;
  text-transform: none;
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
  margin: 0;
}

.hero-foot {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 32px;
}

.hero-sub {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
}

.hero-cta {
  display: inline-block;
  padding: 12px 24px;
  border: 1px solid rgba(255,255,255,0.7);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: white;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.hero-cta:hover {
  background: white;
  color: #0a0a0a;
}

/* Red bar at hero bottom */
.hero-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  z-index: 4;
}

/* ===========================
   Shared Section Styles
   =========================== */
.section {
  padding: 120px 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 60px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent);
}

.section-num {
  color: var(--accent);
}

/* ===========================
   Scroll Reveal
   =========================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   About Section
   =========================== */
.about {
  background: var(--bg);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 80px;
  align-items: start;
}

.about-text {
  border-left: 3px solid var(--accent);
  padding-left: 28px;
}

.about-text p {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
  margin-bottom: 20px;
  font-weight: 300;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.placeholder-portrait {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--surface);
  border-right: 3px solid var(--accent);
  overflow: hidden;
  position: relative;
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

/* ===========================
   Works Section
   =========================== */
.works {
  background: var(--surface);
}

.works .container {
  margin-bottom: 0;
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.film-card {
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.film-thumb {
  position: relative;
  overflow: hidden;
}

.placeholder-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.play-icon {
  font-size: 24px;
  color: rgba(255,255,255,0.2);
  transition: color 0.3s, transform 0.3s;
  position: relative;
  z-index: 1;
}

/* Caption box at bottom of thumbnail — appears on hover */
.film-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 14px 18px;
  background: rgba(10, 10, 10, 0.82);
  border-left: 3px solid var(--accent);
  z-index: 3;
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.film-title {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
  text-transform: uppercase;
}

.film-card:hover .play-icon {
  color: rgba(255,255,255,0.5);
  transform: scale(1.1);
}

.card-meta-wrap {
  padding: 12px 16px 20px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.meta-bar {
  display: inline-block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ===========================
   Photography — Square Grid
   =========================== */

.photography {
  padding: 80px 0 0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin-top: 40px;
}

/* Square photo cell */
.photo-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
}

.photo-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-cell-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.35s ease;
}

.photo-cell:hover img {
  transform: scale(1.05);
}

.photo-cell:hover .photo-cell-overlay {
  background: rgba(0, 0, 0, 0.18);
}

/* Span 2 columns */
.photo-cell.span-2 {
  grid-column: span 2;
}

/* Hero photo — span 2 columns, 2:1 aspect ratio */
.photo-cell.hero-cell {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}


/* ===========================
   Lightbox
   =========================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

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

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
}

.lightbox-caption {
  position: absolute;
  bottom: 52px;
  right: 80px;
  max-width: 200px;
  padding: 10px 14px;
  background: rgba(10, 10, 10, 0.85);
  border-left: 2px solid var(--accent);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.7;
  color: var(--muted);
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
  padding: 8px;
}

.lightbox-close:hover {
  color: var(--text);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  cursor: pointer;
  padding: 20px 28px;
  transition: color 0.2s;
  z-index: 1;
  line-height: 1;
}

.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }

.lightbox-prev:hover,
.lightbox-next:hover {
  color: var(--text);
}

.lightbox-counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-family: inherit;
}

/* ===========================
   Contact Section
   =========================== */
.contact {
  background: var(--surface);
}

.contact-form {
  max-width: 680px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 32px;
}

.form-row .form-group {
  margin-bottom: 0;
}

label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

input, textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--accent);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 300;
  padding: 10px 0;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  width: 100%;
}

input::placeholder, textarea::placeholder {
  color: var(--muted);
}

input:focus, textarea:focus {
  border-bottom-color: var(--text);
}

.submit-btn {
  background: var(--accent);
  border: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 48px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
  margin-top: 8px;
}

.submit-btn:hover {
  background: #aa0000;
}

/* ===========================
   Footer
   =========================== */
/* ─── Floating Contact Button ─────────────────────────────────── */
.float-contact {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  right: 28px;
  z-index: 900;
  padding: 10px 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.float-contact:hover {
  opacity: 1;
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Footer ───────────────────────────────────────────────────── */
.footer {
  background: var(--bg);
}

.footer-inner {
  position: relative;
  overflow: hidden;
}

.footer-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(to right, #1a0000, #0a0a0a, #0d0505);
  opacity: 0.7;
}

.footer-content {
  padding-top: 32px;
  padding-bottom: 80px;
}

.footer-rule {
  border: none;
  border-top: 1px solid var(--accent);
  margin-bottom: 32px;
}

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.footer-socials {
  display: flex;
  gap: 20px;
}

.social-link {
  color: var(--muted);
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.social-link:hover {
  color: var(--text);
}

/* ===========================
   Clients Section
   =========================== */
.clients {
  background: var(--surface);
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.clients-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 112px;
  border-right: 1px solid var(--border);
  opacity: 0.4;
  transition: opacity 0.25s ease, transform 0.25s ease;
  cursor: default;
}

.client-logo:last-child {
  border-right: none;
}

.client-logo:hover {
  opacity: 1;
  transform: scale(1.08);
}

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

.client-logo span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

/* ===========================
   Photography Grid — Responsive
   =========================== */
@media (max-width: 900px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }
  .photo-cell.span-2,
  .photo-cell.hero-cell {
    grid-column: span 2;
  }
  .photo-cell.hero-cell {
    aspect-ratio: 2 / 1;
  }
}

@media (max-width: 500px) {
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .photo-cell.span-2,
  .photo-cell.hero-cell {
    grid-column: span 1;
    aspect-ratio: 1 / 1;
  }
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
  .nav {
    padding: 0 24px;
  }

  .hero {
    padding-left: 4vw;
    padding-bottom: 60px;
  }

  .container {
    padding: 0 24px;
  }

  .section {
    padding: 80px 0;
  }

  .about-grid {
    grid-template-columns: 1fr 200px;
    gap: 40px;
  }

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

  .client-logo:nth-child(3) {
    border-right: none;
  }

  .works-grid {
    grid-template-columns: 1fr;
  }

  .masonry {
    columns: 2;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 600px) {
  .float-contact {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    right: 16px;
    padding: 8px 16px;
    font-size: 10px;
  }

  .nav {
    padding: 0 20px;
    height: 48px;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 10px;
  }

  .hero {
    padding-left: 20px;
    padding-bottom: 50px;
  }

  .container {
    padding: 0 20px;
  }

  .section {
    padding: 60px 0;
  }

  .clients-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .client-logo:nth-child(3) {
    border-right: 1px solid var(--border);
  }

  .client-logo:nth-child(2n) {
    border-right: none;
  }

  .masonry {
    columns: 1;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 10px;
  }

  .footer-bar {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .about-grid {
    grid-template-columns: 1fr 120px;
    gap: 20px;
  }

  .about-text {
    padding-left: 16px;
  }

  .about-text p {
    font-size: 14px;
  }
}

/* ===========================
   Film Card — real thumbnails
   =========================== */
.film-thumb-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.film-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.play-icon-wrap {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  color: #fff;
}

.play-icon-wrap svg {
  width: 20px;
  height: 20px;
}

.film-card:hover .play-icon-wrap {
  opacity: 1;
  transform: scale(1.12);
}

/* ===========================
   Video Lightbox
   =========================== */
.vlightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.vlightbox.active {
  opacity: 1;
  pointer-events: all;
}

.vlightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 92vw;
  max-height: calc(90vh - 56px);
  width: 92vw;
}

.vlightbox-video {
  display: block;
  max-width: 92vw;
  max-height: calc(90vh - 56px);
  width: auto;
  height: auto;
  background: #000;
}

.vlightbox-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 92vw;
  height: 40px;
  padding: 0 4px;
  margin-top: 8px;
}

.vlb-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: color 0.2s;
}

.vlb-btn:hover {
  color: var(--text);
}

.vlb-btn svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.vlb-time {
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: inherit;
}

.vlb-progress-wrap {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  position: relative;
  border-radius: 2px;
}

.vlb-progress-wrap::before {
  content: '';
  position: absolute;
  inset: -8px 0;
}

.vlb-progress-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
}

.vlb-loading {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  position: absolute;
}

/* Caption position override — .lightbox-caption is absolute; reset to static in flex column */
.vlightbox-caption {
  position: static;
  align-self: flex-end;
  margin-top: 8px;
  max-width: min(200px, 92vw);
}

/* Fullscreen */
.vlightbox:-webkit-full-screen .vlightbox-video,
.vlightbox:fullscreen .vlightbox-video {
  max-height: calc(100vh - 80px);
  max-width: 100vw;
}

@media (max-width: 600px) {
  .vlb-time {
    display: none;
  }

  .vlightbox-stage,
  .vlightbox-video {
    max-height: calc(85vh - 56px);
  }
}
