/* ============================================================
   homepage-additions.css — styles for the new homepage sections
   and the M2 / M4 / M5 motion additions. Loaded after site.css.
   ============================================================ */

/* ============ CLIENT-PROBLEMS-AS-THINKING (replaces Insights index) ============ */
.problems-thinking {
  background: var(--kilter-ink); color: var(--kilter-chalk);
  padding: 120px 0 160px;
}
.problems-thinking .eyebrow { color: var(--kilter-stone); }
.problems-thinking .headline em { font-style: normal; color: var(--kilter-butter); }

.pt-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 48px; flex-wrap: wrap; margin-bottom: 56px;
}

.pt-row {
  display: grid; gap: 24px; align-items: stretch;
  margin-bottom: 48px;
}
.pt-row-7-5  { grid-template-columns: 7fr 5fr; min-height: 360px; }
.pt-row-4-4-4 { grid-template-columns: repeat(3, 1fr); min-height: 300px; }
.pt-row-5-7  { grid-template-columns: 5fr 7fr; min-height: 380px; }
.pt-row-8-4  { grid-template-columns: 8fr 4fr; min-height: 340px; }

/* Cells house a photo (and its M2 hover-zoom treatment) */
.pt-cell { display: flex; min-height: 0; }
.pt-photo {
  display: block; position: relative; overflow: hidden;
  border-radius: 16px;
  width: 100%; height: 100%; min-height: 100%;
  background: var(--kilter-forest-deep);
  text-decoration: none; color: inherit;
}
.pt-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 700ms var(--ease-kilter);
}
.pt-photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(to top, rgba(15,15,14,0.62), rgba(15,15,14,0));
  pointer-events: none;
}
.pt-photo:hover img { transform: scale(1.06); }
.pt-photo .hzoom-cap {
  position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 2;
  color: rgba(245,242,235,0.96);
  font-family: var(--font-label); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-shadow: 0 1px 12px rgba(0,0,0,0.5);
}
.pt-photo .hzoom-cap .swap { transition: transform 320ms var(--ease-kilter); }
.pt-photo:hover .hzoom-cap .swap { transform: translateX(6px); }

/* Cards — coloured surfaces with text */
.pt-card {
  display: flex; flex-direction: column; gap: 16px;
  border-radius: 16px; padding: 40px;
  height: 100%; min-height: 100%;
}
.pt-card-forest      { background: var(--kilter-forest-deep); color: var(--kilter-chalk); }
.pt-card-forest-deep { background: var(--kilter-forest-deep); color: var(--kilter-chalk);
  border: 1px solid rgba(245,242,235,0.18); }
.pt-card-blush  { background: var(--kilter-blush);  color: var(--kilter-ink); }

/* Latest-thinking article index — sits under the five tensions */
.pt-articles { margin-top: 88px; padding-top: 56px; border-top: 1px solid rgba(245,242,235,0.18); }
.pt-article-list { list-style: none; margin: 0; padding: 0; }
.pt-article { border-top: 1px solid rgba(245,242,235,0.12); }
.pt-article:first-child { border-top: 0; }
.pt-article-link {
  display: grid; grid-template-columns: 52px 190px 1fr 32px; align-items: center; gap: 24px;
  padding: 26px 8px; text-decoration: none; color: var(--kilter-chalk);
  transition: padding-left 360ms var(--ease-kilter);
}
.pt-article-link:hover { padding-left: 20px; }
.pt-article-num {
  font-family: var(--font-display); font-weight: 800; font-size: 17px; color: var(--kilter-stone);
}
.pt-article-kind {
  font-family: var(--font-label); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--kilter-stone);
}
.pt-article-title {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(20px, 2vw, 28px); letter-spacing: -0.01em; line-height: 1.15;
  margin: 0; color: var(--kilter-chalk); transition: color 280ms var(--ease-kilter);
}
.pt-article-link:hover .pt-article-title { color: var(--kilter-butter); }
.pt-article-arrow {
  font-size: 20px; color: var(--kilter-butter); justify-self: end;
  transition: transform 360ms var(--ease-kilter);
}
.pt-article-link:hover .pt-article-arrow { transform: translateX(6px); }
@media (max-width: 760px) {
  .pt-article-link { grid-template-columns: 36px 1fr 24px; gap: 16px; }
  .pt-article-kind { display: none; }
}
.pt-card-ink    { background: var(--kilter-ink);    color: var(--kilter-chalk);
  border: 1px solid rgba(245,242,235,0.22); }
