/* ════════════════════════════════════════════════════════════════════════
   KoMPASS sign-in — v2 ("cinematic") login page
   ════════════════════════════════════════════════════════════════════════
   Ported from docs/login-redesign/reference/login-reference.html per the
   KoMPASS login redesign prompt. Precedence: prompt > SPEC.md > reference
   (reference wins on every visual value -- colour, size, easing, timing,
   keyframe -- copied verbatim below unless the prompt's own Product
   Decisions section overrides a value).

   Scope: this file is ONLY ever loaded by templates/login.html. It defines
   its own CSS custom properties on :root rather than reusing style.css /
   theme.css tokens -- Product Decision #8: "The login page ignores the
   app's three themes ... It is a fixed light K Line design. Do not load
   theme CSS here." style.css is not loaded here either, so this file is a
   fully self-contained stylesheet (plus fonts.css for the already
   self-hosted Inter family -- see the <link> in login.html).

   Timeline: every one-shot intro animation's delay is written as
   calc(<seconds>s * var(--intro-scale)). --intro-scale is 1 by default,
   0.25 under .kn-intro-short (repeat-visit-in-session short intro, set by
   login-intro.js before first paint) and ignored entirely once
   .kn-intro-done is set (skip-intro: delay forced to 0 directly, see
   bottom of file) -- this is the ONE place every timing constant lives,
   satisfying "timings are changeable in one spot".
   ════════════════════════════════════════════════════════════════════════ */

:root {
  /* ---- colour tokens (SPEC §4.1, values from the reference) ---- */
  --red-500: #D2232A;
  --red-400: #E0333A;
  --red-600: #C41A22;
  --red-800: #9E1118;
  --red-link: #B3121B;
  --red-link-hover: #7E0C12;
  --ink-900: #1F2226;
  --ink-800: #2B2F36;
  --ink-700: #3A3F46;
  --ink-600: #4A4F57;
  /* --ink-500 darkened slightly from the reference's #5A5F67 (SPEC §10: the
     10.5px full-form text must still clear 4.5:1 on the lightest glass --
     checked against the glass's lightest realistic background and bumped a
     shade darker here; everywhere else this token reads identically). */
  --ink-500: #52565D;
  --ink-400: #6B7078;
  --bg-0: #F6F6F7;
  --bg-1: #E9EAEC;
  --bg-2: #DCDEE2;
  --sea-back: #B9DCE6;
  --sea-mid: #7FB5CB;
  --sea-front: #5E98B5;
  --letterbox: #15171A;

  /* ---- type (SPEC §4.2) ---- */
  --font-display: Sora, Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;

  /* ---- radii (SPEC §4.3) ---- */
  --r-capsule: 44px;
  --r-card: 28px;
  --r-field: 14px;

  /* ---- easing (SPEC §6) ---- */
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --ease-expo: cubic-bezier(.16,1,.3,1);
  --ease-letterbox: cubic-bezier(.7,0,.2,1);

  /* ---- intro timeline scale: 1 = full first-visit intro, 0.25 = short
     repeat-visit intro (set by login-intro.js). Skip-intro (.kn-intro-done)
     bypasses this entirely with !important 0s delays further down. ---- */
  --intro-scale: 1;
}

/* Sora self-hosted here (latin subset only, fetched via @fontsource/sora into
   a scratch dir and copied in -- no node_modules/package.json committed).
   Inter is NOT redeclared: fonts.css (already loaded by every other KoMPASS
   page) already self-hosts Inter 400/500/600/700/800 latin+other ranges
   under family 'Inter' -- login.html links that same stylesheet rather than
   duplicating the font files. */
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/static/fonts/sora-latin-600-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/static/fonts/sora-latin-700-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/static/fonts/sora-latin-800-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

* { box-sizing: border-box; }

html, body.kn-login-page {
  margin: 0;
  padding: 0;
  /* Decorative layers (the 15 floating verticals especially -- absolutely
     positioned, nowrap, some 40-68px font) are deliberately positioned past
     the viewport edge at narrow AND very wide widths, relying entirely on
     clipping rather than per-breakpoint repositioning (same approach the
     reference file itself uses). overflow-x on body alone is NOT enough:
     in standards mode the real scrolling element is <html>
     (document.documentElement), and body's own overflow only propagates up
     to replace the viewport's scrolling behaviour when BOTH exist in
     agreement -- found live via a real window.scrollTo() probe, not
     assumed: body had overflow-x:hidden yet the page still scrolled
     horizontally because html's own overflow-x was left at its 'visible'
     default. Both must be constrained. */
  overflow-x: hidden;
}

body.kn-login-page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  color: var(--ink-900);
  background: radial-gradient(1200px 700px at 30% 45%, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
}

a.kn-link { color: var(--red-link); }
a.kn-link:hover { color: var(--red-link-hover); }

[hidden] { display: none !important; }

