/* ── Case Study — layout and components ── */
/* Depends on global.css for tokens, reset, nav, page wrapper, footer. */

:root {
  /* 3-col grid — Norm 1:2:1 ratio */
  --col-gap: 48px;
}

body { line-height: 1.75; }

/* ── Hero ── */
.hero { padding: 96px 0 64px; text-align: left; }
.hero-eyebrow {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 400;
  letter-spacing: 0.04em; color: var(--text-3); margin-bottom: 24px;
}
.hero-title {
  font-family: var(--serif); font-size: clamp(2.5rem, 4vw, 3.5rem); font-weight: 400;
  color: var(--text); letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 24px;
  max-width: 900px;
}
.hero-subhead {
  font-family: var(--sans); font-size: 1rem; font-weight: 400;
  color: var(--text-2); line-height: 1.55; max-width: 720px;
  letter-spacing: -0.005em;
}
.hero-subhead em { font-style: italic; font-family: var(--serif); }

/* ── Hero image ── */
.hero-img { padding-bottom: 64px; border-bottom: 1px solid var(--rule-s); }
.hero-img img { width: 100%; border-radius: var(--radius); }
.hero-cap { font-family: var(--sans); font-size: 0.8125rem; color: var(--text-3); line-height: 1.5; margin-top: 12px; }

/* ── Content intro: 3-col grid — Norm 1:2:1 ── */
.content-intro {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  column-gap: var(--col-gap);
  row-gap: 56px;
  padding: 64px 0;
  border-bottom: 1px solid var(--rule-s);
  align-items: start;
}
.intro-label-problem   { grid-column: 1; grid-row: 1; padding-top: 2px; }
.intro-problem         { grid-column: 2; grid-row: 1; }
.intro-label-objective { grid-column: 1; grid-row: 2; padding-top: 2px; }
.intro-objective       { grid-column: 2; grid-row: 2; }
.intro-meta            { grid-column: 3; grid-row: 1 / 3; font-family: var(--sans); }

.meta-item { margin-bottom: 28px; }
.meta-item:last-child { margin-bottom: 0; }
.meta-label { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.02em; color: var(--text-3); margin-bottom: 6px; }
.meta-value { font-family: var(--mono); font-size: 0.8125rem; color: var(--text-2); line-height: 1.4; }

/* ── Shared text elements ── */
.section-label {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 400;
  letter-spacing: 0.02em; color: var(--text);
}
.epigraph { font-style: italic; font-size: 1.0625rem; line-height: 1.55; color: var(--text); font-family: var(--serif); }
.epigraph + .body-text { margin-top: 36px; }
.body-text { font-family: var(--sans); font-size: 0.9375rem; color: var(--text); line-height: 1.65; letter-spacing: -0.003em; }
.body-text + .body-text { margin-top: 28px; }
.body-text em { font-style: italic; font-family: var(--serif); }
.objective-text { font-family: var(--sans); font-size: 1rem; color: var(--text); line-height: 1.6; letter-spacing: -0.005em; }

/* ── Experience section ── */
.experience-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--rule-s);
}
.experience-section > .section-label {
  display: block;
  width: 25%;
  margin-bottom: 24px;
}
.experience-block {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  column-gap: var(--col-gap);
  row-gap: 20px;
  align-items: start;
}
.experience-block + .experience-block { margin-top: 96px; }
.exp-heading {
  grid-column: 2;
  font-family: var(--serif); font-size: 1.5rem; font-weight: 400;
  color: var(--text); letter-spacing: -0.015em; line-height: 1.25;
}
.exp-body { grid-column: 2; }

.exp-media-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  column-gap: var(--col-gap);
  align-items: start;
  margin-top: 40px;
}
.exp-images { grid-column: 1 / -1; }
.exp-images > .img-wrap:first-child { margin-top: 0; }

.objective-text + .signals-list { margin-top: 36px; }

/* ── Pull quote ── */
.pull-quote {
  margin: 64px auto 48px;
  text-align: center;
  max-width: 640px;
  font-family: var(--serif); font-size: 1.375rem;
  font-style: italic; color: var(--text-3); line-height: 1.65;
}

/* ── Screen pair: desktop dominant, centered ── */
.screen-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 20px;
}
.screen-pair > picture:first-child,
.screen-pair > img:first-child { width: 78%; flex-shrink: 0; }
.screen-pair > picture:first-child img,
.screen-pair > img:first-child {
  width: 100%;
  border-radius: var(--radius);
}
.screen-pair > picture:last-child,
.screen-pair > img:last-child { width: 18%; flex-shrink: 0; }
.screen-pair > picture:last-child img,
.screen-pair > img:last-child {
  width: 100%;
  border-radius: 28px;
}
.screen-pair-caption {
  font-family: var(--sans); font-size: 0.8125rem;
  color: var(--text-3); line-height: 1.5; margin-top: 12px;
  text-align: center;
}
.exp-images .screen-pair ~ .screen-pair { margin-top: 48px; }

/* ── Single image ── */
.img-wrap { margin-top: 40px; }
.img-wrap img { width: 100%; border-radius: var(--radius); }
.img-caption { font-family: var(--sans); font-size: 0.8125rem; color: var(--text-3); line-height: 1.5; margin-top: 12px; }

