/* ========================================
   Film Forge — Global Styles
   ======================================== */

/* --- CSS Custom Properties --- */
:root {
  --color-bg: #000000;
  --color-text: #fafafa;
  --color-text-secondary: #fefefe;
  --color-accent: #dc3737;
  --color-white: #ffffff;
  --color-card-bg: #ffffff;
  --color-card-text: #111111;

  --font-heading: 'Familjen Grotesk', sans-serif;
  --font-body: 'Arimo', sans-serif;

  --site-max-width: 1500px;
  --site-gutter: 4vw;
  --nav-height: 80px;

  --transition-base: 0.3s ease;
  --transition-slow: 0.6s ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
}

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

/* --- Layout --- */
.container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding-left: var(--site-gutter);
  padding-right: var(--site-gutter);
}

/* ========================================
   Header / Navigation
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  padding: 0 var(--site-gutter);
  background: transparent;
  transition: background var(--transition-base);
}

.site-header.scrolled {
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--site-max-width);
  margin: 0 auto;
}

.header-logo img {
  height: 36px;
  width: auto;
}

/* Nav fade-in on page load */
.header-logo,
.header-nav a {
  opacity: 0;
  animation: navFadeIn 0.6s ease forwards;
}

.header-logo { animation-delay: 0.1s; }
.header-nav a:nth-child(1) { animation-delay: 0.2s; }
.header-nav a:nth-child(2) { animation-delay: 0.3s; }
.header-nav a:nth-child(3) { animation-delay: 0.4s; }
.header-nav a:nth-child(4) { animation-delay: 0.5s; }
.header-nav a:nth-child(5) { animation-delay: 0.6s; }

@keyframes navFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.header-nav a {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--color-text);
  position: relative;
  transition: opacity var(--transition-base);
}

.header-nav a:hover {
  opacity: 0.7;
}

.header-nav a.active {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-nav .nav-instagram {
  display: flex;
  align-items: center;
}

.header-nav .nav-instagram svg {
  width: 22px;
  height: 22px;
  fill: var(--color-text);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 5px 0;
  transition: var(--transition-base);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.hero-video-wrapper iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 56.25vw; /* 16:9 aspect ratio */
  min-height: 100vh;
  min-width: 177.78vh; /* 100 * 16/9 */
  transform: translate(-50%, -50%);
  border: none;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  pointer-events: none;
}

.scroll-arrow {
  position: absolute;
  bottom: 32px;
  right: var(--site-gutter);
  z-index: 10;
  width: 48px;
  height: 48px;
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: scroll-bounce 2.5s ease-in-out infinite;
  transition: border-color 0.3s ease, background 0.3s ease;
  padding: 0;
  outline: none;
}

.scroll-arrow:hover {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  animation-play-state: paused;
}

.scroll-arrow svg {
  width: 22px;
  height: 22px;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 2;
  fill: none;
  transition: stroke 0.3s ease;
}

.scroll-arrow:hover svg {
  stroke: #fff;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ========================================
   Stories Section ("Stories that...")
   ======================================== */
.stories-section {
  position: relative;
  padding: 120px 0;
  text-align: center;
}

.stories-text {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 400;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.stories-words {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.stories-words span {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 400;
  color: var(--color-accent);
  display: block;
}

/* ========================================
   Project Sections
   ======================================== */
.project-section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

/* Full-section clickable link overlay */
.project-link {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 4;
  cursor: pointer;
}

/* Keep title links above the overlay for direct text clicking */
.project-title a {
  position: relative;
  z-index: 5;
}

.project-section {
  cursor: pointer;
}

.project-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  transition: transform 1.2s ease, filter 0.6s ease;
}

.project-section:hover .project-bg {
  transform: scale(1.03);
  filter: brightness(1.15);
}

.project-section:hover .project-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}

.project-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  z-index: 2;
  transition: background 0.6s ease;
}

.project-info {
  position: relative;
  z-index: 3;
  padding: 40px var(--site-gutter) 50px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  max-width: var(--site-max-width);
  margin: 0 auto;
  width: 100%;
  align-items: end;
}

.project-title-block {
  grid-column: 3;
  text-align: right;
}

.project-title {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 4px;
}

.project-title a {
  color: inherit;
  text-decoration: none;
  transition: opacity var(--transition-base);
}

.project-title a:hover {
  opacity: 0.75;
}

/* Prevent awkward line breaks on shorter titles */
.project-title--nowrap {
  white-space: nowrap;
}

.project-type {
  font-family: var(--font-body);
  font-size: 19px;
  color: var(--color-text-secondary);
  font-weight: 400;
}

.project-credits {
  grid-column: 1 / 3;
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.project-credit {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--color-text-secondary);
  line-height: 1.4;
}

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

/* ========================================
   Services Page
   ======================================== */
.page-content {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 100px;
  min-height: 100vh;
}

.services-intro {
  max-width: 800px;
  margin: 0 auto 80px;
  text-align: center;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 400;
  line-height: 1.5;
  font-style: italic;
}

.services-block {
  max-width: 780px;
  margin: 0 auto 60px;
}

.services-block h2 {
  font-family: var(--font-heading);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 400;
  font-style: italic;
  color: var(--color-accent);
  text-align: center;
  margin-bottom: 24px;
}

.services-block p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  text-align: justify;
}

