/* ==========================================================================
   Personal Health Coach — case study
   Layered on top of styles.css
   ========================================================================== */

.cs-main { background: #fff; }

/* Generic section --------------------------------------------------------- */

.cs-section {
  padding: 112px 0;
  background: #fff;
}

.cs-section__inner {
  max-width: 1088px; /* 1040 content + 24px gutters */
  margin: 0 auto;
  padding: 0 24px;
}

.cs-section__title {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
  text-align: center;
}

.cs-section__lede {
  margin-top: 40px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--gray-body);
  text-align: center;
}

.cs-section__lede a,
.cs-link {
  color: inherit;
}

.cs-section__lede a:hover { text-decoration: underline; }

.cs-figure { margin-top: 60px; }
.cs-figure img { width: 100%; }

.cs-figure__caption {
  margin-top: 32px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--gray-body);
  text-align: center;
}

/* Cover -------------------------------------------------------------------- */

.cs-cover {
  background: var(--cover);
  padding: 132px 24px 120px;
  text-align: center;
}

.cs-cover__title {
  font-size: 36px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.017em;
  color: #000;
}

.cs-cover__media {
  max-width: 809px;
  margin: 82px auto 0;
}

.cs-cover__sub {
  max-width: 947px;
  margin: 64px auto 0;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--gray-sub);
}

/* Role and contribution ---------------------------------------------------- */

.cs-role { padding: 112px 0; background: #fff; }

.cs-role__title {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
}

.cs-role__lede {
  margin-top: 40px;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--gray-body);
}

.cs-role__row { margin-top: 44px; }

.cs-role__label {
  font-size: 22px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
}

.cs-role__value {
  margin-top: 14px;
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--gray-body);
}

/* Outcome bullets — Figma PHC 450:19612 / 19118 / 18170 / 18663 */
.cs-role__list {
  margin: 14px 0 0;
  padding-left: 1.5em;
  list-style: disc;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.22px;
  color: #666;
  word-break: break-word;
}
.cs-role__list li { margin: 0; }
.cs-role__list li + li { margin-top: 0; }

/* Key features ------------------------------------------------------------- */

.cs-features {
  background: var(--cover);
  padding: 112px 0 140px;
}

.cs-features__title {
  font-size: 32px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  text-align: center;
  color: #000;
}

.cs-feature {
  max-width: 985px; /* 937 content + 24px gutters */
  margin: 0 auto;
  padding: 70px 24px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.cs-feature__media img {
  max-width: 316px;
  margin: 0 auto;
}

.cs-feature__media--wide img { max-width: 418px; }

.cs-feature__title {
  font-size: 28px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
}

.cs-feature__desc {
  margin-top: 26px;
  font-size: 22px;
  line-height: 1.3;
  color: var(--gray-body);
}

/* Note strip ---------------------------------------------------------------- */

.cs-note {
  background: #fff;
  padding: 100px 24px;
  text-align: center;
}

.cs-note p {
  max-width: 1075px;
  margin: 0 auto;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
  color: #000;
}

/* Card grids ---------------------------------------------------------------- */

.cs-cards {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Pillar rows (image + caption, no card background) */
.cs-cards--pillars {
  max-width: 948px;
  margin-left: auto;
  margin-right: auto;
  gap: 24px;
}

.cs-card {
  background: var(--card);
  border-radius: 36px;
  padding: 28px;
  text-align: center;
}

.cs-card--bare {
  background: none;
  border-radius: 0;
  padding: 0;
}

.cs-card__img { border-radius: 100px; margin-bottom: 16px; }

.cs-card__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
}

.cs-card__desc {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--gray-body);
}

/* 2×2 tile grids (audit barriers, principles) ------------------------------- */

.cs-tiles {
  margin-top: 64px;
  max-width: 752px;
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.cs-tile {
  text-align: center;
  background: var(--card);
  border-radius: 36px;
  padding: 32px;
}

.cs-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 500px;
  background: #ecf5ff;
  color: #346de3;
  margin: 0 auto 16px;
  font-size: 36px;
}

.cs-tile__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
}

.cs-tile__desc {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--gray-body);
}

/* Image grids --------------------------------------------------------------- */

