/* LENIX refinement layer. Loaded after site.css and showcase.css.
   One pass each from the impeccable commands: typeset and bolder (type), layout (spacing, borders),
   colorize (product accent as a role), animate and delight (feedback, one scan motif), polish. */

/* ---------- tokens ---------- */
:root{
  --font-display:'Red Hat Display', 'Segoe UI', system-ui, sans-serif;
  --font-text:'Red Hat Text', 'Segoe UI', system-ui, sans-serif;
  --font-num:'Red Hat Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* spacing: a 4px base, named by step */
  --s-1:4px; --s-2:8px; --s-3:12px; --s-4:16px; --s-5:24px; --s-6:32px; --s-7:48px; --s-8:72px;
  --s-section:clamp(96px, 13vw, 176px);

  /* borders: two line strengths, three radii */
  --r-s:10px; --r-m:16px; --r-l:24px;
  --line:rgba(190,196,255,.12); --line-strong:rgba(190,196,255,.26);

  /* neutrals tinted toward the logo's blue-violet */
  --page:#07070f; --surface:#0f1020; --surface-2:#181a30;
  --text:#f4f4fb; --text-2:#bcbfd4; --text-3:#9295b1;
  --lift:0 1px 0 rgba(255,255,255,.05) inset, 0 28px 60px -32px rgba(0,0,0,.75);

  /* the product accent, readable as small text on either theme */
  --c:var(--violet);
  --c-ink:color-mix(in srgb, var(--c) 58%, var(--text));
}
html[data-theme="light"]{
  --line:rgba(22,26,74,.13); --line-strong:rgba(22,26,74,.3);
  --page:#f4f5fb; --surface:#ffffff; --surface-2:#e9ebf6;
  --text:#0a0b1c; --text-2:#40445e; --text-3:#5c6080;
  --lift:0 1px 0 rgba(255,255,255,.9) inset, 0 24px 48px -30px rgba(22,26,74,.28);
}

/* ---------- type ---------- */
body{font-family:var(--font-text);font-size:16px}
h1,h2,h3,.chapter-words,.next strong,.contact-links a,.scene-steps h3{font-family:var(--font-display)}
.plan text{font-family:var(--font-text)}
h2{font-weight:800;font-size:clamp(34px, 5.2vw, 68px);line-height:1;letter-spacing:-.035em;max-width:17ch}
h3{font-weight:700}
.sec h2{font-size:clamp(28px, 3.4vw, 44px);line-height:1.04;max-width:22ch}
.lede{margin-top:var(--s-5);font-weight:400;font-size:clamp(17px, 1.5vw, 20px);line-height:1.58;max-width:58ch;text-wrap:pretty}
.prose p,.fn dd,.rows p,.scene-steps p,.p-copy p,.verdict li{text-wrap:pretty}
.hero h1{font-weight:800;letter-spacing:calc(-2.4 * var(--u))}
.sub{font-weight:400}
.page-hero h1{font-weight:800;font-size:clamp(42px, 6.4vw, 88px);line-height:.98;letter-spacing:-.04em;max-width:15ch}
.chapter-words{font-weight:800;letter-spacing:-.045em}
.p-copy h3{font-size:clamp(40px, 5.6vw, 76px);font-weight:800;letter-spacing:-.045em;line-height:.96}
.scene-steps h3{font-weight:700;letter-spacing:-.03em}
.rows h3{font-weight:700;font-size:clamp(22px, 2.5vw, 32px);letter-spacing:-.03em}
.fn dt{font-family:var(--font-display);font-size:20px;font-weight:700;letter-spacing:-.02em}
.contact h2{font-size:clamp(40px, 6.4vw, 88px);letter-spacing:-.045em}
.next strong{font-weight:800;letter-spacing:-.045em}
.thread li h3{font-family:var(--font-display);font-weight:800;letter-spacing:-.03em}
/* numbers and codes read as data */
.dash b,.plan .cnt,.scene-count,.thread .n,.dash output,.scene-steps .stat,.crumbs{font-family:var(--font-num);font-variant-numeric:tabular-nums;letter-spacing:0}
.dash b{font-weight:500}