/* ── Framework / flow shared treatments ── */
.framework-wrap { margin-top: 32px; }
.framework-wrap img { width: 100%; border-radius: var(--radius); }

/* ── Lightbox hover — shared across all zoomable images ── */
.exp-images img,
.framework-wrap img,
.flow-step img,
.img-wrap img,
.detail-wrap img,
.diagram-wrap img,
.panel-item img {
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.exp-images img:hover,
.framework-wrap img:hover,
.flow-step img:hover,
.img-wrap img:hover,
.detail-wrap img:hover,
.panel-item img:hover {
  transform: scale(1.015);
  box-shadow: 0 6px 28px rgba(56,56,57,0.13);
}
.diagram-wrap img:hover {
  transform: scale(1.004);
  box-shadow: 0 4px 20px rgba(56,56,57,0.1);
}

/* ── Closing sections: 3-col grid — Norm 1:2:1 ── */
.closing-section {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  column-gap: var(--col-gap);
  padding: 64px 0;
  border-bottom: 1px solid var(--rule-s);
  align-items: start;
}
.closing-section:last-of-type { border-bottom: none; }
.closing-section > .section-label { grid-column: 1; padding-top: 2px; }
.closing-section > .closing-body  { grid-column: 2; }

/* Next-project link inside closing-section */
.closing-section .next-link {
  font-family: var(--sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.15s;
}
.closing-section .next-link:hover { opacity: 0.6; }
.closing-section--next { border-top: 1px solid var(--rule-s); padding-top: 48px; }

/* ── Research signals ── */
.signals-list { display: flex; flex-direction: column; }
.signal-row { display: flex; align-items: baseline; gap: 24px; padding: 16px 0; border-bottom: 1px solid var(--rule-s); }
.signal-value { font-family: var(--sans); font-size: 2rem; font-weight: 500; letter-spacing: -0.03em; color: var(--text); min-width: 72px; flex-shrink: 0; }
.signal-label { font-family: var(--sans); font-size: 0.9375rem; color: var(--text-2); line-height: 1.5; letter-spacing: -0.003em; }

/* ── Flow sequence (Balance) ── */
.flow-sequence {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.flow-step { border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.flow-step img { width: 100%; }
.flow-label { padding: 12px 16px; font-family: var(--sans); font-size: 0.8125rem; color: var(--text-2); border-top: 1px solid var(--rule-s); }
.flow-number { font-family: var(--sans); font-size: 0.6875rem; color: var(--text-3); margin-right: 8px; letter-spacing: 0.04em; }

/* ── Case Manager specifics ── */
.panel-row {
  grid-column: 1 / -1;
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.panel-item img {
  width: 100%;
  border-radius: var(--radius);
}
.panel-label {
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); margin-top: 12px; margin-bottom: 4px;
}
.panel-caption { font-family: var(--sans); font-size: 0.8125rem; color: var(--text-3); line-height: 1.5; }

.diagram-col { grid-column: 1 / -1; margin-top: 40px; }
.diagram-col .diagram-wrap { max-width: 960px; margin: 0 auto; }
.diagram-wrap svg,
.diagram-wrap img { width: 100%; height: auto; display: block; border-radius: 6px; }
.diagram-heading {
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text); margin-bottom: 28px;
}
.diagram-caption { font-family: var(--sans); font-size: 0.8125rem; color: var(--text-3); line-height: 1.5; margin-top: 20px; }

.detail-wrap {
  margin-top: 40px;
  padding: 48px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--rule-s);
}
.detail-wrap img {
  width: 100%; max-width: 720px; display: block;
  margin: 0 auto; border-radius: 6px;
}

/* Edge-to-edge breakout */
.img-wrap.breakout { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
.img-wrap.breakout img { border-radius: 0; border: none; box-shadow: none; }

/* ── Lightbox overlay ── */
.lb-overlay {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(30,28,24,0.88);
  align-items: center; justify-content: center;
  cursor: zoom-out;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.lb-overlay img {
  max-width: 90vw; max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.36);
  display: block; pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .content-intro {
    grid-template-columns: 1fr;
    row-gap: 24px;
  }
  .intro-label-problem, .intro-problem,
  .intro-label-objective, .intro-objective, .intro-meta {
    grid-column: 1 !important;
    grid-row: auto !important;
  }
  .experience-section > .section-label { width: auto; margin-bottom: 40px; }
  .experience-block {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }
  .exp-heading, .exp-body { grid-column: 1; }
  .exp-media-pair {
    grid-column: 1;
    grid-template-columns: 1fr;
    row-gap: 16px;
  }
  .exp-images { grid-column: 1; }
  .closing-section {
    grid-template-columns: 1fr;
    row-gap: 16px;
  }
  .closing-section > .section-label,
  .closing-section > .closing-body { grid-column: 1 !important; }
  .panel-row { grid-template-columns: 1fr; }
  .diagram-col { grid-column: 1; }
}

@media (max-width: 768px) {
  .screen-pair { flex-direction: column; align-items: center; }
  .screen-pair > picture:first-child,
  .screen-pair > img:first-child,
  .screen-pair > picture:last-child,
  .screen-pair > img:last-child { width: 100%; }
  .flow-sequence { grid-template-columns: 1fr; }
  .detail-wrap { padding: 24px; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 1.75rem; }
}
