/* ============================================================
   Kita Labs — prism landing (+ shared tokens for /visor)
   Pure black · the only color is the dispersed spectrum
   ============================================================ */

:root {
  --black:  #000000;
  --ink:    #07070a;
  --white:  #f4f3ef;
  --bone:   #ddd9d0;
  --ash:    #807c74;
  --ash-dim:#4a473f;
  --line:        rgba(244,243,239,0.12);
  --line-soft:   rgba(244,243,239,0.07);
  --line-strong: rgba(244,243,239,0.26);

  /* all-mono: one precise typeface across the whole site. --serif kept as an
     alias so existing display headings simply become mono, no markup churn. */
  --mono:  "JetBrains Mono", ui-monospace, Menlo, monospace;
  --serif: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--bone);
  font-family: var(--mono);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--white); color: #000; }

/* the landing locks the viewport once JS drives the stage — no native scroll.
   without JS we fall back to a normal scrollable stack of the same heroes. */
body.landing.js { overflow: hidden; height: 100svh; }
body.landing:not(.js) { min-height: 100svh; }

/* ───────── the descent canvas ───────── */
#space {
  position: fixed; inset: 0; z-index: 0;
  width: 100%; height: 100%; display: block;
}
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.04;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────── brand mark ───────── */
.logo, .lfoot__brand { display: inline-flex; align-items: center; gap: 11px; color: var(--white); }
.logo__mark { display: inline-grid; place-items: center; color: var(--white); }
.logo__mark svg { overflow: visible; filter: drop-shadow(0 0 6px rgba(244,243,239,0.25)); }
.logo__word { font-family: var(--mono); font-size: 14px; letter-spacing: 0.12em; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* footer — pinned within the locked viewport */
.lfoot {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: clamp(14px, 2.4vw, 22px) clamp(20px, 5vw, 56px);
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
}
.lfoot__brand span:last-child { font-size: 13px; letter-spacing: 0.12em; }
.lfoot__links { display: flex; flex-wrap: wrap; gap: clamp(14px, 2vw, 28px); }
.lfoot__links a {
  position: relative; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash);
  transition: color .25s;
}
.lfoot__links a:hover { color: var(--white); }
.lfoot__links a.is-tbd { color: var(--ash-dim); cursor: not-allowed; }
.lfoot__links a.is-tbd span {
  font-size: 8px; letter-spacing: 0.1em; vertical-align: super; margin-left: 4px;
  color: var(--ash-dim); border: 1px solid var(--line); padding: 1px 4px; border-radius: 2px;
}
.lfoot__links a.is-tbd:hover { color: var(--ash); }
.lfoot__meta { font-size: 11px; letter-spacing: 0.1em; color: var(--ash-dim); margin: 0; }

/* ───────── shared footer responsive (visor / morph) ───────── */
@media (max-width: 640px) {
  .lfoot { justify-content: center; text-align: center; }
  .lfoot__meta { width: 100%; }
}

/* ============================================================
   landing — the descent. one canvas field (app.js); scroll falls a
   camera through it. the only chrome is a wordmark, a regime label,
   a depth gauge, and the closing line. Never a page that scrolls.
   ============================================================ */
.hud {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: baseline; justify-content: space-between;
  padding: clamp(18px, 3vw, 30px) clamp(20px, 5vw, 56px);
  pointer-events: none;
}
.hud__brand { pointer-events: auto; font-size: 13px; font-weight: 500; letter-spacing: 0.22em; color: var(--white); }
.hud__act { margin: 0; font-size: 10.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ash); }
.hud__act span { transition: color .5s var(--ease); }

/* depth gauge — fills as you fall through the descent */
.rail {
  position: fixed; right: clamp(16px, 3vw, 34px); top: 18vh; bottom: 18vh; z-index: 5;
  width: 1px; background: var(--line-soft); pointer-events: none;
}
.rail i {
  position: absolute; top: 0; left: -1px; width: 3px; height: 0%;
  background: linear-gradient(var(--bone), var(--white));
  box-shadow: 0 0 10px rgba(244,243,239,0.4);
}

