/* ==========================================================================
   Access Matrix — Access & Identity page, below "Why identity comes first".
   Content: a role x resource permission matrix (the visual payoff of the essay
   above — "access reads like your org chart, not a spreadsheet of exceptions").
   Layout borrows the HOME comparison table idiom (sec-why: rounded hairline grid,
   muted mono uppercase header) but gives it its own character — a true matrix
   with centered permission cells, blue-gradient check marks, qualified-grant
   pills, and a highlighted non-human AGENT row (identity is first-class).
   Supporting focal, not the page hero: restrained warm band (#f7f6f2, echoes
   the hero) + a single white floating table, blue primary (#0036FA -> #4E87FC)
   used only on grants / accents. Motion: site scroll-reveal rise + per-row
   stagger (~0.6s ease) + a check-pop micro-interaction.
   ========================================================================== */

.pg-idmx {
  background-color: #f4f7fd;
  padding: 104px 0;
}

.pg-idmx__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 80px;
}

/* --- masthead --- */
.pg-idmx__kicker {
  font-family: "Cabin", sans-serif;
  font-weight: 600;
  font-size: 13px;
  line-height: 16px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #0036fa, #4e87fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pg-idmx__title {
  font-family: "Cabin", sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.14;
  letter-spacing: -0.01em;
  color: #12140f;
  margin-top: 18px;
  max-width: 620px;
}

/* --- the matrix (a floating white table) --- */
.pg-idmx__table {
  --cols: minmax(210px, 1.5fr) repeat(4, minmax(0, 1fr));
  margin-top: 48px;
  background-color: #fff;
  border: 1px solid #e4e9f4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 24px 60px -34px rgba(18, 20, 15, 0.28);
}

.pg-idmx__row {
  display: grid;
  grid-template-columns: var(--cols);
  align-items: stretch;
  border-bottom: 1px solid #eef1f8;
  transition: background-color 0.35s ease;
}

.pg-idmx__row:last-child {
  border-bottom: none;
}

/* header row */
.pg-idmx__row--head {
  background-color: #eff4fd;
}

.pg-idmx__th {
  padding: 16px 24px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a968c;
  display: flex;
  align-items: center;
}

.pg-idmx__th--res {
  justify-content: center;
}

/* body cells */
.pg-idmx__cell {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  border-left: 1px solid #eef1f8;
  min-height: 74px;
}

.pg-idmx__cell--role {
  border-left: none;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 5px;
}

.pg-idmx__cell--res {
  justify-content: center;
}

/* --- role identity --- */
.pg-idmx__role {
  font-family: "Cabin", sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.2;
  color: #12140f;
}

.pg-idmx__meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #a29e93;
}

.pg-idmx__meta-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background-color: #c8c3b6;
}

.pg-idmx__owner {
  color: #0036fa;
}

/* --- permission cell values --- */
.pg-idmx__yes {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, #0036fa, #4e87fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* a plain granted check gets a soft blue disc */
.pg-idmx__grant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: #eaf0ff;
  transition: transform 0.3s ease, background-color 0.3s ease;
}

/* qualified grant: check + a scoped label pill */
.pg-idmx__grant--tagged {
  width: auto;
  height: auto;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  gap: 6px;
  background-color: #eaf0ff;
}

.pg-idmx__tag {
  font-family: "Cabin", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #0036fa;
}

/* denied: a quiet hairline dash */
.pg-idmx__no {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background-color: #d8d3c7;
}

/* --- the agent row: non-human identity is first-class --- */
.pg-idmx__row--agent {
  background-color: #f4f7ff;
  position: relative;
}

.pg-idmx__row--agent::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background-image: linear-gradient(180deg, #0036fa, #4e87fc);
}

.pg-idmx__row--agent .pg-idmx__cell {
  border-left-color: #e6ebfb;
}

.pg-idmx__badge {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0036fa;
  background-color: #e2e9ff;
  padding: 2px 7px;
  border-radius: 5px;
}

/* --- hover micro-interaction --- */
.pg-idmx__row--body:hover {
  background-color: #f6f9ff;
}

.pg-idmx__row--body:hover .pg-idmx__grant {
  transform: scale(1.08);
  background-color: #dfe8ff;
}

/* --- footnote --- */
.pg-idmx__note {
  margin-top: 22px;
  font-family: "Cabin", sans-serif;
  font-size: 14px;
  line-height: 22px;
  color: #a29e93;
  max-width: 760px;
}

.pg-idmx__note b {
  color: #6f6a5f;
  font-weight: 600;
}

/* --- scroll-reveal (site motion language) --- */
.pg-idmx__head,
.pg-idmx__row--body,
.pg-idmx__note {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.35s ease;
}

.pg-idmx__head.is-in,
.pg-idmx__row--body.is-in,
.pg-idmx__note.is-in {
  opacity: 1;
  transform: none;
}

.pg-idmx__row--body.is-in:nth-child(2) { transition-delay: 0.06s; }
.pg-idmx__row--body.is-in:nth-child(3) { transition-delay: 0.13s; }
.pg-idmx__row--body.is-in:nth-child(4) { transition-delay: 0.20s; }
.pg-idmx__row--body.is-in:nth-child(5) { transition-delay: 0.27s; }
.pg-idmx__row--body.is-in:nth-child(6) { transition-delay: 0.34s; }

/* check-pop once the row has arrived */
.pg-idmx__row--body .pg-idmx__grant {
  transform: scale(0.6);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, background-color 0.3s ease;
}

.pg-idmx__row--body.is-in .pg-idmx__grant {
  transform: scale(1);
  opacity: 1;
  transition-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
  .pg-idmx__head,
  .pg-idmx__row--body,
  .pg-idmx__note,
  .pg-idmx__row--body .pg-idmx__grant {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --- responsive --- */
@media (max-width: 1040px) {
  .pg-idmx {
    padding: 80px 0;
  }
  .pg-idmx__inner {
    padding: 0 24px;
  }
  .pg-idmx__title {
    font-size: 32px;
  }
}

@media (max-width: 760px) {
  .pg-idmx__title {
    font-size: 28px;
  }
  .pg-idmx__table {
    --cols: 1fr;
    border-radius: 14px;
  }
  /* hide the desktop header row; each row becomes a stacked card */
  .pg-idmx__row--head {
    display: none;
  }
  .pg-idmx__row {
    padding: 6px 4px 14px;
  }
  .pg-idmx__cell {
    border-left: none;
    min-height: 0;
    padding: 11px 22px;
    justify-content: space-between;
  }
  .pg-idmx__cell--role {
    padding-top: 18px;
    padding-bottom: 8px;
  }
  .pg-idmx__cell--res {
    justify-content: space-between;
  }
  /* surface the resource name on each stacked cell */
  .pg-idmx__cell--res::before {
    content: attr(data-label);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #a29e93;
  }
  .pg-idmx__row--agent .pg-idmx__cell {
    border-left: none;
  }
}
