/* ============================================================
   PolymerFilms — page-specific styles
   Builds on css/case-study.css. Classes are prefixed .pf-.
   Accents come from the client brand (green, blue, teal),
   kept secondary to the portfolio design.
   ============================================================ */

.pf-page {
  --pf-green: #38b060;
  --pf-blue: #0e5a9c;
  --pf-teal: #2aa6c4;
  --cs-gradient: linear-gradient(90deg, #38b060 0%, #2aa6c4 50%, #0e5a9c 100%);
  --cs-accent: #38b060;
}

/* ------ Hero: client logo as the title; translucent film sheets drift behind ------ */
.pf-hero { position: relative; overflow: hidden; }
.pf-hero > .mxd-container { position: relative; z-index: 1; }
.pf-logo-title { margin: 0; padding-bottom: 2.4rem; line-height: 0; }
.pf-logo-title img { display: block; width: 100%; max-width: 52rem; height: auto; }

.pf-films {
  position: absolute;
  top: 0; right: 0;
  width: min(62vw, 96rem);
  height: 64rem;
  z-index: 0;
  pointer-events: none;
  perspective: 1200px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 40%), linear-gradient(180deg, #000 55%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(90deg, transparent 0%, #000 40%), linear-gradient(180deg, #000 55%, transparent 100%);
          mask-composite: intersect;
}
.pf-film {                    /* one thin sheet of film, seen at an angle */
  position: absolute;
  right: -10%;
  width: 90%;
  height: 16rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.10) 45%, rgba(255, 255, 255, 0) 60%),
    linear-gradient(90deg, rgba(56, 176, 96, 0.10), rgba(42, 166, 196, 0.10) 50%, rgba(14, 90, 156, 0.14));
  transform: rotateX(62deg) rotateZ(-14deg);
  transform-origin: center;
  box-shadow: 0 0 40px rgba(42, 166, 196, 0.08);
}
.pf-film--1 { top: 6rem; }
.pf-film--2 { top: 12rem; right: -6%; opacity: 0.9; }
.pf-film--3 { top: 18rem; right: -2%; opacity: 0.8; border-color: rgba(56, 176, 96, 0.35); }
.pf-film--4 { top: 24rem; right: 2%;  opacity: 0.65; }
.pf-film--5 { top: 30rem; right: 6%;  opacity: 0.5; }
@media only screen and (max-width: 767px) {
  .pf-films { width: 110vw; height: 44rem; opacity: 0.7; }
  .pf-film { height: 10rem; }
}
.pf-hero-media .cs-media__frame {
  box-shadow: 0 40px 90px -50px rgba(56, 176, 96, 0.5), 0 30px 80px -50px rgba(14, 90, 156, 0.7);
}

/* ------ Process steps ------ */
.pf-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin: 0; padding: 0;
  list-style: none;
}
@media only screen and (min-width: 768px)  { .pf-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem; } }
@media only screen and (min-width: 1200px) { .pf-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pf-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2.6rem 2rem;
  border: 1px solid var(--cs-line);
  border-radius: var(--cs-radius);
  overflow: hidden;
}
.pf-step::before {            /* progress bar that fills step by step */
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--cs-gradient);
  transform-origin: left center;
  transform: scaleX(var(--pf-fill, 1));
}
.pf-step__num   { color: var(--pf-green); font: normal 600 1.4rem/1 var(--_font-accent); }
.pf-step__title { margin: 0; color: var(--t-bright); font: normal 600 2rem/1.2 var(--_font-default); }
.pf-step__text  { margin: 0; color: var(--t-medium); font: normal 400 1.5rem/1.45 var(--_font-default); }

/* ------ Industry chips ------ */
.pf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0; padding: 0;
  list-style: none;
}
.pf-chip {
  padding: 0.9rem 1.6rem;
  border: 1px solid var(--cs-line);
  border-radius: 10rem;
  color: var(--t-bright);
  font: normal 500 1.5rem/1.2 var(--_font-default);
}
.pf-chip { transition: border-color 0.3s ease, color 0.3s ease; }
.pf-chip:hover { border-color: var(--pf-green); }

/* ------ 07 Resource stage: two chapters on the left, one browser window on the right ------
   Without JS both recordings simply stack; .is-enhanced turns it into a player that shows
   one recording at a time and moves to the next when it ends. */
.pf-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3.2rem;
  align-items: center;
}
@media only screen and (min-width: 1200px) {
  .pf-stage { grid-template-columns: 5fr 7fr; gap: 6rem; }
}
.pf-stage__nav { display: flex; flex-direction: column; border-top: 1px solid var(--cs-line); }

