/* ==========================================================================
   Case study template
   --------------------------------------------------------------------------
   Loaded only by /work/<client>/ pages, on top of site.css.
   site.css supplies the base (header, buttons, typography, tokens, cards);
   everything here is case-study specific and prefixed with .case- so it
   cannot collide with the main stylesheet.

   To add a new case study: copy /work/seekers/index.html, swap the content
   slots, and keep the class names. No CSS changes should be needed.
   ========================================================================== */

.case-main {
  display: block;
}

.case-section {
  width: min(1280px, calc(100% - 72px));
  margin-inline: auto;
  padding-block: var(--section-gap, clamp(96px, 10vw, 156px));
}

.case-section + .case-section {
  padding-top: 0;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.case-hero {
  /* Matches the homepage's effective .hero padding-top (site.css), so the
     gap under the sticky header reads the same across the site. */
  padding-top: clamp(58px, 5.8vw, 86px);
  text-align: center;
}

.case-hero h1 {
  max-width: min(100%, 1060px);
  margin-inline: auto;
  margin-bottom: 14px;
  font-size: clamp(2rem, 2.85vw, 3.05rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.case-hero-sub {
  max-width: 760px;
  margin: 0 auto clamp(32px, 3.6vw, 46px);
  color: var(--muted);
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.5;
}

/* Video, profile/quote row and metrics share one narrower column. */
.case-hero-video,
.case-hero-layout {
  max-width: 860px;
  margin-inline: auto;
}

/* Keeps the headline on two lines on desktop; collapses to natural wrapping below. */
@media (max-width: 900px) {
  .case-hero h1 br {
    display: none;
  }
}

/* Row 1: client profile + pull quote, side by side and equal height.
   Row 2: headline metrics across three columns. */
.case-hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 30px);
  align-items: stretch;
  text-align: left;
}

/* Client identity card — mirrors the client's public profile as proof. */
.case-profile {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: clamp(20px, 2vw, 26px);
  border: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
  border-radius: var(--rs-card-radius, 18px);
  background: var(--rs-card-bg, rgba(13, 13, 13, 0.74));
  box-shadow: var(--rs-card-shadow);
  margin: 0;
}

.case-profile-avatar {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--yellow, #ffc533);
}

.case-profile-avatar img {
  width: 84%;
  height: 84%;
  object-fit: contain;
  filter: brightness(0);
}

.case-profile-body {
  min-width: 0;
}

.case-profile-handle {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 700;
}

.case-profile-handle svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--blue, #57c1ff);
}

.case-profile-name {
  margin: 2px 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.case-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--body, #cdcdcd);
  font-size: 0.88rem;
}

.case-profile-stats b {
  color: var(--ink);
  font-weight: 700;
}

/* Pull quote sitting beside the client stats. */
.case-quote {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0;
  padding: var(--rs-card-padding, clamp(28px, 2.7vw, 36px));
  border: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
  border-radius: var(--rs-card-radius, 18px);
  background: var(--rs-card-bg, rgba(13, 13, 13, 0.74));
  box-shadow: var(--rs-card-shadow);
}

.case-quote-mark {
  color: var(--orange, #ff7a1a);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 2.6rem;
  line-height: 0.4;
}

.case-quote blockquote {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.05rem, 1.25vw, 1.22rem);
  font-style: italic;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

.case-quote figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.case-quote-avatar {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
}

.case-quote figcaption strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

/* Headline client metrics, three across under the profile + quote row. */
.case-stats {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
  align-content: start;
}

.case-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: clamp(22px, 2.2vw, 30px);
  text-align: center;
  border: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
  border-radius: var(--rs-card-radius, 18px);
  background: var(--rs-card-bg, rgba(13, 13, 13, 0.74));
  box-shadow: var(--rs-card-shadow);
}

