/* Konto website round 3: shared base (tokens, type, pages, buttons, step captions, motion).
   No scenery and no app UI here: scenes live in each section, the app kit in app.css,
   the cast in cast.css. Owned by the lead. */
/* ---------- tokens ---------- */
.ks {
  --ink: #0F1D22;
  --ink-2: #2A3F4D;
  --ink-3: #4A6275;          /* 5.9:1 on white */
  --line: #D8E1EA;
  --line-2: #E8EEF3;
  --paper: #FFFFFF;
  --mist: #F2F5F8;

  --c25: #F5FCFD; --c50: #F0FAFB; --c100: #D4F1F5; --c200: #A3E4EE; --c300: #7DD8E8;
  --c500: #0BBAD8; --c600: #099AB3; --c700: #06707F; --c800: #054C56; --c900: #033038;

  --ok: #1E8449; --ok-50: #E8F8F0; --ok-200: #A9DFBF; --ok-500: #2ECC71;
  --bad: #C0392B; --bad-50: #FDECEB; --bad-200: #F5B7B1;
  --warn: #D68910; --warn-50: #FEF5E7; --warn-200: #FAD7A0; --warn-800: #7E5109;
  --ai: #8B5CF6; --ai-ink: #6D3FD9; --ai-50: #F5F0FF; --ai-200: #D8C2FF;
  --pink: #E5487A;

  --film: #06141C;
  --r-s: 10px; --r-m: 16px; --r-l: 24px; --r-xl: 32px;
  --shadow-1: 0 1px 2px rgba(10,25,41,.06), 0 4px 14px rgba(10,25,41,.06);
  --shadow-2: 0 2px 6px rgba(10,25,41,.08), 0 18px 44px rgba(10,25,41,.14);
  --shadow-3: 0 4px 10px rgba(10,25,41,.10), 0 34px 80px rgba(10,25,41,.22);
  --ease: cubic-bezier(.2,.7,.1,1);
  --spring: cubic-bezier(.34,1.56,.64,1);

  --font: 'Lama Sans', 'Segoe UI', system-ui, sans-serif;
  font-family: var(--font);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 16px;
  line-height: 1.5;
}
.ks[lang="ckb"] { --font: 'Rabar', 'Lama Sans', system-ui, sans-serif; }
.ks *, .ks *::before, .ks *::after { box-sizing: border-box; }
.ks img { display: block; max-width: 100%; }
.ks button { font: inherit; color: inherit; cursor: pointer; }
.ks a { color: inherit; }
.ks :focus-visible { outline: 3px solid var(--c500); outline-offset: 3px; border-radius: 8px; }

/* numbers, codes and identifiers keep their own order in every language */
.ks .num { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- section shell ---------- */
.ks.band {
  position: relative;
  overflow: hidden;
  container-type: inline-size;
  container-name: band;
  background: linear-gradient(180deg, var(--sky1, #fff) 0%, var(--sky2, #fff) 100%);
  color: var(--ink);
  isolation: isolate;
}
.ks .wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: 48px; position: relative; }
.ks .grid2 {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 56px;
  align-items: center;
}
.ks .grid2.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.ks .grid2.flip > .copy { order: 2; }
.ks .copy { position: relative; z-index: 3; }

/* ---------- type ---------- */
.ks .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 800; letter-spacing: .02em;
  color: var(--eyebrow, var(--c700));
  margin: 0 0 20px;
}
.ks .eyebrow img { width: 28px; height: 28px; }
.ks .eyebrow .n {
  font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 7px;
  background: var(--ink); color: #fff; letter-spacing: .04em;
}
.ks .h1, .ks .h2 {
  margin: 0;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.012em;
  text-wrap: balance;
}
.ks .h1 { font-size: clamp(44px, 6.4cqi, 92px); line-height: .98; }
.ks .h2 { font-size: clamp(38px, 4.6cqi, 68px); line-height: 1.0; }
.ks[dir="rtl"] .h1, .ks[dir="rtl"] .h2 { letter-spacing: 0; line-height: 1.22; }
.ks[lang="ckb"] .h1, .ks[lang="ckb"] .h2 { font-weight: 700; line-height: 1.32; font-size-adjust: none; }
.ks[lang="ckb"] .h1 { font-size: clamp(36px, 4.5cqi, 66px); }
.ks[lang="ckb"] .h2 { font-size: clamp(32px, 3.7cqi, 54px); }
/* digits stay in Lama Sans in every language */
.ks[lang="ckb"] .num, .ks[lang="ckb"] .odo, .ks[lang="ckb"] .k .num { font-family: 'Lama Sans', sans-serif; }
.ks .mark {
  background: linear-gradient(transparent 58%, var(--mark, var(--c200)) 58%, var(--mark, var(--c200)) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding-inline: .06em; margin-inline: -.06em;
}
.ks .lead {
  margin: 24px 0 0;
  font-size: clamp(17px, 1.45cqi, 20px);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 34em;
}
.ks .facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; max-width: 30em; }
.ks .facts li {
  display: flex; gap: 12px; align-items: baseline;
  font-size: 16px; font-weight: 600; color: var(--ink);
  padding: 11px 0; border-top: 1px solid var(--facts-line, rgba(15,29,34,.12));
}
.ks .facts li:last-child { border-bottom: 1px solid var(--facts-line, rgba(15,29,34,.12)); }
.ks .facts li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--c500); transform: translateY(-2px); }

