/* ==========================================================================
   HORIZON X — Portfolio Listing Page (projects.html)
   Premium editorial project listing inspired by the Blogs page visual rhythm.
   Uses the pw- prefix to avoid conflicts with existing project-card grid CSS.
   ========================================================================== */

/* ==========================================================================
   PORTFOLIO HERO
   ========================================================================== */

.pw-hero {
  background: var(--ink);
  padding: clamp(130px, 20vw, 200px) 0 clamp(60px, 8vw, 96px);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--navy-line);
}

/* Architectural grid overlay */
.pw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.025) 0 1px, transparent 1px 80px);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 90%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), transparent 90%);
}

.pw-hero .container {
  position: relative;
  z-index: 1;
}

.pw-hero-inner {
  max-width: 840px;
}

/* Eyebrow */
.pw-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0899f4;
  margin-bottom: 28px;
}

.pw-eyebrow-dash {
  display: inline-block;
  width: 24px;
  height: 1px;
  background: #0899f4;
  flex-shrink: 0;
}

/* Hero Heading */
.pw-hero-heading {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(52px, 9vw, 108px);
  line-height: 0.93;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--off);
  margin: 0 0 32px;
}

.pw-heading-accent {
  color: #0899f4;
  font-style: normal;
}

/* Hero description */
.pw-hero-desc {
  font-family: var(--f-body);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.65;
  color: var(--off-dim);
  max-width: 58ch;
  margin: 0;
}

/* Thin architectural rule below hero text */
.pw-hero-rule {
  width: 100%;
  height: 1px;
  background: var(--navy-line);
  margin-top: clamp(40px, 6vw, 72px);
}

/* Mobile hero */
@media (max-width: 640px) {
  .pw-hero {
    padding-top: clamp(100px, 28vw, 140px);
  }

  .pw-hero-heading {
    font-size: clamp(42px, 13vw, 72px);
  }
}


/* ==========================================================================
   CATEGORY FILTERS BAR
   ========================================================================== */

.pw-filters-section {
  background: var(--ink);
  border-bottom: 1px solid var(--navy-line);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.94);
}

.pw-filters-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 14px 0;
}

.pw-filters-row::-webkit-scrollbar {
  display: none;
}

/* Filter buttons (injected by JS — .filter-btn class shared) */
.pw-filters-row .filter-btn {
  flex-shrink: 0;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--off-dim);
  background: transparent;
  border: 1px solid var(--navy-line);
  border-radius: 2px;
  padding: 8px 16px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.pw-filters-row .filter-btn:hover {
  color: #0899f4;
  border-color: #0899f4;
  background: rgba(8, 153, 244, 0.04);
}

.pw-filters-row .filter-btn[aria-pressed="true"] {
  color: #ffffff;
  background: #111111;
  border-color: #111111;
}

.pw-filters-row .filter-count {
  opacity: 0.6;
  margin-left: 4px;
}


/* ==========================================================================
   PROJECT LISTING SECTION (2-Column Grid Layout)
   ========================================================================== */

.pw-listing-section {
  background: var(--ink);
  padding: 0;
}

/* 2-Column Grid container */
.pw-project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(44px, 5vw, 72px) clamp(32px, 4vw, 56px);
  align-items: stretch;
  padding: clamp(36px, 5vw, 64px) 0 clamp(48px, 6vw, 84px);
}

/* Empty state */
.pw-empty-state {
  text-align: center;
  padding: clamp(80px, 12vw, 140px) 20px;
  display: none;
  grid-column: 1 / -1;
}

.pw-empty-state.is-shown {
  display: block;
}

.pb-empty-title {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--off);
  margin-bottom: 12px;
}

.pb-empty-subtitle {
  display: block;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0899f4;
}

/* Loading state */
.pw-loading {
  text-align: center;
  padding: 80px 0;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey);
  grid-column: 1 / -1;
}


/* ==========================================================================
   PROJECT BLOCK (.pb-project-block)
   Clean, architectural 2-column presentation.
   ========================================================================== */

