/* =============================================================
   Consultancy study pages
   Hero with an illustrative plot, trigger cards, a method strip,
   tools and scenarios side by side, deliverable cards, then the
   shared case links, FAQ and paper close.
   ============================================================= */
.st { --st-g: #5dd2a6; --st-b: #8ec5ff; --st-a: #e9a566; --st-c: #c97b3d; --st-sheet: #0f1720; }

/* ---------- Hero ---------- */
.st .app-hero { padding-top: clamp(48px, 5.5vw, 84px); }
.st .app-hero .breadcrumb { margin-bottom: clamp(26px, 3vw, 40px); }
.st-hg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 4.5vw, 72px); align-items: center; }
.st .app-hero h1 { font-size: clamp(32px, 3.9vw, 56px); line-height: 1.04; max-width: 11.5em; }
.st-lead { margin-top: 20px; max-width: 32em; font-size: clamp(17px, 1.35vw, 19px); line-height: 1.55; color: var(--text-mute); text-wrap: pretty; }
.st-btns { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
.st-btns .btn-ghost { color: var(--text); border-color: var(--line-2); }
.st-btns .btn-ghost:hover { color: var(--ink); }

/* figure: framed like a drawing sheet */
.st-fig { margin: 0; background: #0a1017; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 12px 16px 16px; box-shadow: 0 30px 80px -40px rgba(0,0,0,0.8); }
.st-fig-h { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0 10px; margin-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.07); font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim); }
.st-fig-h span:first-child { color: var(--copper-hi); }
.st-fig svg { display: block; width: 100%; height: auto; direction: ltr; overflow: visible; }
.st-leg { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 13px; color: var(--text-mute); }
.st-leg li { display: inline-flex; align-items: center; gap: 8px; }
.st-leg i { display: inline-block; width: 18px; border-top: 2px solid currentColor; }
.st-leg i.d { border-top-style: dashed; }
.st-leg i.bar { width: 11px; height: 11px; border: 0; border-radius: 2px; background: currentColor; }
.st-leg i.ghost { width: 11px; height: 11px; border: 1.5px solid currentColor; border-radius: 2px; background: rgba(201,123,61,0.22); }
.st-leg .a { color: var(--st-a); } .st-leg .c { color: var(--st-c); } .st-leg .b { color: var(--st-b); } .st-leg .g { color: var(--st-g); } .st-leg .w { color: rgba(232,229,223,0.85); }
.st-cap { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--text-dim); text-wrap: pretty; }