/* ========================================
   Who We Are Page
   ======================================== */
.about-intro {
  max-width: 700px;
  margin: 0 auto 80px;
  font-size: 18px;
  line-height: 1.7;
}

.about-intro .accent {
  font-weight: 700;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
}

.team-member {
  text-align: left;
}

.team-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  margin-bottom: 20px;
}

.team-name {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.team-title {
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.team-bio {
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--color-text);
}

/* ========================================
   News Page — Film Reel
   ======================================== */

/* Film grain overlay */
.news-grain::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.reel-section {
  padding: calc(var(--nav-height) + 60px) 0 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.reel-label {
  padding: 0 5vw 28px;
  font-family: var(--font-heading);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
}

.reel-track-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* Film strip perforations */
.reel-track-wrapper::before,
.reel-track-wrapper::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 24px;
  z-index: 10;
  background: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 50px,
    rgba(250,250,250,0.04) 50px,
    rgba(250,250,250,0.04) 62px,
    transparent 62px,
    transparent 80px
  );
  pointer-events: none;
}

.reel-track-wrapper::before { top: 0; border-bottom: 1px solid rgba(250,250,250,0.06); }
.reel-track-wrapper::after { bottom: 0; border-top: 1px solid rgba(250,250,250,0.06); }

.reel-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  cursor: grab;
  padding: 24px 5vw;
  gap: 2px;
}

.reel-track::-webkit-scrollbar { display: none; }
.reel-track:active { cursor: grabbing; }

/* Frame / Card */
.news-frame {
  flex: 0 0 clamp(340px, 30vw, 460px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #0a0a0a;
  border-left: 1px solid rgba(250,250,250,0.04);
  border-right: 1px solid rgba(250,250,250,0.04);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.5s ease;
}

.news-frame:hover {
  background: #111;
}

.news-frame:hover .news-frame__headline {
  transform: translateY(-3px);
}

.news-frame:hover .news-frame__image img {
  transform: scale(1.04);
}

/* Top: logo image area */
.news-frame__image {
  width: 100%;
  height: 45%;
  min-height: 180px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #0a0a0a 0%, #151515 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 40px;
}

.news-frame__image img {
  width: auto;
  height: auto;
  max-width: 75%;
  max-height: 65%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.75;
  transition: transform 0.6s ease, opacity 0.3s ease;
}

/* SVG logos are already white — no filter needed */
.news-frame__image img[src$=".svg"] {
  filter: none;
  opacity: 0.85;
}

.news-frame:hover .news-frame__image img {
  opacity: 0.9;
}

/* Bottom: text area */
.news-frame__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px 32px 32px;
}

.news-frame__source {
  font-family: var(--font-body);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #666;
  margin-bottom: 12px;
}

.news-frame__headline {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2vw, 26px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  transition: transform 0.5s ease;
}