.pt-card-chalk  { background: var(--kilter-chalk);  color: var(--kilter-ink); }

.pt-num {
  font-family: var(--font-label); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.7;
}
.pt-q {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(24px, 2vw, 32px); line-height: 1.08; letter-spacing: -0.01em;
  margin: 0; text-wrap: balance;
}
.pt-q em { font-style: normal; }
.pt-card-forest .pt-q em,
.pt-card-forest-deep .pt-q em,
.pt-card-ink .pt-q em { color: var(--kilter-butter); }
.pt-card-blush .pt-q em { color: var(--kilter-forest); }
.pt-card-chalk .pt-q em { color: var(--kilter-blush); }

.pt-off {
  font-family: var(--font-body); font-size: 15px; line-height: 1.55;
  margin: 0; opacity: 0.85; max-width: 460px;
}
.pt-foot {
  margin-top: auto;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  flex-wrap: wrap;
}
.pt-tag {
  font-family: var(--font-label); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 6px 12px; border: 1px solid currentColor; border-radius: 999px;
  opacity: 0.85;
}
.pt-buyer {
  font-family: var(--font-label); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0.6;
}

/* Evidence block — fills the featured card and backs the claim with data */
.pt-evidence {
  margin-top: 12px;
  padding-top: 28px;
  border-top: 1px solid rgba(245,242,235,0.18);
  display: flex; flex-direction: column; gap: 18px;
  max-width: 480px;
}
.pt-stat { display: flex; align-items: baseline; gap: 18px; }
.pt-evidence-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-label); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid rgba(245,242,235,0.35);
  border-radius: 999px;
  padding: 5px 12px;
  margin-bottom: 16px;
  opacity: 0.85;
}
.pt-stat-num {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(48px, 4.6vw, 72px); line-height: 0.9; letter-spacing: -0.02em;
  color: var(--kilter-butter); flex: none;
}
.pt-stat-label {
  font-family: var(--font-body); font-size: 14px; line-height: 1.5;
  opacity: 0.88;
}
.pt-evidence-body {
  font-family: var(--font-body); font-size: 14px; line-height: 1.6;
  margin: 0; opacity: 0.82;
}
.pt-source {
  font-family: var(--font-label); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; opacity: 0.55; margin: 0;
}

.pt-footer {
  margin-top: 80px;
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; flex-wrap: wrap;
}

@media (max-width: 1080px) {
  /* All rows collapse to a single column so cards & photos never wrap into
     a jagged half-row (which made 02/Tension sit beside Row-3's photo). */
  .pt-row-7-5, .pt-row-5-7, .pt-row-8-4, .pt-row-4-4-4 {
    grid-template-columns: 1fr;
  }
  .pt-row { min-height: 0; margin-bottom: 16px; }
  .pt-card { padding: 28px; min-height: 240px; height: auto; }
  .pt-cell { min-height: 0; }
  /* Give photos a definite shape so they don't render at the image's native
     aspect ratio (which was producing 1300px-tall hero photos on tablet). */
  .pt-photo { aspect-ratio: 16 / 10; height: auto; min-height: 0; }
}
@media (max-width: 720px) {
  .problems-thinking { padding: 88px 0 120px; }
  .pt-head { margin-bottom: 64px; }
}

/* ============ SECTORS — "Worlds we've worked in" (replaces ClientProblems) ============ */
.sectors {
  background: var(--kilter-chalk); color: var(--kilter-ink);
  padding: 160px 0 0;
}
.sectors .eyebrow { color: var(--kilter-iron); }
.sectors .headline em { font-style: normal; color: var(--kilter-blush); }

.sec-head {
  display: flex; flex-direction: column; gap: 24px;
  margin-bottom: 96px; max-width: 1100px;
}
.sec-intro {
  font-family: var(--font-body); font-size: 20px; line-height: 1.6;
  color: var(--kilter-iron); margin: 8px 0 0; max-width: 720px;
  text-wrap: pretty;
}

.sec-stack { display: flex; flex-direction: column; gap: 0; }
.sec-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center; padding: 64px 0;
  border-top: 1px solid var(--color-border);
}
.sec-row:last-child { border-bottom: 1px solid var(--color-border); }
.sec-row.flip { direction: rtl; }
.sec-row.flip > * { direction: ltr; }

