/* Perch landing — Instrument Sans/Serif + JetBrains Mono, deep-space blue, orange = Mouse Shift only.
   Every demo stage is FIXED-SIZE: scenes change inside, the frame never moves. */

:root {
  --bg: #08090C;
  --ink: #E9EBEF;
  --mut: #9BA3B1;
  --dim: #616977;
  --blue: #5B92F7;
  --blue-hi: #B6D0FF;
  --amber: #F0A836;
  --amber-hi: #F6C468;
  --line: rgba(255, 255, 255, 0.09);
  --card: linear-gradient(170deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014));
  --sans: "Instrument Sans", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); overflow-x: clip; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: transparent;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
a { color: #8CB6FF; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.wrap { max-width: 1180px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.sm { font-size: 12px; }
.ink { color: var(--ink); }
.strong { color: #C6CCD6; font-weight: 500; }
.right { margin-left: auto; }

/* ---------- living background ---------- */

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.glow { position: absolute; border-radius: 50%; filter: blur(30px); pointer-events: none; will-change: transform; }
.glow-hero {
  top: -280px; left: 50%; width: 1100px; height: 700px; margin-left: -550px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(91, 146, 247, 0.2), transparent 70%);
  animation: breathe 9s ease-in-out infinite;
}
.glow-mid {
  top: 40%; right: -320px; width: 900px; height: 800px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(124, 92, 255, 0.09), transparent 70%);
  animation: breathe 13s ease-in-out infinite reverse;
}
.glow-amber {
  top: 68%; left: -300px; width: 860px; height: 760px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(240, 168, 54, 0.07), transparent 70%);
  animation: breathe 11s ease-in-out infinite;
}
.grain {
  position: absolute; inset: 0; opacity: 0.5;
  background-image: radial-gradient(rgba(255,255,255,0.028) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(70% 60% at 50% 30%, black, transparent);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 30%, black, transparent);
}
@keyframes breathe { 0%, 100% { opacity: 0.55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }

@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.caret { display: inline-block; width: 1.5px; height: 15px; vertical-align: -2px; background: var(--blue); animation: caret 1.1s step-end infinite; }

/* ---------- reveal / stagger ---------- */

.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s cubic-bezier(0.2, 0.7, 0.3, 1), transform 0.8s cubic-bezier(0.2, 0.7, 0.3, 1); }
.reveal.in { opacity: 1; transform: none; }
[data-stagger] > * { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
[data-stagger].in > * { opacity: 1; transform: none; }
[data-stagger].in > *:nth-child(2) { transition-delay: 0.08s; }
[data-stagger].in > *:nth-child(3) { transition-delay: 0.16s; }
[data-stagger].in > *:nth-child(4) { transition-delay: 0.24s; }

/* ---------- nav ---------- */

.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 22px; padding-bottom: 22px; position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.brand-tile {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(160deg, #2E3A54, #151A26);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14.5px; }
.nav-links > a { color: #98A0AE; transition: color 0.15s; }
.nav-links > a:hover { color: var(--ink); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 10px;
  background: var(--blue); color: #07101F !important; font-weight: 600;
  box-shadow: 0 6px 20px rgba(91, 146, 247, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 9px 26px rgba(91, 146, 247, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.4); }

/* ---------- hero ---------- */

.hero { position: relative; z-index: 4; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; padding-top: 56px; padding-bottom: 90px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px; color: #9AA2B0; letter-spacing: 0.02em;
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 10px var(--blue); }
h1 { font-size: 66px; line-height: 0.97; letter-spacing: -0.035em; font-weight: 600; margin: 20px 0 0; }
h2 { font-size: 40px; line-height: 1.06; letter-spacing: -0.03em; font-weight: 600; }
.lede { margin-top: 22px; font-size: 19px; line-height: 1.55; color: var(--mut); max-width: 31em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 32px; }
.btn-dl {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 24px; border-radius: 14px;
  background: linear-gradient(180deg, #6D9FF9, #4A82EE); color: #06101F; font-size: 16px; font-weight: 600;
  box-shadow: 0 14px 34px rgba(91, 146, 247, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-dl:hover { transform: translateY(-2px); color: #06101F; box-shadow: 0 20px 44px rgba(91, 146, 247, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.45); }
.btn-dl.big { padding: 16px 26px; font-size: 16.5px; }
.cta-row .mono { font-size: 13.5px; }
.hero-term { margin-top: 18px; display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.term.slim { padding: 9px 10px 9px 14px; border-radius: 11px; }
.term.slim code { font-size: 12.5px; }
.term.slim .t-copy { width: 74px; height: 28px; display: grid; place-items: center; }

.hero-visual { position: relative; will-change: transform; }
.hero-halo { position: absolute; inset: -40px; background: radial-gradient(45% 45% at 60% 40%, rgba(91, 146, 247, 0.2), transparent 72%); pointer-events: none; }

/* hero live showcase — the four features perform, one at a time */
.hero-stage {
  position: relative; border-radius: 20px; padding: 20px 24px 16px; overflow: hidden;
  background: linear-gradient(170deg, #12151C, #0A0C11);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.09);
  transition: transform 0.25s ease-out, box-shadow 0.25s ease-out;
  will-change: transform;
}
.hero-stage::after {
  content: ""; position: absolute; inset: 0; border-radius: 20px; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(91, 146, 247, 0.09) 50%, transparent 65%);
  background-size: 240% 100%;
  animation: sheen 7s linear infinite;
}
@keyframes sheen { from { background-position: 220% 0; } to { background-position: -120% 0; } }
.h-tabs { display: flex; justify-content: center; gap: 22px; font-size: 12px; }
.h-tabs span { position: relative; padding-bottom: 6px; color: #4E5665; letter-spacing: 0.04em; transition: color 0.3s, text-shadow 0.3s; }
.h-tabs span::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: 0; height: 2px; border-radius: 1px;
  background: var(--blue); box-shadow: 0 0 10px var(--blue);
  transform: scaleX(0); transition: transform 0.35s cubic-bezier(0.3, 1.3, 0.5, 1);
}
.h-tabs span.on { color: var(--blue); text-shadow: 0 0 16px rgba(91, 146, 247, 0.5); }
.h-tabs span.on::after { transform: scaleX(1); }
.h-scene { position: relative; height: 252px; margin-top: 14px; }
.h-panel {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px; opacity: 0; pointer-events: none;
  transform: translateY(16px) scale(0.95);
  transition: opacity 0.3s, transform 0.5s cubic-bezier(0.25, 1.35, 0.45, 1);
}
.h-panel.on { opacity: 1; transform: none; }
/* mouse & keys hero scenes: input performs centered, then glides left as the action expands in */
.h-panel[data-p="2"], .h-panel[data-p="3"] { flex-direction: row; justify-content: center; gap: 0; }
.h-arrow { color: #4E5665; display: flex; overflow: hidden; max-width: 0; opacity: 0; transition: max-width 0.55s cubic-bezier(0.3, 1, 0.4, 1), margin 0.55s cubic-bezier(0.3, 1, 0.4, 1), opacity 0.35s 0.15s; }
.h-panel .h-fired {
  max-width: 0; padding: 0; border-width: 0; margin: 0; overflow: hidden; white-space: nowrap;
  transition: max-width 0.55s cubic-bezier(0.3, 1, 0.4, 1), margin 0.55s cubic-bezier(0.3, 1, 0.4, 1),
    padding 0.55s cubic-bezier(0.3, 1, 0.4, 1), opacity 0.35s 0.15s, background 0.28s, border-color 0.28s;
}
.h-panel.done .h-arrow { max-width: 22px; margin: 0 0 0 18px; opacity: 1; }
.h-panel.done .h-fired { max-width: 250px; padding: 10px 15px; border-width: 1px; margin-left: 18px; opacity: 1; }
.h-panel .hp-card { width: 82%; }
.hp-pasted { font-size: 11.5px; color: #7FD9B8; padding: 8px 13px; border-top: 1px solid rgba(255, 255, 255, 0.07); opacity: 0; transition: opacity 0.25s; }
.hp-pasted.show { opacity: 1; }
.hp-k.right { margin-left: auto; }
.h-note {
  width: 82%; height: 132px; padding: 16px; border-radius: 12px; text-align: left;
  background: rgba(13, 15, 20, 0.9); border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14.5px; line-height: 1.55; color: #B6BDC8; white-space: pre-wrap; overflow: hidden;
}
.h-typed { color: var(--blue-hi); font-size: 14px; }
.h-note.expanded .h-typed { font-family: var(--sans); color: var(--ink); font-size: 14.5px; }
.h-mouse { position: relative; }
.h-fired { align-self: center; }
.h-cap {
  font-size: 14px; line-height: 1.5; color: #A8B0BE;
  margin-top: 12px; height: 46px; overflow: hidden; text-align: center; transition: opacity 0.2s;
}
.h-cap.fade { opacity: 0; }
.h-caps { display: flex; gap: 12px; align-items: center; }
.mini-mac {
  position: relative; border-radius: 20px; overflow: hidden;
  background: linear-gradient(170deg, #12151C, #0A0C11);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}
.mini-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; background: rgba(255, 255, 255, 0.055); border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 11.5px; color: #8A929F; }
.mini-menus { display: flex; gap: 16px; align-items: center; }
.mini-status { display: flex; gap: 14px; align-items: center; }
.mini-body { padding: 26px 24px 30px; min-height: 240px; position: relative; }
.mini-body .sm { font-size: 13px; }
.mini-mail { margin-top: 14px; font-size: 15px; line-height: 1.6; color: #B6BDC8; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-popup { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); width: 88%; animation: float 7s ease-in-out infinite; }
.hp-card {
  border-radius: 14px; background: rgba(20, 23, 30, 0.86); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12); overflow: hidden;
}
.hp-search { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); font-size: 13px; color: #6E7683; }
.hp-rows { padding: 6px; }
.hp-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; opacity: 0.6; }
.hp-row.on { background: rgba(91, 146, 247, 0.16); border: 1px solid rgba(91, 146, 247, 0.3); opacity: 1; }
.hp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); flex: none; }
.hp-dot.alt { background: #4A5261; }
.hp-label { font-size: 13.5px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hp-k { font-size: 11px; color: var(--blue); }
.hp-row:not(.on) .hp-k { color: #5A6270; }

/* ---------- quad ---------- */

.quad { position: relative; z-index: 4; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding-bottom: 100px; }
.qcard {
  display: block; padding: 20px 18px 22px; border-radius: 16px; color: inherit;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
}
.qcard:hover { transform: translateY(-4px); border-color: rgba(91, 146, 247, 0.34); background: linear-gradient(170deg, rgba(91, 146, 247, 0.14), rgba(255, 255, 255, 0.02)); color: inherit; }
.q-name { margin-top: 14px; font-size: 16px; font-weight: 600; }
.q-line { margin-top: 6px; font-size: 13.5px; line-height: 1.45; color: #8B929F; }

/* ---------- sections ---------- */

.sec { position: relative; z-index: 4; display: grid; grid-template-columns: 0.86fr 1.14fr; gap: 64px; align-items: center; padding-top: 40px; padding-bottom: 110px; }
.sec-flip { grid-template-columns: 1.14fr 0.86fr; }
.eyebrow { font-size: 12.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); }
.sec h2, .perapp h2 { margin-top: 16px; }
.body { margin-top: 18px; font-size: 17px; line-height: 1.6; color: var(--mut); }
.body.warm { color: #B6A796; }
.body.center { max-width: 30em; margin-left: auto; margin-right: auto; }
.bullets { display: flex; flex-direction: column; gap: 11px; margin-top: 26px; font-size: 15px; color: #AEB5C1; }
.bullets > div { display: flex; gap: 11px; align-items: flex-start; }
.b-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); margin-top: 8px; flex: none; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag { padding: 7px 11px; border-radius: 9px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); font-size: 13px; color: var(--blue-hi); }

/* ---------- demo stage (fixed frame) ---------- */

.stage {
  position: relative; border-radius: 22px; padding: 26px 26px 20px;
  background: var(--card); border: 1px solid var(--line);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.stage-amber { border-color: rgba(240, 168, 54, 0.24); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.stage-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 34px; }
.stage-top .sm { white-space: nowrap; }

.chips { display: flex; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; min-height: 32px; padding: 5px 10px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #D3D9E3; font-family: var(--mono); font-size: 14.5px; font-weight: 500;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.12s, box-shadow 0.2s;
}
.chip.lit, .chip-blue.show {
  background: rgba(91, 146, 247, 0.16); border-color: rgba(91, 146, 247, 0.34); color: var(--blue-hi);
  box-shadow: 0 4px 12px rgba(91, 146, 247, 0.2);
}
.chip.lit { transform: translateY(1px) scale(0.97); }
.chip-amber.show {
  background: rgba(240, 168, 54, 0.18); border-color: rgba(240, 168, 54, 0.42); color: var(--amber-hi);
  box-shadow: 0 8px 26px rgba(240, 168, 54, 0.2);
}
.flow-chip { align-self: center; font-family: var(--sans); font-size: 16px; font-weight: 500; padding: 10px 15px; border-radius: 12px; opacity: 0; transition: opacity 0.28s, background 0.28s, border-color 0.28s, color 0.28s, transform 0.28s; }
.flow-chip.show { opacity: 1; }
.flow-chip.pop { animation: chipPop 0.32s cubic-bezier(0.34, 1.5, 0.64, 1); }
@keyframes chipPop { from { transform: scale(0.86); opacity: 0; } }

.cap {
  font-size: 15.5px; line-height: 1.5; color: #A8B0BE;
  margin-top: 20px; height: 54px; overflow: hidden; transition: opacity 0.2s;
}
.cap-amber { color: #C4AF9B; }
.cap.fade { opacity: 0; }

/* controls (JS-injected): ‹ pause › + bar dots */
.ctl { display: flex; align-items: center; gap: 14px; margin-top: 8px; height: 32px; }
.ctl button {
  height: 32px; border-radius: 9px; background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1); color: #AEB5C1; display: grid; place-items: center;
  transition: background 0.15s;
}
.ctl button:hover { background: rgba(255, 255, 255, 0.11); }
.ctl .c-nav { width: 32px; }
.ctl .c-play { width: 88px; font-family: var(--mono); font-size: 12.5px; }
.stage-amber .ctl button { border-color: rgba(240, 168, 54, 0.24); color: #D6C0AB; }
.ctl .c-dots { display: flex; gap: 5px; align-items: center; margin-left: auto; }
.ctl .c-dots span { width: 4px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.2); transition: width 0.25s, background 0.25s; }
.ctl .c-dots span.on { width: 18px; background: var(--blue); box-shadow: 0 0 10px rgba(91, 146, 247, 0.4); }
.stage-amber .ctl .c-dots span.on { background: var(--amber); box-shadow: 0 0 10px rgba(240, 168, 54, 0.4); }

/* ---------- clipboard popup (fixed height) ---------- */

.popup {
  margin-top: 18px; border-radius: 16px; overflow: hidden;
  background: rgba(17, 20, 26, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.pp-search { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.pp-search .mono { font-size: 13.5px; color: var(--ink); }
.pp-search .mono.ghost { color: #6E7683; }
.pp-cats { display: flex; gap: 6px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.pp-cat { padding: 5px 10px; border-radius: 8px; font-size: 12px; color: #767E8C; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.07); transition: all 0.25s; }
.pp-cat.on { background: rgba(91, 146, 247, 0.2); border-color: rgba(91, 146, 247, 0.38); color: #BFD6FF; }
.pp-list { padding: 8px; display: flex; flex-direction: column; gap: 2px; height: 306px; overflow: hidden; }
.pp-row { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 10px; border: 1px solid transparent; opacity: 0.62; transition: all 0.25s; }
.pp-row.sel { background: rgba(91, 146, 247, 0.15); border-color: rgba(91, 146, 247, 0.32); opacity: 1; }
.pp-row.flash { background: rgba(91, 146, 247, 0.34); border-color: rgba(91, 146, 247, 0.65); box-shadow: 0 0 26px rgba(91, 146, 247, 0.4); transform: scale(1.015); opacity: 1; }
.pp-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.pp-main { flex: 1; min-width: 0; }
.pp-label { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-meta { font-size: 11px; color: #636B79; font-family: var(--mono); margin-top: 2px; }
.pp-badge { flex: none; font-size: 11px; font-family: var(--mono); color: #4E5665; }
.pp-row.sel .pp-badge { color: #8CB6FF; }
.pp-pin { flex: none; padding: 3px 8px; border-radius: 999px; font-size: 10.5px; font-family: var(--mono); background: rgba(99, 201, 164, 0.18); border: 1px solid rgba(99, 201, 164, 0.4); color: #7FD9B8; }
.pp-foot { display: flex; align-items: center; gap: 10px; padding: 9px 13px; border-top: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.02); font-size: 11.5px; color: var(--dim); }
.pp-paste { margin-left: auto; color: #7FD9B8; opacity: 0; transition: opacity 0.3s; }
.pp-paste.show { opacity: 1; }

/* ---------- snippets notepad (fixed height) ---------- */

.notepad {
  margin-top: 18px; border-radius: 16px; overflow: hidden;
  background: rgba(13, 15, 20, 0.9); border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.np-bar { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 11.5px; color: #636B79; }
.tl { width: 9px; height: 9px; border-radius: 50%; background: #3A4150; }
.np-title { margin-left: 8px; }
.np-body { padding: 24px 22px; height: 282px; overflow: hidden; }
.np-typed { margin-top: 10px; font-size: 15.5px; color: var(--blue-hi); height: 24px; }
.np-out { margin-top: 20px; display: flex; flex-direction: column; gap: 6px; height: 104px; overflow: hidden; }
.np-line { font-size: 16.5px; line-height: 1.5; color: #AEB5C1; opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s; }
.np-line.first { color: var(--ink); }
.np-line.in { opacity: 1; transform: none; }
.np-chips { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; height: 34px; overflow: hidden; align-content: flex-start; }
.np-chip { line-height: 1.3; }
.np-chip { padding: 5px 9px; border-radius: 8px; font-family: var(--mono); font-size: 11.5px; background: rgba(99, 201, 164, 0.14); border: 1px solid rgba(99, 201, 164, 0.32); color: #7FD9B8; opacity: 0; transform: scale(0.9); transition: opacity 0.3s, transform 0.3s; }
.np-chip.in { opacity: 1; transform: none; }

/* ---------- mouse stages ---------- */

.m-grid { display: grid; grid-template-columns: 178px 1fr; gap: 30px; align-items: center; min-height: 300px; margin-top: 6px; }
.m-col { display: grid; place-items: center; position: relative; transition: transform 0.45s; }
.m-col.mirror { transform: scaleX(-1); }
.m-col svg { display: block; }
.m-body { fill: rgba(255, 255, 255, 0.045); stroke: rgba(255, 255, 255, 0.13); }
.m-line { stroke: rgba(255, 255, 255, 0.1); }
.m-spot { fill: rgba(255, 255, 255, 0.05); stroke: rgba(255, 255, 255, 0.14); transition: fill 0.25s, stroke 0.25s; }
.m-spot.lit { fill: rgba(91, 146, 247, 0.36); stroke: var(--blue); }
.m-spot.hold { fill: rgba(240, 168, 54, 0.34); stroke: var(--amber); }
.m-label { fill: #4E5665; font: 700 9px var(--sans); }
.m-bar { fill: #4E5665; }
.hold-tag {
  position: absolute; font-family: var(--mono); font-size: 9px; letter-spacing: 0.08em; color: #fff;
  background: var(--amber); padding: 2px 7px; border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.2s; pointer-events: none;
}
.hold-tag.show { opacity: 1; }
.m-flick { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s, transform 0.4s; }
.m-flick.show { opacity: 1; transform: translateX(-50%) translateY(-10px); }
.m-scrollhint { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: #4E5665; opacity: 0; transition: opacity 0.3s; }
.m-scrollhint.show { opacity: 1; animation: scrollPulse 1.2s ease-in-out infinite; }
@keyframes scrollPulse { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(4px); } }

.flow { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 13px; }
.flow-k { font-size: 12px; color: var(--dim); letter-spacing: 0.06em; }
.amber-k { color: #7A6B5C; }
.flow-arrow { display: flex; align-items: center; gap: 9px; color: #4E5665; width: 100%; max-width: 220px; }
.flow-line { height: 1px; flex: 1; background: linear-gradient(90deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0)); }

/* shift stage: mouse performs centered, then glides left as the amber action expands in */
.shift-row { display: flex; align-items: center; justify-content: center; gap: 0; min-height: 330px; margin-top: 6px; }
.shift-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.s-combo { font-size: 14px; }
.s-arrow {
  color: #B08D6A; display: flex; overflow: hidden; max-width: 0; opacity: 0;
  transition: max-width 0.55s cubic-bezier(0.3, 1, 0.4, 1), margin 0.55s cubic-bezier(0.3, 1, 0.4, 1), opacity 0.35s 0.15s;
}
.shift-row.done .s-arrow { max-width: 24px; margin-left: 22px; opacity: 1; }
.s-fired {
  font-family: var(--sans); font-size: 17px; font-weight: 500; border-radius: 12px;
  max-width: 0; padding: 0; border-width: 0; margin: 0; overflow: hidden; white-space: nowrap; opacity: 0;
  transition: max-width 0.55s cubic-bezier(0.3, 1, 0.4, 1), margin 0.55s cubic-bezier(0.3, 1, 0.4, 1),
    padding 0.55s cubic-bezier(0.3, 1, 0.4, 1), opacity 0.35s 0.15s, background 0.28s, border-color 0.28s;
}
.shift-row.done .s-fired { max-width: 280px; padding: 12px 18px; border-width: 1px; margin-left: 22px; opacity: 1; }

/* ---------- shift band ---------- */

.shift-band {
  position: relative; z-index: 4; margin-bottom: 0; overflow: hidden;
  border-top: 1px solid rgba(240, 168, 54, 0.18); border-bottom: 1px solid rgba(240, 168, 54, 0.18);
  background: linear-gradient(180deg, rgba(240, 168, 54, 0.07), rgba(240, 168, 54, 0.015));
}
.shift-band::before {
  content: ""; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 520px; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(240, 168, 54, 0.22), transparent 70%);
}
.shift-band .sec { padding-top: 84px; padding-bottom: 84px; }
.amber-t { color: var(--amber-hi); }
.amber-note {
  margin-top: 26px; padding: 16px 18px; border-radius: 14px; font-size: 15px; line-height: 1.55; color: #D8C4B0;
  background: rgba(240, 168, 54, 0.08); border: 1px solid rgba(240, 168, 54, 0.22);
}

/* ---------- keys stage (fixed heights) ---------- */

.k-grid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; min-height: 300px; }
.k-caps { display: flex; gap: 12px; align-items: flex-end; justify-content: center; height: 66px; }
.kcap {
  min-width: 62px; height: 62px; padding: 0 14px; display: grid; place-items: center; border-radius: 12px;
  font-family: var(--mono); font-size: 20px; color: #C6CCD6;
  background: linear-gradient(180deg, #22262F, #141821); border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: all 0.22s;
}
.kcap.small { font-size: 14px; }
.kcap.lit {
  background: linear-gradient(180deg, rgba(91, 146, 247, 0.3), rgba(91, 146, 247, 0.14));
  border-color: rgba(91, 146, 247, 0.5); color: #DCE8FF; transform: translateY(3px);
  box-shadow: 0 2px 0 rgba(91, 146, 247, 0.35), 0 0 30px rgba(91, 146, 247, 0.28);
}
.k-arrow { display: flex; align-items: center; gap: 12px; color: #4E5665; }
.k-line { width: 60px; height: 1px; }
.k-line.l { background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.18)); }
.k-line.r { background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)); }
.k-out-slot { height: 58px; display: flex; align-items: center; }
.k-out {
  padding: 14px 22px; border-radius: 14px; font-size: 22px; font-weight: 500; letter-spacing: -0.01em;
  background: rgba(91, 146, 247, 0.16); border: 1px solid rgba(91, 146, 247, 0.4); color: #CFE0FF;
  box-shadow: 0 12px 34px rgba(91, 146, 247, 0.22);
  opacity: 0.3; transform: scale(0.96); transition: opacity 0.3s, transform 0.3s;
}
.k-out.show { opacity: 1; transform: none; }

/* ---------- per app ---------- */

.perapp { position: relative; z-index: 4; padding-bottom: 110px; }
.perapp-head { max-width: 640px; }
.perapp .stage { margin-top: 34px; padding: 28px; }
.tiles { display: flex; gap: 12px; flex-wrap: wrap; }
.tile {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px; border-radius: 12px; font-size: 14.5px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); color: #6E7683;
  transition: all 0.35s;
}
.tile.front { background: rgba(91, 146, 247, 0.18); border-color: rgba(91, 146, 247, 0.44); color: #CFE0FF; box-shadow: 0 10px 28px rgba(91, 146, 247, 0.22); }
/* per-app live scene: same press chip stays put, the app window swaps, the action lands inside it */
.pa-scene { display: flex; align-items: center; gap: 20px; margin-top: 28px; min-height: 168px; }
.pa-press { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; flex: none; }
.pa-press .flow-chip { font-size: 17px; }
.pa-press .flow-chip.lit { transform: translateY(2px) scale(0.96); background: rgba(91, 146, 247, 0.2); border-color: rgba(91, 146, 247, 0.44); color: var(--blue-hi); }
.pa-wire { position: relative; flex: 1; height: 2px; border-radius: 1px; background: linear-gradient(90deg, rgba(91, 146, 247, 0.3), rgba(255, 255, 255, 0.08)); overflow: visible; }
.pa-signal {
  position: absolute; top: -3px; left: 0; width: 8px; height: 8px; border-radius: 50%;
  background: var(--blue); box-shadow: 0 0 14px var(--blue); opacity: 0;
}
.pa-signal.go { animation: signal 0.45s cubic-bezier(0.3, 0, 0.4, 1) forwards; }
@keyframes signal { 0% { left: 0; opacity: 1; } 90% { opacity: 1; } 100% { left: calc(100% - 8px); opacity: 0; } }
.pa-window {
  flex: none; width: min(340px, 42%); border-radius: 14px; overflow: hidden;
  background: rgba(13, 15, 20, 0.92); border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: transform 0.28s, opacity 0.28s, border-color 0.35s, box-shadow 0.35s;
}
.pa-window.out { opacity: 0; transform: translateY(12px) scale(0.96); }
.pa-window.active { border-color: rgba(91, 146, 247, 0.44); box-shadow: 0 24px 56px rgba(0, 0, 0, 0.55), 0 0 40px rgba(91, 146, 247, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.pa-titlebar { display: flex; align-items: center; gap: 7px; padding: 10px 13px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.pa-app { display: flex; color: #9FC4FF; margin-left: 6px; }
.pa-name { font-size: 13px; color: #C6CCD6; font-weight: 500; }
.pa-front { margin-left: auto; font-size: 10px; letter-spacing: 0.08em; color: var(--blue); padding: 2px 7px; border-radius: 999px; background: rgba(91, 146, 247, 0.14); border: 1px solid rgba(91, 146, 247, 0.3); }
.pa-body { height: 96px; display: grid; place-items: center; }
.pa-body .flow-chip { align-self: center; }
.pa-body .flow-chip.grey { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.1); color: #7C8492; box-shadow: none; }
.perapp .cap { height: 32px; }

/* ---------- get ---------- */

.get { position: relative; z-index: 4; padding-bottom: 90px; }
.get-card {
  position: relative; overflow: hidden; border-radius: 26px; padding: 64px 48px; text-align: center;
  background: linear-gradient(165deg, rgba(91, 146, 247, 0.14), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(91, 146, 247, 0.24);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.get-halo { position: absolute; top: -160px; left: 50%; transform: translateX(-50%); width: 760px; height: 420px; background: radial-gradient(50% 50% at 50% 50%, rgba(91, 146, 247, 0.28), transparent 70%); pointer-events: none; }
.get-card h2 { font-size: 46px; position: relative; }
.get-card .body { position: relative; }
.get-card .btn-dl { position: relative; margin-top: 34px; }
.term-wrap { position: relative; margin: 26px auto 0; max-width: 640px; }
.term {
  max-width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; border-radius: 14px;
  background: rgba(8, 10, 14, 0.7); border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.t-prompt { color: var(--blue); font-size: 14px; }
.term code { flex: 1; min-width: 0; text-align: left; font-size: 13.5px; color: #D3D9E3; overflow-x: auto; white-space: nowrap; }
.t-copy {
  width: 96px; height: 34px; flex: none; border-radius: 9px; font-size: 12.5px;
  background: rgba(91, 146, 247, 0.16); border: 1px solid rgba(91, 146, 247, 0.34); color: var(--blue-hi);
  transition: background 0.15s;
}
.t-copy:hover { background: rgba(91, 146, 247, 0.26); }
.fineprint { margin-top: 16px; font-size: 14px; line-height: 1.6; color: #7C8492; }
.get-card > .mono { position: relative; margin-top: 30px; font-size: 13px; }

/* ---------- footer ---------- */

.footer { position: relative; z-index: 4; border-top: 1px solid rgba(255, 255, 255, 0.07); padding-top: 30px; padding-bottom: 56px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.f-left { display: flex; align-items: center; gap: 10px; color: #6E7683; font-size: 14px; }
.f-right { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.f-right a { display: inline-flex; align-items: center; gap: 8px; }
.f-right a:hover { color: var(--amber-hi); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero, .sec, .sec-flip { grid-template-columns: 1fr; gap: 40px; }
  .hero-term { align-items: center; }
  h1 { font-size: 52px; }
  .sec-flip .stage { order: 2; }
  .sec-flip .sec-copy { order: 1; }
}
@media (max-width: 680px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
  .quad { grid-template-columns: 1fr 1fr; }
  .pa-scene { flex-direction: column; align-items: stretch; gap: 14px; }
  .pa-wire { display: none; }
  .pa-window { width: 100%; }
  .m-grid { grid-template-columns: 1fr; justify-items: center; min-height: 0; }
  .nav-links a:not(.nav-cta) { display: none; }
  .get-card { padding: 44px 22px; }

  /* stack the left-to-right demo rows vertically; arrows point down */
  .shift-row { flex-direction: column; min-height: 0; padding: 10px 0; }
  .shift-row.done .s-arrow { transform: rotate(90deg); margin: 8px 0 0; }
  .shift-row.done .s-fired { margin: 8px 0 0; }
  .h-panel[data-p="2"], .h-panel[data-p="3"] { flex-direction: column; gap: 4px; }
  .h-panel.done .h-arrow { transform: rotate(90deg); margin: 4px 0 0; }
  .h-panel.done .h-fired { margin: 4px 0 0; }
  .stage { padding: 18px 14px 14px; }
  .stage-top { flex-wrap: wrap; height: auto; min-height: 34px; }
  .term code { font-size: 12px; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .reveal, [data-stagger] > * { opacity: 1; transform: none; }
}

/* cursor spotlight + live shortcuts */
.spot {
  position: fixed; inset: 0; z-index: 60; pointer-events: none;
  background: radial-gradient(480px at var(--mx, -600px) var(--my, -600px), rgba(91, 146, 247, 0.16), rgba(91, 146, 247, 0.05) 45%, transparent 70%);
}
.kbd-pop {
  position: fixed; inset: 0; z-index: 100; display: none; place-items: center;
  background: rgba(4, 5, 8, 0.45); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
}
.kbd-pop.open { display: grid; }
.kbd-pop .hp-card { width: min(430px, 90vw); animation: chipPop 0.25s cubic-bezier(0.34, 1.5, 0.64, 1); }
.kbd-hint { margin-top: 12px; text-align: center; font-size: 12px; color: #7C8492; font-family: var(--mono); }
.flash-pill {
  position: fixed; top: 16%; left: 50%; transform: translateX(-50%) scale(0.9); z-index: 100;
  display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 13px;
  background: rgba(17, 20, 26, 0.95); border: 1px solid rgba(91, 146, 247, 0.4); color: #CFE0FF;
  font-size: 15px; font-weight: 500; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(91, 146, 247, 0.25);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.flash-pill.show { opacity: 1; transform: translateX(-50%) scale(1); }