/* ────────────────────────── ambient background ────────────────────────── */
.kn-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.kn-dotgrid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(43,47,54,0.10) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 32% 45%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse at 32% 45%, #000 0%, transparent 75%);
}
.kn-blob { position: absolute; border-radius: 50%; filter: blur(70px); will-change: transform; }
.kn-blob-1 { width: 560px; height: 560px; left: 14%; top: 16%; background: rgba(214,38,46,0.18); animation: blobA 22s ease-in-out infinite alternate; }
.kn-blob-2 { width: 480px; height: 480px; right: -6%; bottom: -12%; background: rgba(110,116,126,0.30); animation: blobB 26s ease-in-out infinite alternate; }
.kn-blob-3 { width: 360px; height: 360px; left: 40%; top: -10%; background: rgba(255,255,255,0.85); animation: blobB 30s ease-in-out infinite alternate-reverse; }
.kn-blob-4 { width: 300px; height: 300px; right: 18%; top: 10%; background: rgba(214,38,46,0.10); animation: blobA 28s ease-in-out infinite alternate-reverse; }
@keyframes blobA { 0%{transform:translate(0,0) scale(1)} 50%{transform:translate(-80px,60px) scale(1.12)} 100%{transform:translate(40px,-40px) scale(.95)} }
@keyframes blobB { 0%{transform:translate(0,0) scale(1)} 50%{transform:translate(90px,-50px) scale(1.08)} 100%{transform:translate(-30px,30px) scale(1.15)} }

/* ────────────────────────── floating verticals ────────────────────────── */
.kn-verticals {
  position: absolute; inset: 0; pointer-events: none;
  animation: fadeIn 2.5s ease calc(3.8s * var(--intro-scale)) both;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.vword {
  position: absolute; white-space: nowrap; font-family: var(--font-display);
  font-weight: 700; letter-spacing: -.01em; user-select: none;
  will-change: transform, opacity;
}
@keyframes driftA { 0%{transform:translate(0,0) rotate(0deg);opacity:.55} 50%{opacity:1} 100%{transform:translate(90px,-50px) rotate(2deg);opacity:.7} }
@keyframes driftB { 0%{transform:translate(0,0) rotate(0deg);opacity:.8} 50%{opacity:.45} 100%{transform:translate(-110px,40px) rotate(-2deg);opacity:1} }
@keyframes driftC { 0%{transform:translate(0,0);opacity:.6} 33%{transform:translate(50px,35px)} 66%{transform:translate(-30px,60px);opacity:1} 100%{transform:translate(70px,-20px);opacity:.5} }
@keyframes driftD { 0%{transform:translate(0,0) rotate(-1deg);opacity:1} 50%{transform:translate(-60px,-55px) rotate(1deg);opacity:.5} 100%{transform:translate(40px,-90px) rotate(0deg);opacity:.85} }
@keyframes driftE { 0%{transform:translate(0,0);opacity:.5} 100%{transform:translate(130px,25px);opacity:1} }
.vw-1  { left:5%;  top:17%; font-size:46px; color:rgba(43,47,54,.07);   filter:blur(.5px); animation:driftA 42s ease-in-out -6s  infinite alternate; }
.vw-2  { left:60%; top:9%;  font-size:68px; color:rgba(43,47,54,.055);  filter:blur(1.2px); animation:driftB 50s ease-in-out -12s infinite alternate; }
.vw-3  { left:38%; top:80%; font-size:40px; color:rgba(210,35,42,.08);  animation:driftC 46s ease-in-out -3s  infinite alternate; }
.vw-4  { left:66%; top:88%; font-size:30px; color:rgba(43,47,54,.08);   animation:driftA 54s ease-in-out -20s infinite alternate-reverse; }
.vw-5  { left:3%;  top:72%; font-size:34px; color:rgba(43,47,54,.07);   filter:blur(.6px); animation:driftD 48s ease-in-out -9s  infinite alternate; }
.vw-6  { left:26%; top:4%;  font-size:26px; color:rgba(43,47,54,.08);   animation:driftE 58s ease-in-out -15s infinite alternate; }
.vw-7  { left:16%; top:90%; font-size:28px; color:rgba(210,35,42,.07);  animation:driftC 40s ease-in-out -22s infinite alternate; }
.vw-8  { left:80%; top:33%; font-size:30px; color:rgba(210,35,42,.085); animation:driftE 44s ease-in-out -4s  infinite alternate-reverse; }
.vw-9  { left:50%; top:24%; font-size:22px; color:rgba(43,47,54,.09);   animation:driftB 52s ease-in-out -30s infinite alternate; }
.vw-10 { left:52%; top:64%; font-size:24px; color:rgba(43,47,54,.08);   animation:driftA 60s ease-in-out -18s infinite alternate-reverse; }
.vw-11 { left:1%;  top:44%; font-size:22px; color:rgba(43,47,54,.08);   animation:driftB 45s ease-in-out -11s infinite alternate; }
.vw-12 { left:58%; top:74%; font-size:20px; color:rgba(210,35,42,.075); animation:driftD 56s ease-in-out -27s infinite alternate; }
.vw-13 { left:34%; top:50%; font-size:18px; color:rgba(43,47,54,.08);   animation:driftC 38s ease-in-out -8s  infinite alternate; }
.vw-14 { left:87%; top:20%; font-size:20px; color:rgba(43,47,54,.09);   animation:driftD 41s ease-in-out -14s infinite alternate-reverse; }
.vw-15 { left:72%; top:58%; font-size:52px; color:rgba(43,47,54,.045);  filter:blur(1.5px); animation:driftE 62s ease-in-out -35s infinite alternate; }

/* ────────────────────────────── header / logo ──────────────────────────── */
.kn-header {
  position: relative; z-index: 3; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px clamp(20px,4vw,56px) 0;
}
.kn-logo-wrap {
  position: relative; width: min(340px,70vw); aspect-ratio: 1581/225;
  animation: logoDrop 1s var(--ease-out) calc(3.3s * var(--intro-scale)) both;
}
@keyframes logoDrop { from{opacity:0;transform:translateX(-30px);filter:blur(6px)} to{opacity:1;transform:none;filter:none} }
.kn-logo-img {
  display: block; width: 100%; height: 100%;
  filter: drop-shadow(-1px -1px 0 rgba(255,255,255,.95)) drop-shadow(1px 1.5px 0 rgba(60,64,70,.25)) drop-shadow(0 8px 14px rgba(110,10,16,.12));
}
.kn-logo-shine {
  position: absolute; inset: 0;
  -webkit-mask-image: url(/static/images/klsm-logos.png);
  mask-image: url(/static/images/klsm-logos.png);
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.95) 50%, transparent 60%);
  background-size: 260% 100%;
  animation: logoShine 5.5s cubic-bezier(.45,.05,.3,1) calc(4.2s * var(--intro-scale)) infinite both;
  mix-blend-mode: screen; pointer-events: none;
}
@keyframes logoShine { 0%{background-position:170% 0} 45%,100%{background-position:-70% 0} }

