/* ==========================================================================
   Solutions hub (/solutions/), Solutions module. Loaded with the sl_showcase
   block, so only on the hub. Navy + red #A50000, spacing tokens (PR #105),
   logical properties only.
   ========================================================================== */

/* Section headings on the hub: 40px on desktop, like the Australia page. */
@media (min-width: 901px) {
  :root main h2.display { font-size: 40px; }
}

/* ---- Solutions in delivery (sl_showcase) ---- */
.sl-show { position: relative; overflow: hidden; }
.sl-show::before {
  content: ""; position: absolute; inset-block-start: -30%; inset-inline-end: -10%; inline-size: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(165, 0, 0, .28) 0, rgba(165, 0, 0, 0) 65%); pointer-events: none;
}
.sl-show > .wrap { position: relative; }
.sl-tabs {
  display: flex; gap: var(--space-2); margin-block-end: var(--space-5);
  overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.sl-tabs::-webkit-scrollbar { display: none; }
.sl-tabs[hidden] { display: none; }
.sl-tab {
  position: relative; flex: 1 0 auto; display: flex; align-items: center; gap: var(--space-3);
  min-block-size: 64px; padding-block: var(--space-3); padding-inline: var(--space-4);
  border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .04); color: var(--white);
  font: inherit; text-align: start; cursor: pointer; scroll-snap-align: start; white-space: nowrap;
  transition: background-color .25s ease, border-color .25s ease;
}
.sl-tab:hover { border-color: rgba(255, 255, 255, .5); }
.sl-tab[aria-selected="true"] { background: var(--white); border-color: var(--white); color: var(--navy-900); }
.sl-tab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sl-tab-no { font: 600 14px/1 var(--f-mono); color: var(--red); }
.sl-tab[aria-selected="false"] .sl-tab-no { color: rgba(255, 255, 255, .6); }
.sl-tab-copy { display: flex; flex-direction: column; gap: 2px; }
.sl-tab-copy b { font-family: var(--f-card-title); font-weight: var(--fw-card-title); letter-spacing: var(--tracking-card-title); text-transform: var(--tt-card-title); font-size: 16px; line-height: 1.15; }
.sl-tab-copy small { font-size: 13px; opacity: .75; }
.sl-tab-bar { position: absolute; inset-inline-start: 0; inset-block-end: -1px; block-size: 3px; inline-size: 0; background: var(--red); }

