/* =========================================================
   BOLI CARE · CAPABILITIES (V5 · editorial / peek-thumb)
   12 mini-cards · clinician band + patient band
   Direct continuation of #consultations on /for-physicians/
   ========================================================= */

.phys-capabilities {
  position: relative;
  /* this is a CONTINUATION of #consultations - pull up into its bottom-padding */
  margin-top: clamp(-72px, -6vw, -40px);
  padding: clamp(16px, 2.5vw, 32px) 0 clamp(80px, 9vw, 120px);
  background: var(--paper);                /* same as #consultations → seamless join */
  overflow: hidden;
  z-index: 1;
}


/* =========================================================
   ░░  SECTION HEADER  ░░  (centered, sober)
   ========================================================= */
.cap-head {
  position: relative;
  max-width: 720px;
  margin: 0 auto 56px;
  text-align: center;
}
.cap-head .eyebrow-gold {
  color: var(--green);
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  font-weight: 600;
  font-size: var(--fs-eyebrow);
  display: inline-block;
  margin-bottom: 14px;
}
.cap-head h2 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: var(--tr-tight);
  color: var(--ink);
  margin: 0 0 14px;
}
.cap-head h2 em {
  color: var(--green);
  font-style: italic;
  font-weight: 500;
}
.cap-head .lede {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 600px;
}


/* =========================================================
   ░░  BAND  ░░  (clinician / patient)
   Centered "rule + chip + subtitle" pattern
   ========================================================= */
.cap-band {
  position: relative;
  margin-top: 72px;
}
.cap-band:first-of-type { margin-top: 0; }

.cap-band-head {
  text-align: center;
  margin: 0 auto 44px;
  max-width: 720px;
}

/* Chapter-style marker : ─── II ─── */
.cap-band-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 18px;
  color: var(--gold);
}
.cap-band-rule {
  display: block;
  width: 64px;
  height: 1px;
  background: currentColor;
  opacity: .55;
}
.cap-band-numeral {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  line-height: 1;
  color: var(--gold);
  letter-spacing: -.01em;
}
.cap-band--clinician .cap-band-marker { color: var(--green); }
.cap-band--clinician .cap-band-numeral { color: var(--green); }
.cap-band--patient .cap-band-marker { color: var(--brand-green); }
.cap-band--patient .cap-band-numeral { color: var(--brand-green); }

/* Chapter label - mono uppercase, letter-spaced */
.cap-band-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 14px;
}

.cap-band-sub {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1rem, 1.2vw, 1.12rem);
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 560px;
}


/* =========================================================
   ░░  GRID  ░░
   ========================================================= */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}


/* =========================================================
   ░░  CARD  ░░  (number left · peek-thumb right)
   ========================================================= */
.cap-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 22px;
  padding: 24px 26px 22px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  overflow: hidden;             /* crop the peek-thumb */
  box-shadow: 0 14px 40px -32px rgba(13,26,20,.18);
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease),
              border-color var(--dur-base) var(--ease);
}
.cap-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 32px 60px -28px rgba(13,26,20,.24);
}

/* Number - top left, big italic serif */
.cap-num {
  font-family: var(--font-head);
  font-style: italic;
  font-weight: 500;
  font-size: 2.6rem;
  color: var(--gold);
  line-height: .95;
  margin: 0 0 12px;
  position: relative;
  z-index: 2;
}
.cap-band--patient .cap-num { color: var(--peach); }

/* Pill tag */
.cap-pill {
  display: inline-block;
  align-self: flex-start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 100px;
  margin: 0 0 14px;
  position: relative;
  z-index: 2;
  border: 1px solid transparent;
}
.cap-band--clinician .cap-pill {
  background: var(--green-50);
  color: var(--green);
  border-color: rgba(13,91,63,.15);
}
.cap-band--patient .cap-pill {
  background: var(--brand-green-50);
  color: var(--brand-green);
  border-color: rgba(0,150,70,.15);
}

/* Title */
.cap-card h4 {
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.32rem;
  line-height: 1.2;
  letter-spacing: -.005em;
  color: var(--ink);
  margin: 0 0 10px;
  padding-right: 110px;         /* room for big peek-thumb */
  position: relative;
  z-index: 2;
}

/* Description */
.cap-desc {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin: 0 0 18px;
  padding-right: 90px;          /* room for peek-thumb tail */
  position: relative;
  z-index: 2;
}

/* Divider */
.cap-card-rule {
  height: 1px;
  background: var(--rule-soft);
  margin: 0 0 14px;
  border: 0;
  position: relative;
  z-index: 2;
}

/* Bullets - these run full-width, peek-thumb is above them */
.cap-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.cap-points li {
  position: relative;
  padding-left: 16px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}
.cap-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.cap-band--patient .cap-points li::before {
  background: var(--peach);
}


/* =========================================================
   ░░  PEEK-THUMB  ░░  (big circle, cropped at right edge)
   ========================================================= */
