/* ============================================================
   Contactable — Capability/Product page SHARED archetypes
   Loads after iip.css, before each page's own <page>.css.
   Holds the responsive LAYOUT + shared visual styling for the
   archetypes common to the capability pages. Each page section
   carries the generic class ALONGSIDE its prefixed one, e.g.
   class="cap-challenge biov-challenge". Page CSS keeps only
   genuine differences (image src/aspect, bespoke sections).
   Reference build: id-verification.html (signed off).
   Breakpoints (largest→smallest, later wins): 1100 / 900 / 640.
   ============================================================ */

/* ===== Hero ===== */
.cap-hero {
  position: relative;
  overflow: hidden;
  min-height: 668px;
  display: flex;
  align-items: center;
  background: #f2f2f2;
}
.cap-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url(../assets/brand/idv-hero-fingerprint.webp);
  background-repeat: no-repeat;
  /* Dev-Ready hero template (idv node 10206-65495): the asset is composed
     at the full frame width (fingerprint in its right half), rendered as
     width-fill cover — outer arc lands ~51% across and the strokes bleed
     to the section's bottom edge. Same values as .idv-hero__bg. */
  background-size: 100% auto;
  background-position: right center;
}
.cap-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  /* copy pulled left of the standard site gutter */
  padding-left: clamp(24px, 6vw, 88px);
}
.cap-hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  max-width: 560px;
}
.cap-hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.cap-hero__eyebrow {
  font-family: var(--font-brand);
  font-weight: 600;
  text-transform: uppercase;
  font-size: clamp(15px, 1.56vw, 20px);
  line-height: 1.5;
  letter-spacing: 1px;
  color: rgba(86, 95, 150, 0.75);
  margin: 0;
}
.cap-hero__title {
  font-family: var(--font-impact);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(34px, 5.86vw, 75px);
  line-height: 1.1;
  color: var(--deep-blue);
  margin: 0;
  width: min(765px, 100vw - 180px);
  max-width: none;
  text-wrap: wrap;
}
.cap-hero__text {
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.5;
  color: var(--deep-blue);
  max-width: 551px;
  margin: 0;
}

/* ===== Challenge / Problem — HOMEPAGE Layout/195 arrangement (user, 2026-07):
   image left, copy + the two items TOGETHER in the right column, vertically
   centred; equal 1:1 columns, gap 80. Mirrors .hp-problem exactly so every
   intro section reads the same across the site. ===== */
