/* ============================================================
   WORK PAGE — In Motion
   The Third Narrative · Video Showcase
   ============================================================ */

/* ─── Nav ─── */
.work-page { overflow-x: hidden; }

.work-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 40px;
  background: linear-gradient(to bottom, rgba(10,10,10,0.95), transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.4s ease;
}
.work-nav.scrolled {
  background: rgba(10,10,10,0.95);
}
.work-nav-logo {
  text-decoration: none; display: flex; flex-direction: column; line-height: 1;
}
.nav-logo-the {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 2px;
}
.nav-logo-main {
  font-family: var(--font-display); font-size: 18px; font-weight: 400;
  color: var(--white); letter-spacing: 0.05em;
}
.work-nav-links {
  display: flex; gap: 32px; align-items: center;
}
.work-nav-links a {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.3s ease; position: relative;
}
.work-nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--white);
  transition: width 0.3s var(--ease-out-expo);
}
.work-nav-links a:hover,
.work-nav-links a.active { color: var(--white); }
.work-nav-links a:hover::after,
.work-nav-links a.active::after { width: 100%; }

/* ─── Header ─── */
.work-header {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 120px 40px 80px;
  background: var(--bg-primary);
}
.work-header-bg {
  position: absolute; inset: 0; z-index: 0;
}
.header-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.04; mix-blend-mode: overlay; pointer-events: none;
}
.header-noise-lines {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(255,255,255,0.012) 2px,
    rgba(255,255,255,0.012) 4px
  );
  pointer-events: none;
}

.work-header-content {
  position: relative; z-index: 2; text-align: center;
  max-width: 960px; animation: headerFadeIn 1.2s var(--ease-out-expo) forwards;
}
@keyframes headerFadeIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.work-header-label {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 40px;
  display: flex; align-items: center; justify-content: center; gap: 16px;
}
.label-line { display: block; width: 32px; height: 1px; background: var(--text-muted); }

.work-header-title {
  font-family: var(--font-display);
  font-size: clamp(72px, 12vw, 160px);
  font-weight: 300; line-height: 0.9;
  letter-spacing: -0.01em; text-transform: uppercase;
  margin-bottom: 40px; overflow: hidden;
}
.title-word {
  display: inline-block;
  opacity: 0; transform: translateY(100%);
  animation: titleSlideUp 0.9s var(--ease-out-expo) forwards;
}
.title-word:nth-child(1) { animation-delay: 0.15s; }
.title-word:nth-child(2) { animation-delay: 0.3s; margin-left: 0.25em; }
.title-word--italic { font-style: italic; color: var(--text-accent); }

@keyframes titleSlideUp {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0); }
}

.work-header-sub {
  font-family: var(--font-display); font-size: clamp(18px, 2.5vw, 28px);
  font-weight: 300; font-style: italic; color: var(--text-accent);
  max-width: 640px; margin: 0 auto 48px; line-height: 1.5;
  opacity: 0; animation: headerFadeIn 1s var(--ease-out-expo) 0.5s forwards;
}

.work-header-meta {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; gap: 16px;
  opacity: 0; animation: headerFadeIn 1s var(--ease-out-expo) 0.7s forwards;
}
.meta-sep { color: var(--border-medium); }

.work-scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: headerFadeIn 1s ease 1.2s forwards;
}
.scroll-line {
  width: 1px; height: 48px;
  background: linear-gradient(to bottom, var(--text-muted), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
.work-scroll-indicator span {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-muted);
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─── Filter Bar ─── */
.work-filter-bar {
  position: -webkit-sticky; position: sticky; top: 0; z-index: 50;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 40px;
}
.filter-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; gap: 0; overflow-x: auto;
  scrollbar-width: none;
}
.filter-inner::-webkit-scrollbar { display: none; }
.filter-btn {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.2em; text-transform: uppercase;
  background: none; border: none; border-bottom: 2px solid transparent;
  color: var(--text-secondary); padding: 20px 24px;
  cursor: pointer; white-space: nowrap;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.filter-btn:hover { color: var(--white); }
.filter-btn.active {
  color: var(--white); border-bottom-color: var(--white);
}

/* ─── Video Grid ─── */
.work-grid-wrapper {
  padding: 60px 40px 120px;
  background: var(--bg-primary);
}
.work-video-grid {
  max-width: 1400px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

/* Featured cards span 2 columns (Removed for uniform grid) */
.video-card--featured {
  grid-column: span 1;
}

/* ─── Video Card ─── */
.video-card {
  opacity: 0; transform: translateY(20px);
  transition:
    opacity 0.7s var(--ease-out-expo),
    transform 0.7s var(--ease-out-expo),
    grid-column 0.4s ease;
  cursor: pointer;
}
.video-card.visible {
  opacity: 1; transform: translateY(0);
}
.video-card.hidden {
  display: none;
}
.video-card-inner {
  background: var(--bg-secondary);
  overflow: hidden; height: 100%;
  display: flex; flex-direction: column;
  transition: background 0.3s ease;
}
.video-card:hover .video-card-inner {
  background: var(--bg-accent);
}

.video-thumb-wrap {
  position: relative; overflow: hidden;
  aspect-ratio: 16/9; flex-shrink: 0;
}
.video-card--featured .video-thumb-wrap {
  aspect-ratio: 16/9;
}

.video-thumb {
  width: 100%; height: 100%;
  object-fit: contain; display: block;
  background: #000;
  filter: grayscale(80%) contrast(1.1);
  transition: filter 0.5s ease, transform 0.7s var(--ease-out-expo);
  pointer-events: none;
}
.video-card:hover .video-thumb {
  filter: grayscale(20%) contrast(1.15);
  transform: scale(1.04);
}

.video-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10,10,10,0.3) 0%,
    rgba(10,10,10,0.1) 40%,
    rgba(10,10,10,0.7) 100%
  );
  display: flex; align-items: center; justify-content: center;
  transition: background 0.4s ease;
}
.video-card:hover .video-thumb-overlay {
  background: rgba(10,10,10,0.15);
}

