/* ══════════════════════════════════════════════════
   PROJECT DETAIL PAGES — Shared Components
   Requires: styles.css (design tokens + base)
   ══════════════════════════════════════════════════ */


/* ─── PROJECT HERO ───────────────────────────────── */

.hero--project {
  position: relative;
  height: calc(100vh - 61px);
  height: calc(100dvh - 61px);
  display: flex;
  align-items: flex-end;
  padding: 0 var(--gutter) 64px;
  margin-top: 61px;
  overflow: hidden;
}

.hero-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.5;
}

.hero--project .hero-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.55;
  animation: none;
}

.hero-media-placeholder {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #0d1520 0%, #141317 50%, #0c0b0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

.hero-media-placeholder span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.play-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero--project .hero-overlay {
  position: absolute; inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(12,11,14,0.15) 0%,
    rgba(12,11,14,0.82) 100%
  );
}

.hero--project .hero-content {
  position: relative;
  z-index: 2;
}


/* ─── PROJECT HERO TAGS ──────────────────────────── */

.hero-eyebrow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border: 1px solid var(--border);
}

.tag-client { color: var(--accent); border-color: var(--accent); }
.tag-role   { color: var(--dim); }
.tag-year   { color: var(--muted); }

.hero--project .hero-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: -0.01em;
  max-width: 860px;
  margin-bottom: 24px;
  color: var(--white);
  text-shadow: 0 2px 40px rgba(0,0,0,0.4);
}

.hero--project .hero-title em {
  font-style: italic;
  color: var(--accent);
}

.hero-tagline {
  font-size: 15px;
  font-weight: 400;
  color: var(--dim);
  max-width: 560px;
  line-height: 1.75;
  margin-bottom: 40px;
}


/* ─── BUTTONS ────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--accent);
  color: var(--black);
  padding: 14px 28px;
  transition: opacity 0.25s;
}

.btn-primary:hover { opacity: 0.85; }

.btn-outline {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--white);
  color: var(--white);
  padding: 14px 28px;
  transition: border-color 0.25s, color 0.25s;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-cta-outline {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border: 1px solid var(--white);
  color: var(--white);
  padding: 14px 28px;
  transition: border-color 0.25s, color 0.25s;
}

.btn-cta-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}


/* ─── STATS BAR ──────────────────────────────────── */

.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

.stat-item {
  padding: 40px var(--gutter);
  border-right: 1px solid var(--border);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  margin-bottom: 8px;
  color: var(--white);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}


/* ─── TWO-COL GRID ───────────────────────────────── */

.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.main-col {
  padding: 64px var(--gutter);
  border-right: 1px solid var(--border);
}

.main-col:last-child { border-right: none; }

.section-label--project {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 400;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 20px;
}

.section-body {
  font-size: 15px;
  font-weight: 400;
  color: var(--dim);
  line-height: 1.75;
}

.section-body + .section-body {
  margin-top: 16px;
}


/* ─── HIGHLIGHT QUOTE ────────────────────────────── */

.highlight-quote {
  margin-top: 32px;
  padding: 24px 28px;
  border-left: 2px solid var(--accent);
  background: var(--dark);
}

.highlight-quote p {
  font-family: var(--font-display);
  font-size: 18px;
  font-style: italic;
  font-weight: 400;
  color: var(--white);
  line-height: 1.5;
}

.highlight-quote cite {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}


/* ─── DELIVERABLES LIST ──────────────────────────── */

.deliverables-list { margin-top: 32px; }

.deliverable-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.deliverable-item:first-child {
  border-top: 1px solid var(--border);
}

.deliverable-name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.deliverable-spec {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--white);
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}


/* ─── VIDEO SECTION ──────────────────────────────── */

.video-section {
  padding: 72px var(--gutter);
  border-bottom: 1px solid var(--border);
}

.video-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

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

.video-embed {
  position: relative;
  background: var(--mid);
  aspect-ratio: 16/9;
  overflow: hidden;
}

.video-embed.tall {
  aspect-ratio: 9/16;
}

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

.video-placeholder {
  position: absolute; inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.video-placeholder span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.video-caption {
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.video-grid-vertical {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 2px;
}

.video-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  max-width: 560px;
}


/* ─── THUMBNAIL + LIGHTBOX ───────────────────────── */

.thumb-play-wrap {
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.thumb-play-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-play-btn {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12,11,14,0.35);
  transition: background 0.25s;
}

.thumb-play-wrap:hover .thumb-play-btn {
  background: rgba(12,11,14,0.55);
}

.thumb-play-btn svg {
  width: 44px; height: 44px;
  opacity: 0.9;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.vid-modal {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: rgba(12,11,14,0.95);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.vid-modal.open { display: flex; }

.vid-modal-inner {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vid-modal-inner video {
  width: 100%; height: auto;
  display: block;
  background: #000;
}

.vid-modal-close {
  align-self: flex-end;
  margin-bottom: 10px;
  background: none;
  border: none;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s;
}

.vid-modal-close:hover { color: var(--white); }


/* ─── GALLERY (filter tabs + grid) ───────────────── */

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-tab {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}

.filter-tab:hover {
  border-color: var(--dim);
  color: var(--white);
}

.filter-tab.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(196,154,92,0.08);
}

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

.gallery-item {
  position: relative;
  background: var(--mid);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1/1;
}

.gallery-item.hidden { display: none; }

.gallery-item img,
.gallery-item video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.gallery-overlay {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(12,11,14,0.92));
  z-index: 2;
}

.gallery-market {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2px;
}

.gallery-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--white);
}