.pb-project-block {
  display: flex;
  flex-direction: column;
  position: relative;
  border-bottom: 1px solid var(--navy-line);
  padding-bottom: clamp(32px, 4vw, 48px);
}

.pb-project-block.is-hidden {
  display: none;
}

/* Header: number, category eyebrow, title, desc */
.pb-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;
}

.pb-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.pb-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.35);
}

.pb-category {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0899f4;
}

.pb-location {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
}

.pb-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(8, 153, 244, 0.1);
  border: 1px solid rgba(8, 153, 244, 0.4);
  padding: 3px 9px;
  border-radius: 2px;
  line-height: 1;
  transition: all 0.25s ease;
  user-select: none;
}

.pb-featured-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0899f4;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.pb-featured-badge:hover {
  background: rgba(8, 153, 244, 0.18);
  border-color: #0899f4;
  box-shadow: 0 0 10px rgba(8, 153, 244, 0.22);
}

.pb-featured-badge:hover .pb-featured-star {
  transform: rotate(45deg) scale(1.15);
}

.pb-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--off);
  margin: 0 0 12px;
}

.pb-desc {
  font-family: var(--f-body);
  font-size: clamp(13.5px, 1.1vw, 15.5px);
  line-height: 1.62;
  color: var(--off-dim);
  max-width: 54ch;
  margin: 0;
}

/* Main Project Image Preview */
.pb-image-wrap {
  position: relative;
  width: 100%;
  cursor: pointer;
  user-select: none;
  display: block;
  margin-top: auto;
}

.pb-image-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--navy);
  border: 1px solid var(--navy-line);
  border-radius: 2px;
}

.pb-image-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.pb-image-wrap:hover .pb-image-inner img {
  transform: scale(1.03);
}

.pb-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.5) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: clamp(12px, 2vw, 20px);
  pointer-events: none;
}

.pb-overlay-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 7px 12px;
  border-radius: 30px;
  transition: background 0.3s, border-color 0.3s;
}

.pb-image-wrap:hover .pb-overlay-badge {
  background: #0899f4;
  border-color: #0899f4;
}

/* Footer & Gallery CTA Button */
.pb-footer {
  margin-top: clamp(16px, 2.5vw, 22px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.pb-gallery-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--off);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--off);
  padding: 0 0 4px 0;
  cursor: pointer;
  transition: color 0.25s, border-color 0.25s, gap 0.25s;
}

.pb-gallery-btn:hover {
  color: #0899f4;
  border-color: #0899f4;
  gap: 14px;
}

.pb-btn-arrow {
  display: flex;
  align-items: center;
  transition: transform 0.25s;
}

.pb-gallery-btn:hover .pb-btn-arrow {
  transform: translateX(4px);
}

/* ==========================================================================
   FULL-WIDTH HERO VIDEO PROJECT SHOWCASE (.pb-video-hero-block)
   Cinematic, architectural 3D walkthrough presentation spanning full width.
   ========================================================================== */

.pb-video-hero-block {
  grid-column: 1 / -1;
  width: 100%;
  border-bottom: none;
  padding-bottom: 0;
  margin: clamp(8px, 1.5vw, 16px) 0 clamp(16px, 2.5vw, 28px);
}