/* ────────────────────────────────── main ───────────────────────────────── */
.kn-main {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap;
  align-items: center; min-height: calc(100vh - 300px);
  padding: 24px clamp(20px,4vw,56px); gap: 48px;
}
.kn-hero {
  flex: 1 1 600px; min-width: 0; display: flex; flex-direction: column;
  align-items: center; gap: 34px;
}

/* ---- brand capsule ---- */
.kn-cap { position: relative; width: 100%; max-width: 720px; padding: 40px 40px 34px; }
@media (max-width: 720px) { .kn-cap { padding: 30px 24px; } }
.kn-cap-glass {
  position: absolute; inset: 0; border-radius: var(--r-capsule); overflow: hidden;
  background: linear-gradient(135deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.2) 55%, rgba(255,255,255,.4) 100%);
  border: 1px solid rgba(255,255,255,.85);
  backdrop-filter: blur(22px) saturate(185%); -webkit-backdrop-filter: blur(22px) saturate(185%);
  box-shadow: inset 0 1.5px 1px rgba(255,255,255,1), inset 0 -14px 28px rgba(255,255,255,.28),
              inset 14px 0 26px rgba(255,255,255,.18), inset -6px -6px 18px rgba(43,47,54,.06),
              0 34px 80px rgba(31,34,38,.16), 0 0 0 1px rgba(43,47,54,.04);
  animation: glassForm 1.2s var(--ease-out) calc(2.55s * var(--intro-scale)) both;
}
@supports not (backdrop-filter: blur(1px)) {
  .kn-cap-glass { background: rgba(255,255,255,.88); }
  .kn-card { background: rgba(255,255,255,.88) !important; }
}
@keyframes glassForm { 0%{opacity:0;transform:scale(.94);filter:blur(12px)} 60%{opacity:1} 100%{opacity:1;transform:none;filter:none} }
.kn-spec {
  position: absolute; left: 5%; right: 5%; top: 3px; height: 46%;
  border-radius: 40px 40px 50% 50% / 40px 40px 26px 26px;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(255,255,255,0));
  opacity: .65;
}
.kn-liquid { position: absolute; width: 46%; height: 120%; top: -10%; left: 0; filter: blur(34px); opacity: .55; }
.kn-liquid-1 { background: radial-gradient(circle, rgba(214,38,46,.55), rgba(214,38,46,0) 70%); animation: liquid1 14s ease-in-out infinite alternate; }
.kn-liquid-2 { background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); animation: liquid2 11s ease-in-out infinite alternate; }
.kn-liquid-3 { background: radial-gradient(circle, rgba(120,126,136,.45), rgba(120,126,136,0) 70%); animation: liquid1 17s ease-in-out -6s infinite alternate-reverse; }
@keyframes liquid1 { 0%{transform:translate(-10%,10%) scale(1);border-radius:42% 58% 63% 37%/45% 38% 62% 55%} 50%{transform:translate(60%,-20%) scale(1.2);border-radius:60% 40% 35% 65%/55% 60% 40% 45%} 100%{transform:translate(20%,30%) scale(.9);border-radius:42% 58% 63% 37%/45% 38% 62% 55%} }
@keyframes liquid2 { 0%{transform:translate(120%,0) scale(1.1)} 50%{transform:translate(30%,40%) scale(.85)} 100%{transform:translate(90%,-25%) scale(1.15)} }
.kn-radiate {
  position: absolute; inset: 0; border-radius: var(--r-capsule);
  border: 1.5px solid rgba(210,35,42,.32); box-shadow: 0 0 24px rgba(210,35,42,.12);
  animation: radiate 4.2s cubic-bezier(.2,.6,.3,1) infinite both; pointer-events: none;
}
.kn-radiate-1 { animation-delay: calc(3.3s * var(--intro-scale)); }
.kn-radiate-2 { animation-delay: calc(4.7s * var(--intro-scale)); }
.kn-radiate-3 { animation-delay: calc(6.1s * var(--intro-scale)); }
@keyframes radiate { 0%{transform:scale(1);opacity:0} 8%{opacity:.55} 100%{transform:scale(1.18,1.55);opacity:0} }
.kn-burst {
  position: absolute; left: 50%; top: 50%; width: 520px; height: 520px; margin: -260px 0 0 -260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.95) 0%, rgba(255,210,210,.5) 30%, rgba(210,35,42,0) 65%);
  animation: burst 1.4s cubic-bezier(.2,.7,.3,1) calc(2.6s * var(--intro-scale)) both;
  pointer-events: none;
}
@keyframes burst { 0%{transform:scale(.2);opacity:0} 30%{opacity:.9} 100%{transform:scale(2.2);opacity:0} }

