/* PPS — Capabilities page: tabs on desktop, accordion on phones
   Loaded in numeric order; later files may refine earlier ones. */

/* ==========================================================================
   Capabilities: tabs (desktop) / accordion (phones)
   ========================================================================== */
.cap-tabs { display: grid; grid-template-columns: 360px 1fr; gap: 28px; align-items: stretch; }
.cap-nav { display: grid; gap: 6px; align-content: start; }
.cap-tab { display: grid; grid-template-columns: 30px 24px 1fr; align-items: center; gap: 12px; width: 100%; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); color: var(--navy); font: inherit; font-weight: 500; font-size: .95rem; text-align: start; cursor: pointer; position: relative; transition: background .3s, color .3s, border-color .3s, transform .3s var(--ease); }
.cap-tab .icon { width: 22px; height: 22px; color: var(--gold); transition: color .3s; }
.ct-num { font-size: .78rem; font-weight: 600; color: var(--silver); transition: color .3s; }
.cap-tab:hover { border-color: var(--gold); transform: translateX(4px); }
[dir="rtl"] .cap-tab:hover { transform: translateX(-4px); }
.cap-tab.active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.cap-tab.active .ct-num { color: var(--gold-light); }
.cap-tab.active .icon { color: var(--gold-light); }
.cap-tab.active::after { content: ""; position: absolute; inset-block: 12px; inset-inline-start: -1px; width: 3px; border-radius: 3px; background: var(--gold); }
.cap-tab:focus-visible, .cp-head:focus-visible, .cp-step:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.cap-panels { position: relative; }
.cap-panel { height: 100%; }
.cp-head { display: none; }
.cp-body { position: relative; overflow: hidden; height: 100%; display: flex; flex-direction: column; padding: 52px 52px 40px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); }
.cp-num { position: absolute; top: 10px; inset-inline-end: 34px; font-size: 9rem; font-weight: 600; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(170, 137, 59, .28); pointer-events: none; }
.cp-icon { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: var(--navy); color: var(--gold-light); margin-block-end: 28px; box-shadow: 0 14px 30px rgba(25, 36, 58, .18); }
.cp-icon .icon { width: 34px; height: 34px; }
.cp-body .cap-label { margin-block-end: 8px; }
.cp-body h3 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); line-height: 1.25; margin-block-end: 18px; max-width: 560px; }
.cp-body p { max-width: 640px; font-size: 1.02rem; }
.cp-body p + p { margin-block-start: 12px; }
.cp-nav { display: flex; align-items: center; gap: 10px; margin-block-start: auto; padding-block-start: 34px; }
.cp-count { margin-inline-end: auto; font-size: .82rem; font-weight: 600; letter-spacing: .1em; color: var(--silver); }
.cp-step { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer; transition: background .3s, color .3s, border-color .3s; }
.cp-step .icon { width: 18px; height: 18px; }
.cp-step[data-step="-1"] .icon { transform: scaleX(-1); }
.cp-step:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* only the selected panel is shown once JS is running */
.js .cap-tabs .cap-panel:not(.active) { display: none; }
.cap-panel.active .cp-body > * { animation: capIn .55s var(--ease) both; }
.cap-panel.active .cp-body > :nth-child(2) { animation-delay: .04s; }
.cap-panel.active .cp-body > :nth-child(3) { animation-delay: .08s; }
.cap-panel.active .cp-body > :nth-child(4) { animation-delay: .12s; }
.cap-panel.active .cp-body > :nth-child(n+5) { animation-delay: .16s; }
@keyframes capIn { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: none; } }
.cap-panel.active .cp-num { animation-name: capNum; }
@keyframes capNum { from { opacity: 0; translate: 30px 0; } to { opacity: 1; translate: none; } }
@media (prefers-reduced-motion: reduce) { .cap-panel.active .cp-body > * { animation: none; } }

/* phones: accordion */
@media (max-width: 900px) {
  .cap-tabs { grid-template-columns: 1fr; gap: 10px; }
  .cap-nav { display: none; }
  .js .cap-tabs .cap-panel:not(.active) { display: block; }
  .cap-panel { height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--white); overflow: hidden; }
  .cap-panel + .cap-panel { margin-block-start: 10px; }
  .cp-head { display: grid; grid-template-columns: 30px 22px 1fr 18px; align-items: center; gap: 12px; width: 100%; padding: 16px 18px; border: 0; background: none; font: inherit; font-weight: 500; color: var(--navy); text-align: start; cursor: pointer; }
  .cp-head .icon { width: 20px; height: 20px; color: var(--gold); }
  .cp-head .icon:last-child { width: 16px; height: 16px; color: var(--silver); transition: transform .3s; }
  .cap-panel.open .cp-head { background: var(--navy); color: var(--white); }
  .cap-panel.open .cp-head .ct-num, .cap-panel.open .cp-head .icon { color: var(--gold-light); }
  .cap-panel.open .cp-head .icon:last-child { transform: rotate(180deg); }
  .cp-body { display: none; padding: 26px 20px 22px; border: 0; border-radius: 0; height: auto; }
  .cap-panel.open .cp-body { display: flex; }
  .cp-num { font-size: 5rem; inset-inline-end: 16px; }
  .cp-icon { width: 56px; height: 56px; border-radius: 16px; margin-block-end: 18px; }
  .cp-nav { display: none; }
  .cap-panel.active .cp-body > * { animation: none; }
  .cap-panel.open .cp-body > * { animation: capIn .45s var(--ease) both; }
}

/* Journey stages centred in their columns (desktop), so the row sits in the middle of the page */
@media (min-width: 1025px) {
  .step.step-icon { text-align: center; }
  .step.step-icon .step-dot { inset-inline-start: 50%; translate: -50% 0; }
  [dir="rtl"] .step.step-icon .step-dot { translate: 50% 0; }
  .step.step-icon::after { inset-inline-start: calc(50% + 40px); inset-inline-end: auto; width: calc(100% + 22px - 80px); }
  .step.step-icon:hover .step-dot { transform: scale(1.08); }
}