.sl-cases { display: grid; gap: var(--space-6); }
.sl-case { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; background: var(--navy-800); border: 1px solid rgba(255, 255, 255, .12); }
.sl-case[hidden] { display: none; }
.sl-case-media { position: relative; margin: 0; min-block-size: 320px; overflow: hidden; background: var(--navy-950); }
.sl-case-media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.sl-case-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 26, 48, 0) 50%, rgba(10, 26, 48, .7)); pointer-events: none; }
.sl-case-chips { position: absolute; z-index: 1; inset-block-end: var(--space-4); inset-inline-start: var(--space-4); inset-inline-end: var(--space-4); display: flex; flex-wrap: wrap; gap: var(--space-2); }
.sl-chip {
  display: inline-flex; align-items: center; gap: 6px; padding-block: 6px; padding-inline: 10px;
  background: rgba(10, 26, 48, .86); color: var(--white); font: 600 12.5px/1.3 var(--f-mono); letter-spacing: .6px; text-transform: uppercase; white-space: nowrap;
}
.sl-chip.is-red { background: var(--red); }
.sl-chip svg { inline-size: 14px; block-size: 14px; flex: none; }
.sl-case-copy { display: flex; flex-direction: column; gap: var(--flow-gap-tight); padding: clamp(24px, 3.2vw, 44px); color: var(--white); }
.lp .lp-sec .sl-case-copy > h3 {
  font-family: var(--f-card-title); font-weight: var(--fw-card-title); letter-spacing: var(--tracking-card-title);
  text-transform: var(--tt-card-title); font-size: var(--fs-card-title-lg); line-height: 1.15; color: var(--white);
}
.sl-case-text { color: var(--mist); }
.sl-case-text > p + p { margin-block-start: var(--flow-gap-tight); }
.sl-facts { display: grid; gap: 0; margin-block: var(--space-2); border-block-start: 1px solid rgba(255, 255, 255, .14); }
.sl-facts > div { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: var(--space-3); padding-block: 10px; border-block-end: 1px solid rgba(255, 255, 255, .14); }
.sl-facts dt { font: 600 12.5px/1.5 var(--f-mono); letter-spacing: .6px; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.sl-facts dd { margin: 0; font-size: 15px; }
.sl-case-copy .lp-actions { margin-block-start: auto; padding-block-start: var(--space-3); }
.sl-note { margin-block-start: var(--space-5); font-size: var(--fs-small); color: var(--mist); max-inline-size: 820px; }
.sl-show-actions { margin-block-start: var(--space-5); }

@media (max-width: 900px) {
  .sl-case { grid-template-columns: minmax(0, 1fr); }
  .sl-case-media { min-block-size: 0; aspect-ratio: 16 / 10; }
  .sl-tab { flex: 0 0 auto; min-block-size: 56px; padding-inline: var(--space-3); }
  .sl-tab-copy small { display: none; }
}
@media (max-width: 719px) {
  .sl-case-copy .lp-actions .btn { flex: 1 1 auto; white-space: nowrap; }
  .sl-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* ==========================================================================
   Motion. sl.js adds .sl-fx to the page root only when the visitor has not
   asked for reduced motion and the browser can observe scrolling; without
   it everything is static and fully visible.
   - hero: slow zoom of the photograph, copy rises in, a red light line;
   - every section: heading and cards rise into view one after another;
   - showcase: the active reference fades in with a slow zoom, the tab bar
     fills while the references advance on their own.
   ========================================================================== */
.sl-fx .lp-hero-media { overflow: hidden; }
.sl-fx .lp-hero-media img { animation: sl-zoom 16s ease-out both; transform-origin: 55% 45%; }
.sl-fx .lp-hero-copy > * { animation: sl-rise .85s cubic-bezier(.2, .7, .2, 1) both; }
.sl-fx .lp-hero-copy > *:nth-child(2) { animation-delay: .08s; }
.sl-fx .lp-hero-copy > *:nth-child(3) { animation-delay: .16s; }
.sl-fx .lp-hero-copy > *:nth-child(4) { animation-delay: .24s; }
.sl-fx .lp-hero-copy > *:nth-child(n+5) { animation-delay: .32s; }

.sl-fx [data-sl-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--sl-delay, 0s); }
.sl-fx [data-sl-reveal].is-in { opacity: 1; transform: none; }

.sl-fx .sl-case:not([hidden]) { animation: sl-fade .6s ease both; }
.sl-fx .sl-case:not([hidden]) .sl-case-media img { animation: sl-zoom 9s ease-out both; }
.sl-fx .sl-case:not([hidden]) .sl-case-copy > * { animation: sl-rise .6s cubic-bezier(.2, .7, .2, 1) both; }
.sl-fx .sl-case:not([hidden]) .sl-case-copy > *:nth-child(2) { animation-delay: .06s; }
.sl-fx .sl-case:not([hidden]) .sl-case-copy > *:nth-child(3) { animation-delay: .12s; }
.sl-fx .sl-case:not([hidden]) .sl-case-copy > *:nth-child(n+4) { animation-delay: .18s; }
.sl-fx .sl-show.is-playing .sl-tab[aria-selected="true"] .sl-tab-bar { animation: sl-fill var(--sl-dwell, 7s) linear both; }

@keyframes sl-zoom { from { transform: scale(1.1); } to { transform: scale(1); } }
@keyframes sl-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes sl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sl-fill { from { inline-size: 0; } to { inline-size: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .sl-fx *, .sl-fx *::before, .sl-fx *::after { animation: none !important; transition: none !important; }
  .sl-fx [data-sl-reveal] { opacity: 1; transform: none; }
}

/* Roles on the hub: four cards as two by two from tablet width. */
@media (min-width: 720px) {
  .lp .ip-aud-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   Cinematic layer (VICTOR 2026-11-14: "hyper-realistic, impressive motion").
   Everything below needs .sl-fx (no reduced motion, IntersectionObserver).
   ========================================================================== */

/* Hero: a steel portal frame draws itself over the photograph, nodes glow,
   welding sparks fall from the nodes (canvas), photo follows the pointer. */
.sl-stage { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.sl-frame {
  position: absolute; inset-block: 12% 10%; inset-inline-end: 3%; inline-size: min(52%, 760px); block-size: auto;
  max-block-size: 78%; overflow: visible; mix-blend-mode: screen;
  transform: translate3d(calc(var(--sl-px, 0) * -18px), calc(var(--sl-py, 0) * -12px + var(--sl-sy, 0) * -60px), 0);
  transition: transform .4s ease-out;
}
.sl-frame line { fill: none; stroke: rgba(160, 205, 255, .78); stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px rgba(120, 180, 255, .55)); animation: sl-draw 1.1s cubic-bezier(.6, .1, .2, 1) forwards; animation-delay: calc(.5s + var(--sl-i) * .055s); }
.sl-frame line.is-brace { stroke: rgba(255, 255, 255, .35); stroke-width: 1; }
.sl-frame circle { fill: #ff3b30; opacity: 0; filter: drop-shadow(0 0 8px rgba(255, 60, 40, .95)); animation: sl-node 2.6s ease-in-out infinite; animation-delay: calc(2.2s + var(--sl-i) * .35s); transform-box: fill-box; transform-origin: center; }
.sl-sparks { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.sl-fx .lp-hero-media img { transform: scale(calc(1.06 + var(--sl-sy, 0) * .06)) translate3d(calc(var(--sl-px, 0) * 14px), calc(var(--sl-py, 0) * 10px), 0); transition: transform .5s ease-out; animation: sl-zoom-in 2.4s cubic-bezier(.2, .7, .2, 1) both; }
.sl-fx .lp-hero-media { will-change: transform; }
.sl-fx .lp-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .10) 48%, rgba(165, 0, 0, .18) 52%, transparent 65%); background-size: 260% 100%; animation: sl-sweep 9s ease-in-out 1.4s infinite; }
.sl-word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-block-end: .06em; }
.sl-word > span { display: inline-block; animation: sl-word .9s cubic-bezier(.2, .8, .2, 1) both; }
.sl-fx .lp-hero-copy > .lp-hero-title { animation: none; }
@media (max-width: 900px) {
  .sl-frame { inset-block-start: 4%; inset-inline-end: -8%; inline-size: 80%; opacity: .55; }
}

/* Scroll progress under the header */
.sl-progress { position: fixed; z-index: 60; inset-inline: 0; inset-block-start: calc(env(safe-area-inset-top) + var(--header-h)); block-size: 3px; background: linear-gradient(90deg, var(--red), #ff4d3d); transform: scaleX(0); transform-origin: left; pointer-events: none; }
:root[dir="rtl"] .sl-progress { transform-origin: right; }

/* Headings: eyebrow line draws, title wipes in from the start side */
.sl-head .eyebrow::before { transform: scaleX(0); transform-origin: left; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
:root[dir="rtl"] .sl-head .eyebrow::before { transform-origin: right; }
.sl-head h2 { clip-path: inset(0 100% 0 0); transition: clip-path 1s cubic-bezier(.7, 0, .2, 1) .1s; }
:root[dir="rtl"] .sl-head h2 { clip-path: inset(0 0 0 100%); }
.sl-head.is-on .eyebrow::before { transform: none; }
.sl-head.is-on h2 { clip-path: inset(0 0 0 0); }

/* Cards tilt in 3D towards the pointer with a glare */
.sl-tilt { position: relative; transform: perspective(900px) rotateX(var(--sl-rx, 0deg)) rotateY(var(--sl-ry, 0deg)); transition: transform .35s ease-out, box-shadow .35s ease-out; transform-style: preserve-3d; }
.sl-tilt::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .35s ease; background: radial-gradient(circle at var(--sl-gx, 50%) var(--sl-gy, 50%), rgba(255, 255, 255, .22), transparent 55%); }
.sl-tilt:hover { box-shadow: 0 24px 50px -24px rgba(6, 17, 31, .55); }
.sl-tilt:hover::after { opacity: 1; }

/* Showcase: photograph wipes in with a red edge */
.sl-fx .sl-case:not([hidden]) .sl-case-media { animation: sl-wipe 1s cubic-bezier(.7, 0, .2, 1) both; }
.sl-fx .sl-case:not([hidden]) .sl-case-media::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; z-index: 2; inline-size: 4px; background: var(--red); box-shadow: 0 0 24px rgba(255, 40, 30, .9); animation: sl-edge 1s cubic-bezier(.7, 0, .2, 1) both; }
:root[dir="rtl"] .sl-fx .sl-case:not([hidden]) .sl-case-media { animation-name: sl-wipe-rtl; }

/* Certificates pop in one after another */
.sl-fx .ip-cert-grid > li { animation: sl-pop .6s cubic-bezier(.2, .9, .3, 1.3) both; }
.sl-fx .ip-cert-grid > li:nth-child(2) { animation-delay: .07s; }
.sl-fx .ip-cert-grid > li:nth-child(3) { animation-delay: .14s; }
.sl-fx .ip-cert-grid > li:nth-child(4) { animation-delay: .21s; }
.sl-fx .ip-cert-grid > li:nth-child(5) { animation-delay: .28s; }
.sl-fx .ip-cert-grid > li:nth-child(6) { animation-delay: .35s; }
.sl-fx .ip-cert-grid > li:nth-child(n+7) { animation-delay: .42s; }

@keyframes sl-draw { to { stroke-dashoffset: 0; } }
@keyframes sl-node { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes sl-zoom-in { from { opacity: .3; filter: saturate(.4) brightness(.6); } to { opacity: 1; filter: none; } }
@keyframes sl-sweep { 0% { background-position: 130% 0; } 55%, 100% { background-position: -40% 0; } }
@keyframes sl-word { from { transform: translateY(105%); } to { transform: none; } }
@keyframes sl-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sl-wipe-rtl { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes sl-edge { from { inset-inline-start: 0; opacity: 1; } 90% { opacity: 1; } to { inset-inline-start: 100%; opacity: 0; } }
@keyframes sl-pop { from { opacity: 0; transform: translateY(14px) scale(.92); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .sl-stage, .sl-progress { display: none; }
  .sl-head h2 { clip-path: none; }
}
/* Long role concerns wrap inside their chip instead of running past the card. */
.lp .ip-aud .ip-chips li { white-space: normal; max-inline-size: 100%; }