.pb-hero-block-inner {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr;
  gap: clamp(32px, 4.5vw, 68px);
  align-items: center;
  background: #090b10;
  background: linear-gradient(135deg, #07090d 0%, #0d1118 60%, #111722 100%);
  border: 1px solid rgba(8, 153, 244, 0.28);
  border-radius: 4px;
  padding: clamp(32px, 4vw, 56px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Atmospheric architectural glow */
.pb-hero-block-inner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(8, 153, 244, 0.18) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.pb-hero-block-inner::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(8, 153, 244, 0.08) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

/* Left content column */
.pb-hero-col-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.pb-hero-col-content .pb-meta-top {
  margin-bottom: 18px;
}

.pb-hero-col-content .pb-num {
  color: rgba(255, 255, 255, 0.45);
}

.pb-hero-col-content .pb-location {
  color: rgba(255, 255, 255, 0.7);
}

.pb-hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 20px;
}

.pb-hero-desc {
  font-family: var(--f-body);
  font-size: clamp(14px, 1.15vw, 16px);
  line-height: 1.68;
  color: rgba(255, 255, 255, 0.76);
  margin: 0 0 32px;
  max-width: 52ch;
}

.pb-hero-actions {
  display: flex;
  align-items: center;
}

.pb-hero-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  background: #0899f4;
  border: 1px solid #0899f4;
  padding: 14px 28px;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.28s ease, transform 0.28s ease, box-shadow 0.28s ease;
  user-select: none;
}

.pb-hero-cta-btn:hover {
  background: #0782d0;
  border-color: #0782d0;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(8, 153, 244, 0.38);
}

.pb-hero-btn-arrow {
  display: flex;
  align-items: center;
  transition: transform 0.28s ease;
}

.pb-hero-cta-btn:hover .pb-hero-btn-arrow {
  transform: translateX(5px);
}

/* Right media column */
.pb-hero-col-media {
  position: relative;
  z-index: 2;
  width: 100%;
}

.pb-hero-media-card {
  position: relative;
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  background: #000000;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.4s ease;
  user-select: none;
}

.pb-hero-media-card:hover {
  transform: scale(1.018);
  border-color: rgba(8, 153, 244, 0.65);
  box-shadow: 0 24px 60px rgba(8, 153, 244, 0.22);
}

.pb-hero-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #05070a;
}

.pb-hero-video-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
  filter: brightness(0.92);
}

.pb-hero-media-card:hover .pb-hero-video-preview {
  transform: scale(1.04);
  filter: brightness(1);
}

.pb-hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.5) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.pb-hero-play-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  position: relative;
}

.pb-hero-play-btn {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: rgba(8, 153, 244, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 32px rgba(8, 153, 244, 0.65);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease, box-shadow 0.3s ease;
  padding-left: 4px;
}

.pb-hero-media-card:hover .pb-hero-play-btn {
  transform: scale(1.14);
  background: #0899f4;
  box-shadow: 0 0 48px rgba(8, 153, 244, 0.9);
}

.pb-hero-play-pulse {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #0899f4;
  animation: pbHeroPulse 2s infinite cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

@keyframes pbHeroPulse {
  0% {
    transform: translateX(-50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translateX(-50%) scale(1.65);
    opacity: 0;
  }
}

.pb-hero-play-label {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.3s ease, border-color 0.3s ease;
}

.pb-hero-media-card:hover .pb-hero-play-label {
  background: rgba(8, 153, 244, 0.25);
  border-color: #0899f4;
}

.pb-hero-duration-badge {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: 2px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Responsive Grid Adjustments */
@media (max-width: 1024px) {
  .pb-hero-block-inner {
    grid-template-columns: 1fr;
    gap: clamp(28px, 4vw, 40px);
    padding: clamp(28px, 4vw, 40px);
  }

  .pb-hero-desc {
    max-width: 100%;
  }
}

@media (max-width: 860px) {
  .pw-project-list {
    grid-template-columns: 1fr;
    gap: clamp(36px, 6vw, 56px);
    padding: clamp(28px, 6vw, 48px) 0;
  }

  .pb-project-block {
    padding-bottom: clamp(28px, 5vw, 40px);
  }

  .pb-title {
    font-size: clamp(24px, 7vw, 36px);
  }

  .pb-image-inner {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .pb-title {
    font-size: clamp(22px, 8vw, 32px);
  }

  .pb-image-inner {
    aspect-ratio: 4 / 3;
  }

  .pb-hero-block-inner {
    padding: 24px 18px;
  }

  .pb-hero-title {
    font-size: clamp(24px, 7vw, 34px);
  }

  .pb-hero-cta-btn {
    width: 100%;
    justify-content: center;
  }

  .pb-hero-play-btn {
    width: 56px;
    height: 56px;
  }

  .pb-hero-play-pulse {
    width: 56px;
    height: 56px;
  }
}


/* ==========================================================================
   INLINE LIGHTBOX / FULLSCREEN IMAGE VIEWER (.hx-lightbox)
   Cinematic, modern, professional gallery overlay on the same page.
   ========================================================================== */

.hx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.hx-lightbox.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hx-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 10, 0.96);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.hx-lightbox-container {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(14px, 2.5vw, 28px);
  box-sizing: border-box;
}

/* Top bar: counter, title, close button */
.hx-lightbox-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hx-lightbox-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hx-lightbox-counter {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0899f4;
}

.hx-lightbox-title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 50vw;
}

.hx-lightbox-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}

.hx-lightbox-close:hover {
  background: #0899f4;
  border-color: #0899f4;
  color: #ffffff;
  transform: scale(1.08);
}

/* Stage: previous, image, next */
.hx-lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1540px;
  margin: 0 auto;
  gap: clamp(12px, 2vw, 36px);
  position: relative;
  padding: 12px 0;
}

.hx-lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
  z-index: 10;
}

