/* ORIGEX — ORX-P01 | PG06 How We Work composition | Copyright © ORVEAX
 * M7 second pass: process clarity, role hierarchy and responsive mass control.
 * Frozen content/IA preserved; no new runtime dependency or feature family.
 */

/* --------------------------------------------------------------------------
   Hero — route-first explanation rather than a decorative media block
   -------------------------------------------------------------------------- */
.orx-how-hero {
  padding-block: clamp(3.75rem, 6vw, 6rem);
}

.orx-how-hero .orx-hero__grid {
  align-items: center;
  gap: clamp(2rem, 4.5vw, 4.75rem);
}

.orx-how-hero .orx-hero__grid > div:first-child {
  max-inline-size: 44rem;
}

.orx-how-hero .orx-media--hero {
  position: relative;
  min-inline-size: 0;
  min-block-size: clamp(24rem, 34vw, 31rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 86% 12%, rgba(255,255,255,.10), transparent 34%),
    linear-gradient(145deg,var(--orx-primary-strong),var(--orx-primary));
  color:#fff;
  display:grid;
  place-items:center;
  padding:clamp(1.4rem, 3vw, 2.4rem);
  border-color: color-mix(in srgb, var(--orx-primary) 72%, var(--orx-border));
  box-shadow: var(--orx-shadow-e2);
}

.orx-how-route {
  position: relative;
  inline-size: min(100%, 36rem);
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 0;
  align-items: start;
}

.orx-how-route::before {
  content: "";
  position: absolute;
  inset-block-start: 1.1rem;
  inset-inline: 12.5%;
  block-size: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,.22), var(--orx-accent), rgba(255,255,255,.22));
}

[dir="rtl"] .orx-how-route::before {
  background: linear-gradient(270deg, rgba(255,255,255,.22), var(--orx-accent), rgba(255,255,255,.22));
}

.orx-how-route__step {
  position: relative;
  z-index: 1;
  min-inline-size: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  padding: 0 .55rem;
  text-align: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.orx-how-route__step strong {
  font-size: var(--orx-fs-body);
  line-height: 1.35;
}

.orx-how-route__step span {
  max-inline-size: 16ch;
  font-size: var(--orx-fs-small);
  line-height: 1.5;
  opacity: .74;
}

.orx-how-route__number {
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border: 4px solid color-mix(in srgb, var(--orx-primary-strong) 78%, transparent);
  border-radius: var(--orx-radius-pill);
  display:grid;
  place-items:center;
  background:var(--orx-accent);
  color:#fff;
  font-weight:800;
  box-shadow: 0 0 0 1px rgba(255,255,255,.16);
}

/* --------------------------------------------------------------------------
   Qualification — four review lenses, compact and scannable
   -------------------------------------------------------------------------- */
.orx-qualification-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1rem;
  margin-block-start: 2rem;
}

.orx-qualification-card {
  block-size:100%;
  position:relative;
  overflow:hidden;
  padding: 1.3rem;
  border-block-start: 3px solid var(--orx-accent);
  box-shadow: none;
}

.orx-qualification-card:nth-child(2) { border-block-start-color: var(--orx-secondary); }
.orx-qualification-card:nth-child(3) { border-block-start-color: var(--orx-primary); }
.orx-qualification-card:nth-child(4) { border-block-start-color: var(--orx-border-strong); }

.orx-qualification-card::before { content:none; }
.orx-qualification-card .orx-card__copy { margin-block-end:0; }

/* --------------------------------------------------------------------------
   Four-step process — one connected operational sequence
   -------------------------------------------------------------------------- */
.orx-process-grid {
  position: relative;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  counter-reset:orx-process;
  margin-block-start: 2rem;
}

.orx-process-grid::before {
  content: "";
  position: absolute;
  inset-block-start: 2rem;
  inset-inline: 12.5%;
  block-size: 1px;
  background: linear-gradient(90deg, var(--orx-border-strong), var(--orx-secondary), var(--orx-border-strong));
}

[dir="rtl"] .orx-process-grid::before {
  background: linear-gradient(270deg, var(--orx-border-strong), var(--orx-secondary), var(--orx-border-strong));
}