/* ---- pixel title assembly ---- */
@keyframes pxFly { 0%{opacity:0;transform:translate(var(--fx),var(--fy)) rotate(var(--fr)) scale(.3)} 18%{opacity:1} 82%{transform:translate(0,0) rotate(0) scale(1.18)} 100%{opacity:1;transform:none} }
@keyframes pxGone { 0%{opacity:1;transform:none} 100%{opacity:0;transform:translate(var(--gx),var(--gy)) scale(.2)} }
@keyframes pxDebris { 0%{opacity:0;transform:translate(var(--fx),var(--fy)) scale(.4)} 25%{opacity:.9} 100%{opacity:0;transform:translate(0,0) scale(1.4)} }
.kn-pxw { position: relative; display: flex; align-items: center; justify-content: center; }
.kn-pxlayer { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); pointer-events: none; }
.kn-pxl {
  position: absolute; width: 6px; height: 6px; border-radius: 1.5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 2px 4px rgba(31,34,38,.18);
  will-change: transform, opacity;
}
.kn-pxl-k { box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 10px rgba(210,35,42,.55); }
.kn-lockflash {
  position: absolute; left: 50%; top: 50%; width: 340px; height: 110px; margin: -55px 0 0 -170px;
  border-radius: 50%; background: radial-gradient(ellipse, rgba(255,255,255,.95), rgba(255,255,255,0) 70%);
  animation: lock .9s ease-out calc(2.45s * var(--intro-scale)) both; pointer-events: none;
}
.kn-lockflash-b { animation-delay: calc(2.85s * var(--intro-scale)); }
@keyframes lock { 0%{opacity:0;transform:scale(.6)} 35%{opacity:.95;transform:scale(1.05)} 100%{opacity:0;transform:scale(1.3)} }

/* ---- wordmarks ---- */
.kn-wm {
  position: relative; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(34px,4vw,50px); line-height: 1; letter-spacing: -.02em;
  width: fit-content; min-height: 1em;
  animation: resolve .8s var(--ease-out) calc(2.65s * var(--intro-scale)) both;
}
.kn-wm-b { animation-delay: calc(3.05s * var(--intro-scale)); }
@keyframes resolve { 0%{opacity:0;filter:blur(8px);transform:scale(1.06)} 100%{opacity:1;filter:blur(0);transform:none} }
.kn-wm-text { color: var(--ink-800); text-shadow: 0 1px 0 rgba(255,255,255,.95), 0 -1px 0 rgba(0,0,0,.16), 0 10px 22px rgba(43,47,54,.14); }
.kn-wm-k { color: var(--red-500); animation: kPulse 3.2s ease-in-out calc(3s * var(--intro-scale)) infinite; }
@keyframes kPulse { 0%,100%{text-shadow:0 1px 0 rgba(255,255,255,.9),0 -1px 0 rgba(90,0,0,.25),0 6px 16px rgba(210,35,42,.25)} 50%{text-shadow:0 1px 0 rgba(255,255,255,.9),0 -1px 0 rgba(90,0,0,.25),0 6px 30px rgba(210,35,42,.6)} }
.kn-wm-shine {
  position: absolute; inset: 0; color: transparent;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.95) 48%, rgba(255,215,215,.9) 52%, transparent 65%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text;
  animation: textShine 6s ease-in-out calc(3.4s * var(--intro-scale)) infinite both;
  pointer-events: none;
}
.kn-wm-shine-b { animation-delay: calc(4.2s * var(--intro-scale)); }
@keyframes textShine { 0%{background-position:160% 0} 40%,100%{background-position:-60% 0} }
.kn-streak {
  position: absolute; left: -30%; right: -30%; top: 50%; height: 2px; margin-top: -1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95) 45%, rgba(255,190,190,1) 50%, rgba(255,255,255,.95) 55%, transparent);
  box-shadow: 0 0 18px rgba(255,255,255,.9), 0 0 40px rgba(210,35,42,.35);
  animation: streak 1.1s var(--ease-out) calc(2.5s * var(--intro-scale)) both;
  pointer-events: none;
}
@keyframes streak { 0%{transform:scaleX(0);opacity:0} 30%{opacity:1} 100%{transform:scaleX(1);opacity:0} }

/* ---- vertical divider ---- */
.kn-vdiv {
  position: relative; align-self: stretch; width: 1.5px; min-height: 90px;
  background: linear-gradient(transparent, rgba(43,47,54,.38) 25%, rgba(210,35,42,.55) 50%, rgba(43,47,54,.38) 75%, transparent);
  animation: divGrow .9s var(--ease-out) calc(2.7s * var(--intro-scale)) both;
}
@keyframes divGrow { from{transform:scaleY(0);opacity:0} to{transform:scaleY(1);opacity:1} }
.kn-vdiv::after {
  content: ""; position: absolute; left: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  border-radius: 50%; background: var(--red-500); box-shadow: 0 0 10px rgba(210,35,42,.8);
  animation: divDot 3.2s ease-in-out calc(3.2s * var(--intro-scale)) infinite both;
}
@keyframes divDot { 0%{top:0;opacity:0} 10%{opacity:1} 90%{opacity:1} 100%{top:100%;opacity:0} }
@media (max-width: 720px) { .kn-vdiv { display: none; } }