.hx-lightbox-nav:hover {
  background: #0899f4;
  border-color: #0899f4;
  color: #ffffff;
  transform: scale(1.08);
}

.hx-lightbox-img-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 100%;
  max-height: calc(100vh - 150px);
  user-select: none;
}

.hx-lightbox-img {
  max-width: 100%;
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.hx-lightbox-img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

/* Spinner loader */
.hx-lightbox-loader {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.hx-lightbox-loader.is-active {
  display: flex;
}

.hx-loader-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #0899f4;
  border-radius: 50%;
  animation: hxSpin 0.7s linear infinite;
}

@keyframes hxSpin {
  to { transform: rotate(360deg); }
}

/* Mobile bottom nav */
.hx-lightbox-bottom-nav {
  display: none;
}

@media (max-width: 640px) {
  .hx-lightbox-stage .hx-lightbox-nav {
    display: none !important;
  }

  .hx-lightbox-bottom-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .hx-lightbox-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
  }

  .hx-lightbox-pill-btn:hover {
    background: #0899f4;
    border-color: #0899f4;
  }

  .hx-lightbox-mobile-counter {
    font-family: var(--f-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: #0899f4;
  }
}

/* ==========================================================================
   CINEMATIC VIDEO LIGHTBOX MODAL (.hx-video-lightbox)
   ========================================================================== */

.hx-video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s;
}

.hx-video-lightbox.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.hx-video-modal-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1440px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(14px, 2.5vw, 28px);
  box-sizing: border-box;
}

.hx-video-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hx-video-tag {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #0899f4;
  background: rgba(8, 153, 244, 0.12);
  border: 1px solid rgba(8, 153, 244, 0.35);
  padding: 4px 10px;
  border-radius: 2px;
}

.hx-video-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(10px, 2vw, 24px) 0;
  position: relative;
  min-height: 0;
}

.hx-video-player-card {
  width: 100%;
  max-width: 1280px;
  max-height: calc(100vh - 140px);
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.hx-main-video-player {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000000;
  outline: none;
  border: none;
}

@media (max-width: 768px) {
  .hx-video-modal-container {
    padding: 12px 10px;
  }

  .hx-video-topbar {
    padding-bottom: 10px;
  }

  .hx-video-player-card {
    max-height: calc(100vh - 100px);
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================================================
   FINAL CTA (shared with other pages, defined here for projects.html)
   ========================================================================== */

.final-cta {
  background: var(--midnight);
  border-top: 1px solid var(--navy-line);
  padding-block: clamp(56px, 7vw, 90px);
  text-align: center;
}

.final-cta .inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.final-cta h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(32px, 5.5vw, 68px);
  text-transform: uppercase;
  line-height: 0.96;
  letter-spacing: -0.01em;
  color: var(--off);
  margin: 0;
}

.final-cta h2 em {
  font-style: normal;
  color: #0899f4;
}

.final-cta p {
  font-size: clamp(14px, 1.4vw, 17px);
  color: var(--off-dim);
  max-width: 50ch;
  line-height: 1.65;
}