.cs-grid-2x2 {
  margin-top: 64px;
  max-width: 968px;          /* 2 x 472 + 24 gap */
  margin-left: auto;
  margin-right: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.cs-grid-2x2 img { width: 100%; }

.cs-dir-tile {
  text-align: center;
  background: #e8f8ed;
  border-radius: 36px;
  padding: 32px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cs-dir-tile img {
  width: 76%;
  margin-top: 32px;
  border-radius: 0;   /* phone shots are transparent PNGs, square-cornered */
  background: none;
}

.cs-dir-tile figcaption {
  order: -1;
  max-width: 342px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
}

/* Exploration cards: image with attached caption bar */

.cs-shot-card {
  background: var(--card);
  border-radius: 36px;
  overflow: hidden;
  text-align: center;
}

.cs-shot-card img { width: 100%; border-radius: 0; }

.cs-shot-card figcaption {
  padding: 27px 16px;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
}

/* Redesign goals — title + 1px rule + description (167:4719 / 167:5705) ----- */

.cs-goals {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: start;
}

.cs-goal { text-align: center; }

.cs-goal__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.009em;
  color: #000;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.5);
}

.cs-goal__desc {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--gray-body);
}

/* Grey showcase sections ----------------------------------------------------- */

.cs-section--grey { background: var(--card); }

/* Full-bleed image ------------------------------------------------------------ */

.cs-bleed { margin-top: 80px; }
.cs-bleed img { width: 100%; }

/* Feedback strips -------------------------------------------------------------- */

.cs-strips {
  margin-top: 80px;
  display: grid;
  grid-template-columns: 505fr 512fr;
  gap: 25px;
  align-items: center;
}

.cs-strips img {
  width: 100%;
  border-radius: 36px;
}

.cs-strips + .cs-figure { margin-top: 80px; }