/* the only words on the page — surface at the bottom of the descent */
.outro {
  position: fixed; left: 0; right: 0; bottom: clamp(74px, 13vh, 130px); z-index: 5;
  text-align: center; opacity: 0; padding: 0 24px; pointer-events: none;
}
.outro__line { margin: 0 0 22px; font-size: clamp(13px, 1.7vw, 16px); letter-spacing: 0.04em; color: var(--bone); }
.outro__links { display: inline-flex; gap: clamp(20px, 4vw, 40px); }
.outro__links a {
  position: relative; pointer-events: auto;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ash); transition: color .25s;
}
.outro__links a::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px;
  background: var(--white); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.outro__links a:hover { color: var(--white); }
.outro__links a:hover::after { transform: scaleX(1); }

/* scroll cue — a tick that falls, matching the descent */
.cue {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: clamp(30px, 6vh, 56px); z-index: 5; margin: 0; padding: 6px 4px 0;
  background: none; border: 0; cursor: pointer; pointer-events: auto;
  font-family: inherit; font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ash-dim);
  transition: opacity .7s var(--ease);
}
/* the two labels crossfade on hover: "scroll to descend" → "jump to bottom" */
.cue__txt {
  display: block; transition: opacity .32s var(--ease), transform .32s var(--ease), text-shadow .32s var(--ease);
}
.cue__b { position: absolute; left: 0; right: 0; top: 6px; opacity: 0; transform: translateY(4px); }
.cue:hover .cue__a, .cue:focus-visible .cue__a { opacity: 0; transform: translateY(-4px); }
.cue:hover .cue__b, .cue:focus-visible .cue__b {
  opacity: 1; transform: translateY(0);
  color: var(--white); text-shadow: 0 0 12px rgba(196, 176, 255, 0.55), 0 0 4px rgba(244, 243, 239, 0.6);
}
.cue::after {
  content: ""; display: block; width: 1px; height: 24px; margin: 12px auto 0;
  background: linear-gradient(var(--ash), transparent);
  animation: cuefall 2.4s var(--ease) infinite;
  transition: opacity .32s var(--ease);
}
.cue:hover::after, .cue:focus-visible::after { opacity: 0; }
@keyframes cuefall {
  0% { opacity: 0; transform: translateY(-8px) scaleY(0.4); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(10px) scaleY(1); }
}

/* without JS: hide the live chrome, just centre the closing links */
body.landing:not(.js) .rail,
body.landing:not(.js) .cue,
body.landing:not(.js) .hud__act { display: none; }
body.landing:not(.js) .outro { opacity: 1; bottom: auto; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  .rail { top: 14vh; bottom: 14vh; }
}
@media (prefers-reduced-motion: reduce) {
  .cue::after { animation: none; }
  .outro { opacity: 1; }
}

/* ============================================================
   /visor — product page (scrollable)
   ============================================================ */
body.visor {
  background:
    radial-gradient(120% 80% at 80% -10%, rgba(120,90,255,0.05), transparent 55%),
    radial-gradient(100% 70% at 15% 8%, rgba(70,200,255,0.04), transparent 55%),
    #000;
  min-height: 100svh;
}
.wrap { max-width: 980px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

.vnav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 5vw, 40px);
  background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.vnav__back { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash); transition: color .25s; }
.vnav__back:hover { color: var(--white); }
.vnav__right { display: flex; align-items: center; gap: clamp(16px, 3vw, 28px); }
.vnav__cta { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--white); border: 1px solid var(--line-strong); padding: 9px 16px; border-radius: 3px; transition: background .25s, border-color .25s; }
.vnav__cta:hover { background: rgba(244,243,239,0.06); border-color: var(--white); }

