/* ==========================================================================
   TRANSFORMATIES — page-only styles
   Case 01 Jules (compare slider), Case 02 Gerbert (typographic, red),
   Case 03 Vincent (compare slider), principles, reviews.
   ========================================================================== */

/* ---------- hero stat row ---------- */
.tx-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 22px;
  border-top: 1px solid var(--line-ink);
}
.tx-hero-stats__item { padding: 0 16px 0 0; }
.tx-hero-stats__item + .tx-hero-stats__item { padding-left: 16px; border-left: 1px solid var(--line-ink); }
.tx-hero-stats__num {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(34px, 3.6vw, 56px);
  line-height: 0.9;
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.tx-hero-stats__num sup { font-size: 0.42em; color: var(--red); vertical-align: top; line-height: 1; }
.tx-hero-stats__label { margin-top: 8px; font-size: 13px; line-height: 1.35; color: var(--on-ink-muted); }
@media (max-width: 640px) {
  .tx-hero-stats__label { font-size: 11.5px; }
}

/* ---------- case head ---------- */
.case__head { margin-bottom: clamp(36px, 5vw, 64px); }

/* ---------- case grid (photo + text) ---------- */
.case__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
.case--reverse .case__media { order: 2; }
.case--reverse .case__body { order: 1; }
@media (max-width: 900px) {
  .case__grid { grid-template-columns: 1fr; }
  .case--reverse .case__media,
  .case--reverse .case__body { order: initial; }
}

.case__body { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.case__name { font-size: clamp(64px, 8.4vw, 160px); line-height: 0.84; }
.case__weeks {
  display: inline-block;
  color: var(--red);
  padding: 6px 0;
}
.case__goal { color: var(--on-ink-muted); font-size: clamp(17px, 1.3vw, 19px); max-width: 46ch; }
.case__summary {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(20px, 1.7vw, 25px);
  line-height: 1.3;
  max-width: 48ch;
}
.case__metrics { width: 100%; margin-top: 4px; }

/* ---------- metrics (shared by Jules & Gerbert) ---------- */
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-ink); }
.metric { padding-top: 18px; }
.metric + .metric { padding-left: 16px; border-left: 1px solid var(--line-ink); }
.metric__v { font-family: var(--f-display); font-weight: 900; font-size: clamp(32px, 3.4vw, 52px); line-height: 0.9; }
.metric__v small { font-size: 0.42em; margin-left: 3px; color: var(--on-ink-muted); font-weight: 800; }
.metric__k { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-ink-faint); margin-top: 6px; }

/* ---------- compare slider (before / after) ---------- */
.compare {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-3);
  --pos: 50%;
}
.compare__before,
.compare__after {
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  background-size: 200% auto;
  filter: grayscale(1) contrast(1.08);
}
.compare__before { background-position: 0% 10%; }
.compare__after {
  background-position: 100% 10%;
  clip-path: inset(0 0 0 var(--pos));
}
.compare__line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: var(--on-ink);
  z-index: 2;
  pointer-events: none;
}
.compare__knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.compare__knob::before,
.compare__knob::after {
  content: "";
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}
.compare__knob::before { border-right: 6px solid var(--ink); }
.compare__knob::after { border-left: 6px solid var(--ink); }
.compare__tag {
  position: absolute;
  z-index: 2;
  top: 14px;
  padding: 7px 10px 6px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 11px;
  letter-spacing: 0.1em;
  pointer-events: none;
}
.compare__tag--before { left: 14px; }
.compare__tag--after { right: 14px; }
.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
}

/* ---------- Case 02 — typographic (no photo), red section ---------- */
.section--red {
  background: var(--red);
  color: var(--ink);
}
.section--red .eyebrow { color: rgba(11, 11, 10, 0.66); }
.section--red .eyebrow::before { background: var(--ink); }
.section--red .case__weeks { color: var(--ink); }
.section--red .case__goal { color: rgba(11, 11, 10, 0.72); }
.section--red .metrics,
.section--red .metric + .metric { border-color: rgba(11, 11, 10, 0.24); }
.section--red .metric__v small,
.section--red .metric__k { color: rgba(11, 11, 10, 0.62); }
.section--red ::selection { background: var(--ink); color: var(--red); }