/* --------------------------------------------------------------------------
   Tablet (designed at 800)
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .cs-section { padding: 90px 0; }

  .cs-section__title { font-size: 28px; }
  .cs-section__lede { font-size: 18px; margin-top: 30px; }

  .cs-cover { padding: 120px 24px 90px; }
  .cs-cover__title { font-size: 36px; }
  .cs-cover__sub { font-size: 20px; letter-spacing: 0.02em; margin-top: 48px; }

  .cs-role__title, .cs-features__title { font-size: 28px; }
  .cs-role__label { font-size: 22px; }
  .cs-role__value, .cs-role__lede { font-size: 18px; }
  .cs-role__list {
    font-size: 18px;
    line-height: 1.3;
    letter-spacing: 0;
  }

  .cs-feature__title { font-size: 24px; letter-spacing: 0; }
  .cs-feature__desc { font-size: 18px; }

  .cs-note p { font-size: 18px; }

  .cs-card { border-radius: 28px; padding: 22px; }
  .cs-card__title { font-size: 18px; letter-spacing: 0; }
  .cs-card__desc { font-size: 14px; }

  .cs-tiles { gap: 14px; }
  .cs-tile { padding: 24px; border-radius: 28px; }
  .cs-tile__title { font-size: 22px; letter-spacing: 0; }
  .cs-tile__desc { font-size: 14px; }
  .cs-tile__icon { font-size: 30px; }

  .cs-dir-tile figcaption, .cs-shot-card figcaption { font-size: 18px; }

  .cs-goal__title { font-size: 18px; padding-bottom: 20px; }
  .cs-goal__desc { font-size: 14px; margin-top: 12px; }

  .cs-figure__caption { font-size: 18px; }
}

/* --------------------------------------------------------------------------
   Mobile — matches the 390px Figma frame (167:5503)
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  /* Section shell: 72px vertical, 24px gutters, 342px content */
  .cs-section { padding: 72px 0; }
  .cs-section__inner { padding: 0 24px; }

  .cs-section__title {
    font-size: 24px;
    max-width: 342px;
    margin-left: auto;
    margin-right: auto;
  }

  .cs-section__lede {
    font-size: 14px;
    margin-top: 20px;          /* heading -> lede */
    max-width: 342px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Cover */
  .cs-cover { padding: 96px 24px 56px; }
  .cs-cover__title { font-size: 28px; }
  .cs-cover__media { max-width: 323px; margin-top: 48px; }
  .cs-cover__sub {
    font-size: 14px;
    max-width: 346px;
    margin-top: 40px;
    letter-spacing: -0.01em;
  }

  /* Role — 40px gutters, 310px content */
  .cs-role { padding: 72px 0; }
  .cs-role .cs-section__inner { padding: 0 40px; }
  .cs-role__title { font-size: 24px; }
  .cs-role__lede { font-size: 14px; margin-top: 20px; }
  .cs-role__row { margin-top: 32px; }
  .cs-role__label { font-size: 14px; }
  .cs-role__value { font-size: 14px; margin-top: 8px; }
  .cs-role__list {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.3;
    letter-spacing: -0.14px;
  }

  /* Key features — 190px phone shots, 80px between features (167:5537) */
  .cs-features { padding: 72px 0 44px; }
  .cs-features__title { font-size: 24px; }

  .cs-feature {
    grid-template-columns: 1fr;
    gap: 32px;                 /* image -> text */
    padding: 80px 24px 0;      /* feature -> feature */
    max-width: none;
    justify-items: center;
  }

  .cs-feature__media { order: -1; }
  .cs-feature__media img { max-width: 190px; }
  .cs-feature__media--wide img { max-width: 246px; }  /* phone + watch composite */
  .cs-feature__content { max-width: 275px; text-align: center; }
  .cs-feature__title { font-size: 20px; }
  .cs-feature__desc { font-size: 14px; margin-top: 16px; }

  /* Note strip */
  .cs-note { padding: 70px 24px; }
  .cs-note p { font-size: 14px; max-width: 342px; }

  /* Pillar rows — 208px cards, stacked, 40px apart, blue titles */
  .cs-cards {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 40px;
  }

  .cs-cards--pillars {
    max-width: 208px;
    margin-top: 24px;
    gap: 40px;
  }

  .cs-card { padding: 24px; border-radius: 28px; }
  .cs-card--bare { padding: 0; }
  .cs-card__img { border-radius: 100px; margin-bottom: 12px; }
  .cs-card__title { font-size: 14px; }
  .cs-card__desc { font-size: 12px; margin-top: 8px; }

  /* Weekly-goal cards */
  .cs-cards:not(.cs-cards--pillars) { max-width: 280px; margin-left: auto; margin-right: auto; gap: 20px; }
  .cs-cards:not(.cs-cards--pillars) .cs-card__title { font-size: 16px; color: #000; }

  /* Audit + principle tiles — single column, centred */
  .cs-tiles {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 40px auto 0;
    gap: 20px;
  }

  .cs-tile { padding: 32px 24px; border-radius: 36px; }
  .cs-tile__title { font-size: 16px; }
  .cs-tile__desc { font-size: 12px; margin-top: 8px; }
  .cs-tile__icon { font-size: 16px; padding: 6px 10px; margin-bottom: 12px; }

  .cs-tiles--principles { max-width: 281px; gap: 16px; }
  .cs-tiles--principles .cs-tile { padding: 24px 24px 32px; }

  /* Image grids — single column, 280px centred (167:5750 / 167:5727) */
  .cs-grid-2x2 {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin: 40px auto 0;
  }

  .cs-grid-2x2--shots { gap: 32px; }
  .cs-grid-2x2--dirs { gap: 16px; }

  /* Direction cards: 280x262, r36, 166x162 image flush to the bottom */
  .cs-dir-tile { border-radius: 36px; padding: 32px 0 0; }
  .cs-dir-tile img { width: 166px; margin-top: 32px; }
  .cs-dir-tile figcaption { font-size: 14px; max-width: 257px; }

  /* Exploration cards: 280x246, r36, 61px caption bar */
  .cs-shot-card { border-radius: 36px; }
  .cs-shot-card figcaption { font-size: 16px; padding: 20px 12px; }

  /* Redesign goals — 208px, stacked */
  .cs-goals {
    grid-template-columns: 1fr;
    max-width: 208px;
    margin: 40px auto 0;
    gap: 16px;
  }

  .cs-goal__title { font-size: 16px; padding-bottom: 16px; }
  .cs-goal__desc { font-size: 12px; margin-top: 16px; }

  /* Feedback strips */
  .cs-strips {
    grid-template-columns: 1fr;
    max-width: 342px;
    margin: 40px auto 0;
    gap: 16px;
  }

  .cs-strips img { border-radius: 20px; }
  .cs-strips + .cs-figure { margin-top: 40px; }

  /* Figures */
  .cs-figure { margin-top: 40px; }
  .cs-figure__caption { font-size: 12px; margin-top: 16px; }

  .cs-figure--hide-mobile { display: none; }
  .cs-bleed { margin-top: 40px; }

  /* Each mobile visual is exported at its exact Figma width */
  .cs-figure--swap img,
  .cs-bleed picture img { margin: 0 auto; }

  .cs-mw-280 img { max-width: 280px; }
  .cs-mw-282 img { max-width: 282px; }
  .cs-mw-303 img { max-width: 303px; }
  /* Weekly-goal export is 335px wide but its visible card occupies only the
     left 280px, so centring the PNG shifts the card 27px off-centre.
     Nudge it back so the card sits centred, as in the Figma frame. */
  .cs-mw-335 img {
    max-width: 335px;
    transform: translateX(27px);
  }

  /* Learning-loop section is white on mobile (grey on desktop) */
  .cs-section--white-mobile { background: #fff; }

  /* Weekly-goal section: 48px between heading block and visual */
  .cs-section--weekly .cs-figure { margin-top: 48px; }
}