.cap-thumb {
  position: absolute;
  top: 18px;
  right: -80px;                 /* ~120px visible inside card */
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 48%, rgba(216,167,77,.14) 49%, rgba(216,167,77,.14) 50%, transparent 51%),
    radial-gradient(circle at 50% 50%, transparent 38%, rgba(216,167,77,.10) 39%, rgba(216,167,77,.10) 40%, transparent 41%),
    radial-gradient(circle at 50% 50%, transparent 28%, rgba(216,167,77,.07) 29%, rgba(216,167,77,.07) 30%, transparent 31%),
    linear-gradient(135deg, rgba(216,167,77,.32) 0%, var(--paper-2) 100%);
  border: 1px solid rgba(216,167,77,.32);
  z-index: 1;
  transition: transform var(--dur-base) var(--ease);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
/* Inner dashed ring */
.cap-thumb::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(13,26,20,.18);
}
/* ID label - placed in the visible left portion */
.cap-thumb::after {
  content: attr(data-ph);
  position: absolute;
  top: 50%;
  left: 14px;
  width: 92px;
  text-align: center;
  transform: translateY(-50%);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-muted);
  line-height: 1.3;
  white-space: nowrap;
}
.cap-card:hover .cap-thumb {
  transform: translateX(-8px) rotate(-3deg);
}

.cap-band--patient .cap-thumb {
  background:
    radial-gradient(circle at 50% 50%, transparent 48%, rgba(243,166,130,.14) 49%, rgba(243,166,130,.14) 50%, transparent 51%),
    radial-gradient(circle at 50% 50%, transparent 38%, rgba(243,166,130,.10) 39%, rgba(243,166,130,.10) 40%, transparent 41%),
    radial-gradient(circle at 50% 50%, transparent 28%, rgba(243,166,130,.07) 29%, rgba(243,166,130,.07) 30%, transparent 31%),
    linear-gradient(135deg, rgba(243,166,130,.32) 0%, var(--paper-2) 100%);
  border-color: rgba(243,166,130,.34);
}


/* =========================================================
   ░░  PHONE PEEK-THUMB  ░░  (real app screenshot, portrait phone shape)
   Used on patient cards (Pat-01..06). Replaces decorative circle.
   ========================================================= */