/* ============================================================
   visor — "Toss your notes into the notch" (body.vapp).
   Neo-brutalist / blueprint: a graph grid, sharp bordered note
   blocks, the notch+card drawn as one seamless outline. Hard
   rectangles, hairline borders, no pills, no glow.
   The scrollable beam / 404 pages keep plain body.visor.
   ============================================================ */
body.vapp { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; background: #08080b; }
body.vapp.js { overflow: hidden; height: 100svh; }
body.vapp:not(.js) { min-height: 100svh; }

#vgame { position: fixed; inset: 0; z-index: 1; display: block; width: 100%; height: 100%;
  touch-action: none; cursor: grab; }
#vgame:active { cursor: grabbing; }

/* every interactive surface is a sharp, bordered rectangle */
.vapp .vhud__dl, .vapp .dlbtn, .vapp .ghostbtn, .vapp .cmd, .vapp .cmd__copy { border-radius: 0; }

/* toolbar — a hairline-ruled bar pinned to the BOTTOM, clear of the notch */
.vhud { position: fixed; bottom: 0; left: 0; right: 0; z-index: 8;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: clamp(13px, 2vw, 18px) clamp(18px, 4vw, 40px);
  border-top: 1px solid var(--line-soft); background: rgba(8,8,11,0.7);
  pointer-events: none; transition: opacity .4s var(--ease); }
.vhud > * { pointer-events: auto; }
.vhud__right { display: flex; align-items: center; gap: clamp(14px, 3vw, 26px); }
.vhud__back { font-size: 12px; letter-spacing: 0.06em; color: var(--ash); transition: color .25s; }
.vhud__back:hover { color: var(--white); }
.vhud__mark { font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--white); }
.vhud__dl { font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--white);
  border: 1px solid var(--white); padding: 8px 16px; transition: background .2s, color .2s; }
.vhud__dl:hover { background: var(--white); color: #000; }

/* instruction + tally — monospace readouts */
.ghint { position: fixed; left: 0; right: 0; top: 47%; z-index: 5; text-align: center; margin: 0;
  font-size: clamp(12px, 1.5vw, 15px); letter-spacing: 0.02em; color: var(--ash); pointer-events: none; transition: opacity .6s var(--ease); }
.ghint b { color: var(--white); font-weight: 700; }
.gtally { position: fixed; top: clamp(20px, 4vh, 32px); left: clamp(18px, 4vw, 40px); z-index: 5; margin: 0;
  font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ash-dim);
  border: 1px solid var(--line); padding: 7px 14px; pointer-events: none; }
.gtally b { color: var(--white); font-weight: 700; }