/* ---------- layout: rhythm ---------- */
.wrap{width:min(1200px, 100% - 48px)}
.blk{padding-top:var(--s-section)}
.blk:last-of-type{padding-bottom:var(--s-section)}
.sec{padding-bottom:clamp(88px, 11vw, 144px)}
.prow{padding:clamp(64px, 9vw, 128px) 0;border-top:1px solid var(--line);gap:clamp(32px, 6vw, 96px)}
.p-copy{display:flex;flex-direction:column;align-items:flex-start}
.p-copy .kind{order:-1;margin:0 0 var(--s-4);display:inline-flex;align-items:center;gap:var(--s-2);font-size:13.5px;font-weight:600;color:var(--c-ink)}
.p-copy .kind::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--c)}
.p-copy p{margin-top:var(--s-5);font-size:17px;line-height:1.6}
.feats{margin-top:var(--s-5);gap:var(--s-3)}
.p-links{margin-top:var(--s-6);gap:var(--s-3)}
.rows{margin-top:var(--s-7);border-bottom-color:var(--line)}
.rows > div{padding:var(--s-6) 0;border-top-color:var(--line)}
.fn > div{padding:var(--s-6) 0;border-top-color:var(--line)}
.doc{gap:clamp(40px, 6vw, 96px)}
#services{background:var(--surface);border-block:1px solid var(--line);padding-bottom:var(--s-section);margin-top:var(--s-section)}
.contact{border-top:2px solid;border-image:var(--grad) 1;padding-top:clamp(64px, 9vw, 112px)}
footer{margin-top:var(--s-section)}

/* ---------- borders and surfaces ---------- */
.shot,.stage,.tbl-wrap,.embed,.dash,.fit,.fn .ph{border-radius:var(--r-m);border-color:var(--line)}
.shot,.stage,.tbl-wrap,.embed,.dash{box-shadow:var(--lift)}
html.motion .wipe{clip-path:inset(0 0 100% 0 round 16px)}
html.motion .wipe.in{clip-path:inset(0 0 0 0 round 16px)}
.cmp thead th{border-bottom:1px solid var(--line-strong)}
.cmp th,.cmp td{border-top-color:var(--line)}
.topbar{border-bottom-color:var(--line)}
.pill{height:46px;padding:0 22px;border-radius:23px;font-weight:600}
.pill.sm{height:40px;padding:0 18px;border-radius:20px}
.pill.line{border-color:var(--line-strong)}
a:focus-visible,button:focus-visible,[tabindex]:focus-visible,input:focus-visible{outline:2px solid var(--c-ink);outline-offset:3px}