.sec-photo {
  position: relative; overflow: hidden; border-radius: 16px;
  aspect-ratio: 5 / 4;
  display: block; text-decoration: none; color: inherit;
  background: var(--kilter-forest);
}
.sec-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 700ms var(--ease-kilter);
}
.sec-photo:hover img { transform: scale(1.04); }
.sec-photo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%;
  background: linear-gradient(to top, rgba(15,15,14,0.62), rgba(15,15,14,0));
  pointer-events: none;
}
.sec-photo .hzoom-cap {
  position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 2;
  color: rgba(245,242,235,0.96);
  font-family: var(--font-label); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  text-shadow: 0 1px 10px rgba(0,0,0,0.5);
}
.sec-photo .hzoom-cap .swap { transition: transform 320ms var(--ease-kilter); }
.sec-photo:hover .hzoom-cap .swap { transform: translateX(6px); }

.sec-body { display: flex; flex-direction: column; gap: 16px; }
.sec-who {
  font-family: var(--font-label); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--kilter-iron);
}
.sec-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 4.4vw, 64px); line-height: 1; letter-spacing: -0.02em;
  margin: 0; color: var(--kilter-forest);
}
.sec-copy {
  font-family: var(--font-body); font-size: 17px; line-height: 1.6;
  margin: 0; max-width: 480px;
}
/* "What we measured" — metric names, no values (client results stay confidential) */
.sec-measured { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.sec-measured-label {
  font-family: var(--font-label); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--kilter-iron);
}
.sec-measured-list { display: flex; flex-wrap: wrap; gap: 8px; max-width: 480px; }
.sec-measured-item {
  font-family: var(--font-body); font-size: 13px; line-height: 1.3;
  color: var(--kilter-forest);
  border: 1px solid rgba(27, 67, 50, 0.28);
  border-radius: 999px;
  padding: 6px 14px;
}

.sec-pull {
  padding: 96px 0;
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(40px, 5vw, 72px); line-height: 1.05; letter-spacing: -0.015em;
  text-align: center; text-wrap: balance; margin: 0 auto;
  max-width: 1100px; color: var(--kilter-forest);
}
.sec-pull em { font-style: normal; color: var(--kilter-blush); }

@media (max-width: 1080px) {
  .sec-row, .sec-row.flip { grid-template-columns: 1fr; gap: 24px; direction: ltr; }
  .sec-row.flip > * { direction: ltr; }
  .sectors { padding: 120px 0 0; }
  .sec-head { margin-bottom: 64px; }
  .sec-pull { padding: 64px 0; }
}

/* ============ M2 · hzoom (also used standalone elsewhere) ============ */
.hzoom { display: block; position: relative; overflow: hidden; }
.hzoom img { transition: transform 700ms var(--ease-kilter); }
.hzoom:hover img { transform: scale(1.04); }

/* InsidePractice: apply the same hover-zoom to existing image-slots */
.inside-cell image-slot, .inside-cell .image-slot { transition: transform 700ms var(--ease-kilter); }
.inside-cell > div:hover image-slot { transform: scale(1.03); }

/* ============ M4 · magnetic CTA ============ */
/* The hook sets .is-magnetic for opt-in transition smoothing */
.is-magnetic { transition: transform 280ms var(--ease-kilter); will-change: transform; }
.is-magnetic.is-tracking { transition: transform 120ms var(--ease-kilter); }

/* ============ M5 · word-by-word headline reveal ============
   The :not(.__om-t) excludes the live-editor's text-instrumentation
   spans from the inline-block transform — without it they'd collapse
   their single-space content and words would run together. */
.wr-ready { /* parent class; child <span>/<em>/<strong> handles the animation */ }
.wr-ready > span:not(.__om-t),
.wr-ready > em,
.wr-ready > strong {
  display: inline-block;
  margin-right: 0.3em; /* explicit word spacing so layout doesn't depend on text content */
  opacity: 0;
  transform: translateY(0.4em);
  transition:
    opacity   900ms var(--ease-kilter),
    transform 900ms var(--ease-kilter);
}
.wr-ready > span.__om-t { display: inline; }
.wr-ready.is-revealed > span:not(.__om-t),
.wr-ready.is-revealed > em,
.wr-ready.is-revealed > strong {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .wr-ready > span:not(.__om-t),
  .wr-ready > em,
  .wr-ready > strong {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
}