/* win reveal — a sharp bordered console */
.vwin { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: 9vh 6vw;
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease); pointer-events: none; }
.vwin.is-on { opacity: 1; visibility: visible; pointer-events: auto; }
.vwin__card { max-width: 540px; text-align: center; padding: clamp(32px, 5vw, 56px); display: grid; gap: 22px;
  border: 1px solid var(--white); background: #000; }
.vwin__card .cmd { margin: 0 auto; }
.vwin__h { font-size: clamp(1.8rem, 5vw, 2.9rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.02em; margin: 0; color: var(--white); }
.vwin__p { font-size: clamp(13px, 1.6vw, 15px); line-height: 1.6; color: var(--bone); margin: 0 auto; max-width: 40ch; }
.vwin__row { display: inline-flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: center; }

/* reused buttons → sharp bordered rectangles */
.vapp .dlbtn { font-family: inherit; font-weight: 700; font-size: 13px; letter-spacing: 0.06em;
  background: var(--white); color: #000; box-shadow: none; }
.vapp .dlbtn:hover { transform: none; box-shadow: none; background: var(--bone); }
.vapp .ghostbtn { font-family: inherit; text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px;
  border: 1px solid var(--line-strong); padding: 11px 16px; color: var(--bone); transition: border-color .2s, color .2s; }
.vapp .ghostbtn:hover { border-color: var(--white); color: var(--white); }
.vapp .cmd { border: 1px solid var(--line-strong); }
.vapp .cmd code, .vapp code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* no-JS / reduced-motion fallback: a clean, readable page */
.vfallback { display: none; }
body.vapp:not(.js) #vgame, body.vapp:not(.js) .ghint, body.vapp:not(.js) .gtally, body.vapp:not(.js) .vwin { display: none; }
body.vapp:not(.js) .vfallback { display: block; max-width: 640px; margin: 0 auto;
  padding: clamp(96px, 15vh, 170px) clamp(22px, 6vw, 40px) 90px; }
.vfallback h2 { font-size: clamp(2rem, 6vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; margin: 0 0 18px; color: var(--white); }
.vfallback p { color: var(--bone); font-size: clamp(14px, 1.8vw, 17px); line-height: 1.6; margin: 0 0 22px; }
.vfallback ul { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
.vfallback li { color: var(--ash); font-size: 15px; line-height: 1.5; padding-left: 22px; position: relative; }
.vfallback li::before { content: "→"; position: absolute; left: 0; color: var(--white); }

@media (max-width: 560px) { .vhud__back { display: none; } }

/* hero */
.vhero { padding: clamp(70px, 13vh, 150px) 0 clamp(40px, 7vh, 80px); display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.vhero__tag { font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ash); display: inline-flex; align-items: center; gap: 10px; margin: 0 0 20px; }
.vhero__tag b { color: var(--white); font-weight: 400; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #6fe0a0; box-shadow: 0 0 10px #6fe0a0; }
.vhero__title { font-family: var(--mono); font-weight: 700; font-size: clamp(2.1rem, 6vw, 3.7rem); line-height: 1.02; letter-spacing: -0.045em; margin: 0; color: var(--white); }
.vhero__sub { color: var(--bone); font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.6; margin: 22px 0 0; max-width: 48ch; font-family: var(--mono); }
.vhero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 34px; }

.dlbtn {
  display: inline-flex; align-items: center; gap: 11px; padding: 15px 26px; border-radius: 4px;
  background: var(--white); color: #000; font-family: var(--mono); font-size: 13px; letter-spacing: 0.06em;
  transition: transform .3s var(--ease), box-shadow .3s; box-shadow: 0 10px 40px rgba(244,243,239,0.12);
}
.dlbtn:hover { transform: translateY(-2px); box-shadow: 0 16px 50px rgba(244,243,239,0.22); }
.dlbtn small { opacity: 0.55; font-size: 11px; }
.ghostbtn { font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ash); transition: color .25s; }
.ghostbtn:hover { color: var(--white); }

/* terminal one-liner */
.cmd {
  display: flex; align-items: center; gap: 12px; margin-top: 22px; max-width: 600px;
  padding: 13px 13px 13px 16px; border: 1px solid var(--line-strong); border-radius: 5px;
  background: rgba(0,0,0,0.5); cursor: pointer; transition: border-color .25s;
}
.cmd:hover { border-color: var(--white); }
.cmd code { font-family: var(--mono); font-size: 12px; color: var(--bone); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.cmd code b { color: #6fb6ff; font-weight: 400; }
.cmd__copy { flex: none; font-size: 11px; letter-spacing: 0.1em; color: #000; background: var(--bone); padding: 6px 12px; border-radius: 3px; }
.cmd.copied .cmd__copy { background: #6fe0a0; }
.vhero__note { font-size: 11px; color: var(--ash-dim); margin: 12px 0 0; letter-spacing: 0.04em; }

/* notch demo */
.vdemo { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.laptop { width: 100%; max-width: 440px; }
.laptop__screen { position: relative; aspect-ratio: 16/10.6; border-radius: 16px 16px 5px 5px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(244,243,239,0.06), transparent 55%), linear-gradient(180deg, #0c0c12, #050507);
  border: 1px solid var(--line-strong); box-shadow: inset 0 0 0 5px #0a0a0e, 0 40px 90px rgba(0,0,0,0.6); overflow: hidden; }
.laptop__bar { position: absolute; top: 8px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 16px; font-size: 10px; letter-spacing: 0.1em; color: var(--ash-dim); }
.notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 150px; height: 26px; background: #000; border-radius: 0 0 15px 15px; cursor: pointer; z-index: 4; display: grid; place-items: center; border: none; transition: width .35s var(--ease); }
.notch__cam { width: 6px; height: 6px; border-radius: 50%; background: #1a1a20; }
.notch.is-open { width: 160px; }
.notch-note { position: absolute; top: 26px; left: 50%; width: 232px; transform: translateX(-50%); background: rgba(8,8,12,0.97); border: 1px solid var(--line-strong); border-top: none; border-radius: 0 0 15px 15px; padding: 15px; z-index: 3; clip-path: inset(0 0 100% 0); opacity: 0; transition: clip-path .5s var(--ease), opacity .4s; pointer-events: none; }
.notch-note.is-open { opacity: 1; clip-path: inset(0 0 0 0); }
.notch-note__head { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: 0.1em; color: var(--ash); margin-bottom: 11px; }
.notch-note__head span:last-child { color: #6fe0a0; }
.notch-note__tasks { list-style: none; margin: 0 0 11px; padding: 0; display: grid; gap: 9px; }
.notch-note__tasks li { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; color: var(--bone); }
.notch-note__tasks i { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ash-dim); }
.notch-note__tasks li.done { color: var(--ash-dim); text-decoration: line-through; }
.notch-note__tasks li.done i { background: var(--white); border-color: var(--white); }
.notch-note__add { font-size: 11px; color: var(--ash-dim); padding: 7px 10px; border: 1px dashed var(--line-strong); }
.laptop__base { height: 11px; width: 112%; margin-left: -6%; border-radius: 0 0 11px 11px; background: linear-gradient(180deg, #16161c, #050507); box-shadow: 0 18px 30px rgba(0,0,0,0.5); }
.vdemo__hint { font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ash-dim); }

/* features */
.vfeat { padding: clamp(50px, 9vh, 100px) 0; border-top: 1px solid var(--line-soft); }
.vfeat__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
.vfeat__cell { background: #000; padding: 28px clamp(20px,2.4vw,30px); }
.vfeat__k { font-family: var(--mono); font-size: 12px; color: var(--ash); }
.vfeat__cell h3 { font-family: var(--mono); font-weight: 700; font-size: 1.12rem; letter-spacing: -0.02em; margin: 14px 0 9px; color: var(--white); }
.vfeat__cell p { color: var(--ash); font-family: var(--mono); font-size: 0.84rem; line-height: 1.7; margin: 0; }
.vfeat__cell code { color: #6fb6ff; font-size: 0.9em; }

/* install steps */
.vinstall { padding: clamp(50px, 9vh, 100px) 0; border-top: 1px solid var(--line-soft); text-align: center; }
.vinstall h2 { font-family: var(--mono); font-weight: 700; font-size: clamp(1.6rem, 4vw, 2.4rem); letter-spacing: -0.035em; margin: 0 0 14px; color: var(--white); }
.vinstall p { color: var(--ash); font-family: var(--mono); font-size: 0.86rem; max-width: 56ch; margin: 0 auto 28px; line-height: 1.7; }
.vinstall .vhero__actions { justify-content: center; }
.vinstall .cmd { margin-left: auto; margin-right: auto; }

/* shared footer on scrollable pages: flow at the end of content, not pinned */
body.visor .lfoot {
  position: static;
  margin-top: clamp(40px, 8vh, 90px);
  background: none;
}

@media (max-width: 820px) {
  .vhero { grid-template-columns: 1fr; gap: 44px; }
  .vfeat__grid { grid-template-columns: 1fr; }
}
