/* Project detail pages — Trionn work-page layout (used with about.css).
   Sticky left rail (back link, title, services, tabbed story, prev/next)
   while only the right media column scrolls; rail releases into the footer. */

/* ---- split ---- */
.pj-split {
  display: grid;
  grid-template-columns: minmax(320px, 34%) 1fr;
  align-items: start;
}

/* ---- left rail (sticky = stays put while media scrolls) ---- */
.pj-rail {
  position: sticky;
  top: 0;
  /* min-height, not height: between 901px and ~1100px the split is still
     two columns and this rail is squeezed to its 320px minimum, so the copy
     wraps tall enough to exceed the viewport. With a fixed height the panel
     text simply overflowed the box and ran straight through the CTA block
     that margin-top:auto pins to the bottom - measured at 143-183px of
     overlap across all six project pages. Letting the rail grow keeps the
     bottom-pinned behaviour whenever there is spare room and removes the
     collision when there is not. */
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 13vh 2.6vw 4.5vh 3vw;
}

.pj-back {
  font-family: var(--af-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--af-ink-l);
  text-decoration: none;
  display: block;
}
.pj-back .af-arrow { color: var(--af-green); display: inline-block; transform: rotate(180deg); }
.pj-back:hover { color: var(--af-green); }
.pj-rail-rule { height: 1px; background: var(--af-line-l); margin: 2.2vh 0 4.2vh; }

.pj-title {
  font-size: clamp(30px, 2.6vw, 44px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.pj-desc {
  margin-top: 1.6vh;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--af-soft-l);
  max-width: 34ch;
}
.pj-svcs { margin-top: 3.4vh; }
.pj-svc {
  font-size: 14px;
  line-height: 1.75;
  color: #d3d3d3;
}
.pj-svc::before { content: "\00b7  "; color: var(--af-green); }

/* tabs */
.pj-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6em;
  margin-top: 6vh;
}
.pj-tab {
  appearance: none;
  background: none;
  border: none;
  padding: 0 0 6px;
  cursor: pointer;
  font-family: var(--af-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--af-soft-l);
  position: relative;
  transition: color 0.35s ease;
}
.pj-tab::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--af-green);
  transition: right 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.pj-tab.pj-on { color: var(--af-ink-l); }
.pj-tab.pj-on::after { right: 0; }
.pj-tab:hover { color: var(--af-ink-l); }

/* stacked panels crossfade in one grid cell */
.pj-panels { display: grid; margin-top: 3vh; min-height: 0; }
.pj-panel {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.19, 1, 0.22, 1);
  pointer-events: none;
  font-size: 14.5px;
  line-height: 1.62;
  color: #c9c9c9;
}
.pj-panel.pj-on { opacity: 1; transform: none; pointer-events: auto; }
.pj-panel ul { list-style: none; margin: 0; padding: 0; }
.pj-panel li { padding-left: 1.1em; position: relative; }
.pj-panel li + li { margin-top: 0.9em; }
.pj-panel li::before { content: "\00b7"; position: absolute; left: 0; color: var(--af-green); }