/* ---------- colour: the product accent has jobs ---------- */
.feats li::before{background:var(--c);height:2px;width:14px}
.toc a.on{border-left-color:var(--c);border-left-width:2px;padding-left:15px}
.cmp .us{background:color-mix(in srgb, var(--c) 9%, var(--surface-2))}
.cmp thead .us{box-shadow:inset 0 2px 0 var(--c)}
html.motion .scene-bar i{background:var(--c)}
.crumbs a:hover{color:var(--c-ink)}
.thread li a{color:var(--text)}
.thread li:nth-child(1){--c:var(--cyan)} .thread li:nth-child(2){--c:var(--magenta)}
.thread li:nth-child(3),.thread li:nth-child(4){--c:var(--violet)}
.thread .n{color:var(--c-ink)}
html.motion .thread li.on::before{background:var(--c)}
.fn dt small{color:var(--c-ink)}
.prose a,.note a,.tbl-note a{text-decoration-color:var(--c)}
::selection{background:var(--c);color:#fff}

/* ---------- motion: feedback and continuity ---------- */
.pill{transition:background-color .2s ease, border-color .2s ease, opacity .2s ease, scale .14s ease, box-shadow .25s ease}
.pill:active,.btn:active,.icon-btn:active{scale:.96}
.pill.solid:hover{opacity:1;box-shadow:0 0 0 4px color-mix(in srgb, var(--c) 34%, transparent)}
.pill.line:hover{border-color:var(--text);background:transparent}
.tb-links a{border-bottom:0;background:linear-gradient(currentColor, currentColor) 100% 100% / 0 1px no-repeat;transition:color .2s ease, background-size .4s var(--e-reveal)}
.tb-links a:hover,.tb-links a[aria-current="page"]{background-size:100% 1px;background-position:0 100%}
.icon-btn svg{transition:rotate .5s var(--e-reveal)}
.icon-btn.js-theme:hover svg{rotate:45deg}
.rows > div{transition:padding .45s var(--e-reveal), border-color .3s ease}
.rows h3{transition:color .3s ease}
.facts div{transition:padding .4s var(--e-reveal)}
a.shot{position:relative}
a.shot img{transition:scale .9s var(--e-reveal)}
.clients li{transition:translate .45s var(--e-reveal), border-color .3s ease}
/* delight: a reader sweep in the product colour crosses a screen when you point at it */
a.shot::after,.stage::after{content:"";position:absolute;left:0;right:0;top:0;height:28%;pointer-events:none;opacity:0;
  background:linear-gradient(180deg, transparent, color-mix(in srgb, var(--c) 30%, transparent) 86%, var(--c) 99%, transparent);translate:0 -100%}
@keyframes sweep{0%{translate:0 -100%;opacity:1}85%{opacity:1}100%{translate:0 360%;opacity:0}}
.clients .slot{display:grid;place-items:center;width:100%;height:100%;text-decoration:none;position:relative;overflow:hidden}
.clients .slot span{grid-area:1 / 1;font-size:13px;line-height:1.4;transition:translate .45s var(--e-reveal), opacity .3s ease}
.clients .slot span:first-child{color:var(--text-3)}
.clients .slot span:last-child{translate:0 140%;opacity:0;font-weight:600;color:var(--text)}
@media (hover:hover){
  .rows > div:hover{padding-left:var(--s-4);border-top-color:var(--line-strong)}
  .rows > div:hover h3{color:var(--c-ink)}
  .facts div:hover{padding-left:var(--s-3)}
  a.shot:hover img{scale:1.025}
  a.shot:hover::after,.stage:hover::after{animation:sweep 1.1s var(--e-soft) 1}
  .clients li:hover{translate:0 -4px;border-color:var(--line-strong)}
  .clients .slot:hover span:first-child{translate:0 -140%;opacity:0}
  .clients .slot:hover span:last-child{translate:0 0;opacity:1}
}
.clients .slot:focus-visible span:first-child{translate:0 -140%;opacity:0}
.clients .slot:focus-visible span:last-child{translate:0 0;opacity:1}
/* continuity between pages */
@view-transition{navigation:auto}
::view-transition-old(root){animation:vtOut .22s ease both}
::view-transition-new(root){animation:vtIn .5s var(--e-reveal) both}
@keyframes vtOut{to{opacity:0}}
@keyframes vtIn{from{opacity:0;translate:0 14px}}

/* ---------- small screens, reduced motion ---------- */
@media (max-width:900px){
  .p-copy h3{font-size:clamp(40px, 11vw, 60px)}
  h2{font-size:clamp(32px, 8.4vw, 48px)}
}
@media (prefers-reduced-motion:reduce){
  ::view-transition-old(root),::view-transition-new(root){animation:none}
  a.shot::after,.stage::after{display:none}
  .pill,.rows > div,.facts div,a.shot img,.clients li,.clients .slot span,.icon-btn svg{transition:none}
  .pill:active,.icon-btn:active{scale:1}
}