.gallery-length {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.gallery-play {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  background: rgba(12,11,14,0.3);
  transition: background 0.25s;
}

.gallery-item:hover .gallery-play {
  background: rgba(12,11,14,0.5);
}

.gallery-play svg {
  width: 40px; height: 40px;
  opacity: 0.85;
}

.gallery-play.hidden { display: none; }


/* ─── FORMAT TABS (video panels) ─────────────────── */

.format-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.format-tab {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s;
}

.format-tab:hover { color: var(--white); }

.format-tab.active {
  border-color: var(--accent);
  color: var(--accent);
}

.video-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.video-panel {
  display: none;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 16/9;
  max-width: 960px;
  width: 100%;
}

.video-panel.active { display: block; }

.video-panel[data-ratio="4:5"]  { aspect-ratio: 4/5;  max-width: 480px; }
.video-panel[data-ratio="9:16"] { aspect-ratio: 9/16; max-width: 420px; }

.video-panel img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.video-play-btn,
.video-panel .thumb-play-btn {
  position: absolute; inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  background: rgba(12,11,14,0.35);
  transition: background 0.25s;
}

.video-panel:hover .video-play-btn,
.video-panel:hover .thumb-play-btn {
  background: rgba(12,11,14,0.55);
}

.video-play-btn svg,
.video-panel .thumb-play-btn svg {
  width: 44px; height: 44px;
  fill: white;
  opacity: 0.9;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.format-caption {
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}


/* ─── PHOTO GRID ─────────────────────────────────── */

.photo-section {
  padding: 72px var(--gutter);
  border-bottom: 1px solid var(--border);
}

.photo-section > .section-label--project {
  display: block;
  margin-bottom: 32px;
}

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

.photo-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
}

.photo-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.8);
  transition: transform 0.5s ease, filter 0.4s ease;
}

.photo-card:hover img {
  transform: scale(1.02);
  filter: saturate(1);
}


/* ─── PHOTO LIGHTBOX ─────────────────────────────── */

.lightbox {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: rgba(12,11,14,0.96);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open { display: flex; }

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

.lightbox-close {
  position: fixed;
  top: 20px; right: 24px;
  z-index: 301;
  background: none;
  border: none;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.25s;
}

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

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 301;
  background: none;
  border: none;
  color: var(--dim);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 12px;
  transition: color 0.25s;
}

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

.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }


/* ─── PRODUCTION CONTEXT (seed-to-stage) ─────────── */

.production-context {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.context-col {
  padding: 64px var(--gutter);
  border-right: 1px solid var(--border);
}

.context-col:last-child { border-right: none; }

.context-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.context-heading {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}

.context-body {
  font-size: 14px;
  color: var(--dim);
  line-height: 1.75;
}


/* ─── TIMELINE (impa-kasanganay) ─────────────────── */

.timeline-section {
  padding: 56px var(--gutter);
  border-bottom: 1px solid var(--border);
}

.timeline-section > .section-label--project {
  margin-bottom: 32px;
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

.timeline-item {
  padding: 48px var(--gutter);
  border-right: 1px solid var(--border);
}

.timeline-item:last-child { border-right: none; }

.timeline-year {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 16px;
}

.timeline-event {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}

.timeline-detail {
  font-size: 13px;
  color: var(--dim);
  line-height: 1.6;
}


/* ─── SCOPE CARDS ────────────────────────────────── */

.scope-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
}

.scope-col {
  padding: 56px var(--gutter);
  border-right: 1px solid var(--border);
}

.scope-col:last-child { border-right: none; }

.scope-icon {
  width: 36px; height: 36px;
  color: var(--accent);
  margin-bottom: 24px;
}

.scope-title {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 12px;
}

.scope-text {
  font-size: 14px;
  font-weight: 400;
  color: var(--dim);
  line-height: 1.7;
}


/* ─── FOOTER CTA ─────────────────────────────────── */

.footer-cta {
  padding: 80px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  border-bottom: 1px solid var(--border);
}

.footer-cta-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 40px);
  font-weight: 400;
  line-height: 1.2;
  max-width: 640px;
  color: var(--white);
}

.footer-cta-text em {
  font-style: italic;
  color: var(--accent);
}


/* ─── RESPONSIVE ─────────────────────────────────── */

@media (max-width: 900px) {
  .hero--project { padding: 0 24px 48px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .main-grid { grid-template-columns: 1fr; }
  .main-col {
    padding: 48px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .video-grid { grid-template-columns: 1fr; }
  .video-grid-vertical { grid-template-columns: repeat(2, 1fr); }
  .scope-section { grid-template-columns: 1fr; }
  .scope-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .footer-cta {
    padding: 48px 24px;
    flex-direction: column;
    align-items: flex-start;
  }
  .video-section { padding: 48px 24px; }
  .production-context { grid-template-columns: 1fr; }
  .context-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .timeline-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .deliverable-spec { white-space: normal; word-break: break-word; }
  .lightbox-prev { left: -10px; }
  .lightbox-next { right: -10px; }
  .video-grid-2col { grid-template-columns: 1fr; }
}