/* view link + prev/next pinned to the rail bottom */
.pj-view {
  margin-top: auto;
  padding-top: 4vh;
  align-self: flex-start;
  font-family: var(--af-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pj-pn {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 4.5vh;
  padding-top: 2.6vh;
  border-top: 1px solid var(--af-line-l);
}
.pj-pn a {
  font-family: var(--af-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--af-ink-l);
  text-decoration: none;
  transition: color 0.3s ease;
}
.pj-pn a:hover { color: var(--af-green); }

/* ---- right media column (the only part that scrolls) ---- */
.pj-media {
  display: grid;
  gap: 2vw;
  padding: 2.4vw 2.4vw 2.4vw 0;
  box-sizing: border-box;
}
/* start the media lower so a bright cover doesn't sit behind the fixed nav */
.pj-media.pj-top { padding-top: 13vh; }

/* SecondMate "Desktop & Mobile Showcase" — a transparent device-frame PNG
   (sm-frame, carries the logo/bezels) layered z-order over an animated
   tablet crossfade + phone vertical slide, with a two-row marquee below.
   All motion is pure CSS keyframes (reduced-motion guarded). */
.sm-showcase { line-height: 0; }
.smx-shot {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  line-height: 0;
  background: #000;
}
.smx-frame { position: relative; z-index: 2; display: block; width: 100%; }
.scr { position: absolute; z-index: 1; overflow: hidden; }
.scr-tab { left: 27.6%; top: 5.03%; width: 48.85%; height: 15.47%; }
.scr-ph  { left: 79.75%; top: 4.97%; width: 17.0%; height: 15.98%; }
.scr-strip {
  display: flex; height: 100%; width: 800%;
  animation: scrslide 16s cubic-bezier(.66, 0, .34, 1) infinite;
}
.scr-strip img { flex: 0 0 12.5%; width: 12.5%; height: 100%; object-fit: cover; display: block; }
.scr-f {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0;
  animation: fadecycle 15s linear infinite;   /* 3 tablet slides, 5s each */
}
.scr-f2 { animation-delay: 5s; }
.scr-f3 { animation-delay: 10s; }
.mrq { position: absolute; z-index: 3; left: 0; top: 71.32%; width: 100%; height: 27.76%; overflow: hidden; }
.mrow { position: absolute; left: 0; height: 40%; display: flex; gap: 16px; width: max-content; align-items: center; }
.mrow-l { top: 6.5%; animation: mrqslide 45s linear infinite; }
.mrow-r { bottom: 6.5%; animation: mrqslide 45s linear infinite reverse; }
.mrow img { height: 100%; width: auto; border-radius: 14px; display: block; flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .06); }
@keyframes scrslide {
  0%, 18% { transform: translateX(0); }
  25%, 43% { transform: translateX(-12.5%); }
  50%, 68% { transform: translateX(-25%); }
  75%, 93% { transform: translateX(-37.5%); }
  100% { transform: translateX(-50%); }
}
@keyframes fadecycle { 0% { opacity: 0; } 5% { opacity: 1; } 33% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
@keyframes mrqslide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .scr-strip { animation: none; }
  .scr-f { animation: none; }
  .scr-f1 { opacity: 1; }
  .mrow { animation: none; }
}
/* Whiterock shots size to their own aspect-ratio (set inline per image)
   so each fits exactly with no crop, whatever its proportions */
.pj-media.pj-top .pj-shot { height: auto; }
.pj-shot {
  position: relative;
  height: 92vh;
  border-radius: 10px;
  overflow: hidden;
  background: #0c0c0c;
}
.pj-shot img, .pj-shot video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.19, 1, 0.22, 1);
}
.pj-shot:hover img, .pj-shot:hover video { transform: scale(1.03); }
.pj-shot.pj-fit img { object-fit: contain; padding: 5%; box-sizing: border-box; }

/* first media gets the clip reveal on load */
.pj-shot.pj-first {
  clip-path: inset(0 0 100% 0 round 10px);   /* round: keep the corner radius during the reveal */
  transition: clip-path 1.2s cubic-bezier(0.65, 0, 0.35, 1);
}
.pj-shot.pj-first.af-in { clip-path: inset(0 0 0% 0 round 10px); }
.pj-story { min-width:0; margin:0; }

/* ---- footer (rail releases here) ---- */

@media (max-width: 900px) {
  .pj-split { grid-template-columns: 1fr; }
  .pj-rail {
    position: static;
    height: auto;
    padding: 14vh 7vw 4vh;
  }
  .pj-view { margin-top: 5vh; }
  .pj-media { padding: 0 5vw 6vh; gap: 4vw; }
  .pj-shot { height: 58vh; }
      }
