/* ============================================================
   KAPTIS TECHNOLOGY v4 — 3D zoom backdrop + DOM scroll narrative
   Canvas fixed (the zoom), blocks scroll top-down and reveal.
   ============================================================ */

body.tech{
  --accent:#D2FA64;
  --teal:#4fd8c8;
  --violet:#7a8cff;
  --bg:#000000;
  --ink:#eef2f7;
  --mut:#9aa4b8;
  --line:rgba(230,240,255,.14);
  background:var(--bg);
  color:var(--ink);
}
body.tech a{color:var(--teal)}
body.tech ::selection{background:var(--teal);color:#000}
body.tech .grain{opacity:.22}

body.tech .fx-canvas{position:fixed;inset:0;z-index:0;width:100%;height:100%}
body.tech .fx-fallback{
  position:fixed;inset:0;z-index:0;pointer-events:none;display:none;
  background:
    radial-gradient(55vw 50vh at 72% 16%,rgba(79,216,200,.10),transparent 62%),
    radial-gradient(60vw 55vh at 18% 78%,rgba(122,140,255,.10),transparent 60%),
    #000;
}

/* header / footer */
body.tech .site-head{
  background:rgba(0,0,0,.42);backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);position:fixed;top:0;left:0;right:0;z-index:40;
}
body.tech .site-head .brand{color:var(--ink)}
body.tech .site-head .brand span{color:var(--teal);font-weight:300}
body.tech .site-nav a{color:var(--ink)}
body.tech .site-nav a::after{background:var(--teal)}
body.tech .site-head .btn-ghost{background:transparent;border-color:rgba(230,240,255,.35);color:var(--ink)}
body.tech .site-head .btn-ghost:hover{border-color:var(--teal);color:var(--teal)}
body.tech .site-foot{border-top:1px solid var(--line);background:#000;position:relative;z-index:5}
body.tech .foot-nav a{color:var(--mut)}
body.tech .foot-nav a:hover{color:var(--ink)}
body.tech .foot-note{color:var(--mut)}

/* buttons */
body.tech .btn{
  border-radius:999px;border:1px solid rgba(230,240,255,.4);color:var(--ink);
  background:transparent;overflow:hidden;padding:13px 26px;position:relative;z-index:0;
  display:inline-block;transition:color .3s ease-out;
}
body.tech .btn::before{
  content:"";position:absolute;left:0;right:0;bottom:0;top:100%;
  background:var(--teal);z-index:-1;transition:top .3s ease-out;
}
body.tech .btn:hover{color:#000}
body.tech .btn:hover::before{top:0}
body.tech .btn-solid{background:var(--teal);border-color:var(--teal);color:#000}
body.tech .btn-solid::before{background:var(--ink)}

/* ---------- scroll narrative ---------- */
body.tech .tr-narrative{position:relative;z-index:5}
body.tech .tr-block{
  min-height:100vh;display:flex;flex-direction:column;justify-content:center;
  padding:14vh var(--pad,72px);max-width:760px;
  opacity:0;transform:translateY(46px);
  transition:opacity .9s cubic-bezier(.22,1,.36,1),transform .9s cubic-bezier(.22,1,.36,1);
}
body.tech .tr-block.in{opacity:1;transform:none}
body.tech .tr-right{margin-left:auto;margin-right:0;text-align:right}
body.tech .tr-right .tr-steps,
body.tech .tr-right ol{text-align:right}

body.tech .tr-kicker{
  font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;
  color:var(--mut);margin:0 0 26px;
}
body.tech .tr-meta{
  font-size:.68rem;letter-spacing:.18em;text-transform:uppercase;
  color:var(--teal);margin:0 0 14px;
}
body.tech .tr-block h1{
  font-size:clamp(2.4rem,6vw,4.8rem);font-weight:500;letter-spacing:-.02em;
  line-height:1.04;margin:0 0 24px;
}
body.tech .tr-block h1 em{font-family:'Instrument Serif',serif;font-style:italic;font-weight:400}
body.tech .tr-block h2{
  font-size:clamp(1.8rem,3.6vw,3rem);font-weight:500;letter-spacing:-.01em;
  line-height:1.08;margin:0 0 18px;
}
body.tech .tr-lede{font-size:clamp(1.05rem,1.6vw,1.3rem);color:var(--mut);max-width:34em;line-height:1.55}
body.tech .tr-block p{color:var(--mut);font-size:1.02rem;line-height:1.6;max-width:36em}
body.tech .tr-hint{
  margin-top:7vh;font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--mut);
  opacity:.7;
}
body.tech .tr-steps{list-style:none;padding:0;margin:0;counter-reset:step}
body.tech .tr-steps li{
  counter-increment:step;position:relative;padding:18px 0 18px 56px;
  border-top:1px solid var(--line);color:var(--mut);line-height:1.55;max-width:36em;
}
body.tech .tr-steps li:last-child{border-bottom:1px solid var(--line)}
body.tech .tr-steps li::before{
  content:"0" counter(step);position:absolute;left:0;top:20px;
  font-size:.72rem;letter-spacing:.12em;color:var(--teal);
}
body.tech .tr-steps li strong{color:var(--ink)}
body.tech .tr-note{margin-top:18px;font-size:.85rem;color:var(--mut)}
body.tech .tr-cta .btn{margin-top:8px}

/* readability scrim behind text over bright glass */
body.tech .tr-block::after{
  content:"";position:absolute;inset:-8% 0;z-index:-1;pointer-events:none;
  background:radial-gradient(58% 60% at 42% 50%,rgba(0,0,0,.52),transparent 78%);
}

/* loader */
.tech-loader{
  position:fixed;inset:0;z-index:300;background:#000;
  display:flex;flex-direction:column;justify-content:flex-end;
  padding:clamp(24px,5vw,64px);
  transition:clip-path .8s cubic-bezier(.76,0,.24,1),visibility 0s .8s;
  clip-path:inset(0 0 0 0);visibility:visible;
}
.tech-loader.done{clip-path:inset(0 0 100% 0);visibility:hidden}
.tech-loader .tl-row{
  display:flex;justify-content:space-between;align-items:flex-end;
  font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--mut);
}
.tech-loader .tl-count{
  font-size:clamp(3rem,9vw,7rem);font-weight:500;letter-spacing:-.03em;
  color:var(--ink);line-height:1;font-variant-numeric:tabular-nums;
}
.tech-loader .tl-count i{font-style:normal;color:var(--teal)}

/* no-webgl / reduced motion */
body.tech.no-webgl .fx-canvas{display:none}
body.tech.no-webgl .fx-fallback{display:block}
@media (prefers-reduced-motion:reduce){
  body.tech .tr-block{opacity:1;transform:none;transition:none}
  .tech-loader{display:none}
}

@media (max-width:760px){
  body.tech .tr-block{padding:12vh 24px;min-height:88vh}
  body.tech .tr-right{margin-left:0;text-align:left}
}