.pf-chapter {
  position: relative;
  display: grid;
  grid-template-columns: 4.4rem 1fr;
  gap: 0 1.6rem;
  width: 100%;
  padding: 2.8rem 0 3rem;
  border: 0;
  border-bottom: 1px solid var(--cs-line);
  background: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.pf-chapter__num {
  color: var(--t-muted);
  font: normal 600 1.4rem/2.6rem var(--_font-accent);
  transition: color 0.4s ease;
}
.pf-chapter__body { display: flex; flex-direction: column; gap: 0.8rem; }
.pf-chapter__title {
  color: var(--t-medium);
  font: normal 600 2.8rem/1.1 var(--_font-default);
  letter-spacing: -0.06rem;
  transition: color 0.4s ease;
}
.pf-chapter__text {
  max-width: 44rem;
  color: var(--t-medium);
  font: normal 400 1.6rem/1.5 var(--_font-default);
}
.pf-chapter__tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.8rem; }
.pf-chapter__tags span {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--cs-line);
  border-radius: 10rem;
  color: var(--t-medium);
  font: normal 500 1.2rem/1.2 var(--_font-default);
}
.pf-chapter__bar {                          /* playback progress, drawn on the chapter's bottom rule */
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  overflow: hidden;
}
.pf-chapter__bar span {
  display: block;
  height: 100%;
  background: var(--cs-gradient);
  transform-origin: left center;
  transform: scaleX(var(--pf-progress, 0));
}
.pf-chapter.is-active .pf-chapter__num,
.pf-chapter.is-active .pf-chapter__title { color: var(--t-bright); }
.pf-chapter.is-active .pf-chapter__num { color: var(--pf-green); }
.pf-chapter:hover .pf-chapter__title { color: var(--t-bright); }
.pf-chapter:focus-visible { outline: 2px solid var(--pf-green); outline-offset: 4px; }
.pf-stage:not(.is-enhanced) .pf-chapter { cursor: default; }
.pf-stage:not(.is-enhanced) .pf-chapter__title { color: var(--t-bright); }

/* browser window */
.pf-stage__screen { display: flex; justify-content: center; }
.pf-window {
  width: 100%;
  max-width: min(100%, 72rem);
  overflow: hidden;
  border-radius: var(--cs-radius);
  background: #0c1a26;
  box-shadow: 0 50px 100px -60px rgba(14, 90, 156, 0.9), 0 30px 60px -40px rgba(56, 176, 96, 0.45);
  transform: translateZ(0);
}
.pf-window__bar {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  height: 4rem;
  padding: 0 1.6rem;
  background: #13293b;
}
.pf-window__dots { display: inline-flex; gap: 0.6rem; }
.pf-window__dots i { width: 1rem; height: 1rem; border-radius: 50%; background: rgba(255, 255, 255, 0.22); }
.pf-window__dots i:first-child { background: var(--pf-green); }
.pf-window__label {
  flex: 1;
  max-width: 28rem;
  padding: 0.5rem 1.2rem;
  border-radius: 10rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font: normal 500 1.2rem/1.2 var(--_font-default);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pf-window__view { position: relative; }
.pf-shot { margin: 0; }
.pf-shot video { display: block; width: 100%; height: auto; aspect-ratio: 1600 / 1446; object-fit: cover; }
.pf-stage:not(.is-enhanced) .pf-shot + .pf-shot { border-top: 1px solid rgba(255, 255, 255, 0.1); }

/* enhanced: one recording at a time, cross-fading */
.pf-stage.is-enhanced .pf-window__view { aspect-ratio: 1600 / 1446; }
.pf-stage.is-enhanced .pf-shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s var(--cs-ease), transform 1.2s var(--cs-ease);
  pointer-events: none;
}
.pf-stage.is-enhanced .pf-shot.is-active { opacity: 1; transform: none; pointer-events: auto; }
.pf-stage.is-enhanced .pf-shot video { height: 100%; }
@media (prefers-reduced-motion: reduce) {
  .pf-stage.is-enhanced .pf-shot { transition: none; transform: none; }
}
@media only screen and (max-width: 1199px) {
  .pf-stage__screen { order: -1; }          /* on smaller screens the window leads, chapters follow */
}

/* ------ Previous-project link ------ */
.pf-prev { display: flex; margin-bottom: 4rem; }
.pf-prev__link {
  display: inline-flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 1.8rem;
  border-left: 2px solid transparent;
  border-image: var(--cs-gradient) 1;
}
.pf-prev__label { color: var(--t-medium); font: normal 600 1.2rem/1.4 var(--_font-accent); text-transform: uppercase; }
.pf-prev__name {
  color: var(--t-bright);
  font: normal 600 2.8rem/1.1 var(--_font-default);
  letter-spacing: -0.06rem;
  transition: color 0.3s ease;
}
.pf-prev__link:hover .pf-prev__name,
.pf-prev__link:focus-visible .pf-prev__name { color: var(--pf-green); }