.orx-process-step {
  position:relative;
  z-index: 1;
  min-inline-size: 0;
  padding:4.85rem 1.1rem 1.25rem;
  counter-increment:orx-process;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.orx-process-step + .orx-process-step {
  border-inline-start: 1px solid color-mix(in srgb, var(--orx-border) 75%, transparent);
}

.orx-process-step::before {
  content:"0" counter(orx-process);
  position:absolute;
  inset-block-start:.45rem;
  inset-inline-start:50%;
  inline-size: 3.1rem;
  block-size: 3.1rem;
  transform: translateX(-50%);
  display:grid;
  place-items:center;
  border: 5px solid var(--orx-surface-soft);
  border-radius: var(--orx-radius-pill);
  background: var(--orx-primary-strong);
  color:#fff;
  font-size:.9rem;
  font-weight:800;
  line-height:1;
  box-shadow: 0 7px 18px rgba(8,42,47,.12);
}

.orx-process-step .orx-icon-box {
  margin-inline: auto;
}

.orx-process-step .orx-card__copy {
  max-inline-size: 28ch;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Roles — ORIGEX is the coordination layer, not an equal generic card
   -------------------------------------------------------------------------- */
.orx-role-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
  margin-block-start: 2rem;
  align-items: stretch;
}

.orx-role-card {
  min-inline-size: 0;
  block-size:100%;
  display:flex;
  flex-direction:column;
  gap:var(--orx-space-4);
  padding: clamp(1.3rem, 2.5vw, 1.7rem);
  box-shadow: none;
}

.orx-role-card:nth-child(2) {
  border-color: var(--orx-primary-strong);
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.10), transparent 45%),
    var(--orx-primary-strong);
  color: #fff;
  box-shadow: var(--orx-shadow-e1);
}

.orx-role-card:nth-child(2) .orx-card__title { color:#fff; }
.orx-role-card:nth-child(2) .orx-icon-box {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  color:#fff;
}
.orx-role-card:nth-child(2) li { color: rgba(255,255,255,.78); }

.orx-role-card ul {
  margin:0;
  padding-inline-start:1.2rem;
  display:grid;
  gap:var(--orx-space-3);
}

[dir="rtl"] .orx-role-card ul {
  padding-inline-start:0;
  padding-inline-end:1.2rem;
}

.orx-how-boundary {
  border:1px solid var(--orx-border);
  border-inline-start: 4px solid var(--orx-accent);
  border-radius:var(--orx-radius-md);
  padding:var(--orx-space-6);
  background:var(--orx-surface-soft);
  display:flex;
  gap:var(--orx-space-4);
  align-items:flex-start;
}

.orx-how-boundary .orx-icon-box { flex:0 0 auto; }

/* --------------------------------------------------------------------------
   Required information — text first, checklist second
   -------------------------------------------------------------------------- */
.orx-info-layout {
  display:grid;
  grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr);
  gap:clamp(2rem, 5vw, 4.5rem);
  align-items:start;
}

.orx-info-layout > div:first-child {
  position: sticky;
  inset-block-start: calc(var(--orx-header-height) + 2rem);
}

.orx-required-list {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:.75rem;
  margin:0;
  padding:0;
  list-style:none;
}

.orx-required-list li {
  min-inline-size: 0;
  display:flex;
  gap:var(--orx-space-3);
  align-items:flex-start;
  padding:1rem;
  border:1px solid var(--orx-border);
  border-radius:var(--orx-radius-md);
  background:var(--orx-surface);
}

.orx-required-list .orx-icon-box { flex:0 0 auto; }

/* --------------------------------------------------------------------------
   Decision flow — semantic outcome states; color is supplemental only
   -------------------------------------------------------------------------- */
.orx-decision-flow {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:1rem;
  margin-block-start: 1.75rem;
}

.orx-decision-card {
  position: relative;
  min-inline-size: 0;
  block-size:100%;
  padding: 1.35rem;
  border-block-start:4px solid var(--orx-border-strong);
  box-shadow:none;
}

.orx-decision-card::after {
  content: "";
  position: absolute;
  inset-inline: 1.35rem;
  inset-block-end: .85rem;
  inline-size: 2.25rem;
  block-size: 2px;
  background: currentColor;
  opacity: .18;
}

.orx-decision-card--go { border-block-start-color:var(--orx-success); }
.orx-decision-card--clarify { border-block-start-color:var(--orx-warning); }
.orx-decision-card--hold { border-block-start-color:var(--orx-info); }

/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */
@media (max-width:1199.98px) {
  .orx-qualification-grid,
  .orx-process-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }

  .orx-process-grid::before { content:none; }
  .orx-process-step:nth-child(3) { border-inline-start: 0; }

  .orx-how-route { grid-template-columns:repeat(2,minmax(0,1fr)); gap: 1rem; }
  .orx-how-route::before { content:none; }
  .orx-how-route__step {
    padding: 1rem;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: var(--orx-radius-md);
    background: rgba(255,255,255,.06);
  }
}