/* ---- brand hero layout + full forms ---- */
.kn-brandrow { position: relative; display: flex; align-items: flex-start; justify-content: center; gap: clamp(20px,3vw,40px); flex-wrap: wrap; }
.kn-brandcol { flex: 1 1 240px; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
@media (max-width: 720px) { .kn-brandrow { flex-direction: column; } }

.kn-ff { display: flex; flex-wrap: wrap; gap: 0 5px; margin-top: 14px; max-width: 290px; justify-content: center;
         font: 600 10.5px/1.5 var(--font-body); letter-spacing: .11em; text-transform: uppercase; color: var(--ink-500); }
.kn-ff-w { display: inline-block; animation: wordIn .55s var(--ease-out) both; }
@keyframes wordIn { from{opacity:0;transform:translateY(6px);filter:blur(4px)} to{opacity:1;transform:none;filter:none} }
.kn-ff .kn-ini { font-weight: 800; color: var(--ink-900); animation: iniGlow 7s ease-in-out infinite; }
.kn-ff .kn-ini-k { color: var(--red-500); }
@keyframes iniGlow { 0%,8%{text-shadow:none} 3%{text-shadow:0 0 10px rgba(210,35,42,.75),0 0 2px rgba(210,35,42,.6)} }

/* word/initial stagger positions -- KONeCT: base 3.30s / step .06s (8 slots,
   6 bold initials, base 4.30s / step .3s). KoMPASS: base 3.60s / step .06s
   (8 slots, 7 bold initials -- Product Decision #5 -- base 4.30s / step .3s,
   one extra step for the new "Operational" word). */
.kn-konect .kn-ff-pos-1{animation-delay:calc(3.30s * var(--intro-scale))}
.kn-konect .kn-ff-pos-2{animation-delay:calc(3.36s * var(--intro-scale))}
.kn-konect .kn-ff-pos-3{animation-delay:calc(3.42s * var(--intro-scale))}
.kn-konect .kn-ff-pos-4{animation-delay:calc(3.48s * var(--intro-scale))}
.kn-konect .kn-ff-pos-5{animation-delay:calc(3.54s * var(--intro-scale))}
.kn-konect .kn-ff-pos-6{animation-delay:calc(3.60s * var(--intro-scale))}
.kn-konect .kn-ff-pos-7{animation-delay:calc(3.66s * var(--intro-scale))}
.kn-konect .kn-ff-pos-8{animation-delay:calc(3.72s * var(--intro-scale))}
.kn-konect .kn-ini-pos-1{animation-delay:calc(4.30s * var(--intro-scale))}
.kn-konect .kn-ini-pos-2{animation-delay:calc(4.60s * var(--intro-scale))}
.kn-konect .kn-ini-pos-3{animation-delay:calc(4.90s * var(--intro-scale))}
.kn-konect .kn-ini-pos-4{animation-delay:calc(5.20s * var(--intro-scale))}
.kn-konect .kn-ini-pos-5{animation-delay:calc(5.50s * var(--intro-scale))}
.kn-konect .kn-ini-pos-6{animation-delay:calc(5.80s * var(--intro-scale))}

.kn-kompass .kn-ff-pos-1{animation-delay:calc(3.60s * var(--intro-scale))}
.kn-kompass .kn-ff-pos-2{animation-delay:calc(3.66s * var(--intro-scale))}
.kn-kompass .kn-ff-pos-3{animation-delay:calc(3.72s * var(--intro-scale))}
.kn-kompass .kn-ff-pos-4{animation-delay:calc(3.78s * var(--intro-scale))}
.kn-kompass .kn-ff-pos-5{animation-delay:calc(3.84s * var(--intro-scale))}
.kn-kompass .kn-ff-pos-6{animation-delay:calc(3.90s * var(--intro-scale))}
.kn-kompass .kn-ff-pos-7{animation-delay:calc(3.96s * var(--intro-scale))}
.kn-kompass .kn-ff-pos-8{animation-delay:calc(4.02s * var(--intro-scale))}
.kn-kompass .kn-ini-pos-1{animation-delay:calc(4.30s * var(--intro-scale))}
.kn-kompass .kn-ini-pos-2{animation-delay:calc(4.60s * var(--intro-scale))}
.kn-kompass .kn-ini-pos-3{animation-delay:calc(4.90s * var(--intro-scale))}
.kn-kompass .kn-ini-pos-4{animation-delay:calc(5.20s * var(--intro-scale))}
.kn-kompass .kn-ini-pos-5{animation-delay:calc(5.50s * var(--intro-scale))}
.kn-kompass .kn-ini-pos-6{animation-delay:calc(5.80s * var(--intro-scale))}
.kn-kompass .kn-ini-pos-7{animation-delay:calc(6.10s * var(--intro-scale))}

/* ---- tagline ---- */
.kn-tag { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; max-width: 620px;
          animation: rise .9s var(--ease-out) calc(3.7s * var(--intro-scale)) both; }
@keyframes rise { from{opacity:0;transform:translateY(24px) scale(.98)} to{opacity:1;transform:none} }
.kn-tag-h { margin: 0; font-family: var(--font-display); font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: var(--ink-800); }
.kn-tag-p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-500); }