.case-type__hero {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(120px, 19vw, 320px);
  line-height: 0.76;
  letter-spacing: -0.03em;
  margin: clamp(12px, 2vw, 24px) 0 clamp(40px, 5vw, 72px);
}
.case-type__hero small { font-size: 0.24em; letter-spacing: 0; margin-left: 0.12em; }
.case-type__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.case-type__grid .case__goal { max-width: 34ch; }
@media (max-width: 900px) {
  .case-type__grid { grid-template-columns: 1fr; }
}

/* ---------- principles (paper, big numbers) ---------- */
.principles__head { max-width: 60ch; margin-bottom: clamp(48px, 6vw, 88px); }
.principles__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-paper);
}
.principle { padding: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 32px) 0 0; }
.principle + .principle { border-left: 1px solid var(--line-paper); padding-left: clamp(20px, 2.4vw, 36px); }
.principle__n {
  display: block;
  font-weight: 900;
  font-size: clamp(64px, 7vw, 112px);
  line-height: 0.8;
  color: var(--paper-3);
  margin-bottom: 14px;
}
.principle__title { font-size: clamp(20px, 1.6vw, 24px); font-weight: 700; line-height: 1.3; margin-bottom: 12px; max-width: 22ch; }
.principle__body { color: var(--on-paper-muted); font-size: 15.5px; line-height: 1.6; max-width: 34ch; }
@media (max-width: 900px) {
  .principles__list { grid-template-columns: 1fr; }
  .principle + .principle { border-left: 0; border-top: 1px solid var(--line-paper); padding-left: 0; margin-top: 8px; }
}

/* ---------- reviews (layout borrowed from home.css, review copy in styles.css) ---------- */
.reviews__grid { display: grid; grid-template-columns: 340px 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.score { position: sticky; top: calc(var(--nav-h) + 32px); display: grid; gap: 18px; }
.score__big { font-family: var(--f-display); font-weight: 900; font-size: clamp(120px, 14vw, 200px); line-height: 0.78; letter-spacing: -0.03em; }
.score__big span { color: var(--red); }
.score__meta { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--on-ink-muted); }
.review-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 2vw, 24px); }
.review-cards .review:nth-child(2) { transform: translateY(clamp(0px, 5vw, 56px)); }
.review__lead { font-family: var(--f-serif); font-style: italic; font-size: clamp(24px, 2.1vw, 32px); line-height: 1.12; }
.review__txt { color: var(--on-ink-muted); font-size: 16px; line-height: 1.6; }
.review--accent { background: var(--paper); color: var(--on-paper); border-color: var(--paper); }
.review--accent .review__txt { color: var(--on-paper-muted); }
.review--accent figcaption { border-color: var(--line-paper); }
.review--accent .review__meta { color: var(--on-paper-muted); }
@media (max-width: 1000px) {
  .reviews__grid { grid-template-columns: 1fr; }
  .score { position: static; grid-template-columns: auto 1fr; align-items: end; }
}
@media (max-width: 680px) {
  .review-cards { grid-template-columns: 1fr; }
  .review-cards .review:nth-child(2) { transform: none; }
  .score { grid-template-columns: 1fr; }
}

/* Gerbert: giant number left, story right */
.case-type__layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: end; margin-top: clamp(24px, 3vw, 40px); }
.case-type__layout .case-type__hero { margin: 0; font-size: clamp(120px, 21vw, 340px); }
.case-type__body { display: grid; gap: 20px; }
.case-type__who { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.case-type__body .case__summary { margin: 0; font-size: clamp(22px, 1.9vw, 28px); line-height: 1.25; max-width: 30ch; }
.case-type__body .metrics { margin-top: 4px; }
.weeks { display: grid; grid-template-columns: repeat(24, 1fr); gap: 4px; align-items: end; height: 64px; }
.weeks i { display: block; background: var(--ink); height: calc(30% + var(--h) * 70%); transform-origin: bottom; transform: scaleY(0); transition: transform 0.8s var(--ease); transition-delay: calc(var(--n) * 35ms + 300ms); }
.is-in .weeks i { transform: scaleY(1); }
.weeks-legend { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(11, 11, 10, 0.6); margin-top: 8px; }
@media (max-width: 900px) { .case-type__layout { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .case-type__body .metric__v { font-size: 32px; }
  .case-type__body .metric + .metric { padding-left: 12px; }
}