@media (max-width:991.98px) {
  .orx-how-hero {
    padding-block: 3rem 3.5rem;
  }

  .orx-how-hero .orx-hero__grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .orx-how-hero .orx-media--hero {
    min-block-size: 0;
  }

  .orx-info-layout { grid-template-columns:1fr; }
  .orx-info-layout > div:first-child { position: static; }
}

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */
@media (max-width:767.98px) {
  .orx-how-hero {
    padding-block: 2.6rem 3rem;
  }

  .orx-how-hero .orx-media--hero {
    padding: 1rem;
  }

  .orx-how-route,
  .orx-qualification-grid,
  .orx-process-grid,
  .orx-role-grid,
  .orx-info-layout,
  .orx-decision-flow {
    grid-template-columns:1fr;
  }

  .orx-how-route { gap:.65rem; }
  .orx-how-route__step {
    min-block-size: 0;
    display:grid;
    grid-template-columns:auto 1fr;
    grid-template-areas:"num title" "num copy";
    align-items:start;
    text-align:start;
    column-gap:.75rem;
    row-gap:.15rem;
    padding:.8rem;
  }
  .orx-how-route__number { grid-area:num; }
  .orx-how-route__step strong { grid-area:title; }
  .orx-how-route__step span { grid-area:copy; max-inline-size:none; }

  .orx-process-grid { gap:0; }
  .orx-process-step,
  .orx-process-step:nth-child(3) {
    min-block-size:0;
    padding-block:.35rem 1.5rem;
    padding-inline:4.25rem .25rem;
    border-inline-start:0;
    text-align:start;
  }

  .orx-process-step::after {
    content:"";
    position:absolute;
    inset-inline-start:1.5rem;
    inset-block:3.1rem 0;
    inline-size:1px;
    background:var(--orx-border-strong);
  }

  .orx-process-step:last-child::after { content:none; }

  .orx-process-step::before {
    inset-block-start:0;
    inset-inline-start:0;
    inline-size:3rem;
    block-size:3rem;
    transform:none;
    border-width:5px;
  }

  .orx-process-step .orx-icon-box {
    margin-inline:0;
  }

  .orx-process-step .orx-card__copy {
    max-inline-size:none;
    margin-inline:0;
  }

  .orx-required-list { grid-template-columns:1fr; }

  .orx-role-card:nth-child(2) { order:-1; }
}

@media (prefers-reduced-motion:reduce) {
  .orx-how-route__step { backdrop-filter:none; }
}

/* M7 first-six re-audit — hero geometry hardening */
@media (min-width: 992px) {
  .orx-how-hero .orx-hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(25rem, .92fr);
  }
}
@media (max-width: 991.98px) {
  .orx-how-hero {
    padding-block: 2.4rem 2.9rem;
  }
  .orx-how-hero .orx-hero__grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .orx-how-hero .orx-media--hero {
    min-block-size: 0;
    padding: 1.2rem;
  }
  .orx-how-route {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .orx-how-route::before {
    content: "";
  }
  .orx-how-route__step {
    padding: 0 .4rem;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
}
@media (max-width: 575.98px) {
  .orx-how-hero {
    padding-block: 1.75rem 2.2rem;
  }
  .orx-how-hero .orx-hero__grid {
    gap: .9rem;
  }
  .orx-how-hero .orx-media--hero {
    padding: .85rem;
  }
  .orx-how-route {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
  }
  .orx-how-route::before {
    content: none;
  }
  .orx-how-route__step {
    min-block-size: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "num title" "num copy";
    align-items: start;
    text-align: start;
    column-gap: .6rem;
    row-gap: .1rem;
    padding: .65rem;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--orx-radius-md);
    background: rgba(255,255,255,.05);
  }
}


/* M7 first-six re-audit correction — bounded route visual on smaller
 * viewports. The four canonical stages remain fully visible; only excess
 * media mass is removed. */
@media (max-width: 991.98px) {
  .orx-how-hero .orx-media--hero {
    block-size: 250px;
    min-block-size: 250px;
    aspect-ratio: auto;
  }
}
@media (max-width: 575.98px) {
  .orx-how-hero .orx-media--hero {
    block-size: 220px;
    min-block-size: 220px;
  }
}


/* M7 first-six re-audit gate — override the shared 4/5 mobile media ratio
 * for this information-dense route visual. */
@media (max-width: 991.98px) {
  .orx-how-hero .orx-media.orx-media--hero {
    block-size: 220px !important;
    min-block-size: 220px !important;
    aspect-ratio: auto !important;
  }
}
@media (max-width: 575.98px) {
  .orx-how-hero .orx-media.orx-media--hero {
    block-size: 180px !important;
    min-block-size: 180px !important;
  }
  .orx-how-hero h1 {
    font-size: clamp(2rem, 9vw, 2.65rem);
  }
  .orx-how-hero .orx-lead {
    line-height: 1.6;
  }
}