:root {
  --bg: #EDE8DF;
  --black: #0F0F0F;
  --gap: 5px;
  --header-height: 62px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--black);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* ---- HEADER ---- */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--black);
  height: var(--header-height);
}

.header-inner {
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

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

.nav-link {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--black);
  opacity: 0.5;
  transition: opacity 0.15s;
  white-space: nowrap;
}

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

.nav-link.active {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--black);
  font-size: 20px;
  padding: 4px;
  line-height: 1;
}

/* ---- SHOWCASE GRID ---- */

.showcase {
  padding: var(--gap);
}

.masonry-grid {
  position: relative;
}

.grid-item {
  position: absolute;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--black);
  background: var(--black);
}

.grid-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid-item:hover img {
  transform: scale(1.04);
}

.grid-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 15, 15, 0);
  transition: background 0.3s;
  pointer-events: none;
  z-index: 1;
}

.grid-item:hover::after {
  background: rgba(15, 15, 15, 0.1);
}

.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 48px 12px 12px;
  background: linear-gradient(to bottom, transparent, rgba(10, 10, 10, 0.82));
  z-index: 2;
  pointer-events: none;
}

.card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bg);
  line-height: 1.2;
}

.card-caption {
  font-size: 10px;
  color: var(--bg);
  opacity: 0.6;
  margin-top: 3px;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

/* ---- VIDEO THUMBNAIL ---- */

.video-thumb {
  position: relative;
  width: 100%;
  background: var(--black);
}

.video-thumb img {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid-item:hover .video-thumb img {
  transform: scale(1.04);
}

.video-thumb-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 15, 0.3);
  transition: background 0.3s;
}

.grid-item:hover .video-overlay {
  background: rgba(15, 15, 15, 0.15);
}

.video-placeholder {
  width: 100%;
  background: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.play-btn {
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.grid-item:hover .play-btn {
  transform: scale(1.08);
}

.play-btn::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 14px solid var(--bg);
  margin-left: 4px;
}

.video-tag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bg);
  opacity: 0.35;
}

/* ---- LIGHTBOX ---- */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 8, 8, 0.93);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
}

.lightbox-media {
  position: relative;
  max-width: 88vw;
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.lightbox-video-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-poster,
.lightbox-video {
  max-width: 88vw;
  max-height: 88vh;
  display: block;
  object-fit: contain;
}

.lightbox-video {
  outline: none;
}

.lightbox-spinner {
  position: absolute;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--bg);
  animation: lb-pulse 1.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes lb-pulse {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 0.7; }
}

.video-preview {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.grid-item:hover .video-preview {
  transform: scale(1.04);
}

.lightbox-video-ph {
  width: min(600px, 80vw);
  height: min(400px, 55vw);
  background: #161616;
  border: 1px solid #2a2a2a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.play-btn-lg {
  width: 64px;
  height: 64px;
  border: 2px solid var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn-lg::after {
  content: '';
  display: block;
  width: 0;
  height: 0;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 20px solid var(--bg);
  margin-left: 5px;
}

.lightbox-video-ph p {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(237, 232, 223, 0.3);
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 26px;
  background: none;
  border: none;
  color: var(--bg);
  font-size: 30px;
  font-weight: 200;
  opacity: 0.6;
  line-height: 1;
  transition: opacity 0.2s;
  padding: 4px 8px;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ---- PLACEHOLDER PAGES ---- */

.page-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height));
  gap: 28px;
  padding: 40px 24px;
  text-align: center;
}

.placeholder-line {
  width: 48px;
  height: 1px;
  background: var(--black);
}

.placeholder-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(36px, 7vw, 80px);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
}

.placeholder-sub {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.35;
}

/* ---- LOADING PLACEHOLDER ---- */

.grid-item.loading::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- RESPONSIVE ---- */

@media (max-width: 768px) {
  .masonry-grid {
    /* column count handled by JS */
  }

  nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 28px calc(var(--header-height) * 2);
    gap: 0;
    z-index: 99;
  }

  nav.open {
    display: flex;
  }

  .nav-link {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(42px, 12vw, 72px);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.18;
    width: 100%;
    padding: 10px 0;
    border-bottom: 1px solid rgba(15, 15, 15, 0.1);
    transition: opacity 0.15s;
  }

  .nav-link:last-child {
    border-bottom: none;
  }

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

  .nav-toggle {
    display: block;
    position: relative;
    z-index: 101;
  }

  .masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 480px) {
  .logo {
    font-size: 14px;
  }

  .header-inner {
    padding: 0 16px;
  }
}