.play-icon {
  width: 56px; height: 56px;
  opacity: 0; transform: scale(0.8);
  transition: opacity 0.35s ease, transform 0.35s var(--ease-out-expo);
}
.video-card:hover .play-icon {
  opacity: 1; transform: scale(1);
}
.play-icon svg { width: 100%; height: 100%; }

.video-duration {
  position: absolute; bottom: 16px; right: 16px;
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); background: rgba(10,10,10,0.6);
  padding: 4px 10px; border-radius: 2px;
  backdrop-filter: blur(4px);
}

.video-card-info {
  padding: 20px 24px 24px; flex: 1;
  display: flex; flex-direction: column; gap: 6px;
}
.video-card-cat {
  font-family: var(--font-mono); font-size: 9px;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-muted);
}
.video-card-title {
  font-family: var(--font-display); font-size: 22px;
  font-weight: 400; color: var(--white);
  letter-spacing: 0.01em; line-height: 1.2;
}
.video-card-desc {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--text-secondary); letter-spacing: 0.05em;
}

/* ─── Empty state ─── */
.work-empty {
  text-align: center; padding: 120px 24px;
  font-family: var(--font-display); font-size: 24px;
  color: var(--text-muted); font-style: italic;
}

/* ─── Lightbox ─── */
.lightbox-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox-backdrop.active {
  opacity: 1; pointer-events: all;
}
.lightbox {
  position: fixed; inset: 0; z-index: 201;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox:not([hidden]) {
  opacity: 1; pointer-events: all;
}

.lightbox-close {
  position: absolute; top: 24px; right: 28px;
  background: none; border: 1px solid var(--border-subtle);
  color: var(--text-secondary); width: 44px; height: 44px;
  border-radius: 50%; cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.lightbox-close:hover {
  color: var(--white); border-color: var(--white); transform: rotate(90deg);
}
.lightbox-close svg { width: 20px; height: 20px; }

.lightbox-inner {
  width: 100%; max-width: 1100px;
  display: flex; flex-direction: column; gap: 28px;
  transform: translateY(30px);
  transition: transform 0.5s var(--ease-out-expo);
}
.lightbox:not([hidden]) .lightbox-inner {
  transform: translateY(0);
}

.lightbox-video-wrap {
  position: relative; border-radius: 2px; overflow: hidden;
  background: #000; aspect-ratio: 16/9;
  box-shadow: 0 40px 120px rgba(0,0,0,0.8);
}
.lightbox-video {
  width: 100%; height: 100%; display: block;
  object-fit: contain;
  background: #000;
  outline: none;
}

.lightbox-meta {
  display: flex; flex-direction: column; gap: 6px;
  padding: 0 4px;
}
.lightbox-cat {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-muted);
}
.lightbox-title {
  font-family: var(--font-display); font-size: 32px;
  font-weight: 300; color: var(--white); letter-spacing: 0.02em;
}
.lightbox-desc {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--text-secondary); letter-spacing: 0.05em;
}

/* ─── Footer ─── */
.work-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 32px 40px;
}
.work-footer-inner {
  max-width: 1400px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
}
.work-footer-back {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--text-secondary); text-decoration: none;
  transition: color 0.25s ease;
}
.work-footer-back:hover { color: var(--white); }
.work-footer-copy {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--text-muted);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .work-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .video-card--featured {
    grid-column: span 2;
  }
}
@media (max-width: 768px) {
  .work-nav { padding: 16px 20px; }
  .work-nav-links { gap: 20px; }
  .work-header { padding: 100px 20px 60px; }
  .work-filter-bar { padding: 0 20px; }
  .filter-btn { padding: 16px 16px; font-size: 9px; }
  .work-grid-wrapper { padding: 40px 16px 80px; }
  .work-video-grid {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .video-card--featured { grid-column: span 1; }
  .work-footer-inner { flex-direction: column; gap: 16px; text-align: center; }
  .lightbox { padding: 16px; }
  .lightbox-title { font-size: 22px; }
}
@media (max-width: 480px) {
  .work-nav-links { display: none; }
  .video-card-title { font-size: 18px; }
}

/* ─── Case Study Capsule Button & Animation ─── */
.video-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 18px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 100px;
  width: fit-content;
  position: relative;
  z-index: 2;
  overflow: hidden;
  transition: color 0.3s ease, border-color 0.3s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.video-card-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: translateY(102%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: -1;
  border-radius: 100px;
}

.video-card-link:hover {
  color: #0a0a0a;
  border-color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -2px rgba(255, 255, 255, 0.2);
}

.video-card-link:hover::before {
  transform: translateY(0);
}

.video-card-link:active {
  transform: translateY(0) scale(0.98);
}

.video-card-link .btn-arrow {
  display: inline-block;
  font-size: 12px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-card-link:hover .btn-arrow {
  transform: translateX(4px);
}