.news-frame__date {
  font-family: var(--font-body);
  font-size: 12px;
  color: #666;
  margin-top: 14px;
  font-style: italic;
}

/* Accent line at bottom of hovered frame */
.news-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.news-frame:hover::after {
  transform: scaleX(1);
}

/* Scroll hint */
.scroll-hint {
  padding: 16px 5vw;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #666;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scroll-hint__line {
  width: 40px;
  height: 1px;
  background: #666;
  animation: scrollPulse 2s ease infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.3); transform-origin: left; }
}

/* Staggered reveal for news frames */
.news-frame {
  opacity: 0;
  transform: translateX(40px);
  animation: newsSlideIn 0.6s ease forwards;
}

@keyframes newsSlideIn {
  to { opacity: 1; transform: translateX(0); }
}

.news-frame:nth-child(1) { animation-delay: 0.15s; }
.news-frame:nth-child(2) { animation-delay: 0.25s; }
.news-frame:nth-child(3) { animation-delay: 0.35s; }
.news-frame:nth-child(4) { animation-delay: 0.45s; }
.news-frame:nth-child(5) { animation-delay: 0.55s; }
.news-frame:nth-child(6) { animation-delay: 0.65s; }
.news-frame:nth-child(7) { animation-delay: 0.75s; }
.news-frame:nth-child(8) { animation-delay: 0.85s; }
.news-frame:nth-child(9) { animation-delay: 0.95s; }
.news-frame:nth-child(10) { animation-delay: 1.05s; }

/* ========================================
   Footer
   ======================================== */
.site-footer {
  padding: 50px var(--site-gutter);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--site-max-width);
  margin: 0 auto;
}

.footer-logo img {
  height: 40px;
  width: auto;
}

.footer-logomark img {
  height: 60px;
  width: auto;
}

.footer-contact {
  font-family: var(--font-body);
  font-size: 16px;
}

.footer-contact strong {
  font-weight: 700;
}

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

/* ========================================
   Scroll Animations
   ======================================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays */
.fade-delay-1 { transition-delay: 0.1s; }
.fade-delay-2 { transition-delay: 0.2s; }
.fade-delay-3 { transition-delay: 0.3s; }
.fade-delay-4 { transition-delay: 0.4s; }

/* ========================================
   Responsive — Mobile (< 768px)
   ======================================== */
@media (max-width: 767px) {
  :root {
    --site-gutter: 6vw;
    --nav-height: 64px;
  }

  /* Mobile nav */
  .header-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.97);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    transition: right var(--transition-slow);
  }

  .header-nav.open {
    right: 0;
  }

  .header-nav a {
    font-size: 28px;
  }

  .menu-toggle {
    display: block;
    z-index: 200;
  }

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

  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }

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

  /* Hero mobile */
  .hero {
    height: 75vh;
  }

  .hero-video-wrapper iframe {
    width: 200%;
    min-width: 200%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  /* Project sections mobile */
  .project-section {
    min-height: 70vh;
  }

  .project-info {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 24px var(--site-gutter) 30px;
  }

  .project-title-block {
    grid-column: 1;
    text-align: left;
  }

  .project-credits {
    grid-column: 1;
    flex-direction: column;
    gap: 8px;
  }

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

  .project-type {
    font-size: 16px;
  }

  /* Stories mobile */
  .stories-section {
    padding: 60px 0;
  }

  /* Team grid mobile */
  .team-grid {
    grid-template-columns: 1fr;
    gap: 48px;
    max-width: 500px;
  }

  /* News reel mobile */
  .news-frame {
    flex: 0 0 85vw;
  }

  .reel-track {
    padding: 24px 20px;
    gap: 1px;
  }

  .news-frame__image {
    height: 40%;
    min-height: 150px;
  }

  .news-frame__body {
    padding: 20px 24px 28px;
  }

  /* Footer mobile */
  .footer-inner {
    flex-direction: column;
    gap: 30px;
    text-align: center;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 1024px) {
  .team-grid {
    gap: 24px;
  }

  .project-info {
    gap: 16px;
  }

  .news-frame {
    flex: 0 0 340px;
  }
}

/* ========================================
   Individual Project Pages
   ======================================== */
.project-page {
  padding-top: calc(var(--nav-height) + 40px);
  padding-bottom: 80px;
  min-height: 100vh;
}

/* --- Hero Section: Poster + Info --- */
.project-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 40px var(--site-gutter) 80px;
  align-items: start;
}