.case-stat b {
  color: var(--orange, #ff7a1a);
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 1.9vw, 1.72rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.case-stat span {
  color: var(--body, #cdcdcd);
  font-size: clamp(0.92rem, 1vw, 1.02rem);
  line-height: 1.35;
}

/* --------------------------------------------------------------------------
   Section heading
   Deliberately NOT site.css's .section-heading — that one is centered, capped
   at 920px and ~68px, which is the homepage rhythm. Case studies read as an
   article, so headings stay left-aligned and smaller.
   -------------------------------------------------------------------------- */

.case-heading {
  max-width: 22ch;
  margin: 0 auto;
  color: var(--ink);
  font-size: clamp(2.1rem, 3.2vw, 3.1rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
  text-align: center;
}

/* Section eyebrows sit centered above their heading. */
.case-section > .eyebrow {
  text-align: center;
}

.case-heading + .case-lede {
  max-width: var(--rs-subheading-width, 760px);
  margin: 18px auto 0;
  color: var(--rs-subheading-color, rgba(205, 205, 205, 0.82));
  font-size: var(--rs-subheading-size, clamp(1.02rem, 1.2vw, 1.125rem));
  line-height: var(--rs-subheading-line, 1.62);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Systems delivered
   -------------------------------------------------------------------------- */

.case-systems-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 20px);
  margin-top: clamp(38px, 4vw, 56px);
}

.case-system-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: var(--rs-card-padding, clamp(28px, 2.7vw, 36px));
  border: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
  border-radius: var(--rs-card-radius, 18px);
  background: var(--rs-card-bg, rgba(13, 13, 13, 0.74));
  box-shadow: var(--rs-card-shadow);
  transition: var(--rs-card-transition);
}

.case-system-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 122, 26, 0.3);
}

.case-system-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 8px 18px rgba(0, 0, 0, 0.28);
  font-size: 1.2rem;
}

