/* ==========================================================================
   SAHEB.SYS — cinematic portfolio
   Mobile-first (390px base) · 768 / 1100 / 1440 breakpoints
   ========================================================================== */

/* ---------- 0. Tokens ---------- */
:root {
  --bg: #05060b;
  --bg-2: #0a0c16;
  --text: #eef0ff;
  --muted: #9aa0b8;
  --dim: #5d627c;
  --violet: #8b5cf6;
  --violet-hi: #a855f7;
  --indigo: #6366f1;
  --blue: #4f7dff;
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .16);
  --glass: linear-gradient(135deg, rgba(255,255,255,.085), rgba(255,255,255,.02));
  --grad: linear-gradient(90deg, #a855f7 0%, #6366f1 52%, #4f7dff 100%);
  --grad-v: linear-gradient(180deg, #a855f7, #4f7dff);

  --f-display: 'Clash Display', 'Sora', 'Poppins', sans-serif;
  --f-body: 'Sora', 'Poppins', sans-serif;
  --f-accent: 'Sentient', Georgia, serif;

  --gutter: 16px;
  --nav-h: 60px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);

  /* duotone icon palette */
  --ico-blue: 79,125,255;   --ico-blue-i: 140,175,255;
  --ico-violet: 139,92,246; --ico-violet-i: 190,165,255;
  --ico-indigo: 99,102,241; --ico-indigo-i: 160,165,255;
  --ico-teal: 0,199,176;    --ico-teal-i: 90,236,214;
  --ico-amber: 232,160,40;  --ico-amber-i: 255,205,110;
  --ico-rose: 236,72,110;   --ico-rose-i: 255,140,165;
}
@media (min-width: 768px)  { :root { --gutter: 32px; --nav-h: 72px; } }
@media (min-width: 1100px) { :root { --gutter: 4.2vw; --nav-h: 88px; } }

