/* =========================================================
   PROJECT PAGE — BASE
========================================================= */

.project-page {
  background: #dedede;
  padding: 20px;
}

.nav-color {
  background-color: #dedede;
}

.project-divider {
  width: 100%;
  height: 1px;
  background: #000;
  margin: 0px 0 10px;
}

/* Per-project theming */
.project--mirari-christmas {
  --project-bg: #dedede;
  --project-end-bg: #134228;
}

.project--minirari {
  --project-bg: #f1f1f1;
  --project-end-bg: #e56d40;
}

/* =========================================================
   PROJECT HEADER
========================================================= */

.project-header {
  display: grid;
  grid-template-columns: 0.5fr 2.5fr auto;
  gap: 40px;
  margin-bottom: 20px;
  align-items: start;
}

.project-name {
  text-decoration: underline;
}

.project-header-description {
  max-width: 48ch;
}

.project-header-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0px;
  flex-shrink: 0;
}

.project-pagination--header {
  display: flex;
  gap: 12px;
  margin-top: 0px;
}

.project-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap; /* prevents wrapping */
}


/* Year */
.project-year {
  border: 1px solid #000;
  border-radius: 50%;
  padding: 4px 18px;
  font-size: var(--text-small);
  line-height: 1;
  background: transparent;
  color: #000;
  white-space: nowrap;
}

/* Tags */
.project-tags {
  display: flex;
  gap: 6px;
}

.project-tag {
  border: 1px solid #000;
  background: #000;
  color: #dedede;
  padding: 4px 14px;
  font-size: var(--text-small);
  line-height: 1;
  white-space: nowrap;
}

/* Mobile header layout */
@media (max-width: 768px) {
  .project-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .project-pagination--header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 6px;
  }

  .project-header-meta {
    align-items: stretch;
    width: 100%;
  }

  .project-meta-row {
    justify-content: space-between;
    width: 100%;
  }

  .project-tags {
    margin-left: 0;
  }
}

/* =========================================================
   PROJECT PAGINATION
========================================================= */

.project-pagination {
  display: flex;
  gap: 6px;
  margin: 10px 0px 0px 0px;
  font-size: var(--text-small);
  line-height: 1;
}

/* =========================================================
   PROJECT PAGINATION — TAG HOVER
========================================================= */

.project-nav {
  text-decoration: none;
  color: #000;
}

.project-nav:hover {
  text-decoration: underline;
  height: 1px;
}




/* =========================================================
   PROJECT MEDIA — STAGE (SINGLE SOURCE OF TRUTH)
========================================================= */

.project-media {
  width: 100%;
  position: relative;
}

.project-media__mask {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;

  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;

}

  .project-media__mask::-webkit-scrollbar {
    display: none;
  }

.project-media__track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
}

/* =========================
   SLIDES — BASE (DESKTOP FIRST)
========================= */

.project-slide {
  position: relative;
  flex: 0 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.project-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}



@media (min-width: 769px) {
  .slide--narrow {
    width: 34vw;
    min-width: 420px;
  }

  .slide--medium {
    width: 36vw;
    max-width: 1100px;
  }

  .slide--wide {
    width: 70vw;
    max-width: 1600px;
  }
}

/* =========================================================
   PHOTO SLIDES — ALWAYS FILL
========================================================= */

.slide--photo {
  align-items: stretch;
  object-position: center;
}

.slide--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* =========================================================
   VIDEO SLIDE — ALWAYS FILLS
========================================================= */

.project-slide--video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Mobile default */
.video-desktop {
  display: none;
}

/* Desktop override */
@media (min-width: 769px) {
  .video-mobile {
    display: none;
  }

  .video-desktop {
    display: block;
  }
}


/* =========================================================
   COMPOSED SLIDES
========================================================= */

.slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.slide-foreground {
    position: relative;
    z-index: 1;
    max-height: 70%;
    width: auto;
}


.slide-overlay {
  position: relative;
  z-index: 1;
  max-height: 80%;
  width: auto;
}

/* =========================================================
   MOBILE — FIXED 4:5 STAGE
========================================================= */

@media (max-width: 768px) {
  .project-media--horizontal {
    width: 100%;
    aspect-ratio: 4 / 6;
    position: relative;
    overflow: hidden;
  }

  .project-media__track {
    position: relative;
    height: 100%;
  }

  .project-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .project-slide.is-active {
    opacity: 1;
    pointer-events: auto;
  }

  .slide-overlay {
    max-height: 40%;
    }
}


/* =========================================================
   DESKTOP — HORIZONTAL SCROLL
========================================================= */

@media (min-width: 769px) {
  .project-media--horizontal {
    height: 75vh;
    overflow: hidden;
  }


  .project-slide {
    position: relative;
    flex: 0 0 auto;
    height: 100%;
    opacity: 1;
    pointer-events: auto;
  }
}



/* =========================================================
   COMPOSED SLIDE BACKGROUNDS
========================================================= */

.slide--composed {
  background-color: var(--project-bg, #000);
  
}

.slide--composed2 {
  background-color: var(--project-bg, #000);
  
}

.slide--composed.slide--end {
  background-color: var(--project-end-bg, #000);
}




/* =========================================================
   DESKTOP — DEFINITIVE SLIDE LAYOUT RESET
   (prevents mobile rules from leaking)
========================================================= */

@media (min-width: 769px) {


  .project-slide {
    position: relative;
    inset: auto;
    height: 100%;
    flex: 0 0 auto;

    opacity: 1;
    pointer-events: auto;
  }

  .slide--composed {
      width: 80vw;
  }

    .slide--composed2 {
      width: 40vw;
  }

  .slide--end {
    width: 60vw;
    }
}


/* TAP HINT — MOBILE ONLY */

.project-hint {
  position: absolute;
  bottom: 20px;
  right: 20px;

  width: 30px;
  height: 30px;

  z-index: 9999;
  pointer-events: none;

  opacity: 1;
  transition: opacity 0.3s ease;

}

/* hide after first tap */
.project-hint.is-hidden {
  opacity: 0;
}

/* never show on desktop */
@media (min-width: 1024px) {
  .project-hint {
    display: none;
  }
}


.coming-soon {
  text-align: center;
  line-height: 0.8;
}

.coming-soon-oval {
  width: min(500px, 70vw);
  height: auto;

  border: 1px solid #000;
  border-radius: 50%;

  display: flex;
  justify-content: center;

  padding: 20px 20px;
}

/* =========================================
   COMING SOON — CENTERED STAGE
========================================= */

.project--vice .project-media__mask {
  min-height: 30svh;
  
  display: flex;
  align-items: center;   /* vertical center */
  justify-content: center; /* horizontal center */
}

@media (max-width: 768px) {
.project--vice .project-media__mask {
  padding-top: 100px;
  
  display: flex;
  align-items: flex-start;   /* vertical center */
  justify-content: center; /* horizontal center */
}
}