/* =========================================================
   Jory&Co — Project detail (case study) page
   Builds on main.css (tokens, nav, buttons, project cards, ticker, footer)
   Figma: Design AW (Updated) › Work Detail_A (7237:15991)
   ========================================================= */

.page-detail .main { background: var(--black); }
.cs { position: relative; padding: 156px 20px 0; }   /* nav 36 + 100 gap, inside the 20px frame */
.cs .hero__bar { position: absolute; }

[data-lines] { display: flow-root; }
[data-lines] .line { display: block; overflow: hidden; padding: .16em .08em .26em; margin: -.16em -.08em -.26em; }
[data-lines] .line + .line { margin-top: -.42em; } /* adjoining line margins collapse (-.26 vs -.16): restore the full overlap so a multi-line heading keeps its height */
[data-lines] .line__inner { display: block; will-change: transform, opacity; }
html.js .page-detail [data-fade] { opacity: 0; }
html.js .page-detail .cs-title { visibility: hidden; }

/* ---------- Media blocks (16:9, Figma 1400 × 787.5) ---------- */
.cs-media {
  position: relative; margin: 0;
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #111; isolation: isolate;
}
.cs-media__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.cs-media .project__vimeo { z-index: 1; }
.cs-hero { aspect-ratio: 1400 / 785.44; }

/* ---------- Info (Figma 7237:16002: 280 | 75 | 280 | 75 | 690) ---------- */
.cs-info {
  display: grid; grid-template-columns: 280px 280px minmax(0, 690px);
  column-gap: 75px; justify-content: space-between;
  margin-top: 100px;
}
.cs-info__col--client { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.cs-field { display: flex; flex-direction: column; gap: 20px; }
.cs-label {
  font-family: var(--font-mono); font-size: 12px; line-height: 1.4; letter-spacing: 1.2px; text-transform: uppercase;
  opacity: .5;
}
.cs-value { font-size: 17px; line-height: 1.4; }
.cs-info__col--did { display: flex; flex-direction: column; gap: 20px; }
.cs-list { list-style: none; margin: 0; padding: 0; font-size: 17px; line-height: 1.4; }
.cs-info__col--overview { display: flex; flex-direction: column; gap: 30px; }
.cs-title { margin: 0; font-weight: 600; font-size: 30px; line-height: 1.2; }
.cs-intro { display: flex; flex-direction: column; gap: 18px; font-size: 17px; line-height: 1.4; }
.cs-intro p, .acc__body p { margin: 0; }

.cs-link {
  display: inline-flex; align-items: flex-end; gap: 10px; align-self: flex-start;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.2; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--white);
}
.cs-link span { opacity: .5; transition: opacity .3s ease, color .3s ease; }
.cs-link .icon-link { opacity: .5; transition: opacity .3s ease, transform .35s var(--ease-out), color .3s ease; }
.cs-link:hover span, .cs-link:hover .icon-link, .cs-link:focus-visible span { opacity: 1; color: var(--new-green); }
.cs-link:hover .icon-link { color: var(--new-green); }
.icon-link--back { transform: none; }
.cs-link--back:hover .icon-link--back { transform: translateX(-3px); }
.cs-link:hover .icon-link--out { transform: rotate(180deg) scaleY(-1) translate(-2px, 0); }

/* ---------- Accordion (The challenge / idea / outcome) ---------- */
.cs-accordion { display: flex; flex-direction: column; gap: 10px; }
.acc { border-radius: var(--radius); background: var(--white-10); transition: background-color .4s ease; }
.acc:hover { background: rgba(255, 255, 255, 0.13); }
.acc__head { margin: 0; font: inherit; }
.acc__btn {
  appearance: none; background: none; border: 0; color: var(--white); cursor: pointer;
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 15px 20px; text-align: left;
  font-family: var(--font-sans); font-weight: 600; font-size: 20px; line-height: 1;
}
.acc__btn:focus-visible { outline: 1px solid var(--new-green); outline-offset: -1px; border-radius: var(--radius); }
.acc__icon {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--white); color: var(--black);
  display: grid; place-items: center;
  transition: transform .45s var(--ease-out), background-color .3s ease;
}
.acc.is-open .acc__icon { transform: rotate(45deg); }
.acc__btn:hover .acc__icon { background: var(--new-green); }
.acc__panel { overflow: hidden; }
.acc__body { display: flex; flex-direction: column; gap: 18px; padding: 3px 20px 30px; font-size: 17px; line-height: 1.4; }