.project-hero-info {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-top: 20px;
}

.project-hero-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.05;
  color: var(--color-text);
  margin-bottom: 8px;
}

.project-hero-year {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 32px;
}

.project-hero-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 36px;
}

.project-meta-item {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
}

.project-meta-label {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  display: block;
  margin-bottom: 2px;
}

.project-hero-synopsis {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 36px;
}

.project-hero-trailer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 14px 28px;
  transition: all var(--transition-base);
}

.project-hero-trailer:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.project-hero-trailer svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.project-hero-poster {
  position: relative;
}

.project-hero-poster img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Gallery Carousel --- */
.project-gallery {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 var(--site-gutter) 80px;
}

.gallery-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #080808;
  overflow: hidden;
}

.gallery-main img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #080808;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.gallery-main img.active {
  opacity: 1;
  pointer-events: auto;
}

/* Carousel arrows */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background var(--transition-base), border-color var(--transition-base);
}

.gallery-arrow:hover {
  background: rgba(0, 0, 0, 0.85);
  border-color: rgba(255, 255, 255, 0.3);
}

.gallery-arrow svg {
  width: 20px;
  height: 20px;
  stroke: var(--color-white);
  stroke-width: 2;
  fill: none;
}

.gallery-arrow--prev { left: 16px; }
.gallery-arrow--next { right: 16px; }

/* Counter */
.gallery-counter {
  position: absolute;
  bottom: 16px;
  right: 16px;
  font-family: var(--font-body);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 10;
}

/* Thumbnail strip */
.gallery-thumbnails {
  display: flex;
  gap: 6px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.gallery-thumbnails::-webkit-scrollbar { display: none; }

.gallery-thumb {
  flex: 0 0 80px;
  height: 54px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity var(--transition-base), border-color var(--transition-base);
  border: 2px solid transparent;
}

.gallery-thumb:hover {
  opacity: 0.8;
}

.gallery-thumb.active {
  opacity: 1;
  border-color: var(--color-accent);
}

/* --- Press Quotes --- */
.project-quotes {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--site-gutter) 80px;
}

.project-quotes-heading {
  font-family: var(--font-heading);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  text-align: center;
  margin-bottom: 40px;
}

.project-quote {
  text-align: center;
  margin-bottom: 40px;
}

.project-quote p {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.6;
  font-style: italic;
  color: rgba(255, 255, 255, 0.8);
}

/* --- Back Link --- */
.project-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-base);
  margin-bottom: 24px;
}

.project-back:hover {
  color: var(--color-text);
}

.project-back svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  cursor: pointer;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

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

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  font-size: 28px;
}

/* --- Project Navigation (prev/next) --- */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 40px var(--site-gutter) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.project-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition-base);
}

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

.project-nav-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.project-nav-next {
  margin-left: auto;
}

/* --- Project Page Responsive --- */
@media (max-width: 767px) {
  .project-hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 20px var(--site-gutter) 48px;
  }

  .project-hero-poster {
    order: -1;
    max-width: 300px;
    margin: 0 auto;
  }

  .project-hero-info {
    padding-top: 0;
  }

  .project-hero-title {
    font-size: 28px;
  }

  .gallery-arrow {
    width: 36px;
    height: 36px;
  }

  .gallery-arrow svg {
    width: 16px;
    height: 16px;
  }

  .gallery-arrow--prev { left: 8px; }
  .gallery-arrow--next { right: 8px; }

  .gallery-thumb {
    flex: 0 0 60px;
    height: 40px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .project-hero {
    gap: 32px;
  }

  .gallery-thumb {
    flex: 0 0 70px;
    height: 48px;
  }
}
