/* Products: index (pages/products/index) and detail (pages/products/show). Static first; motion only under
   html.rx-motion. Product colours (--c-*) are light only: tag dots, washes, drawn strokes — never text. */

/* ---------------------------------------------------------------- product light per page */
.pd--school, .pd-tag--school { --pc: var(--c-school); --pw: rgba(242,169,29,.13); }
.pd--edc, .pd-tag--edc { --pc: var(--c-edc); --pw: rgba(74,144,226,.15); }
.pd--gerbang, .pd-tag--gerbang { --pc: var(--c-gerbang); --pw: rgba(25,179,168,.16); }
.pd--selari, .pd-tag--selari { --pc: var(--c-selari); --pw: rgba(223,230,240,.09); }
.pd--custom, .pd-tag--custom { --pc: var(--c-custom); --pw: rgba(255,122,89,.13); }
.tag[class*="pd-tag--"]::before, .pl-item::before { background: var(--pc); box-shadow: 0 0 10px 1px var(--pc); }

/* shared section bits */
.pd-sec__t { margin: 1.2rem 0 clamp(2rem, 1.4rem + 2vw, 3.4rem); }
.pd-more { margin-top: 2.2rem; }

/* ---------------------------------------------------------------- 1 · detail hero */
.pd .page-hero { position: relative; overflow: hidden; }
.pd .page-hero::before { content: ""; position: absolute; z-index: -1; right: -10vw; top: 5%; width: 75vw; height: 90%; background: radial-gradient(closest-side, var(--pw), transparent 72%); pointer-events: none; }
html.rx-3d .pd--3d .page-hero::before { display: none; }
.pd-hero__vis { pointer-events: none; }
.pd-hero__btns { margin-top: 2.2rem; }
.pd-hero__apps { margin-top: 1.4rem; }
.pd-hero__apps .a { color: var(--fg-2); }
.pd-hero__drag { display: none; margin-top: 2.4rem; }
html.rx-3d .pd-hero__drag { display: block; color: var(--fg-2); }

/* visual: phones first in the flow, beside the copy on wide screens */
.pd-hero__still, .pd-hero__vis { margin-top: 3rem; }
.pd-hero__still { width: min(100%, 560px); margin-inline: auto; filter: drop-shadow(0 40px 60px rgba(0,0,0,.6)); }
.pd-hero__still--card { width: min(80%, 420px); }
.pd-hero__still.pd-dev--phone { width: min(62vw, 260px); }
html.rx-3d .pd-hero__still { display: none; }

@media (min-width: 900px) {
  .pd--flat .page-hero { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; }
  .pd--flat .page-hero .display, .pd--flat .page-hero .lead { max-width: min(48vw, 40rem); }
  .pd-hero__still, .pd-hero__vis { position: absolute; z-index: 1; margin: 0; top: 50%; translate: 0 -46%; }
  .pd-hero__still { right: 2vw; width: min(48vw, 700px); }
  .pd-hero__still--card { right: 6vw; width: min(36vw, 500px); }
  .pd-hero__still.pd-dev--phone, .pd-hero__vis.pd-dev--phone { right: max(var(--gutter), calc((100vw - var(--container)) / 2 + 4vw)); width: clamp(220px, 20vw, 300px); }
  .pd-recon { right: var(--gutter); width: min(44vw, 620px); }
}

/* dark device frames for light-ground screenshots and product shots */
.pd-dev { margin: 0; border: 1px solid var(--line-2); background: var(--bg-2); overflow: hidden; }
.pd-dev img { width: 100%; height: auto; }
.pd-dev--phone { padding: 10px; border-radius: 34px; box-shadow: 0 50px 80px -40px rgba(0,0,0,.9); }
.pd-dev--phone img { border-radius: 25px; }
.pd-dev--panel { display: grid; place-items: center; aspect-ratio: 4 / 3.4; padding: 1.6rem; border-radius: var(--r-2); background: radial-gradient(60% 60% at 50% 60%, var(--pw, rgba(25,179,168,.12)), transparent 75%), var(--bg-1); }
.pd-dev--panel img { width: auto; max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0,0,0,.55)); }

