/* Full project pages ------------------------------------------------------ */
:root { --project-page-height: 100vh; }
@supports (height: 100svh) { :root { --project-page-height: 100svh; } }

html.is-project-page,
html.is-project-page body {
  width: 100%;
  height: var(--project-page-height);
  min-height: var(--project-page-height);
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
}

html.is-project-page body { touch-action: none; }

.project-page-app,
.project-page-stage {
  position: relative;
  width: 100%;
  height: var(--project-page-height);
  min-height: var(--project-page-height);
  overflow: hidden;
  background: var(--bg);
}

.project-page-stage {
  opacity: 1;
  transition: none;
}

body.is-page-exiting .project-page-stage,
body.is-navigation-outro .project-page-stage {
  opacity: 0;
  transition: opacity 1.28s cubic-bezier(0.365, 0.220, 0.000, 0.995);
}

/* Shared reveal states ---------------------------------------------------- */
.project-page-info,
.project-page-video-controls,
[data-project-media-reveal] {
  opacity: 0;
  transition: none;
}

body.is-opacity-transitions-enabled .project-page-info,
body.is-opacity-transitions-enabled .project-page-video-controls,
body.is-opacity-transitions-enabled [data-project-media-reveal] {
  transition: opacity 1.28s cubic-bezier(0.365, 0.220, 0.000, 0.995);
}

body.is-page-visible:not(.is-page-exiting):not(.is-navigation-outro) .project-page-info,
body.is-page-visible:not(.is-page-exiting):not(.is-navigation-outro) .project-page-video-controls,
body.is-page-visible:not(.is-page-exiting):not(.is-navigation-outro) [data-project-media-reveal].is-project-media-revealed {
  opacity: 1;
}

body.is-page-exiting .project-page-info,
body.is-page-exiting .project-page-video-controls,
body.is-page-exiting [data-project-media-reveal],
body.is-navigation-outro .project-page-info,
body.is-navigation-outro .project-page-video-controls,
body.is-navigation-outro [data-project-media-reveal] {
  opacity: 0 !important;
  transition: opacity 1.28s cubic-bezier(0.365, 0.220, 0.000, 0.995) !important;
}

/* Info / close ------------------------------------------------------------ */
.project-page-info {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  display: grid;
  gap: 0;
  width: 350px;
  max-width: calc(100vw - 14px);
  box-sizing: border-box;
  color: var(--text);
  background: transparent;
  font-size: var(--ui-font-size);
  line-height: 1.2;
  font-weight: 550;
  letter-spacing: 0.005em;
  text-align: left;
  pointer-events: auto;
  cursor: pointer;
}

.project-page-info.has-no-project-details { cursor: default; }

.project-page-info-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  pointer-events: none;
  gap: 7px;
}

.project-page-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.project-page-close-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 7px;
  border: 0;
  border-radius: 0;
  color: var(--text);
  background: transparent;
  font: inherit;
  line-height: 0;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.project-page-close-button [data-button-label] {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: calc(1 * var(--site-menu-toggle-height));
  height: var(--site-menu-toggle-height);
  padding: 0;
  border: var(--rule-border-width) solid currentColor;
  border-radius: 1em;
  background: transparent;
  color: inherit;
  line-height: 0;
}

.project-page-close-button [data-button-label]::before {
  content: "";
  position: absolute;
  left: 55%;
  top: 50%;
  display: block;
  width: 0.5em;
  height: 0.5em;
  box-sizing: border-box;
  border-left: 0.1em solid currentColor;
  border-top: 0.1em solid currentColor;
  transform: translate(-42%, -50%) rotate(-45deg);
  transform-origin: center center;
}

.project-page-details {
  display: flex;
  flex-direction: column;
  gap: 1em;
  width: 100%;
  max-width: 100%;
  padding: 0px 7px;
  padding-bottom: 7px;
  pointer-events: auto;
}


.project-page-details[hidden] { display: none !important; }

.project-page-description-text,
.project-page-credits {
  display: block;
  margin: 0;
}

/* Full video page --------------------------------------------------------- */
body[data-project-page-type="fullVideo"] .project-page-stage {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--project-page-height);
  min-height: var(--project-page-height);
  max-height: var(--project-page-height);
  overflow: hidden;
}

