/* ==================================================================
   3DMG EXPLORATIONS — additions on top of the shared case-study
   layout in css/skateboard.css (sk-*). Each concept carries its own
   set colour in --x3-tone (lavender / teal / olive), taken from the
   Cinema 4D backdrops.
   ================================================================== */

.x3-page { --x3-tone: var(--sk-dark); }

/* long concept titles: one size down from the skateboard chapters so they stay on one line */
.x3-page .sk-chapter h2,
.x3-page .sk-chapter__num { font-size: clamp(2rem, 0.8rem + 3.8vw, 4.5rem); }

/* work-in-progress tag above the hero title */
.x3-wip {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.85);
}

/* media bands tinted with the concept's set colour */
.sk-band.x3-tone { background: color-mix(in srgb, var(--x3-tone) 22%, var(--sk-dark)); }
.sk-band.x3-tone figcaption { color: rgba(237, 237, 234, 0.6); }

.x3-loop {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #000;
}

/* process strip — five steps, left to right, last one in accent */
.x3-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
  margin: 0;
  padding: clamp(28px, 4vw, 48px) 0 clamp(16px, 2vw, 24px);
  list-style: none;
}
.x3-strip figure { margin: 0; }
.x3-strip img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--sk-line);
}
.x3-strip figcaption {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--sk-line);
}
.x3-strip img.is-portrait { object-fit: contain; background: #111; }
.x3-strip .is-final figcaption { color: var(--sk-accent); border-top-color: var(--sk-accent); }

/* need + love + dislike = life balance */
.x3-sum {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr);
  gap: clamp(8px, 1.2vw, 16px);
  align-items: end;
  margin: 0;
  padding: clamp(40px, 5vw, 64px) 0 0;
  list-style: none;
}
.x3-sum img,
.x3-sum video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.x3-sum span {
  display: block;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 2px solid var(--x3-tone);
}
.x3-sum__result span { border-top-color: var(--sk-accent); color: var(--sk-ink); }

/* timeline — one bar per set, width = its frame count */
.x3-timeline {
  display: flex;
  margin: clamp(32px, 4vw, 48px) 0 clamp(40px, 5vw, 64px);
  padding: 0;
  list-style: none;
}
.x3-timeline li {
  flex: var(--x3-len) 1 0;
  min-width: 0;
  padding: 44px 10px 8px;
  background: var(--x3-tone);
  color: #fff;
}
.x3-timeline li + li { border-left: 2px solid var(--sk-bg); }
.x3-timeline b {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.x3-timeline .sk-mono { color: rgba(255, 255, 255, 0.8); }

/* behind the scenes — 2 × 2 viewport grid */
.x3-bts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
  margin: 0;
  padding: clamp(40px, 5vw, 64px) 0 0;
  list-style: none;
}
.x3-bts figure,
.x3-compare figure { margin: 0; }
.x3-bts img,
.x3-compare img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.x3-bts figcaption,
.x3-compare figcaption { margin-top: 8px; }

/* scene structure + facts */
.x3-scene {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: clamp(20px, 3vw, 40px);
  padding: clamp(40px, 5vw, 64px) 0;
}
.x3-scene > * { min-width: 0; }   /* let the code block scroll instead of widening the page */
.x3-tree {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  background: var(--sk-dark);
  color: var(--sk-light);
  font-size: 0.6875rem;
  line-height: 1.75;
  text-transform: none;
}
.x3-facts { display: grid; gap: 18px; margin: 0; align-content: start; }
.x3-facts div { border-top: 1px solid var(--sk-ink); padding-top: 8px; }
.x3-facts dt { margin-bottom: 6px; }
.x3-facts dd { margin: 0; font-size: 0.875rem; line-height: 1.5; }

/* before / after */
.x3-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(8px, 1.2vw, 16px);
  margin: 0;
  padding: 0 0 clamp(56px, 7vw, 96px);
  list-style: none;
}

/* ------------------------------------------------------------------
   Tablet + phone
   ------------------------------------------------------------------ */
@media (max-width: 900px) {
  .x3-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 20px; }
  .x3-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .x3-sum__result { grid-column: 1 / -1; }
  .x3-scene { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .x3-hero h1 { font-size: clamp(3.5rem, 1rem + 13vw, 5.5rem); }   /* the title is longer than "Skateboard" */
  .x3-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .x3-strip li:last-child { grid-column: 1 / -1; }
  .x3-timeline { flex-direction: column; }
  .x3-timeline li { padding-top: 16px; }
  .x3-timeline li + li { border-left: 0; border-top: 2px solid var(--sk-bg); }
  .x3-bts, .x3-compare { grid-template-columns: 1fr; }
}