/* dark bands flip the type */
.ks.dark { --ink: #FFFFFF; --ink-2: #C9DCE2; --ink-3: #9FB6BF; --eyebrow: var(--c300); --facts-line: rgba(255,255,255,.16); --mark: rgba(11,186,216,.45); }

/* ---------- buttons ---------- */
.ks .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 14px; border: 0;
  font-size: 16px; font-weight: 800; text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.ks .btn:hover { transform: translateY(-1px); }
.ks .btn:active { transform: translateY(1px) scale(.99); }
.ks .btn-ink { background: var(--ink); color: #fff; box-shadow: 0 6px 18px rgba(15,29,34,.22); }
.ks.dark .btn-ink { background: #fff; color: #0F1D22; }
.ks .btn-cyan { background: var(--c500); color: #04242B; box-shadow: 0 8px 22px rgba(11,186,216,.35); }
.ks .btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px currentColor; }
.ks .btn svg { width: 20px; height: 20px; flex: none; }

.ks .stage { position: relative; min-height: 560px; display: flex; align-items: center; justify-content: center; }

/* ---------- pages (kpage.js) ---------- */
html.kp-wide { scroll-snap-type: y mandatory; }
html.kp-narrow { scroll-snap-type: y proximity; }
.ks.kpage { position: relative; scroll-snap-align: start; }
html.kp-wide .ks.kpage { height: var(--ph, 100vh); scroll-snap-stop: always; overflow: hidden; }
/* the 1440 x 900 design frame, scaled to fit the screen */
html.kp-wide .ks .kframe {
  position: absolute; left: var(--kx, 0px); top: var(--ky, 0px);
  width: 1440px; height: 900px; transform: scale(var(--kf, 1)); transform-origin: 0 0;
}
html.kp-narrow .ks .kframe { position: relative; width: 100%; }
/* things that belong to the screen edge, not the frame (sky, ground) */
.ks .kbleed { position: absolute; inset: 0; pointer-events: none; }

/* ---------- step captions: what the preview is doing (never a button) ---------- */
.ks .beats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; counter-reset: beat; }
.ks .beats li {
  position: relative; display: flex; align-items: baseline; gap: 8px; padding-bottom: 9px;
  font-size: 15px; font-weight: 700; color: var(--ink-3); opacity: .62;
  transition: opacity .35s var(--ease), color .35s var(--ease);
}
.ks .beats li b { font-size: 12px; font-weight: 800; color: inherit; font-variant-numeric: tabular-nums; }
.ks .beats li::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; width: 100%;
  border-radius: 2px; background: currentColor; opacity: .18;
}
.ks .beats li i {
  position: absolute; inset-inline-start: 0; bottom: 0; height: 2px; width: 0; border-radius: 2px; background: var(--c500); z-index: 1;
}
.ks .beats li.past { opacity: .9; color: var(--ink-2); }
.ks .beats li.past i { width: 100%; }
.ks .beats li.on { opacity: 1; color: var(--ink); }
.ks .beats li.on i { animation: k-beat var(--bd, 2.4s) linear forwards; }
.ks .beats.done li { opacity: .9; color: var(--ink-2); }
.ks .beats.done li i { width: 100%; animation: none; }
@keyframes k-beat { from { width: 0 } to { width: 100% } }

/* the live phone screen slot (kapp.js lays the real app over it) */
.ks .kapp-slot { position: relative; overflow: hidden; }
.ks .kapp-slot .kapp-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the live app and its posters draw their own status bar, island and home bar */
.ks .kapp-slot .phone-sb, .ks .kapp-slot .phone-isl, .ks .kapp-slot .phone-hi { display: none; }


@keyframes k-blink { 0%, 100% { opacity: 1 } 50% { opacity: .25 } }
@keyframes k-twinkle { from { opacity: .45 } to { opacity: .85 } }
@keyframes k-sway { from { transform: translateX(-50%) rotate(-3deg) } to { transform: translateX(-50%) rotate(3deg) } }
@keyframes k-walk { from { transform: translateX(var(--from, -160px)) } to { transform: translateX(var(--to, 1600px)) } }
@keyframes k-bob { from { translate: 0 0 } to { translate: 0 -2px } }
@keyframes k-float { from { transform: translateY(0) } to { transform: translateY(-10px) } }
@keyframes k-rise { from { opacity: 0; transform: translateY(18px) } to { opacity: 1; transform: none } }
@keyframes k-pop { 0% { transform: scale(.6); opacity: 0 } 60% { transform: scale(1.08); opacity: 1 } 100% { transform: scale(1) } }
@keyframes k-ring { 0% { box-shadow: 0 0 0 0 rgba(11,186,216,.55) } 100% { box-shadow: 0 0 0 16px rgba(11,186,216,0) } }
@keyframes k-breathe { 0%, 100% { transform: scaleY(1) } 50% { transform: scaleY(1.012) } }
@keyframes k-eyes { 0%, 92%, 100% { transform: scaleY(1) } 95% { transform: scaleY(.1) } }

@media (prefers-reduced-motion: reduce) {
  .ks *, .ks *::before, .ks *::after { animation-duration: .001s !important; animation-iteration-count: 1 !important; transition-duration: .001s !important; }
}

@container band (max-width: 1060px) {
  .ks .wrap { padding-inline: 32px; }
  .ks .grid2, .ks .grid2.flip { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ks .grid2.flip > .copy { order: 0; }
}
@container band (max-width: 640px) {
  .ks .wrap { padding-inline: 20px; }
  .ks .lead { font-size: 17px; }
  .ks .facts li { font-size: 15px; }
  .ks .btn { min-height: 50px; padding: 0 20px; }
}

/* no snapping until the page has settled (kpage.js adds kp-ready) */
html:not(.kp-ready) { scroll-snap-type: none !important; }

/* pages far from the screen are not drawn and do not animate (kpage.js) */
.ks.kpage[data-koff] { content-visibility: auto; contain-intrinsic-size: auto 100vh; }
.ks.kpage[data-koff] *, .ks.kpage[data-koff] *::before, .ks.kpage[data-koff] *::after { animation-play-state: paused !important; }