/* ────────────────────────────── login card ─────────────────────────────── */
.kn-card-col { flex: 1 1 420px; display: flex; justify-content: center; min-width: 0; }
.kn-card {
  position: relative; overflow: hidden; width: 100%; max-width: 440px; padding: 40px 38px 34px;
  border-radius: var(--r-card);
  background: linear-gradient(160deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.32) 100%);
  border: 1px solid rgba(255,255,255,.75);
  backdrop-filter: blur(26px) saturate(160%); -webkit-backdrop-filter: blur(26px) saturate(160%);
  box-shadow: 0 40px 90px rgba(31,34,38,.18), 0 2px 0 rgba(255,255,255,.7) inset, 0 -1px 0 rgba(43,47,54,.06) inset;
  animation: cardIn 1.2s var(--ease-out) calc(3.6s * var(--intro-scale)) both;
}
@keyframes cardIn { 0%{opacity:0;transform:perspective(1200px) translateX(60px) rotateY(-14deg) scale(.96);filter:blur(10px)} 100%{opacity:1;transform:none;filter:none} }
.kn-card-sheen { position: absolute; top: 0; width: 40%; height: 1px; background: linear-gradient(90deg,transparent,rgba(255,255,255,1),transparent); animation: edgeSheen 6s ease-in-out infinite; }
@keyframes edgeSheen { 0%{left:-40%} 60%,100%{left:120%} }
.kn-card-bar { position: absolute; top: 0; left: 38px; width: 56px; height: 4px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--red-400), var(--red-800)); }

.kn-form { display: flex; flex-direction: column; gap: 18px; }
.kn-form > * { animation: rise .7s var(--ease-out) both; }
.kn-form > *:nth-child(1){animation-delay:calc(4.00s * var(--intro-scale))}
.kn-form > *:nth-child(2){animation-delay:calc(4.08s * var(--intro-scale))}
.kn-form > *:nth-child(3){animation-delay:calc(4.16s * var(--intro-scale))}
.kn-form > *:nth-child(4){animation-delay:calc(4.24s * var(--intro-scale))}
.kn-form > *:nth-child(5){animation-delay:calc(4.32s * var(--intro-scale))}
.kn-form > *:nth-child(6){animation-delay:calc(4.40s * var(--intro-scale))}
.kn-form > *:nth-child(7){animation-delay:calc(4.48s * var(--intro-scale))}
.kn-form > *:nth-child(8){animation-delay:calc(4.56s * var(--intro-scale))}

.kn-card-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.kn-card-head h1 { margin: 0; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em; color: var(--ink-900); }
.kn-card-head p { margin: 0; font-size: 15px; color: var(--ink-500); }

/* error banner */
.kn-error {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r-field);
  background: rgba(210,35,42,.08); border: 1px solid rgba(210,35,42,.25); color: var(--red-800);
  font-size: 13.5px; line-height: 1.5;
}
.kn-error svg { flex: 0 0 auto; margin-top: 1px; }
@keyframes kn-shake { 0%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} 100%{transform:translateX(0)} }
.kn-card.kn-shake { animation: kn-shake .4s both, cardIn 1.2s var(--ease-out) calc(3.6s * var(--intro-scale)) both; }

.kn-field-group { display: flex; flex-direction: column; gap: 8px; }
.kn-field-group label { font-size: 13px; font-weight: 600; color: var(--ink-700); }
.kn-field { position: relative; display: flex; align-items: center; }
.kn-field .kn-ico { position: absolute; left: 16px; color: var(--ink-400); pointer-events: none; transition: color .2s; }
.kn-inp {
  width: 100%; height: 52px; padding: 0 48px 0 46px; border-radius: var(--r-field);
  border: 1px solid rgba(255,255,255,.85); background: rgba(255,255,255,.55);
  font: 500 15px var(--font-body); color: var(--ink-900); outline: none;
  box-shadow: inset 0 1px 2px rgba(31,34,38,.06);
  transition: border-color .2s, box-shadow .25s, background .2s;
}
.kn-inp::placeholder { color: #7D828A; }
.kn-inp:hover { background: rgba(255,255,255,.7); }
.kn-inp:focus { border-color: var(--red-500); background: rgba(255,255,255,.85); box-shadow: 0 0 0 4px rgba(210,35,42,.14), inset 0 1px 2px rgba(31,34,38,.04); }
.kn-field:focus-within .kn-ico { color: var(--red-500); }
.kn-inp[aria-invalid="true"] { border-color: var(--red-500); }
.kn-field-err { font-size: 12px; color: var(--red-500); margin-top: -2px; }

.kn-eye {
  position: absolute; right: 6px; width: 44px; height: 44px; border: 0; background: transparent;
  border-radius: 10px; color: var(--ink-400); cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: color .2s, background .2s;
}
.kn-eye:hover { color: var(--red-500); background: rgba(210,35,42,.08); }
.kn-eye:focus-visible { outline: 3px solid rgba(210,35,42,.3); outline-offset: 2px; }

.kn-btn-primary {
  position: relative; overflow: hidden; height: 54px; border: 0; border-radius: var(--r-field);
  cursor: pointer; color: #fff; font: 600 16px var(--font-body); letter-spacing: .01em;
  background: linear-gradient(135deg, var(--red-400) 0%, var(--red-600) 55%, var(--red-800) 100%);
  box-shadow: 0 10px 24px rgba(196,26,34,.32), inset 0 1px 0 rgba(255,255,255,.35);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: transform .2s, box-shadow .25s; width: 100%; min-height: 44px;
}
.kn-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(196,26,34,.4), inset 0 1px 0 rgba(255,255,255,.35); }
.kn-btn-primary:active { transform: translateY(0) scale(.99); }
.kn-btn-primary:focus-visible { outline: 3px solid rgba(210,35,42,.35); outline-offset: 3px; }
.kn-btn-primary::after { content:""; position:absolute; top:0; left:-60%; width:40%; height:100%; background:linear-gradient(100deg,transparent,rgba(255,255,255,.35),transparent); transform:skewX(-20deg); }
.kn-btn-primary:hover::after { animation: btnShine .9s ease; }
@keyframes btnShine { 0%{left:-60%} 100%{left:130%} }
.kn-btn-primary .kn-arrow { transition: transform .25s; }
.kn-btn-primary:hover .kn-arrow { transform: translateX(5px); }
.kn-btn-primary:disabled { cursor: default; opacity: .9; }
.kn-spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to{transform:rotate(360deg)} }