.cap-challenge {
  background: #fff;
  padding: 112px 0;
}
.cap-challenge__grid {
  display: flex;
  align-items: center;
  gap: 80px;
  /* Gutter rule (user, 2026-07): the image's LEFT edge lines up with the hero
     copy's text line. Capability heroes use .wrap + this same clamp, so
     overriding .wrap's --wrap-pad here keeps them aligned at every width. */
  padding-inline: clamp(24px, 6vw, 88px);
}
.cap-challenge__img-wrap {
  flex: 1 1 0;
  min-width: 0;
  aspect-ratio: 620 / 661;   /* per-page override allowed (scope it ≥901px) */
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.cap-challenge__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cap-challenge__content {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.cap-challenge__copy {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.cap-challenge__heading {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: calc(clamp(34px, 3.8vw, 48px) * var(--heading-scale));
  line-height: 1.1;
  color: #f54c2c;
  margin: 0;
}
.cap-challenge__lead {
  font-size: 18px;
  line-height: 1.5;
  color: #0f1e6d;
  margin: 0;
}
.cap-challenge__list {
  display: flex;
  gap: 24px;
  padding: 8px 0;
}
.cap-challenge__item { flex: 1 0 0; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.cap-challenge__icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f54c2c;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.cap-challenge__icon-wrap .material-symbols-rounded {
  font-size: 40px;   /* match homepage .hp-problem: 40px glyph in the 48px circle */
  line-height: 1;
  font-weight: 200;   /* font-weight drives the weight (variable font); fvs 'wght' alone renders 400 */
  font-variation-settings: 'FILL' 0, 'wght' 200, 'GRAD' 0, 'opsz' 48;
}
.cap-challenge__item-title {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 24px;   /* homepage / Figma H6 */
  line-height: 1.3;
  color: #0f1e6d;
  margin: 0;
}
.cap-challenge__item-text { font-size: 16px; line-height: 1.5; color: #0f1e6d; margin: 0; }

/* ===== Verify (tabbed sub-capabilities) ===== */
.cap-verify { background: #fff; padding: 112px 0; }
.cap-verify__inner { display: flex; flex-direction: column; align-items: center; gap: 80px; }
.cap-verify__head {
  max-width: 768px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.cap-verify__heading {
  font-family: var(--font-brand);
  font-weight: 700;
  /* unified section-heading size (fluid, matches challenge/stats) */
  font-size: calc(clamp(34px, 3.8vw, 48px) * var(--heading-scale));
  line-height: 1.1;
  color: #f54c2c;
  margin: 0;
}
.cap-verify__text { font-size: 18px; line-height: 1.5; color: var(--deep-blue); margin: 0; }

.cap-tabs { width: 100%; border: 2px solid #959abb; border-radius: 26px; overflow: hidden; }
/* Tabs menu + pills = the signed-off IIP .caps template (auto-width centred pills,
   never stretched; min-height 134 gives the Figma 39px air below a single row) */
.cap-tabs__menu {
  display: flex;
  gap: 22px 16px;
  align-items: center;
  justify-content: center;
  min-height: 134px;
  padding: 24px;
  flex-wrap: wrap;
}
.cap-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 0 1 auto;
  width: auto;
  min-width: 0;
  height: 56px;
  border-radius: 43px;
  border: 1.5px solid #8087b0;
  background: transparent;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.1;
  color: #8087b0;
  cursor: pointer;
  padding: 12px 24px;
  white-space: nowrap;
  transition: all .2s var(--ease-out);
}
.cap-tab:hover:not(.is-active) { border-color: var(--periwinkle); color: var(--periwinkle); }
.cap-tab.is-active { background: #6861e7; border-color: #6861e7; color: #fff; }
.cap-tabs__panes { position: relative; }
.cap-pane { display: flex; gap: 68px; align-items: center; padding: 12px 48px 48px; } /* 12px top = breathing room under the tab pills */
.cap-pane[hidden] { display: none; }
.cap-pane__icon {
  flex-shrink: 0;
  width: 260px;
  height: 260px;
  border-radius: 15px;
  background: linear-gradient(127deg, var(--bright-orange) 4%, var(--deep-orange) 97%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.cap-pane__icon .material-symbols-rounded {
  /* 188px = template scale (matches the 188px wght100-outlined SVG icons of the IIP caps) */
  font-size: 188px;
  /* font-weight drives the weight (Material Symbols is a variable font);
     font-variation-settings 'wght' alone renders 400 unless font-weight is set. */
  font-weight: 100;
  font-variation-settings: 'FILL' 0, 'wght' 100, 'GRAD' 0, 'opsz' 48;
}
.cap-pane__content {
  flex: 1 0 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
.cap-pane__title {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 40px;
  line-height: 1.2;
  color: var(--deep-orange);
  margin: 0;
}
.cap-pane__body { font-size: 16px; line-height: 1.5; color: var(--deep-blue); }
.cap-pane__body p { margin: 0 0 16px; }
.cap-pane__body ul { margin: 0; padding-left: 24px; }
.cap-pane__body li { margin-bottom: 4px; }

/* ===== Stats (purple circle cluster — ported from homepage .hp-stats) =====
   Copy left, a staggered 2×2 cluster of circles right. The cluster box is
   sized to the circles' Figma bounding box (715×536, circles 274) and every
   position is a % of that box, so it scales to the column. Numbers/labels
   use cqi to scale with each circle. Responsive: smaller staggered cluster on
   tablet, flowing 2×2 grid on phones. */
.cap-stats { background: #fff; padding: 112px 0 114px; }
.cap-stats__inner { display: flex; gap: 80px; align-items: center; }
.cap-stats__copy { flex: 1 0 0; max-width: 400px; display: flex; flex-direction: column; gap: 32px; min-width: 0; }
.cap-stats__head { display: flex; flex-direction: column; gap: 24px; }
.cap-stats__heading {
  font-family: var(--font-brand);
  font-weight: 700;
  /* unified section-heading size (fluid, matches challenge/verify) */
  font-size: calc(clamp(34px, 3.8vw, 48px) * var(--heading-scale));
  line-height: 1.1;
  color: #f54c2c;
  margin: 0;
  text-wrap: wrap;
}
.cap-stats__text { font-size: 18px; font-weight: 600; line-height: 1.5; color: var(--deep-blue); margin: 0; }
.cap-stats__actions { display: flex; gap: 16px; }
.cap-stats__cluster {
  flex: 1 0 0;
  position: relative;
  width: 100%;
  max-width: 715px;
  aspect-ratio: 715 / 536;
  margin-inline: auto;
  min-width: 0;
}
.cap-stat {
  position: absolute;
  width: 38.32%;                /* 274 / 715 */
  aspect-ratio: 1;
  border-radius: 50%;
  background: linear-gradient(90deg, #6762EC, #6F3DE8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  container-type: inline-size;  /* cqi = % of the circle's own width */
}
.cap-stat__num { font-family: var(--font-brand); font-weight: 700; font-size: 21.9cqi; line-height: 1.2; }
.cap-stat__label {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 8.76cqi;
  line-height: 1.3;
  max-width: 82%;
  text-wrap: balance;
}
/* staggered positions as % of the 715×536 bounding box */
.cap-stat--a { left: 20.84%; top: 0; }
.cap-stat--b { left: 61.68%; top: 0; }
.cap-stat--c { left: 0;      top: 48.88%; }
.cap-stat--d { left: 41.26%; top: 48.88%; }

/* ===== Lifecycle (numbered step cards — ported from platform .lifecycle) =====
   Centred head, then a row of numbered cards (5 across on desktop). Each card:
   number + icon on top, title + text below. Responsive: 3-per-row ≤1100,
   2-per-row ≤640, 1-per-row ≤460. */
.cap-lifecycle { background: var(--soft-grey); padding: 112px 0; }
.cap-lifecycle__head {
  text-align: center;
  max-width: 1108px;
  margin: 0 auto 80px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}
.cap-lifecycle__head h2 {
  font-family: var(--font-brand);
  font-weight: 700;
  /* unified section-heading size */
  font-size: calc(clamp(34px, 3.8vw, 48px) * var(--heading-scale));
  line-height: 1.1;
  color: var(--deep-orange);
  margin: 0;
  max-width: 994px;
}
.cap-lifecycle__head p { font-size: 20px; line-height: 1.5; color: var(--deep-blue); font-weight: 500; margin: 0; }
.cap-lifecycle-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 17px; }
.cap-lifecycle-card {
  background: #fff;
  border-radius: 15px;
  padding: 15px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-height: 387px;
}
.cap-lifecycle-card__top { height: 136px; display: flex; flex-direction: column; justify-content: space-between; }
.cap-lifecycle-card .num { font-family: var(--font-brand); font-size: 48px; color: var(--periwinkle); line-height: 1.1; font-weight: 700; }
.cap-lifecycle-card__icon { font-size: 68px; color: var(--deep-orange); font-weight: 300; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 48; align-self: center; }
.cap-lifecycle-card__bottom { display: flex; flex-direction: column; gap: 14px; }
.cap-lifecycle-card h3 { font-family: var(--font-brand); font-size: 24px; line-height: 1.3; color: var(--deep-blue); margin: 0; font-weight: 700; }
.cap-lifecycle-card p { font-size: 16px; line-height: 1.5; color: var(--deep-blue); margin: 0; font-weight: 400; }

/* ============================================================
   Responsive — largest → smallest (later wins)
   ============================================================ */
/* Very wide monitors (≥1600px): freeze the fingerprint render at exactly
   what it looks like at 1600px instead of letting it keep growing on
   1920/2560+ screens. */
@media (min-width: 1600px) {
  .cap-hero__bg { background-size: min(100%, 1600px) auto; }
}
@media (max-width: 1100px) {
  /* Hero top-aligns (kills the big top gap); body narrows */
  .cap-hero { min-height: 0; align-items: flex-start; padding: 88px 0; }
  .cap-hero__text { max-width: 430px; }
  /* Verify tabs: trim so the row fits before it wraps */
  .cap-tabs__menu { padding: 24px; gap: 14px; }
  .cap-tab { font-size: 16px; padding: 10px 16px; }
  /* Lifecycle — 3 per row, orphan row centred */
  .cap-lifecycle-grid { display: flex; flex-wrap: wrap; justify-content: center; }
  .cap-lifecycle-card { flex: 0 1 calc((100% - 2 * 17px) / 3); min-height: 348px; }
}

@media (max-width: 900px) {
  /* Challenge — homepage stack: one centred column, image on top showing the
     FULL photo at natural aspect (no crop), copy + items centred below. */
  .cap-challenge__grid { flex-direction: column; align-items: center; gap: 40px; }
  .cap-challenge__img-wrap { flex: none; width: 100%; max-width: 460px; margin-inline: auto; aspect-ratio: auto; }
  .cap-challenge__img { height: auto; }
  .cap-challenge__content,
  .cap-challenge__copy { align-items: center; text-align: center; }
  .cap-challenge__item { align-items: center; text-align: center; }

  /* Hero — single column; fingerprint shrinks to the bottom-right,
     its box capped to the button baseline (bottom:80px). */
  .cap-hero { padding: 56px 0 80px; }
  /* fingerprint box capped to the button baseline so its bottom lines up */
  .cap-hero__bg { opacity: 0.9; background-size: 76% auto; background-position: right bottom; bottom: 80px; }
  .cap-hero__title { width: auto; max-width: 100%; font-size: clamp(26px, 7.6vw, 44px); }
  .cap-hero__text { max-width: 380px; }

  /* Challenge — trim section padding + column gap (homepage 901–1100 value) */
  .cap-challenge { padding: 72px 0; }
  .cap-challenge__grid { gap: 56px; }

  /* Verify — wrap tabs, stack + centre panes (heading scales via the clamp) */
  .cap-verify { padding: 72px 0; }
  .cap-tabs__menu { gap: 12px; padding: 16px; min-height: 0; }
  .cap-tab { height: 46px; padding: 10px 16px; font-size: 15px; }
  .cap-pane { flex-direction: column; gap: 28px; padding: 48px 24px 32px; align-items: center; text-align: center; }
  .cap-pane__content { align-items: center; }
  .cap-pane__body ul { display: inline-block; text-align: left; }
  .cap-pane__icon { width: 130px; height: 130px; }      /* 50% of template 260 */
  .cap-pane__icon .material-symbols-rounded { font-size: 94px; }  /* 50% of 188 */
  .cap-pane__title { font-size: 28px; }

  /* Stats — stat-circle template (matches homepage): cluster stacks FIRST,
     copy centred below, staggered layout kept at every width (% positions
     + cqi type scale the circles down on phones). */
  .cap-stats { padding: 72px 0; }
  .cap-stats__inner { flex-direction: column; align-items: stretch; gap: 48px; }
  .cap-stats__copy { max-width: none; }
  .cap-stats__copy, .cap-stats__head { align-items: center; text-align: center; }
  .cap-stats__actions { justify-content: center; }
  .cap-stats__cluster {
    order: -1; /* circles first when stacked */
    max-width: 458px;
    margin-inline: auto;
  }
}

@media (max-width: 640px) {
  /* Hero — mobile: 18px full-width body, 28px title, large faint
     fingerprint bleeding off the bottom-right corner. */
  .cap-hero { padding: 48px 0 96px; }
  .cap-hero__eyebrow { font-size: 16px; color: #8087b0; letter-spacing: 0.8px; }
  .cap-hero__title { font-size: 28px; }
  .cap-hero__text { max-width: none; font-size: 18px; }
  /* Dev-Ready mobile template (idv node 11434-2714): full-strength MIRRORED
     fingerprint band overlapping the button, bleeding off the bottom-right.
     KNOBS: 188% = arch size; 6.02vw = left inset; 46.3vw = bottom bleed. */
  .cap-hero__bg {
    background-image: url(../assets/brand/idv-hero-fingerprint-mobile.webp);
    background-size: 188% auto;
    background-position: 6.02vw calc(100% + 46.3vw);
    bottom: 0;
    opacity: 1;
  }

  /* Challenge — single centred column on phones, image reduced */
  .cap-challenge { padding: 48px 0 72px; }
  .cap-challenge__list { flex-direction: column; gap: 32px; }

  /* Stats — tighten the 2×2 grid for phones (cqi handles type scaling) */
  .cap-stats__actions { flex-wrap: wrap; }

  /* Lifecycle — 2 per row, centred */
  .cap-lifecycle { padding: 72px 0; }
  .cap-lifecycle__head { margin-bottom: 48px; }
  .cap-lifecycle__head p { font-size: 17px; }
  .cap-lifecycle-card { flex-basis: calc((100% - 17px) / 2); text-align: center; }
}

/* Lifecycle — 1 per row on small phones */
@media (max-width: 460px) {
  .cap-lifecycle-card { flex-basis: 100%; min-height: 310px; padding: 28px; }
}
