/* KN Services v5 "Watch it build" - page layer (DOM, type, HUD).
   The wall (canvas#stage) is the engine's. Everything here is motion-ready DOM. */


:root {
  --ink: #0B0B0C;
  --ink-2: #161618;
  --paper: #F3EEE4;
  --peri: #9CBEFE;
  --peri-deep: #487DFF;
  --signal: #EB7E3B;

  --bk-cream: #F4E9D6; --bk-crust: #4A2E17; --bk-terra: #C4532A; --bk-flour: #FFFDF8;
  --bb-green: #0E2A21; --bb-bone: #E8E0CC; --bb-brass: #C9A34E; --bb-black: #0A0A0A;

  --f-display: 'Archivo', 'Arial Black', sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  --f-fraunces: 'Fraunces', Georgia, serif;
  --f-shoulders: 'Big Shoulders Display', 'Arial Narrow', sans-serif;

  --m: 32px;          /* page side margin */
  --bar-h: 80px;      /* top bar, hero state */
  --slim-h: 60px;     /* builder bar */
  --blk: var(--paper);
}

* { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font-family: var(--f-body); font-size: 16px; line-height: 1.45;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
html.is-locked, html.is-locked body { overflow: hidden; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
@media (hover: hover) and (pointer: fine) { html.has-cursor, html.has-cursor * { cursor: none !important; } }

a { color: inherit; }
p, h1, h2, h3, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
.mono { font-family: var(--f-mono); font-size: 11px; line-height: 1.4; letter-spacing: .06em; text-transform: uppercase; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- stacking ---------- */
#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; background: var(--ink); }
.layer { position: fixed; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; contain: layout paint; }
.layer a, .layer button { pointer-events: auto; }
.hud { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.track { position: relative; z-index: 1; pointer-events: none; }
.beat { height: calc(var(--h) * 1vh); }
.scene { position: absolute; inset: 0; visibility: hidden; }
.scene--hero { visibility: visible; }

/* block cover used by every "snap in as a block" build */
.blk { position: absolute; inset: 0; background: var(--blk); transform: scaleX(1); transform-origin: 0 50%; pointer-events: none; z-index: 2; }
.js-snap { position: relative; }

/* ---------- buttons: solid blocks, rebuild on hover ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: 52px; padding: 0 26px; border-radius: 0; text-decoration: none; white-space: nowrap;
  font: 600 15px/1 var(--f-body); letter-spacing: .01em; color: var(--ink);
  background: var(--signal); isolation: isolate; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--paper);
  clip-path: inset(0 100% 0 0); transition: clip-path .22s steps(6, end);
}
.btn:hover::after, .btn:focus-visible::after { clip-path: inset(0 0 0 0); }
.btn:focus-visible { outline: 2px solid var(--peri); outline-offset: 3px; }
.btn--paper { background: var(--paper); }
.btn--paper::after { background: var(--signal); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink::after { background: var(--signal); }
.btn--ink:hover { color: var(--ink); }
.btn--sm { height: 36px; padding: 0 16px; font-size: 13px; }
.btn--bar { height: 48px; padding: 0 22px; font-size: clamp(16px, .94vw, 18px); }
.btn--xl { height: 64px; padding: 0 30px; font-size: 20px; }
.btn--line { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1px rgba(243,238,228,.55); }
.btn--line::after { background: var(--paper); }
.btn--line:hover, .btn--line:focus-visible { color: var(--ink); }

/* ---------- top bar ---------- */
.bar {
  position: absolute; left: 0; right: 0; top: 0; height: var(--bar-h); z-index: 4;
  display: flex; align-items: center; gap: 30px; padding: 0 var(--m);
}
.bar__bg { position: absolute; inset: 0; background: var(--ink); transform-origin: 50% 0; transform: scaleY(0); z-index: -1; }
.bar__logo { position: relative; display: block; height: 32px; flex: none; }
.bar__logo img { display: block; height: 100%; width: auto; }
.bar__logo .logo--ink { position: absolute; left: 0; top: 0; opacity: 0; }
.bar__nav { display: flex; gap: clamp(20px, 1.7vw, 34px); font: 500 clamp(16px, .94vw, 18px)/1 var(--f-body); margin-left: 8px; }
.bar__nav a { text-decoration: none; opacity: .88; }
.bar__nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.bar__build { position: absolute; left: calc(var(--m) + 82px); top: 0; bottom: 0; display: flex; align-items: center; gap: 16px; visibility: hidden; }
.bar__build .mono { font-size: 11px; }
.bar__url { display: inline-flex; align-items: center; gap: 8px; height: 24px; padding: 0 10px; background: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(243,238,228,.16); font: 400 12px/1 var(--f-mono); letter-spacing: .02em; text-transform: none; }
.bar__url i { width: 6px; height: 6px; background: var(--peri); display: block; }
.bar__tag { opacity: .62; }
.bar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 20px; text-decoration: none;
  font: 500 clamp(16px, .94vw, 18px)/1 var(--f-body); color: var(--paper); box-shadow: inset 0 0 0 1px rgba(243,238,228,.5);
  position: relative; overflow: hidden; isolation: isolate; white-space: nowrap; background: rgba(11,11,12,.35);
}
.pill b { font-weight: 700; }
.pill::after { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--paper); clip-path: inset(0 100% 0 0); transition: clip-path .22s steps(6, end); }
.pill:hover { color: var(--ink); }
.pill:hover::after { clip-path: inset(0 0 0 0); }
html[data-mode="build"] .bar { height: var(--slim-h); }
html[data-mode="build"] .bar .btn--bar, html[data-mode="build"] .bar .pill { height: 44px; font-size: clamp(16px, .94vw, 18px); }
html[data-mode="build"] .bar__logo { height: 26px; }
/* ink variant: periwinkle (social) and paper (end) grounds */
html[data-mode="ink"] .bar { color: var(--ink); }
html[data-mode="ink"] .pill { color: var(--paper); background: var(--ink); box-shadow: none; }
html[data-mode="ink"] .pill::after { background: var(--paper); }
html[data-mode="ink"] .pill:hover { color: var(--ink); }
html[data-mode="ink"] .bar__nav a { opacity: 1; }
html[data-ground="peri"] .logo--ink { filter: brightness(0); }
.bar, .bar__logo { transition: height .3s steps(4, end); }

/* ---------- hero ---------- */
.scene--hero { padding: calc(var(--bar-h) + 8px) var(--m) clamp(64px, 9vh, 96px); display: flex; flex-direction: column; justify-content: center; }
.hero__fear {
  font: 500 clamp(18px, 1.46vw, 30px)/1.22 var(--f-body); color: var(--paper); max-width: 34ch;
  margin-bottom: clamp(10px, 2.2vh, 26px); align-self: flex-start; text-wrap: balance;
}
.hero__h1 {
  font-family: var(--f-display); font-weight: 900; font-stretch: 125%; text-transform: uppercase;
  letter-spacing: -0.02em; line-height: .82; font-size: min(17vw, 22.5vh); margin: 0; color: var(--paper);
  position: relative; align-self: flex-start; will-change: transform;
}
.hl { display: block; white-space: nowrap; position: relative; }
.hl--2 { padding-left: .06em; }
.hero__h1 em, .end__h2 em, .plans__h em {
  font-family: var(--f-serif); font-style: italic; font-weight: 400; text-transform: lowercase;
  font-stretch: 100%; letter-spacing: -0.015em; font-size: 1.1em; line-height: .7;
}
.ch { display: inline-block; }
.ch--sp { width: .26em; }
.runner { position: absolute; width: .12em; height: .12em; left: 0; top: 0; background: var(--peri); opacity: 0; z-index: 3; }
.hero__row { display: flex; align-items: flex-end; gap: clamp(28px, 4.2vw, 80px); margin-top: clamp(16px, 3vh, 34px); flex-wrap: wrap; }
.price { display: grid; grid-template-columns: auto auto; column-gap: 16px; align-items: end; }
.price__from { grid-column: 1 / -1; margin-bottom: 10px; font: 500 20px/1.1 var(--f-body); color: rgba(243,238,228,.86); }
.price__big {
  font-family: var(--f-display); font-weight: 900; font-stretch: 125%; letter-spacing: -0.03em;
  font-size: min(9.2vw, 14.5vh); line-height: .8; display: inline-flex; align-items: flex-start;
}
.price__big .cur { font-size: .5em; line-height: 1; margin-right: .04em; margin-top: .06em; }
.price__rest { padding-bottom: 4px; }
.price__rest b { display: block; font: 600 clamp(20px, 1.4vw, 28px)/1.15 var(--f-body); }
.price__rest span { display: block; font: 500 clamp(18px, 1.15vw, 22px)/1.3 var(--f-body); color: rgba(243,238,228,.88); }
.hero__side { max-width: min(760px, 52vw); padding-bottom: 2px; }
.hero__sub { font: 500 clamp(18px, 1.5vw, 30px)/1.25 var(--f-body); color: var(--paper); text-wrap: balance; }
.hero__badges { margin-top: clamp(12px, 1.8vh, 20px); }
.hero__btns { display: flex; gap: 10px; margin-top: clamp(14px, 2.2vh, 24px); flex-wrap: wrap; }

/* rolling digits */
.roll { display: inline-block; height: 1em; line-height: 1; overflow: hidden; vertical-align: top; }
.roll__col { display: flex; flex-direction: column; will-change: transform; }
.roll__col span { display: block; height: 1em; line-height: 1; }

/* package screens (plans, social, software): css/packages.css */

/* ---------- marquee bands ---------- */
.marquee { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); visibility: hidden; overflow: hidden; z-index: 3; }
.marquee__track { display: flex; white-space: nowrap; will-change: transform; }
.marquee__row { display: flex; white-space: nowrap; will-change: transform; }
.marquee__row span {
  font-family: var(--f-display); font-weight: 900; font-stretch: 125%; text-transform: uppercase;
  font-size: min(22vw, 34vh); line-height: .86; letter-spacing: -0.02em; padding-right: .3em; color: var(--paper);
}
.marquee__row span i { font-style: normal; color: var(--peri); }
.marquee--b .marquee__row span { color: var(--bb-bone); }
.marquee--b .marquee__row span i { color: var(--bb-brass); }
.marquee--a .marquee__row span { color: var(--bk-cream); }
.marquee--a .marquee__row span i { color: var(--bk-terra); }

/* ---------- KN caption chip ---------- */
.kn-cap {
  position: absolute; left: var(--m); bottom: 28px; z-index: 3; max-width: min(1060px, calc(100vw - 2 * var(--m)));
  background: var(--ink); color: var(--paper); padding: 16px 22px 16px 18px;
  font: 500 20px/1.35 var(--f-body); display: flex; gap: 14px; align-items: flex-start;
}
.kn-cap::before { content: ''; flex: none; width: 10px; height: 10px; margin-top: 8px; background: var(--peri); }

/* sample site 01: bakery - chat 19 moved it to css/s-bakery.css */

/* sample site 02: barber - chat 19 moved it to css/s-barber.css */

/* ---------- end panel (paper) ---------- */
.scene--end {
  --blk: var(--ink); color: var(--ink);
  padding: calc(var(--bar-h) + clamp(8px, 2.6vh, 32px)) var(--m) clamp(24px, 4.4vh, 52px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.end__fear { font: 500 clamp(18px, 1.46vw, 30px)/1.22 var(--f-body); max-width: 34ch; color: var(--ink); text-wrap: balance; }
.end__h2 { font-family: var(--f-display); font-weight: 900; font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.02em; line-height: .84; font-size: min(10.2vw, 19vh); color: var(--ink); align-self: flex-start; }
.end__h2 .l { display: block; white-space: nowrap; }
.end__line { font: 600 clamp(20px, 1.6vw, 34px)/1.2 var(--f-body); max-width: 60ch; text-wrap: balance; }
.end__prices {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none;
  border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
}
.ep { display: flex; flex-direction: column; justify-content: space-between; gap: clamp(6px, 1.1vh, 14px); padding: clamp(12px, 2vh, 24px) clamp(14px, 1.6vw, 32px) clamp(12px, 2vh, 22px); min-width: 0; }
.ep + .ep { box-shadow: inset 2px 0 0 var(--ink); }
.ep:first-child { padding-left: 0; }
.ep__k { font: 600 var(--rd22)/1.1 var(--f-body); }
.ep__v { font-family: var(--f-display); font-weight: 900; font-stretch: 125%; letter-spacing: -0.035em; font-size: min(7.4vw, 13.5vh); line-height: .8; display: flex; align-items: flex-start; white-space: nowrap; }
.ep__v .cur { font-size: .46em; line-height: 1; margin: .07em .05em 0 0; }
.ep__u { font: 600 var(--rd22)/1.1 var(--f-body); }
.end__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.end__btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- HUD ---------- */
.cursor { position: fixed; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--signal); z-index: 9; opacity: 0; display: flex; align-items: center; justify-content: center; will-change: transform; }
.cursor__label { font: 600 10px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); opacity: 0; white-space: nowrap; }
.cursor.is-big .cursor__label { opacity: 1; transition: opacity .1s steps(2) .08s; }
.cursor { transition: width .18s steps(4, end), height .18s steps(4, end), margin .18s steps(4, end); }
.cursor.is-big { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
html:not(.has-cursor) .cursor { display: none; }
.log { position: fixed; left: var(--m); bottom: 24px; color: rgba(243,238,228,.5); font-size: 11px; line-height: 17px; min-height: 51px; display: flex; flex-direction: column; justify-content: flex-end; }
.log div { white-space: nowrap; }
.log .caret { display: inline-block; width: 7px; height: 11px; background: rgba(243,238,228,.5); vertical-align: -1px; margin-left: 2px; }
.cue { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); color: rgba(243,238,228,.88); opacity: 0; display: flex; align-items: center; gap: 12px; white-space: nowrap; font: 500 16px/1 var(--f-body); }
.cue__blocks { display: inline-flex; gap: 3px; }
.cue__blocks i { width: 6px; height: 6px; background: var(--paper); opacity: .25; animation: cue 1.6s steps(1, end) infinite; }
.cue__blocks i:nth-child(2) { animation-delay: .2s; }
.cue__blocks i:nth-child(3) { animation-delay: .4s; }
@keyframes cue { 0%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* sample chapters: KN chip sits clear of the sample site */
.bk-bake, .bb-book { bottom: 132px; }
@media (min-width: 701px) {
  .bk-bake, .bb-book { left: auto; right: var(--m); }
}

/* ---------- smaller desktops ---------- */
@media (max-width: 1180px) {
  .bar__nav { gap: 18px; }
  .bar__build .bar__tag { display: none; }
}
@media (max-width: 980px) {
  .bar__nav { display: none; }
}

/* ---------- phone ---------- */
@media (max-width: 700px) {
  :root { --m: 16px; --bar-h: 64px; --slim-h: 60px; }
  body { font-size: 16px; }
  .bar { gap: 10px; }
  .bar__logo { height: 24px; }
  html[data-mode="build"] .bar__logo { height: 22px; }
  .bar__build { display: none !important; }
  .bar__right { gap: 6px; }
  .pill { height: 44px; padding: 0 12px; font-size: 16px; }
  .pill .pl { display: none; }
  .btn--bar { height: 44px; padding: 0 14px; font-size: 16px; }
  html[data-mode="build"] .bar .btn--bar, html[data-mode="build"] .bar .pill { height: 40px; font-size: 16px; }

  .scene--hero { padding: calc(var(--bar-h) + 14px) var(--m) 64px; justify-content: flex-end; }
  .hero__fear { font-size: 18px; }
  .hero__h1 { font-size: 16.4vw; }
  .hero__row { flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 20px; }
  .hero__side { max-width: none; }
  .price__from { font-size: 16px; }
  .price__big { font-size: 19vw; }
  .price__rest b { font-size: 18px; }
  .price__rest span { font-size: 16px; }
  .hero__sub { font-size: 17px; }
  .hero__btns .btn { height: 52px; padding: 0 18px; font-size: 16px; }

  .marquee__row span { font-size: 30vw; }

  .kn-cap, .scene--bakery .kn-cap, .scene--barber .kn-cap { left: var(--m); right: var(--m); bottom: 14px; max-width: none; font-size: 16px; padding: 10px 12px; }



  .scene--end { padding: calc(var(--bar-h) + 14px) var(--m) 20px; }
  .end__fear { font-size: 18px; }
  .end__h2 { font-size: 15.5vw; }
  .end__h2 .l { white-space: normal; }
  .end__line { font-size: 18px; }
  .end__prices { grid-template-columns: 1fr; }
  .ep { flex-direction: row; align-items: baseline; flex-wrap: wrap; column-gap: 10px; padding: 8px 0; }
  .ep + .ep { box-shadow: inset 0 1px 0 rgba(11,11,12,.3); }
  .ep__v { font-size: 11vw; order: 2; }
  .ep__k { order: 1; flex: 1 0 100%; font-size: 16px; }
  .ep__u { order: 3; font-size: 16px; }
  .end__btns .btn { height: 52px; padding: 0 18px; font-size: 16px; }

  .log { bottom: 18px; }
  .cue { bottom: 22px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn::after, .pill::after, .bb-go::after, .cursor, .bar, .bar__logo { transition: none !important; }
  .cue__blocks i { animation: none; opacity: .6; }
}

/* ---------- round 5: step scrolling (desktop) and its indicator ----------
   html.is-step is set by main.js while one scroll = one step. The indicator is the block motif:
   blue = seen, ONE orange = current; each block jumps to its step. */
html.is-step { overflow: hidden; }
/* chat 22: steps on touch screens too. The page never pans by itself (no half-way screens, no pull to
   refresh); the sideways card rows still swipe. */
html.is-step, html.is-step body { overscroll-behavior: none; }
html.is-step body { touch-action: pan-x pinch-zoom; }
.stepnav { position: fixed; right: calc((var(--m) - 24px) / 2); top: 50%; transform: translateY(-50%); z-index: 7; display: none; flex-direction: column; color: var(--paper); }
html.is-step[data-state="live"] .stepnav { display: flex; }
.stepnav button { width: 24px; height: 22px; display: grid; place-items: center; }
.stepnav button.is-sub { height: 14px; }
.stepnav i { display: block; width: 8px; height: 8px; background: currentColor; opacity: .34; }
.stepnav .is-seen i { background: var(--peri); opacity: 1; }
.stepnav .is-on i { background: var(--signal); opacity: 1; }
html[data-ground="peri"] .stepnav, html[data-ground="paper"] .stepnav { color: var(--ink); }
html[data-ground="peri"] .stepnav .is-seen i, html[data-ground="paper"] .stepnav .is-seen i { background: var(--peri-deep); }
.stepnav button:focus-visible { outline: 2px solid var(--peri); outline-offset: -2px; }
/* chat 22, phone: the indicator sits in the side margin, small, and is not a tap target */
@media (max-width: 700px) {
  .stepnav { right: 2px; pointer-events: none; }
  .stepnav button { width: 10px; height: 11px; }
  .stepnav button.is-sub { height: 8px; }
  .stepnav i { width: 5px; height: 5px; }
  .stepnav button.is-sub i { width: 3px; height: 3px; }
}

/* end scene: contact and legal links (launch, 3 Oct) */
.end__legal { flex: 1 1 100%; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 26px; font: 500 clamp(16px, .94vw, 18px)/1.2 var(--f-body); color: var(--ink); }
.end__legal span { font-weight: 700; }
.end__legal a { color: inherit; }