.cap-thumb--phone {
  /* Override the decorative circle defaults */
  width: 150px;
  height: 300px;
  top: 22px;
  right: -68px;                  /* ~82px peek visible inside card */
  border-radius: 22px;
  border: 1px solid rgba(13,26,20,.08);
  background: #fff;
  overflow: hidden;
  /* Above the divider rule (z=2) so the line passes behind the phone, */
  /* still below the bullet text which sits on the left of the card. */
  z-index: 3;
  box-shadow:
    inset 0 0 0 4px #1f1f1f,                  /* device bezel */
    0 22px 38px -22px rgba(13,26,20,.35),
    0 6px 14px -8px rgba(13,26,20,.18);
  transform: rotate(6deg);
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
/* Kill the dashed-ring + label from the decorative version */
.cap-thumb--phone::before,
.cap-thumb--phone::after { content: none !important; display: none !important; }

/* Patient band: same overrides apply (no orange gradient) */
.cap-band--patient .cap-thumb--phone {
  background: #fff;
  border-color: rgba(13,26,20,.08);
}

/* The actual screen capture */
.cap-thumb-img {
  position: absolute;
  inset: 4px;                    /* sit inside the device bezel */
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
  object-position: top center;
  border-radius: 18px;
  display: block;
  background: #fff;
}

/* Hover : slight lift, straighten a touch */
.cap-card:hover .cap-thumb--phone {
  transform: translateX(-8px) translateY(-2px) rotate(3deg);
  box-shadow:
    inset 0 0 0 4px #1f1f1f,
    0 36px 50px -22px rgba(13,26,20,.42),
    0 10px 18px -8px rgba(13,26,20,.22);
}


/* =========================================================
   ░░  SCREEN PEEK-THUMB  ░░  (real PRO interface, landscape 16:10)
   Used on clinician cards (Phys-UI-01..06). Replaces decorative circle.
   The screenshot is a wide desktop view - we frame it like a
   tilted laptop screen peeking from the right edge of the card.
   ========================================================= */
.cap-thumb--screen {
  /* Override the decorative circle defaults */
  width: 340px;
  height: 215px;                  /* ~1.58:1, matches Chrome 1440x900 capture */
  top: 22px;
  right: -210px;                  /* ~130px peek visible inside card */
  border-radius: 12px;
  border: 1px solid rgba(13,26,20,.10);
  background: #fff;
  overflow: hidden;
  z-index: 3;
  /* Slim dark "device" bezel via inset shadow + warm drop shadow */
  box-shadow:
    inset 0 0 0 3px #1f1f1f,                   /* device bezel */
    0 22px 38px -22px rgba(13,26,20,.34),
    0 6px 14px -8px rgba(13,26,20,.18);
  transform: rotate(-4deg);
  transition: transform var(--dur-base) var(--ease),
              box-shadow var(--dur-base) var(--ease);
}
/* Kill the dashed-ring + label from the decorative version */
.cap-thumb--screen::before,
.cap-thumb--screen::after { content: none !important; display: none !important; }

/* Patient band override : same neutral frame */
.cap-band--patient .cap-thumb--screen {
  background: #fff;
  border-color: rgba(13,26,20,.10);
}

/* The actual interface crop sits inside the bezel.
   These are real Boli Pro prototype crops, with the left menu removed and the
   useful clinical region selected per card. */
.cap-thumb--screen .cap-thumb-img {
  position: absolute;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
  object-position: top left;
  border-radius: 8px;
  display: block;
  background: #fff;
}

.cap-thumb--proto-pip {
  width: 260px;
  height: 164px;
  top: 24px;
  right: -112px;
  z-index: 1;
  transform: rotate(-3deg);
}
.cap-thumb--proto-pip .cap-thumb-img {
  object-position: center center;
}
.cap-card:has(.cap-thumb--proto-pip) .cap-num,
.cap-card:has(.cap-thumb--proto-pip) .cap-pill,
.cap-card:has(.cap-thumb--proto-pip) h4,
.cap-card:has(.cap-thumb--proto-pip) .cap-desc,
.cap-card:has(.cap-thumb--proto-pip) .cap-card-rule,
.cap-card:has(.cap-thumb--proto-pip) .cap-points {
  z-index: 2;
}
.cap-card:has(.cap-thumb--proto-pip) h4 { padding-right: 145px; }
.cap-card:has(.cap-thumb--proto-pip) .cap-desc { padding-right: 125px; }

/* Hover : slight lift, straighten a touch */
.cap-card:hover .cap-thumb--screen {
  transform: translateX(-12px) translateY(-2px) rotate(-2deg);
  box-shadow:
    inset 0 0 0 3px #1f1f1f,
    0 36px 50px -22px rgba(13,26,20,.42),
    0 10px 18px -8px rgba(13,26,20,.22);
}

/* Cards using a screen-peek need a touch more breathing room
   on the right of the title/desc to clear the wider thumb. */
.cap-card:has(.cap-thumb--screen) h4      { padding-right: 130px; }
.cap-card:has(.cap-thumb--screen) .cap-desc { padding-right: 110px; }
.cap-card:has(.cap-thumb--proto-pip) h4      { padding-right: 145px; }
.cap-card:has(.cap-thumb--proto-pip) .cap-desc { padding-right: 125px; }


/* =========================================================
   ░░  RESPONSIVE  ░░
   ========================================================= */
@media (max-width: 1080px) {
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .cap-thumb {
    width: 220px;
    height: 220px;
    right: -90px;
    top: 18px;
  }
  .cap-thumb--phone {
    width: 160px;
    height: 320px;
    right: -76px;
    top: 22px;
  }
  .cap-thumb--screen {
    width: 320px;
    height: 200px;
    right: -200px;
    top: 22px;
  }
  .cap-thumb--proto-pip {
    width: 240px;
    height: 150px;
    right: -96px;
    top: 24px;
  }
  .cap-card h4 { padding-right: 130px; }
  .cap-desc { padding-right: 110px; }
  .cap-card:has(.cap-thumb--screen) h4      { padding-right: 140px; }
  .cap-card:has(.cap-thumb--screen) .cap-desc { padding-right: 120px; }
  .cap-card:has(.cap-thumb--proto-pip) h4      { padding-right: 112px; }
  .cap-card:has(.cap-thumb--proto-pip) .cap-desc { padding-right: 104px; }
}

@media (max-width: 540px) {
  .cap-grid { grid-template-columns: 1fr; gap: 14px; }
  .cap-card {
    padding: 22px 22px 20px;
    border-radius: 20px;
    min-height: 280px;
  }
  .cap-num { font-size: 2.2rem; }
  .cap-card h4 { font-size: 1.2rem; padding-right: 100px; }
  .cap-desc { padding-right: 80px; }
  .cap-thumb {
    width: 180px;
    height: 180px;
    right: -85px;
    top: 18px;
  }
  .cap-thumb--phone {
    width: 130px;
    height: 260px;
    right: -56px;
    top: 22px;
  }
  .cap-thumb--screen {
    width: 250px;
    height: 156px;
    right: -150px;
    top: 22px;
  }
  .cap-thumb--proto-pip {
    width: 190px;
    height: 119px;
    right: -72px;
    top: 20px;
  }
  .cap-card:has(.cap-thumb--screen) h4      { padding-right: 110px; }
  .cap-card:has(.cap-thumb--screen) .cap-desc { padding-right: 90px; }
  .cap-card:has(.cap-thumb--proto-pip) h4      { padding-right: 94px; }
  .cap-card:has(.cap-thumb--proto-pip) .cap-desc { padding-right: 82px; }
  .cap-band-rule { width: 44px; }
  .cap-band-numeral { font-size: 1.45rem; }
  .cap-band-label { font-size: 11px; letter-spacing: .22em; }
}