/* ---------- 1. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 15px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
s { text-decoration: none; color: var(--violet); opacity: .9; }
::selection { background: rgba(139, 92, 246, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
body.is-booting { overflow: hidden; }

body.has-cursor, body.has-cursor a, body.has-cursor button, body.has-cursor label { cursor: none; }
body.has-cursor input, body.has-cursor textarea { cursor: text; }

/* ---------- 2. Shared type ---------- */
.eyebrow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font: 600 10.5px/1.4 var(--f-body); letter-spacing: .2em; text-transform: uppercase;
  color: #b9bcd8;
}
.eyebrow s { margin: 0 2px; }
.dot {
  width: 6px; height: 6px; border-radius: 50%; flex: 0 0 auto;
  background: var(--violet); box-shadow: 0 0 0 3px rgba(139,92,246,.18), 0 0 14px var(--violet);
}
.dot--live { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(139,92,246,0), 0 0 22px var(--violet); } }
.accent {
  font-family: var(--f-accent); font-style: italic; font-weight: 500;
  text-transform: none; letter-spacing: -.01em;
  background: linear-gradient(90deg, #c4a5ff, #8b7bff 50%, #7aa2ff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (min-width: 768px) { .eyebrow { font-size: 11px; } }

/* ---------- 3. Duotone icon tiles ---------- */
.ico {
  --t: var(--ico-violet); --ti: var(--ico-violet-i);
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center; font-size: 21px;
  background: radial-gradient(120% 120% at 30% 20%, rgba(var(--t), .3), rgba(var(--t), .08));
  border: 1px solid rgba(var(--t), .38); color: rgb(var(--ti));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 28px rgba(var(--t), .22);
}
.ph-duotone::before { opacity: .38; }
[data-hue="blue"] .ico   { --t: var(--ico-blue);   --ti: var(--ico-blue-i); }
[data-hue="indigo"] .ico { --t: var(--ico-indigo); --ti: var(--ico-indigo-i); }
[data-hue="violet"] .ico { --t: var(--ico-violet); --ti: var(--ico-violet-i); }

/* ---------- 4. Overlays: grain, scanlines, flash ---------- */
.grain {
  position: fixed; inset: -100%; z-index: 95; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-6%, 4%); }
  40% { transform: translate(5%, -7%); } 60% { transform: translate(-3%, 8%); }
  80% { transform: translate(7%, 2%); } 100% { transform: translate(0, 0); }
}
.scan {
  position: fixed; inset: 0; z-index: 94; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(180deg, rgba(255,255,255,.025) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
#flash { position: fixed; inset: 0; z-index: 93; pointer-events: none; opacity: 0; }
#flash i { position: absolute; left: 0; right: 0; height: 9%; mix-blend-mode: screen; }
#flash i:nth-child(1) { top: 8%;  background: rgba(139,92,246,.55); }
#flash i:nth-child(2) { top: 22%; height: 3%; background: rgba(255,255,255,.7); }
#flash i:nth-child(3) { top: 41%; height: 12%; background: rgba(79,125,255,.5); }
#flash i:nth-child(4) { top: 58%; height: 2%; background: rgba(255,255,255,.8); }
#flash i:nth-child(5) { top: 70%; background: rgba(168,85,247,.45); }
#flash i:nth-child(6) { top: 88%; height: 4%; background: rgba(79,125,255,.6); }
#flash.on { animation: flash .22s steps(1) both; }
#flash.on i { animation: slice .22s steps(3) both; }
#flash.on i:nth-child(even) { animation-direction: reverse; }
@keyframes flash { 0% { opacity: 1; } 35% { opacity: .4; } 55% { opacity: 1; } 100% { opacity: 0; } }
@keyframes slice {
  0% { transform: translateX(-12%); clip-path: inset(0 40% 0 0); }
  50% { transform: translateX(9%); clip-path: inset(0 0 0 30%); }
  100% { transform: translateX(-3%); clip-path: inset(0 10% 0 55%); }
}

/* ---------- 5. Cursor ---------- */
#cursor { display: none; }
@media (pointer: fine) {
  #cursor { display: block; position: fixed; inset: 0; z-index: 99; pointer-events: none; transition: opacity .3s; }
  #cursor.is-out { opacity: 0; }
  .c-dot, .c-ring { position: fixed; top: 0; left: 0; width: 0; height: 0; will-change: transform; }
  .c-dot::before {
    content: ""; position: absolute; width: 6px; height: 6px; left: -3px; top: -3px;
    border-radius: 50%; background: #fff; box-shadow: 0 0 10px rgba(168,85,247,.9);
  }
  .c-ring::before {
    content: ""; position: absolute; width: 38px; height: 38px; left: -19px; top: -19px;
    border-radius: 50%; border: 1px solid rgba(255,255,255,.45);
    transition: transform .45s var(--ease), background-color .3s, border-color .3s;
  }
  #cursor.is-hover .c-ring::before { transform: scale(2.1); border-color: rgba(168,85,247,.8); background: rgba(139,92,246,.08); }
  #cursor.has-label .c-ring::before { transform: scale(2.3); background: rgba(139,92,246,.9); border-color: transparent; }
  .c-label {
    position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.6); opacity: 0;
    font: 600 10px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; color: #fff;
    transition: opacity .25s, transform .4s var(--ease);
  }
  #cursor.has-label .c-label { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  #cursor.has-label .c-dot { opacity: 0; }
}

/* ---------- 6. Boot ---------- */
#boot { display: none; }
.is-booting #boot {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 120;
  background:
    radial-gradient(60% 50% at 50% 50%, rgba(99,102,241,.12), transparent 70%),
    repeating-linear-gradient(180deg, rgba(255,255,255,.03) 0 1px, transparent 1px 3px),
    #030409;
  overflow: hidden;
}
.boot__glyph {
  position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none;
  font: 700 58vw/1 var(--f-display); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(139,92,246,.18);
  animation: glyph 2.4s steps(2) infinite;
}
@keyframes glyph {
  0%, 86%, 100% { transform: none; opacity: 1; text-shadow: none; }
  88% { transform: translateX(-1.5%) skewX(-6deg); text-shadow: 6px 0 rgba(79,125,255,.35), -6px 0 rgba(168,85,247,.35); }
  92% { transform: translateX(1%); opacity: .5; }
}
.boot__frame {
  position: relative; z-index: 1; width: min(640px, calc(100% - 32px));
  padding: 20px; border: 1px solid rgba(139,92,246,.28); border-radius: 18px;
  background: linear-gradient(180deg, rgba(10,12,24,.86), rgba(5,6,12,.92));
  box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset, 0 30px 90px rgba(0,0,0,.6), 0 0 60px rgba(99,102,241,.14);
}
.boot__head, .boot__foot {
  display: flex; justify-content: space-between; gap: 12px;
  font: 600 10.5px/1.4 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.boot__head span:first-child { color: #fff; text-shadow: 0 0 12px rgba(168,85,247,.8); }
.boot__log { min-height: 186px; margin: 16px 0; font: 400 12.5px/1.75 var(--f-body); color: #b9bdf0; }
.boot__log p { display: flex; gap: 10px; white-space: nowrap; overflow: hidden; animation: logIn .18s steps(2) both; }
.boot__log p::before { content: "›"; color: var(--violet); }
.boot__log p .ok { margin-left: auto; color: #7cf3c5; font-weight: 700; text-shadow: 0 0 10px rgba(124,243,197,.6); }
.boot__log p.grant { color: #fff; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; text-shadow: 0 0 16px rgba(168,85,247,.9); }
.boot__log p.grant::before { content: "■"; color: #7cf3c5; }
@keyframes logIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
.boot__bar { height: 3px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; }
.boot__bar i { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 16px rgba(139,92,246,.9); }
.boot__foot { margin-top: 12px; }
#bootPct { color: #fff; font-weight: 700; }
@media (min-width: 768px) { .boot__frame { padding: 28px 30px; } .boot__log { font-size: 13.5px; min-height: 210px; } }

body.boot-out #boot { animation: bootOut .62s steps(1) forwards; }
body.boot-out .boot__frame { animation: bootFrameOut .62s var(--ease-io) forwards; }
@keyframes bootOut {
  0%   { clip-path: inset(0 0 0 0); filter: none; }
  12%  { clip-path: inset(12% 0 64% 0); transform: translateX(-3%); filter: hue-rotate(80deg); }
  24%  { clip-path: inset(48% 0 22% 0); transform: translateX(4%); }
  36%  { clip-path: inset(0 0 72% 0); transform: translateX(-1%); filter: drop-shadow(8px 0 #4f7dff) drop-shadow(-8px 0 #a855f7); }
  50%  { clip-path: inset(70% 0 4% 0); transform: translateX(2%); }
  64%  { clip-path: inset(30% 0 52% 0); opacity: .7; }
  78%  { clip-path: inset(56% 0 40% 0); opacity: .4; }
  100% { clip-path: inset(50% 0 50% 0); opacity: 0; }
}
@keyframes bootFrameOut { to { transform: scale(1.08); filter: blur(6px); } }

/* ---------- 7. Glitch reveal system ---------- */
.js .gl { opacity: 0; }
.js .gl.gl-on { opacity: 1; animation: glClip .72s steps(1, end) both; }
/* elements whose transform is driven by JS keep the clip-only variant */
@keyframes glClip {
  0%   { opacity: 0; clip-path: inset(44% 0 50% 0); filter: hue-rotate(90deg) brightness(1.8); }
  8%   { opacity: 1; clip-path: inset(8% 0 78% 0); }
  16%  { clip-path: inset(66% 0 8% 0); filter: hue-rotate(-60deg) brightness(1.4); }
  24%  { clip-path: inset(0 0 58% 0); }
  32%  { opacity: .35; clip-path: inset(30% 0 30% 0); }
  40%  { opacity: 1; clip-path: inset(0 0 22% 0); filter: hue-rotate(30deg); }
  56%  { clip-path: inset(12% 0 0 0); filter: none; }
  70%  { opacity: .7; clip-path: inset(0 0 0 0); }
  100% { opacity: 1; clip-path: none; filter: none; }
}
.js .hero__beam.gl-on { animation: tube 1.3s steps(1, end) both; }
@keyframes tube {
  0% { opacity: 0; } 6% { opacity: .9; } 10% { opacity: 0; } 18% { opacity: .5; } 22% { opacity: 0; }
  34% { opacity: 1; } 38% { opacity: .2; } 46% { opacity: 1; } 52% { opacity: .6; } 60%, 100% { opacity: 1; }
}
.js .orbit.gl-on .orbit__core { animation: powerOn 1.1s var(--ease) both; }
@keyframes powerOn {
  0% { opacity: 0; filter: brightness(3) blur(10px); }
  14% { opacity: 1; } 20% { opacity: .2; } 28% { opacity: 1; filter: brightness(2) blur(2px); }
  36% { opacity: .5; } 46% { opacity: 1; }
  100% { opacity: 1; filter: none; }
}

/* ---------- 8. Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter); padding-top: env(safe-area-inset-top);
  background: linear-gradient(180deg, rgba(5,6,11,.75), rgba(5,6,11,0));
}
.nav__brand { display: flex; align-items: center; gap: 14px; min-height: 44px; }
.logo { width: 34px; height: 22px; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: square; stroke-linejoin: miter; filter: drop-shadow(0 0 8px rgba(168,85,247,.5)); }
.logo path:last-child { stroke: url(#none); stroke: #b49bff; }
.nav__name { font: 600 13.5px/1 var(--f-body); letter-spacing: .01em; }
.nav__rule, .nav__role { display: none; }
.nav__links { display: none; }
.nav__menu {
  width: 44px; height: 44px; border-radius: 50%; position: relative;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.04); backdrop-filter: blur(10px);
}
.nav__menu i {
  position: absolute; left: 13px; right: 13px; height: 1.5px; background: #fff; border-radius: 2px;
  transition: transform .45s var(--ease), top .45s var(--ease);
}
.nav__menu i:first-child { top: 18px; } .nav__menu i:last-child { top: 25px; }
.menu-open .nav__menu i:first-child { top: 21.5px; transform: rotate(45deg); }
.menu-open .nav__menu i:last-child  { top: 21.5px; transform: rotate(-45deg); }

@media (min-width: 768px) {
  .nav__rule { display: block; width: 52px; height: 1px; background: rgba(255,255,255,.4); }
  .nav__role { display: block; font: 400 14px/1 var(--f-body); color: #c4c7dc; }
  .nav__name { font-size: 15px; }
  .nav__brand { gap: 26px; }
  .logo { width: 40px; height: 26px; margin-right: 18px; }
}
@media (min-width: 1100px) {
  .nav { background: none; }
  .nav__menu { display: none; }
  .nav__links { display: flex; gap: 42px; }
  .nav__links a {
    position: relative; padding: 10px 0; font: 400 14.5px/1 var(--f-body); color: #c8cbe0;
    transition: color .3s;
  }
  .nav__links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
    background: var(--grad); box-shadow: 0 0 12px rgba(139,92,246,.8);
    transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
  }
  .nav__links a:hover, .nav__links a.is-active { color: #fff; }
  .nav__links a:hover::after, .nav__links a.is-active::after { transform: scaleX(1); transform-origin: left; }
}

/* ---------- 9. Menu sheet ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 65; overflow-y: auto; overscroll-behavior: contain;
  background:
    radial-gradient(80% 50% at 100% 0%, rgba(139,92,246,.22), transparent 60%),
    radial-gradient(60% 40% at 0% 100%, rgba(79,125,255,.18), transparent 60%),
    rgba(5,6,11,.97);
  clip-path: circle(0% at calc(100% - var(--gutter) - 22px) calc(var(--nav-h) / 2));
  visibility: hidden; transition: clip-path .8s var(--ease-io), visibility 0s .8s;
}
.menu-open .sheet { clip-path: circle(150% at calc(100% - var(--gutter) - 22px) calc(var(--nav-h) / 2)); visibility: visible; transition: clip-path .8s var(--ease-io), visibility 0s; }
.sheet__inner { padding: calc(var(--nav-h) + 16px) var(--gutter) 32px; max-width: 640px; margin: 0 auto; display: grid; gap: 22px; }
.sheet__id {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 18px;
  background: var(--glass); border: 1px solid var(--line);
}
.sheet__id img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 1px solid rgba(139,92,246,.6); box-shadow: 0 0 0 3px rgba(139,92,246,.15); }
.sheet__id b { display: block; font: 600 15px/1.3 var(--f-body); }
.sheet__id span { display: block; font-size: 12px; color: var(--muted); line-height: 1.45; }
.sheet__links { display: grid; }
.sheet__links a {
  display: flex; align-items: baseline; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font: 600 26px/1.15 var(--f-display); text-transform: uppercase; letter-spacing: -.01em;
  opacity: 0; transform: translateY(16px); transition: opacity .5s, transform .6s var(--ease), color .3s;
}
.sheet__links a em { font: 600 10.5px/1 var(--f-body); font-style: normal; letter-spacing: .16em; color: var(--violet); }
.sheet__links a:hover { color: #c4a5ff; }
.menu-open .sheet__links a { opacity: 1; transform: none; }
.menu-open .sheet__links a:nth-child(1) { transition-delay: .2s; } .menu-open .sheet__links a:nth-child(2) { transition-delay: .24s; }
.menu-open .sheet__links a:nth-child(3) { transition-delay: .28s; } .menu-open .sheet__links a:nth-child(4) { transition-delay: .32s; }
.menu-open .sheet__links a:nth-child(5) { transition-delay: .36s; } .menu-open .sheet__links a:nth-child(6) { transition-delay: .4s; }
.menu-open .sheet__links a:nth-child(7) { transition-delay: .44s; } .menu-open .sheet__links a:nth-child(8) { transition-delay: .48s; }
.sheet__quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sheet__quick a {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); font: 600 13px/1 var(--f-body);
}
.sheet__quick i { font-size: 20px; color: #b49bff; }

/* ---------- 10. HUD ---------- */
.hud { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.hud__c { position: absolute; width: 14px; height: 14px; border-color: rgba(255,255,255,.3); border-style: solid; border-width: 0; }
.hud__c--tl { top: calc(var(--nav-h) + 4px); left: 10px; border-top-width: 1px; border-left-width: 1px; }
.hud__c--tr { top: calc(var(--nav-h) + 4px); right: 10px; border-top-width: 1px; border-right-width: 1px; }
.hud__c--bl { bottom: 10px; left: 10px; border-bottom-width: 1px; border-left-width: 1px; }
.hud__c--br { bottom: 10px; right: 10px; border-bottom-width: 1px; border-right-width: 1px; }
.hud__chapter {
  position: absolute; left: calc(var(--gutter) + 52px); bottom: 22px; display: flex; align-items: center; gap: 10px;
  font: 600 10.5px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #cfd2ea;
}
.hud__chapter b { width: 28px; height: 1px; background: rgba(255,255,255,.4); }
#hudNo { color: #b49bff; }
.hud__meta { display: none; }
.hud__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.05); }
.hud__progress i { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px rgba(139,92,246,.9); }
.hud__term {
  position: absolute; left: var(--gutter); bottom: 10px; pointer-events: auto;
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 19px;
  border: 1px solid rgba(139,92,246,.35); background: rgba(10,12,24,.6); backdrop-filter: blur(10px); color: #c9b8ff;
  box-shadow: 0 0 20px rgba(139,92,246,.15); transition: background .3s, box-shadow .3s;
}
.hud__term:hover { background: rgba(139,92,246,.25); box-shadow: 0 0 30px rgba(139,92,246,.45); }
.hud__scroll {
  position: absolute; right: var(--gutter); bottom: 22px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  font: 500 10px/1.3 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #c2c5dc;
  transition: opacity .6s;
}
.hud__scroll i { margin-top: 6px; font-size: 18px; animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }
body.past-hero .hud__scroll { opacity: 0; }

@media (min-width: 1100px) {
  .hud__c--tl, .hud__c--tr { top: calc(var(--nav-h) - 6px); }
  .hud__meta {
    display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
    position: absolute; right: var(--gutter); top: calc(var(--nav-h) + 6px);
    font: 500 10px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--dim);
  }
  #hudClock { color: #a5a9c6; }
  #hudVisitors:empty { display: none; }
  #hudVisitors { color: #b49bff; }
  .hud__scroll { bottom: 40px; right: calc(var(--gutter) + 2.6vw); font-size: 11px; }
  .hud__chapter { bottom: 30px; font-size: 11px; }
  .hud__term { bottom: 18px; }
  .hud__c--bl, .hud__c--br { bottom: 14px; }
  .hud__c--bl { left: 14px; } .hud__c--br { right: 14px; } .hud__c--tl { left: 14px; } .hud__c--tr { right: 14px; }
}

/* ---------- 11. World & scenes ---------- */
#world { position: relative; }
.scene { position: relative; min-height: 100svh; overflow: hidden; isolation: isolate; }
#spacer { display: none; }

body.cinema #world { position: fixed; inset: 0; perspective: 1400px; overflow: hidden; z-index: 1; }
body.cinema .scene {
  position: absolute; inset: 0; min-height: 0; overflow: hidden;
  will-change: transform, opacity; transform-style: preserve-3d; backface-visibility: hidden;
  background: var(--bg);
}
body.cinema #spacer { display: block; }

.mp { position: relative; width: 100%; height: 100%; will-change: transform; }

/* ---------- 12. HERO (stage A) — phone first ---------- */
.scene--hero {
  background:
    radial-gradient(70% 45% at 72% 42%, rgba(99,102,241,.14), transparent 70%),
    radial-gradient(50% 60% at 50% 100%, rgba(79,125,255,.08), transparent 70%),
    var(--bg);
}
.hero__beam {
  position: absolute; z-index: 0; top: -10%; bottom: 0; left: 52%; width: 34vw;
  background:
    linear-gradient(90deg, transparent 0%, rgba(79,125,255,.07) 30%, rgba(120,160,255,.32) 50%, rgba(79,125,255,.07) 70%, transparent 100%);
  filter: blur(10px);
}
.hero__beam::after {
  content: ""; position: absolute; top: 0; bottom: 30%; left: 47%; width: 6%;
  background: linear-gradient(180deg, rgba(190,210,255,.5), rgba(79,125,255,.12) 70%, transparent);
  filter: blur(6px);
}
.hero__grid {
  position: absolute; inset: 0; z-index: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(70% 60% at 60% 45%, #000 20%, transparent 75%);
          mask-image: radial-gradient(70% 60% at 60% 45%, #000 20%, transparent 75%);
}
.hero__dust { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.hero__dust canvas { width: 100%; height: 100%; }

.hero__portrait {
  position: absolute; z-index: 2; bottom: 0;
  height: 56svh; aspect-ratio: 1100 / 1473;
  left: 50%; margin-left: calc(56svh * -.373 + 14vw);
}
.hero__portrait .mp { -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, #000 70%, transparent 100%); }
.hero__img, .ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.hero__portrait picture { position: absolute; inset: 0; }
.hero__img { filter: drop-shadow(-14px 0 34px rgba(79,125,255,.28)) drop-shadow(12px -6px 30px rgba(139,92,246,.18)) contrast(1.04); }
.ghost { opacity: 0; mix-blend-mode: screen; pointer-events: none; z-index: 2; }
.ghost--r { filter: url(#f-r); }
.ghost--c { filter: url(#f-c); }
.hero__portrait.glitching .ghost--r { animation: ghostR .36s steps(2) both; }
.hero__portrait.glitching .ghost--c { animation: ghostC .36s steps(2) both; }
.hero__portrait.glitching picture { animation: twitch .36s steps(2) both; }
@keyframes ghostR {
  0% { opacity: .9; transform: translate(-12px, 0); clip-path: inset(10% 0 60% 0); }
  33% { opacity: .8; transform: translate(9px, 2px); clip-path: inset(52% 0 20% 0); }
  66% { opacity: .9; transform: translate(-14px, -1px); clip-path: inset(0 0 40% 0); }
  100% { opacity: 0; transform: none; clip-path: inset(0); }
}
@keyframes ghostC {
  0% { opacity: .9; transform: translate(12px, 0); clip-path: inset(30% 0 40% 0); }
  33% { opacity: .8; transform: translate(-8px, -2px); clip-path: inset(0 0 70% 0); }
  66% { opacity: .9; transform: translate(14px, 1px); clip-path: inset(60% 0 4% 0); }
  100% { opacity: 0; transform: none; clip-path: inset(0); }
}
@keyframes twitch {
  0% { transform: translateX(4px); clip-path: inset(0 0 0 0); }
  33% { transform: translateX(-6px); clip-path: inset(0 0 12% 0); }
  66% { transform: translateX(3px); }
  100% { transform: none; clip-path: none; }
}

/* stone pedestal blocks */
.hero__pedestal { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hero__pedestal i {
  position: absolute; bottom: 0; display: block;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='s'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='4'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23s)'/%3E%3C/svg%3E"),
    linear-gradient(170deg, #1a1c26 0%, #0c0d13 45%, #050609 100%);
  background-blend-mode: soft-light, normal;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 -30px 80px rgba(0,0,0,.6);
}
.hero__pedestal i:first-child { left: -6vw; width: 70vw; height: 13svh; }
.hero__pedestal i:first-child::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 3.4svh;
  background: linear-gradient(180deg, #2a2c38, #15161e);
  transform-origin: bottom; transform: skewX(-38deg); transform-origin: 0 100%;
  opacity: .9;
}
.hero__pedestal i:first-child::after {
  content: ""; position: absolute; top: -1px; left: 34%; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, #a855f7 25%, #8b5cf6 70%, rgba(139,92,246,.2));
  box-shadow: 0 0 12px #8b5cf6, 0 0 30px rgba(139,92,246,.7);
}
.hero__pedestal i:last-child { display: none; }

/* copy */
.hero__copy { position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); top: calc(var(--nav-h) + 20px); }
.hero__copy .mp { height: auto; }
.hero__title {
  margin: 14px 0 0; font: 700 44px/.92 var(--f-display); text-transform: uppercase; letter-spacing: -.025em;
  color: #eceef8; text-shadow: 0 10px 40px rgba(0,0,0,.55);
}
.hero__title .line { display: block; white-space: nowrap; }
.hero__title .line:not(.line--grad) {
  background: linear-gradient(180deg, #ffffff 0%, #d9dbe6 55%, #a9acbd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.line--grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(139,92,246,.35));
}
.hero__sub {
  margin-top: 16px; max-width: 62%; font: 400 13.5px/1.6 var(--f-body); color: #c3c6da;
  text-shadow: 0 2px 16px rgba(0,0,0,.9);
}
.hero__sub .accent { font-size: 1.08em; background: none; color: #8f86ff; -webkit-text-fill-color: #8f86ff; }
.cta { display: inline-flex; align-items: center; gap: 14px; margin-top: 20px; min-height: 48px; }
.cta__line { display: none; width: 56px; height: 1px; background: linear-gradient(90deg, transparent, #8b8fff); }
.cta__ring {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 17px;
  border: 1.5px solid #7c6bff; color: #fff; box-shadow: 0 0 18px rgba(124,107,255,.45), inset 0 0 12px rgba(124,107,255,.25);
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.cta__txt { font: 600 12px/1 var(--f-body); letter-spacing: .24em; text-transform: uppercase; }
.cta:hover .cta__ring { background: var(--violet); transform: rotate(-45deg); }
.hero__stack { display: none; }

/* orbit (phone stage A) */
.orbit {
  position: absolute; z-index: 3; width: 150px; aspect-ratio: 1;
  right: -14px; top: calc(var(--nav-h) + 250px);
}
.orbit__core { position: absolute; inset: 0; }
.orbit__core canvas { width: 100%; height: 100%; }
.orbit__ai {
  position: absolute; left: 50%; top: 50%; width: 24%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #12142a, #05060d 70%);
  box-shadow: 0 0 0 1px rgba(139,92,246,.4), 0 0 30px rgba(99,102,241,.7), inset 0 0 18px rgba(139,92,246,.5);
}
.orbit__ai span { font: 600 calc(var(--orb-ai, 15px)) /1 var(--f-display); color: #fff; letter-spacing: -.02em; text-shadow: 0 0 14px rgba(170,160,255,.9); }

/* glass service cards */
.ocard {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  width: clamp(168px, 13.5vw, 250px); padding: 12px 14px 14px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(255,255,255,.025) 60%);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 24px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(139,92,246,.05);
  transition: border-color .4s, box-shadow .4s;
}
.ocard::after {
  content: ""; position: absolute; left: 22%; right: 18%; bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--grad); box-shadow: 0 0 14px rgba(139,92,246,.9); opacity: .9;
}
.ocard:hover { border-color: rgba(168,85,247,.5); box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 0 40px rgba(139,92,246,.25), inset 0 1px 0 rgba(255,255,255,.14); }
.ocard .ico { width: 40px; height: 40px; font-size: 19px; }
.ocard h3 { font: 600 14.5px/1.2 var(--f-body); color: #fff; }
.ocard p { margin-top: 3px; font: 400 11.5px/1.45 var(--f-body); color: #b9bcd2; }
.ocard__go {
  position: absolute; right: 10px; bottom: 10px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; border: 1px solid rgba(255,255,255,.22); color: #fff;
  opacity: 0; transform: translateX(-6px); transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.scene--hero.is-orbital .ocard__go { opacity: 1; transform: none; }

/* phone stage A: cards parked off */
.ocard { display: none; }
.hero__orbital-caption { display: none; }

/* ---- phone stage B: JS centres .orbit (150px, unscaled) at top; cards laid out around it ---- */
@media (max-width: 767px) {
  .scene--hero.is-orbital .ocard {
    display: flex; width: calc(50vw - 22px); padding: 10px 10px 12px; gap: 9px; align-items: flex-start; flex-direction: column;
    animation: cardFade .7s var(--ease) both;
  }
  .scene--hero.is-orbital .ocard .ico { width: 36px; height: 36px; font-size: 17px; }
  .scene--hero.is-orbital .ocard h3 { font-size: 14px; }
  .scene--hero.is-orbital .ocard__go { display: none; }
  .scene--hero.is-orbital .ocard--0 { left: calc(91px - 50vw); top: calc(100% + 56px); }
  .scene--hero.is-orbital .ocard--1 { left: 81px; top: calc(100% + 56px); animation-delay: .06s; }
  .scene--hero.is-orbital .ocard--2 { left: calc(91px - 50vw); top: calc(100% + 182px); animation-delay: .12s; }
  .scene--hero.is-orbital .ocard--3 { left: 81px; top: calc(100% + 182px); animation-delay: .18s; }
  .scene--hero.is-orbital .hero__orbital-caption {
    display: block; position: absolute; z-index: 4; left: var(--gutter); right: var(--gutter); bottom: 74px;
    animation: cardFade .8s .25s var(--ease) both;
  }
}
@keyframes cardFade { from { opacity: 0; filter: blur(6px); } to { opacity: 1; filter: none; } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
.hero__orbital-caption p:last-child { margin-top: 10px; font-size: 13px; line-height: 1.6; color: var(--muted); max-width: 36em; }

/* ---- tablet ---- */
@media (min-width: 768px) {
  .hero__title { font-size: 72px; }
  .hero__sub { font-size: 15px; max-width: 26em; }
  .hero__portrait { height: 70svh; margin-left: calc(70svh * -.373 + 12vw); }
  .orbit { width: 240px; top: calc(var(--nav-h) + 300px); right: 10px; }
  .orbit__ai span { font-size: 24px; }
  .hero__pedestal i:first-child { height: 15svh; width: 64vw; left: 4vw; }
  .hero__stack { display: block; margin-top: 30px; font: 500 11.5px/1.9 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #bfc2d6; }
  .hero__stack span { display: block; color: var(--dim); }
  .hero__stack s { margin: 0 8px; color: #73779a; }
}

/* ---- desktop: matches reference composition ---- */
@media (min-width: 1100px) {
  .hero__beam { left: 46%; width: 20vw; }
  .hero__portrait { height: 92vh; margin-left: calc(92vh * -.373 + 1vw); left: 50%; }
  .hero__portrait .mp { -webkit-mask-image: none; mask-image: none; }
  .hero__copy { right: auto; width: 46vw; top: 15.5vh; left: var(--gutter); }
  .hero__title { margin-top: 2.6vh; font-size: clamp(64px, 6.35vw, 132px); line-height: .9; }
  .hero__sub { margin-top: 4.4vh; max-width: 27.5em; font-size: clamp(14px, .98vw, 17px); color: #cdd0e2; }
  .cta { margin-top: 5.2vh; gap: 20px; }
  .cta__line { display: block; }
  .cta__ring { width: 42px; height: 42px; }
  .hero__stack { margin-top: 9vh; }

  .hero__pedestal i:first-child { left: 12.5vw; width: 43vw; height: 16vh; }
  .hero__pedestal i:first-child::before { height: 4.6vh; }
  .hero__pedestal i:first-child::after { left: 41%; }
  .hero__pedestal i:last-child {
    display: block; right: 0; width: 7.6vw; height: 34vh;
    background-color: #0b0c12;
  }
  .hero__pedestal i:last-child::before {
    content: ""; position: absolute; left: -1px; top: 6%; bottom: 0; width: 2px;
    background: linear-gradient(180deg, transparent, #8b5cf6 30%, #a855f7);
    box-shadow: 0 0 12px #8b5cf6, 0 0 26px rgba(139,92,246,.6);
  }
  .hero__pedestal i:last-child::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 3vh;
    background: linear-gradient(180deg, #23252f, #12131a); transform: skewY(-12deg); transform-origin: 100% 100%;
  }

  .orbit { width: min(31vw, 560px); right: 9vw; top: 21vh; }
  .orbit__ai span { font-size: clamp(30px, 2.4vw, 46px); }
  .ocard { display: flex; }
  .ocard--0 { left: -22%; top: 6%; transform: perspective(900px) rotateY(10deg) rotateZ(1.5deg); }
  .ocard--1 { left: 64%; top: -18%; transform: perspective(900px) rotateY(-12deg) rotateZ(-4deg); }
  .ocard--2 { left: 80%; top: 50%; transform: perspective(900px) rotateY(-10deg); }
  .ocard--3 { left: 38%; top: 92%; transform: perspective(900px) rotateY(-4deg); }

  .hero__orbital-caption {
    display: block; position: absolute; z-index: 4; left: var(--gutter); bottom: 12vh; width: 22vw;
    opacity: 0; transition: opacity .8s var(--ease); pointer-events: none;
  }
  .scene--hero.is-orbital .hero__orbital-caption { opacity: 1; left: auto; right: var(--gutter); }
}

/* ---------- 13. Chapters ---------- */
.chap__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #04050a; }
.chap__bg picture, .chap__bg img { position: absolute; inset: 0; width: 100%; height: 100%; }
.chap__bg img { object-fit: cover; transform-origin: center; transform: scale(1.12); will-change: transform; }
.scene--origin .chap__bg img { object-position: 74% 50%; }
.scene--forge .chap__bg img { object-position: 66% 50%; }
.scene--architect .chap__bg img { object-position: 50% 50%; }
.scene--horizon .chap__bg img { object-position: 22% 50%; }
.chap__shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(5,6,11,.96) 0%, rgba(5,6,11,.82) 34%, rgba(5,6,11,.15) 66%, rgba(5,6,11,.55) 100%);
}
.chap__no {
  position: absolute; z-index: 1; right: -6vw; top: calc(var(--nav-h) - 2vw);
  font: 700 62vw/.8 var(--f-display); letter-spacing: -.06em;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,.14);
  pointer-events: none; user-select: none;
}
.scene__inner { position: relative; z-index: 2; will-change: transform; }
body.cinema .scene__inner { position: absolute; top: 0; left: 0; right: 0; min-height: 100%; }
.chap__body {
  display: flex; flex-direction: column; justify-content: flex-end;
  min-height: 100svh; padding: calc(var(--nav-h) + 40px) var(--gutter) 84px;
}
body.cinema .chap__body { min-height: 100%; }
.chap__body .eyebrow { margin-bottom: 16px; }
.chap__title {
  font: 600 38px/.96 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; color: #f2f3fa;
}
.chap__title .line { display: block; }
.chap__title .line.accent { font-size: 1em; line-height: 1.05; padding-bottom: .04em; }
.chap__text { margin-top: 16px; max-width: 34em; font-size: 14.5px; line-height: 1.65; color: #c5c8db; }
.chap__stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 22px; max-width: 560px;
}
.stat {
  padding: 12px 10px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.stat b {
  display: block; font: 600 22px/1 var(--f-display); letter-spacing: -.01em;
  background: linear-gradient(180deg, #fff, #b8b2ff); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { display: block; margin-top: 6px; font: 500 10px/1.35 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

@media (min-width: 768px) {
  .chap__title { font-size: 60px; }
  .chap__text { font-size: 16px; }
  .stat { padding: 16px; } .stat b { font-size: 30px; } .stat span { font-size: 10.5px; }
  .chap__no { font-size: 46vw; }
}
@media (min-width: 1100px) {
  .chap__shade {
    background:
      linear-gradient(90deg, rgba(5,6,11,.95) 0%, rgba(5,6,11,.78) 30%, rgba(5,6,11,.1) 62%, rgba(5,6,11,.3) 100%),
      linear-gradient(0deg, rgba(5,6,11,.7), transparent 30%, transparent 80%, rgba(5,6,11,.5));
  }
  .scene--horizon .chap__shade {
    background:
      linear-gradient(270deg, rgba(5,6,11,.95) 0%, rgba(5,6,11,.75) 32%, rgba(5,6,11,.1) 62%, rgba(5,6,11,.3) 100%),
      linear-gradient(0deg, rgba(5,6,11,.7), transparent 30%, transparent 80%, rgba(5,6,11,.5));
  }
  .chap__body { justify-content: center; padding: calc(var(--nav-h) + 20px) var(--gutter) 90px; max-width: calc(620px + var(--gutter) * 2); }
  .scene--horizon .chap__body { margin-left: auto; right: 0; left: auto; }
  .chap__title { font-size: clamp(64px, 5.4vw, 108px); }
  .chap__text { font-size: 16.5px; }
  .chap__stats { gap: 12px; margin-top: 34px; }
  .stat b { font-size: clamp(30px, 2.5vw, 44px); }
  .chap__no { top: auto; bottom: -7vw; right: -2vw; font-size: 40vw; -webkit-text-stroke-color: rgba(255,255,255,.1); }
  .scene--horizon .chap__no { right: auto; left: -3vw; }
}

/* ---------- 14. Work ---------- */
.scene--work {
  background:
    radial-gradient(60% 50% at 80% 10%, rgba(99,102,241,.16), transparent 70%),
    radial-gradient(50% 50% at 0% 100%, rgba(139,92,246,.12), transparent 70%),
    var(--bg);
  padding: calc(var(--nav-h) + 24px) 0 64px;
}
.work__head { position: relative; z-index: 2; padding: 0 var(--gutter); }
.work__title { margin-top: 12px; font: 600 36px/.95 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; }
.work__count { margin-top: 10px; font-size: 13px; color: var(--muted); }
.work__count b { color: #fff; font-weight: 600; }
.work__track {
  display: flex; gap: 14px; margin-top: 24px; padding: 12px var(--gutter) 24px;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  scrollbar-width: none; perspective: 1600px;
}
.work__track::-webkit-scrollbar { display: none; }
body.cinema .scene--work { padding: 0; }
body.cinema .work__head { position: absolute; top: calc(var(--nav-h) + 12px); left: 0; right: 0; }
body.cinema .work__track {
  position: absolute; left: 0; top: calc(var(--nav-h) + 150px); overflow: visible; scroll-snap-type: none;
  margin: 0; will-change: transform; transform-style: preserve-3d;
}
.pcard {
  position: relative; flex: 0 0 min(420px, 84vw); scroll-snap-align: start;
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 80px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.1);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transform-origin: center; will-change: transform;
  transition: border-color .4s, box-shadow .4s;
}
.pcard:hover { border-color: rgba(168,85,247,.55); box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 50px rgba(139,92,246,.22), inset 0 1px 0 rgba(255,255,255,.1); }
.pcard__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0d18; }
.pcard__media img, .pcard__media video { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform 1.2s var(--ease); }
.pcard:hover .pcard__media img, .pcard:hover .pcard__media video { transform: scale(1.06); }
.pcard__live {
  position: absolute; z-index: 2; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px 6px 8px; border-radius: 999px; font: 600 9.5px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: #fff;
  background: rgba(5,6,11,.62); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pcard__live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 0 0 rgba(255,59,92,.7); animation: livePulse 1.6s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(255,59,92,.7); } 70% { box-shadow: 0 0 0 8px rgba(255,59,92,0); } 100% { box-shadow: 0 0 0 0 rgba(255,59,92,0); } }
.pcard__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(5,6,11,.75)); pointer-events: none; }
.pcard__idx {
  position: absolute; z-index: 1; left: 12px; top: 12px; padding: 6px 10px; border-radius: 999px;
  font: 600 10.5px/1 var(--f-body); letter-spacing: .16em; color: #fff;
  background: rgba(5,6,11,.6); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(8px);
}
.pcard__gen {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(40% 50% at 50% 50%, rgba(139,92,246,.5), transparent 70%),
    radial-gradient(60% 60% at 20% 80%, rgba(79,125,255,.35), transparent 70%),
    radial-gradient(50% 50% at 85% 15%, rgba(168,85,247,.3), transparent 70%), #070816;
}
.pcard__gen span { position: relative; z-index: 1; font: 700 44px/1 var(--f-display); letter-spacing: .04em; color: #fff; text-shadow: 0 0 30px rgba(168,85,247,.9); }
.pcard__gen i { position: absolute; left: 50%; top: 50%; border-radius: 50%; border: 1px solid rgba(180,160,255,.35); animation: ripple 3.6s linear infinite; }
.pcard__gen i:nth-of-type(1) { width: 90px; height: 90px; margin: -45px; }
.pcard__gen i:nth-of-type(2) { width: 90px; height: 90px; margin: -45px; animation-delay: -1.2s; }
.pcard__gen i:nth-of-type(3) { width: 90px; height: 90px; margin: -45px; animation-delay: -2.4s; }
@keyframes ripple { from { transform: scale(.6); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }
.pcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.pcard__meta { display: flex; justify-content: space-between; font: 600 10px/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: #a99bff; }
.pcard__meta span:last-child { color: var(--dim); }
.pcard h3 { font: 600 20px/1.1 var(--f-display); letter-spacing: -.005em; }
.pcard p { font-size: 13px; line-height: 1.5; color: #b6b9cf; }
.pcard ul { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.pcard li { padding: 5px 9px; border-radius: 999px; font: 500 10.5px/1 var(--f-body); color: #d6d8ea; background: rgba(255,255,255,.05); border: 1px solid var(--line); }
.pcard--more {
  justify-content: center; align-items: flex-start; gap: 14px; padding: 28px 24px;
  background:
    radial-gradient(80% 60% at 100% 0%, rgba(139,92,246,.35), transparent 70%),
    radial-gradient(70% 60% at 0% 100%, rgba(79,125,255,.25), transparent 70%),
    rgba(10,12,24,.8);
  border-color: rgba(139,92,246,.35);
}
.pcard--more .ico { width: 56px; height: 56px; font-size: 26px; }
.pcard--more h3 { font-size: 30px; text-transform: uppercase; line-height: 1; }
.pcard--more h3 .accent { text-transform: none; }
.work__rail { position: absolute; z-index: 2; left: var(--gutter); right: var(--gutter); bottom: 64px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.08); display: none; }
.work__rail i { display: block; height: 100%; width: 0; background: var(--grad); box-shadow: 0 0 12px rgba(139,92,246,.8); }
body.cinema .work__rail { display: block; }

/* phone: compact card so the whole card sits inside one screen */
@media (max-width: 767px) {
  .pcard__body { padding: 12px 14px 14px; gap: 6px; }
  .pcard h3 { font-size: 18px; }
  .pcard p { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  body.cinema .work__track { top: calc(var(--nav-h) + 136px); }
  body:has(.scene--hero.is-orbital) .hud__scroll { opacity: 0; }
  /* arsenal + signal compaction */
  .arsenal { gap: 22px; padding-bottom: 72px; }
  .arsenal__title { font-size: 32px; }
  .honors { margin-top: 16px; gap: 8px; }
  .honor { padding: 12px; gap: 12px; }
  .honor .ico { width: 40px; height: 40px; font-size: 19px; }
  .honor h3 { font-size: 14px; } .honor p { font-size: 12.5px; }
  .skills { --S: min(300px, 82vw); }
  .tl { grid-template-columns: 64px 1fr; padding: 8px 0 8px 14px; gap: 10px; }
  .tl::before { top: 14px; }
  .tl b { font-size: 13.5px; } .tl em { font-size: 12px; }
  .signal { padding-top: calc(var(--nav-h) + 18px); padding-bottom: 56px; }
  .signal__title { font-size: 30px; }
  .form { margin-top: 16px; padding: 14px; gap: 10px; }
  .form__topics { flex-wrap: nowrap; overflow-x: auto; margin: 0 -14px; padding: 0 14px 2px; scrollbar-width: none; }
  .form__topics::-webkit-scrollbar { display: none; }
  .form__topics span { white-space: nowrap; min-height: 34px; }
  .field textarea { min-height: 80px; }
  .btn { width: 100%; }
  .signal__direct { margin-top: 12px; }
}

@media (min-width: 768px) {
  .work__title { font-size: 56px; }
  .pcard h3 { font-size: 23px; } .pcard p { font-size: 13.5px; }
  body.cinema .work__track { top: calc(var(--nav-h) + 190px); }
}
@media (min-width: 1100px) {
  body.cinema .work__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; padding-right: calc(var(--gutter) + 8vw); }
  .work__head .eyebrow { position: absolute; top: -26px; left: var(--gutter); }
  .work__title { font-size: clamp(56px, 5vw, 96px); margin-top: 0; }
  .work__count { margin: 0 0 8px; font-size: 14px; }
  body.cinema .work__track { top: auto; bottom: 110px; gap: 26px; }
  .pcard { flex-basis: min(420px, 30vw); }
  .work__rail { bottom: 54px; }
}
@media (min-width: 1100px) and (max-height: 820px) {
  .pcard { flex-basis: min(360px, 28vw); }
  .pcard p { display: none; }
}

/* ---------- 15. Arsenal ---------- */
.scene--arsenal {
  background:
    radial-gradient(45% 45% at 50% 50%, rgba(99,102,241,.16), transparent 70%),
    radial-gradient(40% 40% at 90% 90%, rgba(139,92,246,.12), transparent 70%),
    var(--bg);
}
.arsenal {
  display: grid; gap: 34px; align-content: start;
  padding: calc(var(--nav-h) + 28px) var(--gutter) 90px;
}
.arsenal__title { margin-top: 12px; font: 600 36px/.95 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; }
.honors { display: grid; gap: 10px; margin-top: 22px; }
.honor {
  display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px;
  background: var(--glass); border: 1px solid var(--line);
}
.honor:nth-child(1) .ico { --t: var(--ico-amber); --ti: var(--ico-amber-i); }
.honor:nth-child(2) .ico { --t: var(--ico-blue); --ti: var(--ico-blue-i); }
.honor:nth-child(3) .ico { --t: var(--ico-violet); --ti: var(--ico-violet-i); }
.honor h3 { font: 600 14.5px/1.3 var(--f-body); }
.honor p { margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

.skills {
  --S: min(350px, 88vw);
  position: relative; width: var(--S); height: var(--S); margin: 0 auto;
}
.skills::before {
  content: ""; position: absolute; inset: 22%; border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.35), rgba(79,125,255,.1) 50%, transparent 70%);
  filter: blur(20px);
}
.skills__core {
  position: absolute; left: 50%; top: 50%; width: 30%; height: 30%; transform: translate(-50%, -50%);
  border-radius: 50%; display: grid; place-content: center; text-align: center; z-index: 2;
  background: radial-gradient(circle at 50% 35%, #15173a, #05060d 72%);
  box-shadow: 0 0 0 1px rgba(139,92,246,.45), 0 0 40px rgba(99,102,241,.55), inset 0 0 24px rgba(139,92,246,.45);
}
.skills__core b { font: 600 calc(var(--S) * .085)/1 var(--f-display); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.skills__core span { margin-top: 4px; font: 600 calc(var(--S) * .024)/1.3 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ring {
  --dur: 60s; --r: calc(var(--S) * .23);
  position: absolute; border-radius: 50%; border: 1px dashed rgba(255,255,255,.12);
  animation: spin var(--dur) linear infinite;
}
.ring--inner { inset: 27%; --r: calc(var(--S) * .23); --dur: 38s; }
.ring--mid   { inset: 14%; --r: calc(var(--S) * .36); --dur: 64s; animation-direction: reverse; border-color: rgba(139,92,246,.22); }
.ring--outer { inset: 0;   --r: calc(var(--S) * .5);  --dur: 96s; border-style: solid; border-color: rgba(255,255,255,.06); }
.chip { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)) translateY(calc(var(--r) * -1)); }
.chip em {
  position: absolute; left: 0; top: 0; white-space: nowrap; font-style: normal;
  padding: 5px 9px; border-radius: 999px; font: 500 calc(var(--S) * .03)/1 var(--f-body); color: #e3e5f5;
  background: rgba(12,14,28,.88); border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1));
  animation: counter var(--dur) linear infinite;
}
.ring--mid .chip em { animation-direction: reverse; border-color: rgba(139,92,246,.4); color: #d9ccff; }
.ring--inner .chip em { background: linear-gradient(135deg, rgba(139,92,246,.35), rgba(79,125,255,.25)); border-color: rgba(168,85,247,.55); color: #fff; font-weight: 600; box-shadow: 0 0 18px rgba(139,92,246,.35); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes counter {
  from { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); }
  to   { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1 - 360deg)); }
}

.timeline { display: grid; gap: 0; }
.timeline .eyebrow { margin-bottom: 10px; }
.tl { position: relative; display: grid; grid-template-columns: 78px 1fr; gap: 12px; padding: 11px 0 11px 18px; border-left: 1px solid rgba(139,92,246,.3); }
.tl::before { content: ""; position: absolute; left: -4px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--violet); box-shadow: 0 0 10px rgba(139,92,246,.8); }
.tl:first-of-type::before, .tl:nth-of-type(2)::before { background: var(--violet); }
.tl > span { font: 600 10.5px/1.6 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: #a99bff; }
.tl b { display: block; font: 600 14px/1.35 var(--f-body); }
.tl em { display: block; font-style: normal; font-size: 12.5px; color: var(--muted); }

@media (min-width: 768px) {
  .arsenal__title { font-size: 56px; }
  .skills { --S: min(460px, 70vw); }
  .honors { grid-template-columns: repeat(3, 1fr); }
  .honor { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 1100px) {
  .arsenal {
    grid-template-columns: minmax(280px, 1fr) auto minmax(250px, .85fr); align-items: center; gap: 3.4vw;
    padding: calc(var(--nav-h) + 10px) var(--gutter) 80px;
  }
  body.cinema .arsenal { min-height: 100%; }
  .arsenal__title { font-size: clamp(52px, 4.2vw, 84px); }
  .honors { grid-template-columns: 1fr; }
  .honor { flex-direction: row; align-items: center; }
  .skills { --S: min(520px, 36vw, 70vh); }
}

/* ---------- 16. Signal (contact) ---------- */
.scene--signal { background: #030408; }
.signal__bg img { object-position: 78% 40%; }
.signal__shade {
  background: linear-gradient(180deg, rgba(3,4,8,.55) 0%, rgba(3,4,8,.86) 34%, rgba(3,4,8,.97) 60%);
}
.signal { padding: calc(var(--nav-h) + 26px) var(--gutter) 70px; max-width: calc(680px + var(--gutter) * 2); }
.signal__title { margin-top: 12px; font: 600 34px/.98 var(--f-display); text-transform: uppercase; letter-spacing: -.02em; }
.form {
  margin-top: 22px; padding: 16px; border-radius: 20px; display: grid; gap: 12px;
  background: linear-gradient(180deg, rgba(16,18,34,.72), rgba(8,9,18,.78));
  border: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.1), 0 0 0 1px rgba(139,92,246,.06);
}
.form__topics { display: flex; flex-wrap: wrap; gap: 8px; }
.form__topics label { position: relative; }
.form__topics input { position: absolute; opacity: 0; pointer-events: none; }
.form__topics span {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px;
  font: 500 12.5px/1 var(--f-body); color: #c9cce0; border: 1px solid var(--line-2); background: rgba(255,255,255,.03);
  transition: background .3s, color .3s, border-color .3s, box-shadow .3s;
}
.form__topics label:hover span { border-color: rgba(168,85,247,.5); color: #fff; }
.form__topics input:checked + span { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 24px rgba(99,102,241,.45); }
.form__topics input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }
.form__row { display: grid; gap: 12px; }
.field { position: relative; display: block; }
.field input, .field textarea {
  width: 100%; padding: 22px 14px 10px; border-radius: 14px; resize: none;
  font: 400 16px/1.4 var(--f-body); color: #fff;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.12);
  transition: border-color .3s, background .3s, box-shadow .3s;
}
.field textarea { min-height: 96px; }
.field span {
  position: absolute; left: 15px; top: 17px; pointer-events: none;
  font: 400 14px/1 var(--f-body); color: var(--muted);
  transform-origin: 0 0; transition: transform .35s var(--ease), color .3s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: rgba(168,85,247,.7); background: rgba(139,92,246,.06); box-shadow: 0 0 0 4px rgba(139,92,246,.14); }
.field input:focus + span, .field input:not(:placeholder-shown) + span,
.field textarea:focus + span, .field textarea:not(:placeholder-shown) + span { transform: translateY(-9px) scale(.74); color: #b49bff; letter-spacing: .04em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form__foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; overflow: hidden;
  font: 600 13px/1 var(--f-body); letter-spacing: .18em; text-transform: uppercase; color: #fff;
  background: var(--grad); box-shadow: 0 12px 34px rgba(99,102,241,.45), inset 0 1px 0 rgba(255,255,255,.3);
  transition: box-shadow .4s, filter .3s;
}
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform: translateX(-120%); transition: transform .8s var(--ease); }
.btn:hover::after { transform: translateX(120%); }
.btn:hover { box-shadow: 0 16px 44px rgba(139,92,246,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.btn i { font-size: 17px; }
.btn[disabled] { filter: saturate(.4) brightness(.8); pointer-events: none; }
.form__status { font-size: 13px; color: var(--muted); }
.form__status.is-ok { color: #6ef0b2; }
.form__status.is-error { color: #ff8aa5; }
.signal__direct { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.signal__direct a {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border-radius: 14px; overflow: hidden;
  font: 500 13px/1.2 var(--f-body); color: #dfe1f2;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  transition: border-color .3s, background .3s;
}
.signal__direct a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signal__direct a:first-child { grid-column: 1 / -1; }
.signal__direct a:hover { border-color: rgba(168,85,247,.55); background: rgba(139,92,246,.08); }
.signal__direct i { font-size: 19px; color: #b49bff; flex: 0 0 auto; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }

.success {
  position: absolute; inset: 0; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center;
  background: rgba(3,4,8,.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; visibility: hidden; transition: opacity .5s, visibility 0s .5s;
}
.success.show { opacity: 1; visibility: visible; transition: opacity .5s, visibility 0s; }
.success svg { width: 92px; height: 92px; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 18px rgba(139,92,246,.8)); }
.success circle { stroke: #8b5cf6; stroke-dasharray: 227; stroke-dashoffset: 227; }
.success path { stroke: #fff; stroke-dasharray: 60; stroke-dashoffset: 60; }
.success.show circle { animation: draw .8s var(--ease) forwards; }
.success.show path { animation: draw .5s .55s var(--ease) forwards; }
.success h3 { font: 600 32px/1 var(--f-display); text-transform: uppercase; }
.success p { color: var(--muted); font-size: 14px; }
.success > * { opacity: 0; transform: translateY(12px); }
.success.show > * { animation: cardIn .7s var(--ease) forwards; }
.success.show h3 { animation-delay: .7s; } .success.show p { animation-delay: .85s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (min-width: 768px) {
  .signal__title { font-size: 56px; }
  .form { padding: 22px; gap: 14px; }
  .form__row { grid-template-columns: 1fr 1fr; }
  .signal__direct { grid-template-columns: repeat(4, auto); justify-content: start; }
  .signal__direct a:first-child { grid-column: auto; }
}
@media (min-width: 1100px) {
  .signal__shade { background: linear-gradient(90deg, rgba(3,4,8,.97) 0%, rgba(3,4,8,.9) 38%, rgba(3,4,8,.25) 64%, rgba(3,4,8,.1) 100%); }
  .signal__bg img { object-position: 70% 50%; }
  body.cinema .signal { display: flex; flex-direction: column; justify-content: center; }
  .signal { padding-top: calc(var(--nav-h) + 6px); padding-bottom: 48px; }
  .signal__title { font-size: clamp(48px, 4.2vw, 82px); }
}

/* state classes set by JS */
.field.is-invalid input, .field.is-invalid textarea { border-color: rgba(255,110,140,.75); box-shadow: 0 0 0 4px rgba(255,110,140,.12); }
.field.is-invalid span { color: #ff8aa5; }
.btn.is-loading { pointer-events: none; }
.btn.is-loading span, .btn.is-loading i { opacity: 0; }
.btn.is-loading::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite;
}

/* ---------- 17. Terminal ---------- */
.term {
  position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 16px;
  background: rgba(3,4,10,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s;
}
.term.open { opacity: 1; visibility: visible; transition: opacity .35s, visibility 0s; }
.term__win {
  width: min(720px, 100%); height: min(460px, 72svh); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, rgba(12,13,28,.94), rgba(5,6,13,.97));
  border: 1px solid rgba(139,92,246,.4);
  box-shadow: 0 0 0 1px rgba(255,255,255,.03) inset, 0 40px 120px rgba(0,0,0,.7), 0 0 70px rgba(139,92,246,.25);
  transform: translateY(16px) scale(.97); transition: transform .5s var(--ease);
}
.term.open .term__win { transform: none; }
.term__bar { display: flex; align-items: center; gap: 7px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.03); }
.term__bar > i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f7a; }
.term__bar > i:nth-child(2) { background: #ffc35a; } .term__bar > i:nth-child(3) { background: #46e3a0; }
.term__bar span { flex: 1; text-align: center; font: 600 10.5px/1 var(--f-body); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.term__bar button { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); }
.term__bar button:hover { color: #fff; background: rgba(255,255,255,.06); }
.term__out { flex: 1; overflow-y: auto; padding: 14px 16px; font: 400 13px/1.7 var(--f-body); color: #c8ccff; overscroll-behavior: contain; }
.term__out p { white-space: pre-wrap; word-break: break-word; }
.term__out .t-cmd { color: #fff; } .term__out .t-cmd::before { content: "› "; color: var(--violet); }
.term__out .t-ok { color: #7cf3c5; text-shadow: 0 0 10px rgba(124,243,197,.45); }
.term__out .t-dim { color: var(--dim); }
.term__out a { color: #b49bff; text-decoration: underline; text-underline-offset: 3px; }
.term__in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.term__in span { font: 600 12.5px/1 var(--f-body); color: #a99bff; text-shadow: 0 0 10px rgba(168,85,247,.6); white-space: nowrap; }
.term__in input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: #fff; font: 400 16px/1.4 var(--f-body); caret-color: #a855f7; }

/* ---------- 18. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .grain { animation: none; }
  .js .gl { opacity: 1; }
}