/* plot marks */
.sp-ax { fill: none; stroke: rgba(232,229,223,0.32); stroke-width: 1; }
.sp-gd { fill: none; stroke: rgba(232,229,223,0.07); stroke-width: 1; }
.sp-t { font-size: 11px; fill: rgba(232,229,223,0.62); }
.sp-tk { font-size: 11px; fill: var(--st-a); }
.sp-tg { font-size: 11px; fill: var(--st-g); }
.sp-tb { font-size: 11px; fill: var(--st-b); }
.sp-l { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sp-thin { stroke-width: 1.5; }
.sp-a { stroke: var(--st-a); } .sp-c { stroke: var(--st-c); } .sp-b { stroke: var(--st-b); } .sp-g { stroke: var(--st-g); } .sp-w { stroke: rgba(232,229,223,0.85); }
.sp-d { stroke-dasharray: 5 5; }
.sp-faint { opacity: 0.5; }
.sp-band { fill: rgba(233,165,102,0.08); }
.sp-bandb { fill: rgba(142,197,255,0.06); }
.sp-x { fill: none; stroke: var(--st-a); stroke-width: 2; stroke-linecap: round; }
.sp-n { stroke: none; } .sp-n.sp-c { fill: var(--st-c); } .sp-n.sp-a { fill: var(--st-a); } .sp-n.sp-b { fill: var(--st-b); }
.sp-op { fill: #0a1017; stroke-width: 2; }
.sp-bar-r { fill: rgba(201,123,61,0.22); stroke: var(--st-c); stroke-width: 1.2; }
.sp-bar-g { fill: var(--st-g); }
.sp-lim { fill: none; stroke: rgba(232,229,223,0.9); stroke-width: 2; stroke-linecap: round; }

/* drawing in on reveal */
.sp-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
.reveal:not(.in) .sp-draw { stroke-dashoffset: 1; }
.reveal.in .sp-draw { animation: stDraw 1.6s var(--ease) both; animation-delay: calc(0.35s + var(--d, 0s)); }
.sp-bar { transform-box: fill-box; transform-origin: 50% 100%; }
.reveal:not(.in) .sp-bar { transform: scaleY(0); }
.reveal.in .sp-bar { animation: stGrow 0.8s var(--ease) both; animation-delay: calc(0.35s + var(--i, 0) * 0.06s); }
@keyframes stDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes stGrow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

/* compliance matrix */
.st-mx { display: grid; gap: 6px; font-size: 13.5px; }
.st-mx-r { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); gap: 6px; align-items: center; }
.st-mx-r > span:first-child { color: var(--text); padding-inline-end: 6px; }
.st-mx-hd span { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); text-align: center; }
.st-mx-r i { display: grid; place-items: center; height: 38px; border-radius: 8px; background: rgba(93,210,166,0.08); border: 1px solid rgba(93,210,166,0.22); }
.st-mx-r i svg { width: 16px; height: 16px; fill: none; stroke: var(--st-g); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.reveal:not(.in) .st-mx-r i { opacity: 0; transform: scale(0.7); }
.reveal.in .st-mx-r i { animation: stPop 0.4s var(--ease) both; animation-delay: calc(0.35s + var(--i, 0) * 0.05s); }
.st-mx-f { margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.07); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-g); }
@keyframes stPop { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.st-sec { padding: clamp(56px, 7vw, 100px) 0; background: var(--ink); }
.st-sec.alt { background: var(--ink-2); border-block: 1px solid var(--line); }
.st-h2 { font-family: var(--font-display); font-weight: 500; font-size: clamp(28px, 3.3vw, 46px); line-height: 1.06; letter-spacing: -0.03em; max-width: 15em; text-wrap: balance; }
.st-h2 em { font-style: normal; color: var(--copper-hi); }
.st-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.st-k { font-family: var(--font-mono); font-weight: 400; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 14px; }

/* when it's needed */
.st-when { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; counter-reset: w; }
.st-when li { counter-increment: w; display: flex; flex-direction: column; gap: 14px; padding: 20px 22px 24px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.st-when li::before { content: counter(w, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; color: var(--copper-hi); }

/* method strip */
.st-steps { list-style: none; margin-top: clamp(34px, 4vw, 56px); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
.st-steps li { position: relative; padding-top: 34px; }
.st-steps li::before { content: ''; position: absolute; top: 4px; inset-inline-start: 0; width: 13px; height: 13px; border-radius: 50%; background: var(--ink-2); border: 2px solid var(--copper-hi); box-sizing: border-box; }
.st-steps li::after { content: ''; position: absolute; top: 10px; inset-inline-start: 22px; inset-inline-end: -12px; height: 1px; background: rgba(232,229,223,0.18); transform-origin: left center; }
html[dir="rtl"] .st-steps li::after { transform-origin: right center; }
.st-steps li:last-child::after { display: none; }
.reveal:not(.in).st-steps li::after { transform: scaleX(0); }
.reveal.in.st-steps li::after { animation: stRail 0.6s var(--ease) both; animation-delay: calc(0.3s + var(--i, 0) * 0.14s); }
.st-steps b { display: block; font-family: var(--font-mono); font-weight: 500; font-size: 12px; color: var(--copper-hi); }
.st-steps h3 { margin-top: 8px; font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
.st-steps p { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--text-mute); text-wrap: pretty; }
@keyframes stRail { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* tools and scenarios */
.st-two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 3.5vw, 48px); }
.st-tools { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.st-tools li { display: flex; flex-direction: column; gap: 6px; padding: 15px 18px; background: var(--st-sheet); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; }
.st-tools b { font-weight: 500; font-size: 16px; color: var(--text); }
.st-tools span { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--st-b); }
.st-scen { list-style: none; display: grid; gap: 10px; }
.st-scen li { position: relative; padding: 15px 18px 17px; padding-inline-start: 40px; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; font-size: 15px; line-height: 1.5; color: var(--text); text-wrap: pretty; }
.st-scen li::before { content: ''; position: absolute; top: 22px; inset-inline-start: 18px; width: 10px; height: 2px; background: var(--st-b); box-shadow: 0 -5px 0 rgba(142,197,255,0.45), 0 5px 0 rgba(142,197,255,0.45); }

/* deliverables and checks */
.st-dels { list-style: none; margin-top: clamp(30px, 4vw, 48px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.st-dels li { position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 168px; padding: 20px 20px 22px; background: var(--st-sheet); border: 1px solid rgba(255,255,255,0.12); border-radius: 8px 22px 8px 8px; }
html[dir="rtl"] .st-dels li { border-radius: 22px 8px 8px 8px; }
.st-dels li::after { content: ''; position: absolute; top: -1px; inset-inline-end: -1px; width: 22px; height: 22px; border-start-end-radius: 22px; background: linear-gradient(225deg, var(--ink-2) 50%, rgba(255,255,255,0.12) 50%); }
html[dir="rtl"] .st-dels li::after { background: linear-gradient(135deg, var(--ink-2) 50%, rgba(255,255,255,0.12) 50%); }
.st-dels b { font-family: var(--font-mono); font-weight: 500; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--copper-hi); }
.st-dels span { font-size: 16px; line-height: 1.45; color: var(--text); text-wrap: pretty; }
.st-qual { margin-top: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 22px 24px; border: 1px solid rgba(93,210,166,0.26); border-radius: 14px; background: rgba(93,210,166,0.05); }
.st-qual > svg { width: 22px; height: 22px; margin-top: 2px; fill: none; stroke: var(--st-g); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.st-qual .st-k { color: var(--st-g); margin-bottom: 8px; }
.st-qual p { max-width: 62em; font-size: 16px; line-height: 1.6; color: var(--text); text-wrap: pretty; }

/* FAQ */
.faq-section .faq { max-width: 840px; }
.st .cta-rel a { white-space: nowrap; }
.faq-section .faq-item { border-top: 1px solid rgba(128,128,128,0.28); }
.faq-section .faq-item:last-child { border-bottom: 1px solid rgba(128,128,128,0.28); }
.faq-section summary { cursor: pointer; list-style: none; padding: 22px 2px; font-family: var(--font-display); font-weight: 500; font-size: clamp(17px, 2.2vw, 22px); line-height: 1.3; display: flex; justify-content: space-between; gap: 18px; align-items: baseline; }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::after { content: "+"; font-family: var(--font-mono); font-size: 20px; opacity: 0.55; flex: 0 0 auto; }
.faq-section .faq-item[open] summary::after { content: "\2013"; }
.faq-section .faq-a { padding: 0 2px 26px; max-width: 47.5em; line-height: 1.72; font-size: 16px; color: var(--text-mute); }
html[dir="rtl"] .faq-section .faq-a { line-height: 1.85; }

/* Arabic: no tracking on Arabic labels */
html[dir="rtl"] :is(.st-fig-h, .st-k, .st-dels b, .st-tools span, .st-mx-f) { letter-spacing: 0; }
html[dir="rtl"] .st-lead { line-height: 1.75; }
html[dir="rtl"] :is(.st-fig-h, .st-k, .st-dels b, .st-tools span, .st-mx-f) { font-size: 12.5px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .st-dels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-dels li { min-height: 0; }
}
@media (max-width: 960px) {
  .st-hg { grid-template-columns: minmax(0, 1fr); }
  .st-fig { max-width: 640px; }
  .st-split { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .st-steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .st-steps li { padding: 0 0 26px; padding-inline-start: 36px; }
  .st-steps li::before { top: 3px; }
  .st-steps li::after { top: 22px; bottom: 2px; inset-inline-start: 6px; inset-inline-end: auto; width: 1px; height: auto; transform-origin: center top; }
  html[dir="rtl"] .st-steps li::after { transform-origin: center top; }
  .reveal:not(.in).st-steps li::after { transform: scaleY(0); }
  .reveal.in.st-steps li::after { animation-name: stRailV; }
  .st-steps h3 { margin-top: 4px; }
  .st-two { grid-template-columns: minmax(0, 1fr); }
}
@keyframes stRailV { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (max-width: 640px) {
  .st-when { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .st-when li { flex-direction: row; align-items: baseline; gap: 14px; padding: 16px 18px; font-size: 15.5px; }
  .st-fig svg :is(.sp-t, .sp-tk, .sp-tg, .sp-tb) { font-size: 15px; }
  .st-fig svg .sp-ts { font-size: 13.5px; }
  .st-dels { grid-template-columns: minmax(0, 1fr); }
  .st-fig { padding: 10px 12px 14px; }
  .st-mx { font-size: 12.5px; }
  .st-mx-r { grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr)); gap: 4px; }
  .st-mx-hd span { font-size: 9.5px; letter-spacing: 0; }
  .st-mx-r i { height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal.in :is(.sp-draw, .sp-bar, .st-mx-r i), .reveal.in.st-steps li::after { animation-duration: 0.01s; animation-delay: 0s; }
}
