/* ============================================================
   PECULIEX — CASE STUDY pages
   Shared by every *-case-study.html and service-details.html.
   Builds on site.css (px-hero, px-frame, px-statement, px-cta).
   ============================================================ */

/* hero leaves room for the cover image that overlaps its lower edge */
.csx-hero { min-height: clamp(480px, 74svh, 780px); }
.csx-hero .px-hero-inner { padding-bottom: calc(var(--csx-lap) + clamp(28px, 4vw, 56px)); }
.csx-hero .px-hero-title { font-size: clamp(34px, 9.2vw, 172px); overflow-wrap: normal; }
:root { --csx-lap: clamp(48px, 9vw, 150px); }

.csx-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(28px, 5vw, 84px);
  margin: 0;
}
.csx-facts dt {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--hx-mute);
  margin-bottom: 8px;
}
.csx-facts dd {
  margin: 0;
  font-family: var(--font-headline);
  font-weight: 800;
  font-size: clamp(16px, 1.5vw, 22px);
  letter-spacing: -0.02em;
}

/* cover image: overlaps the hero, drifts inside its frame on scroll */
.csx-cover { position: relative; z-index: 3; margin-top: calc(-1 * var(--csx-lap)); }
.csx-cover .px-frame {
  aspect-ratio: 16 / 9;
  border-radius: clamp(18px, 2.2vw, 32px);
  box-shadow: 0 40px 100px rgba(9, 9, 12, 0.28);
}

/* the challenge: label on the left, statement on the right */
@media (min-width: 1024px) {
  .csx-story { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); }
}
.csx-story .hx-eyebrow { margin-bottom: 0; }

/* next project: one big link between hairlines */
.csx-next {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px 32px;
  padding: clamp(28px, 4vw, 60px) 0;
  border-top: 1px solid var(--hx-line);
  border-bottom: 1px solid var(--hx-line);
  color: inherit;
  transition: color 0.45s ease;
}
.csx-next-label {
  grid-column: 1 / -1;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--hx-mute);
}
.csx-next-title {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(34px, 7.6vw, 140px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.csx-next-title em {
  font-family: var(--hx-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: -0.02em;
  font-size: 1.1em;
  color: var(--color-primary);
}
.csx-next-arrow {
  width: clamp(54px, 7vw, 116px);
  height: clamp(54px, 7vw, 116px);
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--hx-line);
  transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease, transform 0.7s var(--hx-ease);
}
.csx-next-arrow svg { width: 38%; height: 38%; }
@media (hover: hover) {
  .csx-next:hover .csx-next-arrow { background: var(--hx-purple); border-color: var(--hx-purple); color: #fff; transform: rotate(-45deg); }
}
.csx-next:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 6px; }