/* SELARI®: three streams become one */
.pd-recon { display: grid; gap: 1rem; }
.pd-recon svg { width: 100%; height: auto; overflow: visible; }
.pd-recon__grid line { stroke: var(--line); }
.pd-recon__ln { stroke: var(--fg-3); stroke-width: 1.5; }
.pd-recon__out { stroke: var(--c-selari); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(223,230,240,.55)); }
.pd-recon__dot { fill: var(--bg); stroke: var(--c-selari); stroke-width: 2.5; }
.pd-recon text { fill: var(--fg-3); font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
html.rx-motion .pd-recon__ln, html.rx-motion .pd-recon__out { stroke-dasharray: 1; stroke-dashoffset: 1; animation: pd-draw 1.4s var(--ease-io) .5s forwards; }
html.rx-motion .pd-recon__out { animation-delay: 1.6s; animation-duration: .9s; }
html.rx-motion .pd-recon__dot { opacity: 0; animation: pd-fade .5s var(--ease-out) 1.6s forwards; }
@keyframes pd-draw { to { stroke-dashoffset: 0; } }
@keyframes pd-fade { to { opacity: 1; } }

/* ---------------------------------------------------------------- 2 · what it does */
.pd-feat__in { display: grid; gap: clamp(2.5rem, 2rem + 3vw, 5rem); }
.pd-feat__head .h2 { margin: 1.2rem 0 1.6rem; }
.pd-feat__list { display: grid; border-top: 1px solid var(--line); }
.pd-feat__list li { display: grid; grid-template-columns: 2.6rem 1fr; gap: .2rem 1rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.pd-feat__list .mono { grid-row: span 2; padding-top: .3rem; }
.pd-feat__list h3 { font-size: clamp(1.1rem, 1rem + .4vw, 1.35rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.pd-feat__list p { font-size: var(--t-small); }
@media (min-width: 64rem) {
  .pd-feat__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .pd-feat__head { position: sticky; top: calc(var(--header-h) + 3rem); }
  .pd-feat__list { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .pd-feat__list li:nth-child(2) { border-top: 0; }
}

/* ---------------------------------------------------------------- 3 · how it works */
.pd-how__steps { display: grid; gap: 2rem; counter-reset: s; }
.pd-how__steps li { padding-top: 1.4rem; border-top: 1px solid var(--line-2); }
.pd-how__n { display: block; font-size: clamp(3rem, 2rem + 3vw, 5.5rem); font-weight: 800; letter-spacing: -.06em; line-height: .9; color: var(--fg); }
.pd-how__steps li:first-child .pd-how__n { color: var(--accent-hi); }
.pd-how__steps h3 { margin-top: 1.2rem; font-size: 1.2rem; font-weight: 700; letter-spacing: -.02em; }
.pd-how__steps p { margin-top: .5rem; font-size: var(--t-small); }
@media (min-width: 48rem) { .pd-how__steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .pd-how__steps { grid-template-columns: repeat(var(--n, 4), 1fr); } }

/* ---------------------------------------------------------------- 4 · compare chains */
.pd-cmp__cols { display: grid; gap: 3rem; }
@media (min-width: 56rem) { .pd-cmp__cols { grid-template-columns: 1fr 1fr; } }
.pd-cmp h3 { margin-bottom: 1.2rem; }
.pd-chain { display: grid; gap: 0; }
.pd-chain li { position: relative; padding: .85rem 1.1rem; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-1); color: var(--fg-2); font-weight: 600; }
.pd-chain li + li { margin-top: 1.6rem; }
.pd-chain li + li::before { content: "↓"; position: absolute; left: 1.1rem; top: -1.45rem; font-family: var(--mono); font-size: .8rem; color: var(--fg-3); }
.pd-chain li.is-core { border-color: var(--accent); background: var(--bg-2); color: var(--fg); box-shadow: 0 0 40px -12px var(--accent-glow); }

/* ---------------------------------------------------------------- 5 · in use / 6 · sub-products */
.pd-shots__grid { display: grid; gap: 2rem; }
.pd-shots__grid figure { margin: 0; }
.pd-shots__grid figcaption, .pd-sub figcaption { margin-top: 1rem; }
.pd-shots__grid .pd-dev--phone { max-width: 280px; margin-inline: auto; }
.pd-shots__grid--1 { max-width: 34rem; }
@media (min-width: 48rem) { .pd-shots__grid--2 { grid-template-columns: repeat(2, 1fr); } .pd-shots__grid--3 { grid-template-columns: repeat(3, 1fr); } }
.pd-shots__grid figcaption { text-align: center; }
.pd-shots__note { margin-top: 2rem; }
.pd-sub__in { display: grid; gap: 3rem; align-items: center; }
.pd-sub figure { margin: 0; max-width: 260px; }
@media (min-width: 56rem) { .pd-sub__in { grid-template-columns: 1.3fr 1fr; } .pd-sub figure { justify-self: center; } }

/* ---------------------------------------------------------------- 8 · specs & facts */
.pd-dl { margin: 0; display: grid; border-top: 1px solid var(--line); }
.pd-dl > div { display: grid; gap: .4rem 2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.pd-dl dd { margin: 0; color: var(--fg); max-width: 52rem; }
@media (min-width: 48rem) { .pd-dl > div { grid-template-columns: 14rem 1fr; align-items: baseline; } }
.pd-dl--specs dd { font-variant-numeric: tabular-nums; color: var(--fg-2); }
.pd-facts__sub { margin: clamp(3rem, 2rem + 3vw, 5rem) 0 1.4rem; }
.pd-ticks li { position: relative; padding-left: 1.4rem; }
.pd-ticks li + li { margin-top: .35rem; }
.pd-ticks li::before { content: ""; position: absolute; left: 0; top: .7em; width: .7rem; height: 1px; background: var(--accent); }

/* ---------------------------------------------------------------- 9 · cases / 10 · FAQ / 11 · related */
.pd-faq__in { display: grid; gap: 2rem; }
@media (min-width: 64rem) { .pd-faq__in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.pd-faq .faq details > div { color: var(--fg-2); }
.pd-rel__rows .tag { align-self: center; }
.pd-rel__s { display: block; margin-top: .7rem; max-width: 40rem; font-size: var(--t-small); font-weight: 400; letter-spacing: 0; line-height: 1.5; color: var(--fg-2); }
@media (min-width: 48rem) { .pd-rel__rows > a { grid-template-columns: 11rem 1fr auto; } }

/* ---------------------------------------------------------------- products index */
@media (min-width: 64rem) { .pl-brand__head { grid-template-columns: 1.2fr 1fr; align-items: end; } }

@media (min-width: 64rem) {
  .pl-item { grid-template-columns: 3.5rem minmax(0, 1fr) 22rem 3rem; }
  .pl-item__line { grid-column: 3; align-self: center; }
  .pl-item__go { grid-column: 4; justify-self: end; align-self: center; }
}

.pl-engine .lead { margin-bottom: 3rem; }
.pl-engine__facts .stat__n { font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.6rem); }
.pl-engine__facts .stat__l { max-width: none; color: var(--fg-2); }
.pl-engine__comp { margin-top: 2rem; }
.pl-engine__btns { margin-top: 2.4rem; gap: 1.6rem; }


/* ---------------------------------------------------------------- products index v2: the showroom (scene mode) */
/* product colours for tags and accents */
.px-tag--school { --pc: var(--c-school); } .px-tag--edc { --pc: var(--c-edc); } .px-tag--gerbang { --pc: var(--c-gerbang); }
.px-tag--selari { --pc: var(--c-selari); } .px-tag--custom { --pc: var(--c-custom); }
.px-p--school { --pc: var(--c-school); } .px-p--edc { --pc: var(--c-edc); } .px-p--gerbang { --pc: var(--c-gerbang); } .px-p--selari { --pc: var(--c-selari); } .px-p--custom { --pc: var(--c-custom); }

.px-hero { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; }
.px-hero__in { position: relative; z-index: 2; }
.px-hero__t { margin-top: 1.4rem; }
.px-hero__lead { margin-top: 1.4rem; }
.px-index { list-style: none; margin: 2.4rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; max-width: 40rem; }
.px-index a { display: inline-flex; align-items: center; gap: .55rem; min-height: 40px; padding: .4rem .9rem .4rem .5rem; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(var(--bg-rgb), .55); backdrop-filter: blur(6px); font-weight: 600; font-size: .9rem; color: var(--fg); transition: border-color var(--t-out), background var(--t-out); }
.px-index a .mono { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 .3rem; border-radius: 999px; background: var(--pc, var(--accent)); color: #05070b; font-size: .62rem; letter-spacing: .04em; }
.px-index a:hover { border-color: var(--pc, var(--accent-hi)); background: rgba(var(--fg-rgb), .06); }
.px-index__need { border-style: dashed !important; }
.px-hero__still { display: block; width: min(90vw, 560px); margin: 2rem auto 0; }
.px-drag { position: absolute; left: 0; right: 0; bottom: 22px; text-align: right; color: var(--fg-3); pointer-events: none; display: none; }
html.rx-3d .px-drag { display: block; }

/* a product scene: copy on the left, its device or visual on the right */
.px-p { min-height: 100vh; min-height: 100svh; display: grid; align-content: center; overflow: hidden; }
.px-p__in { position: relative; display: grid; gap: 2.5rem; align-items: center; }
.px-p__copy { position: relative; z-index: 2; }
.px-p__k .hi { color: var(--pc); }
.px-p__t { margin: 1rem 0 0; }
.px-p__t::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 1.4rem; border-radius: 2px; background: var(--pc); box-shadow: 0 0 18px var(--pc); }
.px-p__lead { margin-top: 1.4rem; color: var(--fg); }
.px-feat { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: .1rem; max-width: 36rem; border-top: 1px solid var(--line); counter-reset: f; }
.px-feat li { display: grid; grid-template-columns: 2rem 1fr; gap: .1rem .6rem; padding: .7rem 0; border-bottom: 1px solid var(--line); counter-increment: f; }
.px-feat li::before { content: "0" counter(f); grid-row: span 2; font-family: var(--mono); font-size: .7rem; color: var(--pc); padding-top: .2rem; }
.px-feat b { font-weight: 700; }
.px-feat span { font-size: var(--t-small); color: var(--fg-2); }
.px-p__btns { margin-top: 1.8rem; gap: 1.4rem; }
.px-p__vis { position: relative; }
.px-p__still { display: block; width: min(86vw, 560px); margin: 0 auto; }
.px-phone { width: min(60vw, 260px); padding: 10px; border: 1px solid var(--line-2); border-radius: 34px; background: var(--bg-2); }
.px-phone img { border-radius: 25px; width: 100%; height: auto; }
.px-p--flat { background: radial-gradient(70% 70% at 78% 50%, color-mix(in srgb, var(--pc) 14%, transparent), transparent 70%), var(--bg-1); }

/* Orijin School: three app screens fanned out; they spread as the scene arrives */
.px-fan { position: relative; height: min(64vh, 560px); display: grid; place-items: center; }
.px-fan__ph { position: absolute; width: clamp(150px, 14vw, 230px); margin: 0; padding: 8px; border: 1px solid var(--line-2); border-radius: 30px; background: var(--bg-2); box-shadow: 0 40px 70px -30px rgba(0,0,0,.75); transition: translate 1.1s var(--ease-out) .25s, rotate 1.1s var(--ease-out) .25s; }
.px-fan__ph img { display: block; width: 100%; height: auto; border-radius: 22px; }
.px-fan__ph:nth-child(1) { translate: -62% 6%; rotate: -9deg; }
.px-fan__ph:nth-child(2) { z-index: 1; translate: 0 -2%; }
.px-fan__ph:nth-child(3) { translate: 62% 6%; rotate: 9deg; }
html.rx-scenes .px-p:not(.is-current) .px-fan__ph { translate: 0 10%; rotate: 0deg; transition-delay: 0s; }

/* SELARI®: draw the streams each time the scene arrives */
.px-recon { width: min(100%, 620px); margin-inline: auto; }
html.rx-scenes .px-p:not(.is-current) .px-recon .pd-recon__ln, html.rx-scenes .px-p:not(.is-current) .px-recon .pd-recon__out, html.rx-scenes .px-p:not(.is-current) .px-recon .pd-recon__dot { animation: none; }

/* custom builds: three client-branded wallets on one engine */
.px-wallets { display: flex; justify-content: center; align-items: center; padding: 2rem 0; }
.px-wallet { width: clamp(140px, 13vw, 210px); aspect-ratio: 9 / 18; padding: 14px; border-radius: 26px; border: 1px solid var(--line-2); background: var(--bg-2); box-shadow: 0 40px 60px -30px rgba(0,0,0,.8); display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 8px; margin-inline: -16px; transition: translate 1s var(--ease-out) .2s, rotate 1s var(--ease-out) .2s; }
.px-wallet:nth-child(1) { rotate: -8deg; translate: 0 20px; } .px-wallet:nth-child(3) { rotate: 8deg; translate: 0 20px; } .px-wallet:nth-child(2) { z-index: 1; }
html.rx-scenes .px-p:not(.is-current) .px-wallet { rotate: 0deg; translate: 0 40px; transition-delay: 0s; }
.px-wallet i { width: 28px; height: 28px; border-radius: 8px; background: var(--b); }
.px-wallet b { font-size: .8rem; color: var(--fg-2); }
.px-wallet .num { align-self: end; font-size: clamp(1.1rem, .8rem + .8vw, 1.5rem); font-weight: 800; }
.px-wallet em { height: 10px; border-radius: 5px; background: rgba(var(--fg-rgb), .1); }
.px-wallet em:last-child { height: 34px; border-radius: 10px; background: var(--b); opacity: .9; }
.px-wallets__cap { text-align: center; color: var(--fg-3); }

@media (min-width: 900px) {
  .px-p__in { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .px-p--3d .px-p__in { grid-template-columns: minmax(0, 40rem); }   /* the 3D model takes the right half */
  .px-p--3d .px-p__vis { position: absolute; right: 0; top: 50%; translate: 0 -50%; width: 48%; }
  .px-hero__still { position: absolute; right: 2vw; top: 50%; translate: 0 -46%; width: min(48vw, 700px); margin: 0; }
  .px-hero__in > * { max-width: min(50vw, 44rem); }
}
@media (max-width: 899px) { .px-p { padding-top: calc(var(--header-h) + 1rem); } .px-fan { height: 46vh; } }

/* start with what you need */
.px-needs__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1.6rem; margin-bottom: 2rem; }
.px-needs__head .h2 { margin-top: 1rem; }
.px-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.px-filter button { min-height: 40px; padding: 0 1rem; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--fg-2); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; transition: background var(--t-out), color var(--t-out), border-color var(--t-out); }
.px-filter button:hover { color: var(--fg); border-color: var(--fg-3); }
.px-filter button[aria-pressed="true"] { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.px-needs__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-2); overflow: hidden; }
@media (min-width: 700px) { .px-needs__list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .px-needs__list { grid-template-columns: repeat(4, 1fr); } }
@media (max-height: 860px) and (min-width: 1000px) { .px-needs__head { margin-bottom: 1.4rem; } .px-needs .h2 { font-size: clamp(2rem, 1rem + 3vw, 3.6rem); } .px-need { padding: .9rem 1rem 1rem; } .px-need > .mono { display: none; } .px-needs .s, .px-needs { padding-block: calc(var(--header-h) + .5rem) 1rem; } }
.px-need { display: grid; align-content: start; gap: .5rem; padding: 1.2rem 1.2rem 1.3rem; background: var(--bg-1); transition: opacity .35s var(--ease-out), filter .35s; }
.px-need .mono { color: var(--fg-3); font-size: .62rem; }
.px-need h3 { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.px-need__s { font-size: .875rem; color: var(--fg-2); line-height: 1.45; }
.px-need__p { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .3rem; }
.px-need__p a { display: inline-flex; align-items: center; gap: .4rem; min-height: 30px; padding: 0 .65rem; border: 1px solid var(--line-2); border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--fg); }
.px-need__p a::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--pc); }
.px-need__p a:hover { border-color: var(--pc); }
.px-need.is-off { opacity: .18; filter: grayscale(1); }
.px-need.is-off a { pointer-events: none; }
.px-page .sc-hint { display: none; }
.px-p__t { font-size: clamp(2.6rem, 1rem + 5.2vw, 6.4rem); }
@media (max-height: 860px) and (min-width: 900px) {
  .px-p__t::after { margin-top: 1rem; }
  .px-p__lead { margin-top: 1rem; }
  .px-feat { margin-top: 1.2rem; }
  .px-feat li { padding: .5rem 0; }
  .px-feat span { display: none; }                 /* short screens: feature names only */
  .px-feat li::before { grid-row: auto; padding-top: .25rem; }
  .px-p__btns { margin-top: 1.3rem; }
}
@media (max-width: 899px) {
  .px-feat span { display: none; }
  .px-feat li { padding: .45rem 0; }
  .px-feat li::before { grid-row: auto; padding-top: .25rem; }
  html.rx-3d .px-p--3d .px-feat { display: none; }               /* phones: the device takes the lower part of the screen */
  html.rx-3d .px-p--3d .px-p__in { padding-bottom: 34vh; }
  html.rx-3d .px-hero__in { padding-bottom: 30vh; }
  .px-p__t::after { margin-top: 1rem; }
}
/* a scene taller than the screen must start at the top, not overflow above it (centre only when it fits) */
html.rx-scenes .scene.px-hero, html.rx-scenes .scene.px-p, .px-hero, .px-p { align-content: safe center; }
@media (max-width: 899px) {
  .px-hero { padding-top: calc(var(--header-h) + 1rem); }
  html.rx-3d .px-hero__in { padding-bottom: 26vh; }
  .px-index a { min-height: 36px; font-size: .84rem; }
}
.px-needs__swipe { display: none; }
