/* A lamp's project page (project-page.js) — Figma 1526:7313.
   Pictures sit 10px in from the sides with 10px between them; the title block
   puts AMO at 50px and the first picture at 149.5px. */

/* Positioned, but with no z-index of its own: the picture that flies in over
   the canvas has to share the canvas's stacking context to be drawn above it. */
#project-page {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 0 10px 10px;
  color: #161616;
}

.pp-head {
  box-sizing: border-box;
  height: 149.5px;
  padding-top: 50px;
  text-align: center;
}

.pp-title {
  margin: 0;
  font: 400 24px/29px "Neue Haas Display", ui-sans-serif, system-ui, sans-serif;
  text-transform: uppercase;
}

.pp-sub {
  margin: 0;
  font: 400 18px/21px "Teodor", Georgia, serif;
}

.pp-blocks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pp-image {
  position: relative;
  margin: 0;
  background: #fafafa;
}

/* The picture is its own layer inside the block so it can be lifted out and
   flown while the block keeps its place in the page. */
.pp-pic {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.pp-pic img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
}

.pp-night { opacity: 0; }
.pp-mirror img { transform: scaleX(-1); }

.pp-text {
  margin: 40px auto;
  max-width: 694px;
  font: 300 24px/1.3 "Teodor", Georgia, serif;
  text-align: center;
}

/* Arriving, everything but the first picture waits for it to land; leaving,
   it clears out of the way first. */
#project-page .pp-head,
#project-page .pp-blocks > :not(:first-child) {
  transition: opacity 0.6s ease 0.35s;
}
#project-page.pp-arriving .pp-head,
#project-page.pp-arriving .pp-blocks > :not(:first-child),
#project-page.pp-leaving .pp-head,
#project-page.pp-leaving .pp-blocks > :not(:first-child) {
  opacity: 0;
}
#project-page.pp-leaving .pp-head,
#project-page.pp-leaving .pp-blocks > :not(:first-child) {
  transition: opacity 0.25s ease;
}

/* The home page's furniture stays at home: the corner labels, the runtime's
   mark and the backdrop-filter glass. BACK is the shared nav link at the
   bottom (#fx-nav, effects.css). */
:root.fx-project #container [data-fx-side],
:root.fx-project #fx-labels,
:root.fx-project [data-fx-logo-wrap],
:root.fx-project .fx-glass {
  display: none !important;
}

/* Flying back home the address is already home's, so the link would read
   ABOUT for the length of the flight; it leaves with the rest of the page. */
:root.fx-project-leaving #fx-nav {
  opacity: 0;
  transition: opacity 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  #project-page .pp-head,
  #project-page .pp-blocks > :not(:first-child) {
    transition-duration: 0.1s;
    transition-delay: 0s;
  }
}