.kn-divider { display: flex; align-items: center; gap: 14px; color: #8A8E95; font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.kn-divider .kn-rule { flex: 1; height: 1px; background: linear-gradient(90deg,transparent,rgba(43,47,54,.2)); }
.kn-divider .kn-rule.kn-rule-r { background: linear-gradient(90deg,rgba(43,47,54,.2),transparent); }

.kn-btn-ghost {
  height: 52px; min-height: 44px; border-radius: var(--r-field); cursor: pointer;
  border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.5); color: var(--ink-800);
  font: 600 15px var(--font-body); display: flex; align-items: center; justify-content: center; gap: 12px;
  transition: background .2s, transform .2s, box-shadow .2s; text-decoration: none; width: 100%;
}
.kn-btn-ghost:hover { background: rgba(255,255,255,.85); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(31,34,38,.08); }
.kn-btn-ghost:focus-visible { outline: 3px solid rgba(43,47,54,.25); outline-offset: 3px; }

/* ──────────────────────────────── sea scene ────────────────────────────── */
@keyframes sail { from{left:-380px} to{left:100%} }
@keyframes bob { 0%,100%{transform:translateY(0) rotate(-.7deg)} 50%{transform:translateY(2px) rotate(.6deg)} }
@keyframes puff { 0%{transform:translate(0,0) scale(.35);opacity:0} 12%{opacity:.95} 100%{transform:translate(-78px,-52px) scale(2.9);opacity:0} }
@keyframes waveX { from{transform:translateX(0)} to{transform:translateX(-960px)} }
@keyframes waveX2 { from{transform:translateX(-960px)} to{transform:translateX(0)} }
@keyframes bowFoam { 0%,100%{transform:scale(1,1)} 50%{transform:scale(1.15,.85)} }
@keyframes washDash { to{stroke-dashoffset:-40} }
@keyframes cloudDrift { from{transform:translateX(0)} to{transform:translateX(160px)} }
@keyframes flap { 0%,100%{transform:scaleY(1)} 50%{transform:scaleY(-.6)} }
@keyframes gullFly { 0%{transform:translate(0,0)} 50%{transform:translate(60px,-8px)} 100%{transform:translate(120px,4px)} }
@keyframes glitter { 0%,100%{opacity:0;transform:scale(.4)} 50%{opacity:1;transform:scale(1)} }
.kn-sea {
  position: relative; z-index: 1; height: 190px; margin: 0 0 20px; pointer-events: none; overflow: hidden;
  animation: seaRise 1.4s var(--ease-out) calc(4.2s * var(--intro-scale)) both;
  -webkit-mask-image: linear-gradient(90deg,transparent 0,#000 7%,#000 93%,transparent 100%);
  mask-image: linear-gradient(90deg,transparent 0,#000 7%,#000 93%,transparent 100%);
}
@keyframes seaRise { from{opacity:0;transform:translateY(60px)} to{opacity:1;transform:none} }
.kn-sea-layer { position: absolute; left: 0; width: 3840px; -webkit-mask-image: linear-gradient(#000 20%,transparent); mask-image: linear-gradient(#000 20%,transparent); }
.kn-cloud { position: absolute; width: 70px; height: 22px; border-radius: 22px; background: #fff; opacity: .85;
            box-shadow: 22px -12px 0 4px #fff, -16px -6px 0 2px #fff, 44px -2px 0 -2px #fff;
            filter: drop-shadow(0 4px 6px rgba(120,140,160,.15)); }
.kn-cloud-1 { left: 18%; top: 30px; animation: cloudDrift 60s ease-in-out infinite alternate; }
.kn-cloud-2 { left: 64%; top: 46px; animation: cloudDrift 80s ease-in-out -20s infinite alternate-reverse; }
.kn-gull { position: absolute; animation: gullFly 9s ease-in-out infinite alternate; }
.kn-gull svg { animation: flap .5s ease-in-out infinite; }
.kn-gull-1 { left: 40%; top: 34px; }
.kn-gull-2 { left: 43%; top: 50px; animation-delay: -3s; }
.kn-ship { position: absolute; bottom: 44px; width: 320px; height: 150px; animation: sail 42s linear calc(4.6s * var(--intro-scale)) infinite both; }
.kn-ship-bob { position: absolute; inset: 0; transform-origin: 60% 85%; animation: bob 4.2s ease-in-out infinite; }
.kn-smoke { position: absolute; left: 35px; top: -2px; width: 16px; height: 16px; border-radius: 50%;
            background: radial-gradient(circle at 38% 34%,#fff 0%,#eef0f2 45%,#cfd3d8 80%,rgba(207,211,216,0) 100%);
            box-shadow: inset -2px -3px 4px rgba(110,116,126,.25); animation: puff 3.6s cubic-bezier(.25,.6,.4,1) infinite; }
.kn-smoke:nth-child(1){animation-delay:0s}
.kn-smoke:nth-child(2){animation-delay:.9s}
.kn-smoke:nth-child(3){animation-delay:1.8s}
.kn-smoke:nth-child(4){animation-delay:2.7s}
.kn-wake { position: absolute; left: -250px; top: 116px; width: 272px; height: 14px; clip-path: polygon(0 42%,100% 0,100% 100%,0 58%); background: linear-gradient(90deg,rgba(255,255,255,0),rgba(255,255,255,.95)); }
.kn-wake-foam { position: absolute; left: -210px; top: 119px; width: 230px; height: 8px; clip-path: polygon(0 40%,100% 0,100% 100%,0 60%);
                background: repeating-linear-gradient(90deg,rgba(255,255,255,.95) 0 9px,transparent 9px 26px);
                -webkit-mask-image: linear-gradient(90deg,transparent,#000 70%); mask-image: linear-gradient(90deg,transparent,#000 70%);
                animation: foamRun .6s linear infinite; }
@keyframes foamRun { from{background-position-x:0} to{background-position-x:-52px} }
.kn-bow-foam { transform-box: fill-box; transform-origin: 20% 80%; animation: bowFoam .9s ease-in-out infinite; }
.kn-wash { stroke-dasharray: 10 10; animation: washDash .5s linear infinite; }
.kn-glit { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; animation: glitter 2.6s ease-in-out infinite; }
.kn-glit-1 { left: 22%; top: 140px; }
.kn-glit-2 { left: 47%; top: 152px; animation-delay: .9s; }
.kn-glit-3 { left: 71%; top: 138px; animation-delay: 1.7s; }
.kn-glit-4 { left: 86%; top: 156px; animation-delay: 2.2s; }

/* ───────────────────────────── cinematic intro ─────────────────────────── */
.kn-veil {
  position: absolute; inset: 0; z-index: 20; pointer-events: none;
  background: radial-gradient(ellipse at 32% 45%, #3A3F46 0%, #1F2226 70%);
  animation: veilOut 1.3s var(--ease-letterbox) .2s both;
}
@keyframes veilOut { 0%{opacity:1} 100%{opacity:0;visibility:hidden} }
.kn-lbar { position: absolute; left: 0; right: 0; height: 11vh; z-index: 21; background: var(--letterbox); pointer-events: none; animation: barTop 2.6s var(--ease-letterbox) both; }
.kn-lbar-top { top: 0; transform-origin: top; }
.kn-lbar-bottom { bottom: 0; transform-origin: bottom; }
@keyframes barTop { 0%,30%{transform:scaleY(1)} 100%{transform:scaleY(0)} }

/* short intro: skip veil/letterbox entirely, everything else scaled via
   --intro-scale (set to .25 by login-intro.js). */
.kn-intro-short { --intro-scale: .25; }
.kn-intro-short .kn-veil, .kn-intro-short .kn-lbar { display: none; }

/* ─────────────────────────── skip-intro (kn-intro-done) ───────────────────
   Fast-forward to the settled state on any click/key/touch, or on focusing
   username/password -- SPEC §9. .kn-once tags every ONE-SHOT intro reveal
   animation; .kn-loop tags every ambient/infinite one. Skipping forces
   one-shots to their end state instantly and lets loops just start now
   (keeping their natural duration, so they don't look broken afterwards). */
.kn-once { }
.kn-loop { }
/* .kn-form > * (the 8 card children: heading block, error banner, both
   field groups, the submit button, the divider, the SSO link) are their
   own one-shot `rise` reveal, same shape as .kn-once, but were never ALSO
   given the .kn-once class (they already carry their own nth-child-based
   stagger selector) -- found live via a reduced-motion screenshot that
   showed a fully blank card: without this line, skipping the intro or
   emulating reduced motion correctly fast-forwarded everything tagged
   .kn-once, but the form's own contents still sat on their ORIGINAL
   ~4s-plus delay and simply hadn't appeared yet. Listed explicitly
   alongside .kn-once in both rules below rather than retrofitted onto the
   template, since the selector already uniquely identifies them. */
.kn-intro-done .kn-once, .kn-intro-done .kn-form > * { animation-delay: 0s !important; animation-duration: .01s !important; }
.kn-intro-done .kn-loop { animation-delay: 0s !important; }
.kn-intro-done .kn-veil, .kn-intro-done .kn-lbar, .kn-intro-done .kn-pxlayer, .kn-intro-done .kn-burst,
.kn-intro-done .kn-streak, .kn-intro-done .kn-lockflash { display: none !important; }

/* tag every element above with .kn-once / .kn-loop via the template; this
   block exists so the rule above has something to select even before the
   template-level classes are added by a reviewer -- harmless no-op rule. */

/* pause all ambient animation while the tab is hidden (visibilitychange,
   login.js) -- SPEC §11. */
.kn-paused, .kn-paused * { animation-play-state: paused !important; }

/* ─────────────────────────────── responsive ────────────────────────────── */
@media (max-width: 1099px) {
  .kn-main { flex-direction: column; }
}

/* ───────────────────────────── reduced motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .kn-veil, .kn-lbar, .kn-pxlayer, .kn-burst, .kn-streak, .kn-lockflash { display: none !important; }
  .kn-once, .kn-form > * { animation: fadeIn .2s ease both !important; }
  .kn-loop { animation: none !important; }
  .kn-ship { left: 20% !important; animation: none !important; }
  .kn-ship-bob { animation: none !important; }
  .kn-smoke { display: none !important; }
  .kn-sea-layer { animation: none !important; }
  .kn-verticals { animation: none !important; opacity: 1; }
}