.case-system-icon-green {
  background: linear-gradient(140deg, #6ee7a8, #22a06b);
}

.case-system-icon-violet {
  background: linear-gradient(140deg, #a78bfa, #6d3fe0);
}

.case-system-icon-blue {
  background: linear-gradient(140deg, #7cc8ff, #2f6fe0);
}

.case-system-icon-red {
  background: linear-gradient(140deg, #ff8f6b, #e03f2f);
}

.case-system-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: var(--type-card-title, clamp(1.22rem, 1.35vw, 1.45rem));
  font-weight: 700;
  letter-spacing: -0.025em;
}

.case-system-card p {
  margin: 0;
  color: var(--body, #cdcdcd);
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Goal -> System implemented, stacked inside each card. */
.case-system-step {
  display: grid;
  gap: 6px;
}

.case-system-step-built {
  padding-top: 16px;
  border-top: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
}

.case-system-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.case-system-step-built .case-system-label {
  color: var(--orange, #ff7a1a);
}

.case-system-step:not(.case-system-step-built) p {
  color: var(--ink);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Systems currently in implementation
   -------------------------------------------------------------------------- */

.case-next-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 32px);
  align-items: start;
  width: min(100%, 940px);
  margin: clamp(38px, 4vw, 56px) auto 0;
  padding: var(--rs-card-padding, clamp(28px, 2.7vw, 36px));
  border: 1px solid rgba(255, 122, 26, 0.24);
  border-radius: var(--rs-card-radius, 18px);
  background:
    radial-gradient(circle at 8% 0%, rgba(255, 122, 26, 0.14), transparent 20rem),
    var(--rs-card-bg, rgba(13, 13, 13, 0.74));
  box-shadow: var(--rs-card-shadow);
}

.case-next-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 122, 26, 0.32);
  border-radius: 999px;
  background: rgba(255, 122, 26, 0.12);
  color: var(--orange, #ff7a1a);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.case-next-card h3 {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: clamp(1.3rem, 1.7vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.case-next-card p {
  margin: 0 0 14px;
  color: var(--body, #cdcdcd);
  font-size: var(--rs-subheading-size, clamp(1.02rem, 1.2vw, 1.125rem));
  line-height: var(--rs-subheading-line, 1.62);
}

.case-next-card p:last-child {
  margin-bottom: 0;
}

.case-next-impact {
  padding: 14px 18px;
  border-left: 2px solid var(--orange, #ff7a1a);
  background: rgba(255, 255, 255, 0.022);
  border-radius: 0 10px 10px 0;
}

.case-next-impact strong {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Story: challenge / approach / results
   -------------------------------------------------------------------------- */

.case-story {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: start;
}

.case-story + .case-story {
  margin-top: clamp(56px, 6vw, 92px);
}

.case-story-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 3.2vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.case-story-body p {
  margin: 0 0 18px;
  color: var(--body, #cdcdcd);
  font-size: var(--rs-subheading-size, clamp(1.02rem, 1.2vw, 1.125rem));
  line-height: var(--rs-subheading-line, 1.62);
}

.case-story-body p:last-child {
  margin-bottom: 0;
}

.case-outcomes {
  display: grid;
  gap: 12px;
  margin-top: clamp(24px, 2.6vw, 32px);
  padding: 0;
  list-style: none;
}

.case-outcomes li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 20px;
  border: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
  color: var(--body, #cdcdcd);
  font-size: 0.98rem;
  line-height: 1.5;
}

.case-outcomes li::before {
  content: "→";
  flex: 0 0 auto;
  color: var(--orange, #ff7a1a);
  font-weight: 700;
}

/* Single flex child so the bolded lead-in flows inline with its sentence. */
.case-outcomes li > span {
  min-width: 0;
}

.case-outcomes li strong {
  color: var(--ink);
}

/* --------------------------------------------------------------------------
   Video testimonial
   -------------------------------------------------------------------------- */

/* Portrait frame: the testimonial is recorded vertically (phone / reels format). */
.case-video-frame {
  position: relative;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
  border-radius: var(--rs-card-radius, 18px);
  background: var(--rs-card-bg, rgba(13, 13, 13, 0.74));
  box-shadow: var(--rs-card-shadow);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.case-video-frame iframe,
.case-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #07080a;
}

/* In the hero: directly under the headline, above profile, quote and stats. */
.case-hero-video {
  margin-bottom: clamp(20px, 2.4vw, 30px);
}

/* Placeholder shown until the real recording is dropped in. */
.case-video-pending {
  display: grid;
  gap: 14px;
  align-content: center;
  justify-items: center;
  width: 100%;
  height: 100%;
  padding: 24px;
  text-align: center;
}

.case-video-pending span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 122, 26, 0.28);
  border-radius: 50%;
  background: rgba(255, 122, 26, 0.12);
  color: var(--orange, #ff7a1a);
  font-size: 1.5rem;
}

.case-video-pending p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Closing written testimonial
   -------------------------------------------------------------------------- */

.case-testimonial {
  display: grid;
  gap: clamp(24px, 2.6vw, 34px);
  padding: clamp(36px, 4.4vw, 68px);
  border: 1px solid rgba(255, 122, 26, 0.22);
  border-radius: var(--rs-card-radius, 18px);
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 122, 26, 0.16), transparent 22rem),
    var(--rs-card-bg, rgba(13, 13, 13, 0.74));
  box-shadow: var(--rs-card-shadow);
  text-align: center;
  justify-items: center;
}

.case-testimonial blockquote {
  max-width: 24ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.5rem, 2.6vw, 2.35rem);
  font-style: italic;
  line-height: 1.28;
  letter-spacing: -0.03em;
}

.case-testimonial-author {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.case-testimonial-avatar {
  width: 64px;
  height: 64px;
  margin-bottom: 6px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--rs-card-border, rgba(255, 255, 255, 0.095));
}

.case-testimonial-author strong {
  color: var(--ink);
  font-size: 1.05rem;
}

.case-testimonial-author span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Four text-heavy cards need real room; drop to two well before the tablet
   breakpoint, otherwise each column gets ~190px and the copy turns to slivers. */
@media (max-width: 1200px) {
  .case-systems-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .case-section {
    width: calc(100% - 32px);
  }

  .case-hero-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-story {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-next-card {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 680px) {
  .case-systems-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-profile {
    gap: 14px;
    padding: 18px;
  }

  .case-profile-avatar {
    width: 58px;
    height: 58px;
  }

  .case-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .case-testimonial blockquote {
    max-width: none;
  }
}

/* --------------------------------------------------------------------------
   CTA
   site.css's shared .contact-section carries its own margin-top: var(--section-gap)
   (used after the FAQ accordion on the homepage). Case studies end the previous
   section with the same --section-gap as bottom padding, so the two stack and
   leave a huge double gap above the CTA. Zero it here, scoped to case-study
   pages only, and let .case-section's own padding do the spacing job.
   -------------------------------------------------------------------------- */

.case-main .contact-section {
  margin-top: 0;
}