/* ---------- Gallery ---------- */
.cs-gallery { display: flex; flex-direction: column; gap: 100px; margin-top: 100px; }

/* ---------- Testimonial (Figma 7237:16049) ---------- */
.cs-quote { position: relative; margin-top: 100px; padding-top: 20px; }
.cs-quote::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--white-20); }
.cs-quote__body { margin: 0 auto; width: min(690px, 100%); padding-top: 70px; display: flex; flex-direction: column; gap: 40px; }
.cs-quote__text { margin: 0; font-weight: 600; font-size: 25px; line-height: 1.4; }
.cs-quote__by { display: flex; align-items: center; gap: 10px; }
.cs-quote__avatar {
  width: 60px; height: 60px; border-radius: 50%; flex: none;
  background: var(--new-green); color: var(--black);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 1.2px;
}
.cs-quote__who {
  display: flex; flex-direction: column; gap: 10px;
  font-family: var(--font-mono); font-size: 12px; line-height: 1.2; letter-spacing: 1.2px; text-transform: uppercase;
}
.cs-quote__role { opacity: .5; }

/* ---------- Related projects (Figma Frame 502: 4 × 335) ---------- */
.cs-related { position: relative; margin-top: var(--section-gap); padding-top: 20px; }
.cs-related::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--white-20); }
.cs-related__head { margin-bottom: 20px; }
.cs-related__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.project--sm .project__media { aspect-ratio: 335 / 188; }
.project--sm .project__meta { gap: 20px; }

.cs-cta { padding-bottom: 0; }

@media (max-width: 1180px) {
  .cs-info { grid-template-columns: 1fr 1fr; row-gap: 50px; }
  .cs-info__col--overview { grid-column: 1 / -1; }
  .cs-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 50px; }
}
@media (max-width: 760px) {
  .cs { padding-top: 110px; }
  .cs-info, .cs-gallery, .cs-quote { margin-top: 60px; }
  .cs-gallery { gap: 20px; }
  .cs-info { grid-template-columns: 1fr; }
  .cs-quote__text { font-size: 20px; }
  .cs-quote__body { padding-top: 40px; }
}

/* ---------- Client headline + strapline (left column) ---------- */
.cs-client { display: flex; flex-direction: column; gap: 12px; }
.cs-strap { margin: 0; }

/* ---------- Gallery rhythm: full-width pieces alternate with side-by-side pairs ---------- */
.cs-gallery { gap: 140px; }
.cs-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); align-items: start; }
@media (max-width: 760px) {
  .cs-gallery { gap: 40px; }
  .cs-pair { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- Playable film (click to load the Vimeo player with sound + controls) ---------- */
.cs-film { cursor: pointer; }
.cs-film__play { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; background: rgba(0,0,0,.15); border: 0; padding: 0; cursor: pointer; transition: background-color .4s ease; }
.cs-film__play:hover, .cs-film__play:focus-visible { background: rgba(0,0,0,.35); }
.cs-film__btn { padding: 12px 18px; border-radius: 100px; background: var(--new-green); color: var(--black); transition: transform .4s var(--ease-out); }
.cs-film__play:hover .cs-film__btn { transform: scale(1.06); }
.cs-film__player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 3; }
/* play-film pill: solid triangle before the label (reusable: .cs-film__btn + .cs-film__tri) */
.cs-film__btn { display: inline-flex; align-items: center; gap: 8px; }
.cs-film__tri { flex: none; width: 8px; height: 9px; transform: translateY(-.5px); }
/* bulleted lists inside the challenge / idea / outcome panels */
.acc__list { margin: 0; padding-left: 1.1em; list-style: disc outside; }
.acc__list li { margin-bottom: .5em; }
.acc__list li::marker { color: var(--new-green); }
.acc__list li:last-child { margin-bottom: 0; }