.project-page-video-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--project-page-height);
  min-height: var(--project-page-height);
  overflow: hidden;
  line-height: 0;
}

body[data-project-page-type="fullVideo"] .project-page-video-frame {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: var(--project-page-height);
  min-height: var(--project-page-height);
  max-height: var(--project-page-height);
}

.project-page-video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
  background: transparent;
  color: transparent;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.project-page-video-controls {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 30;
  width: 100vw;
  box-sizing: border-box;
  padding: 0;
  color: var(--text);
  pointer-events: auto;
  cursor: default;
  touch-action: manipulation;
}


/* Full project slider ----------------------------------------------------- */
.project-full-swiper {
  position: relative;
  width: 100vw;
  height: var(--project-page-height);
  min-height: var(--project-page-height);
  overflow: hidden;
}

.project-full-track {
  align-items: stretch;
  height: var(--project-page-height);
  min-height: var(--project-page-height);
}

.project-full-slide {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  width: auto !important;
  max-width: 100vw;
  height: var(--project-page-height);
  min-height: var(--project-page-height);
  overflow: hidden;
  line-height: 0;
  flex: 0 0 auto;
}

.project-full-video-frame {
  width: auto;
  max-width: 100vw;
  height: 100%;
}

.project-full-slide img,
.project-full-slide video {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100vw;
  max-height: 100%;
  object-fit: cover;
  object-position: center center;
  background: transparent;
  color: transparent;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.project-full-slide.is-viewport-clamped img,
.project-full-slide.is-viewport-clamped video,
.project-full-slide.is-viewport-clamped .project-full-video-frame {
  width: 100vw;
}

.project-full-swiper > .swiper-button-prev,
.project-full-swiper > .swiper-button-next {
  position: fixed;
  top: 0;
  bottom: 0;
  z-index: 5;
  display: block;
  width: 50vw;
  height: var(--project-page-height);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: transparent;
  opacity: 1 !important;
  pointer-events: auto !important;
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

.project-full-swiper > .swiper-button-prev {
  left: 0;
  right: auto;
  cursor: w-resize;
}

.project-full-swiper > .swiper-button-next {
  right: 0;
  left: auto;
  cursor: e-resize;
}

.project-full-swiper > .swiper-button-prev::after,
.project-full-swiper > .swiper-button-next::after { display: none; content: ""; }

@media (hover: none), (pointer: coarse) {
  .project-full-swiper > .swiper-button-prev,
  .project-full-swiper > .swiper-button-next {
    pointer-events: none !important;
  }
}


.project-full-swiper.swiper-initialized .project-full-track {
  transition-timing-function: cubic-bezier(0.365, 0.220, 0.000, 0.995);
}

/* Mobile: normal scroll page, no swiper interaction ----------------------- */
@media (max-width: 700px) {
  html.is-project-page,
  html.is-project-page body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
  }

  html.is-project-page::-webkit-scrollbar,
  html.is-project-page body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  html.is-project-page body { touch-action: auto; }

  html.is-project-page .site-header,
  html.is-project-page .site-header * { touch-action: pan-y; }

  .project-page-app,
  .project-page-stage,
  .project-full-project-stage,
  .project-full-swiper {
    height: auto;
    min-height: 100svh;
    overflow: visible;
  }

  body[data-project-page-type="fullProject"] .project-page-app,
  body[data-project-page-type="fullProject"] .project-page-stage {
    overflow: visible;
  }

  .project-page-info,
  .project-page-video-controls {
    width: 100vw;
    max-width: 100vw;
  }

  .project-page-details {
    width: 100%;
    max-width: 100%;
  }

  .project-full-swiper {
    overflow: visible;
  }

  .project-full-track {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    align-items: start;
    gap: 0;
    height: auto;
    min-height: 0;
    transform: none !important;
    transition: none !important;
    will-change: auto;
  }

  .project-full-slide {
    grid-column: span var(--project-mobile-span, 2);
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible;
  }

  .project-full-video-frame {
    width: 100%;
    height: auto;
    max-width: 100%;
  }

  .project-full-slide img,
  .project-full-slide video {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
  }

  .project-full-swiper > .swiper-button-prev,
  .project-full-swiper > .swiper-button-next {
    display: none !important;
  }

  .project-page-info-row {
    gap: 0px 
  }

}
