/* hero preview: one motion. Chores fly into the KOSMA dot, the dot opens into the calm page. Pure CSS clock (~2.3s), plays once. */
:root { --ink: #111; --mute: #8d877b; --cream: #f7f3ec; --pill: #ece6da; --my: clamp(36px, 3vw, 48px); --ph: 44px; --bh: 40px; --pw: min(1100px, calc(100vw - 48px)); --x0: calc((100vw - var(--pw)) / 2); --ease: cubic-bezier(.65, 0, .35, 1); }
@media (max-width: 699px) { :root { --my: 20px; --ph: 40px; --bh: 36px; --pw: calc(100vw - 32px); } }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
p, h1 { margin: 0; }

#mh { position: fixed; left: var(--x0); top: var(--my); width: var(--pw); height: var(--ph); display: flex; align-items: center; justify-content: space-between; z-index: 5; }
#mh .mk { display: flex; align-items: center; }
/* wordmark: K + the dotted logo as the O + SMA, one inline run so the logo shares the letters' baseline and cap height */
#mwm { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1; color: var(--ink); white-space: nowrap; }
#mc { display: inline-block; width: .7em; height: .7em; margin: 0 .03em 0 .04em; vertical-align: -.015em; }
#mj { height: var(--bh); padding: 0 22px; border: 0; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 15px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; }
#mj:hover, .jb:hover { background: #2b2926; }
#mj:focus-visible, .jb:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }


/* dot grid: fills the hero only, clipped at its bottom edge, behind the headline. */
#hero { position: relative; overflow: hidden; touch-action: pan-y; }
#rv.pre { visibility: hidden; }
#dg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: block; }

@property --b { syntax: "<number>"; inherits: false; initial-value: 0; }
#rv { position: relative; z-index: 1; width: var(--pw); margin: 0 auto; padding: clamp(104px, 10.4vw, 150px) 0 56px; display: flex; flex-direction: column; align-items: center; text-align: center; }
#hl { font-size: clamp(46px, 11.2vw, 168px); line-height: .98; font-weight: 700; letter-spacing: -.045em; color: var(--ink); text-wrap: balance; }
#hl .w { display: inline-block; animation: settle 1.8s var(--ease) both; }
#hl .w:last-child { animation-delay: .12s; }
@keyframes settle { from { opacity: 0; transform: translateY(.14em); } to { opacity: 1; transform: none; } }
/* "creative": liquid colour. Big soft radial blobs in the cover-art palette drift and melt into each other (no image tiles, no hard edges), clipped to the letters. */
@property --x1 { syntax: "<percentage>"; inherits: false; initial-value: 10%; }
@property --y1 { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --x2 { syntax: "<percentage>"; inherits: false; initial-value: 40%; }
@property --y2 { syntax: "<percentage>"; inherits: false; initial-value: 80%; }
@property --x3 { syntax: "<percentage>"; inherits: false; initial-value: 70%; }
@property --y3 { syntax: "<percentage>"; inherits: false; initial-value: 20%; }
@property --x4 { syntax: "<percentage>"; inherits: false; initial-value: 95%; }
@property --y4 { syntax: "<percentage>"; inherits: false; initial-value: 70%; }
@property --x5 { syntax: "<percentage>"; inherits: false; initial-value: 55%; }
@property --y5 { syntax: "<percentage>"; inherits: false; initial-value: 50%; }
#hl .cr { display: inline-block; padding: 0 .04em .08em; margin-bottom: -.08em;
  color: transparent; -webkit-text-fill-color: transparent; -webkit-background-clip: text; background-clip: text;
  background-image:
    linear-gradient(rgba(17, 17, 17, calc(var(--b) * 1)), rgba(17, 17, 17, calc(var(--b) * 1))),
    radial-gradient(60% 130% at var(--x1) var(--y1), #fe5484 0%, rgba(254, 84, 132, .55) 38%, rgba(254, 84, 132, 0) 78%),
    radial-gradient(55% 120% at var(--x2) var(--y2), #01bdfb 0%, rgba(1, 189, 251, .55) 40%, rgba(1, 189, 251, 0) 80%),
    radial-gradient(52% 125% at var(--x3) var(--y3), #5fe68f 0%, rgba(95, 230, 143, .5) 38%, rgba(95, 230, 143, 0) 78%),
    radial-gradient(58% 130% at var(--x4) var(--y4), #cc241b 0%, rgba(204, 36, 27, .55) 40%, rgba(204, 36, 27, 0) 80%),
    radial-gradient(70% 140% at var(--x5) var(--y5), #0087ca 0%, rgba(0, 135, 202, .6) 45%, rgba(0, 135, 202, 0) 85%),
    linear-gradient(100deg, #005b8c, #0087ca 35%, #9e696f 70%, #cc241b);
  background-repeat: no-repeat;
  animation: bloom 1.8s var(--ease) both, ink1 9s ease-in-out infinite alternate, ink2 12s ease-in-out -3s infinite alternate, ink3 10s ease-in-out -6s infinite alternate, ink4 14s ease-in-out -2s infinite alternate, ink5 11s ease-in-out -8s infinite alternate; }
@keyframes bloom { from { --b: 1; opacity: .9; } to { --b: 0; opacity: 1; } }
@keyframes ink1 { from { --x1: 0%; --y1: 20%; } to { --x1: 60%; --y1: 90%; } }
@keyframes ink2 { from { --x2: 20%; --y2: 100%; } to { --x2: 85%; --y2: 10%; } }
@keyframes ink3 { from { --x3: 90%; --y3: 0%; } to { --x3: 25%; --y3: 70%; } }
@keyframes ink4 { from { --x4: 100%; --y4: 90%; } to { --x4: 40%; --y4: 20%; } }
@keyframes ink5 { from { --x5: 15%; --y5: 60%; } to { --x5: 80%; --y5: 40%; } }
.cta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px; margin-top: clamp(24px, 3.2vw, 40px); }
.bdg, .jb { display: inline-flex; align-items: center; height: 48px; flex: none; }
.bdg { padding: 0 20px 0 15px; gap: 10px; border-radius: 12px; background: var(--ink); color: #fff; user-select: none; }
.bdg svg { width: 24px; height: 28px; flex: none; fill: #fff; }
.bdg .tx { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.bdg small { font-size: 11px; letter-spacing: .01em; }
.bdg .bb { font-size: 21px; font-weight: 600; letter-spacing: -.02em; margin-top: 3px; }
.jb { padding: 0 26px; border: 0; border-radius: 999px; background: var(--ink); color: var(--cream); font-size: 16px; white-space: nowrap; }


@media (max-width: 699px) {
  #rv { padding-top: 112px; }
  #hl { font-size: clamp(46px, 17vw, 70px); }
  .bdg, .jb { height: 44px; }
  .bdg { padding: 0 16px 0 12px; gap: 8px; }
  .jb { padding: 0 20px; font-size: 15px; }
  .bdg svg { width: 21px; height: 25px; }
  .bdg small { font-size: 10px; }
  .bdg .bb { font-size: 18px; margin-top: 2px; }
  .cta { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #hl .w, #hl .cr { animation: none; }
  #hl .cr { --b: 0; }
}

/* typed headline: one character per tick, caret follows, "creative" blooms once typed, then the CTA eases in. Reduced motion: no .ty class, final state. */
.ty #hl .w { animation: none; }
.ty #hl { position: relative; }
.ty #hl .ch { visibility: hidden; }
.ty #hl .ch.on { visibility: visible; }
.ty #hl .cr { --b: 1; animation: ink1 9s ease-in-out infinite alternate, ink2 12s ease-in-out -3s infinite alternate, ink3 10s ease-in-out -6s infinite alternate, ink4 14s ease-in-out -2s infinite alternate, ink5 11s ease-in-out -8s infinite alternate; }
.ty #hl .cr.bl { animation: bloom 1.3s var(--ease) both, ink1 9s ease-in-out infinite alternate, ink2 12s ease-in-out -3s infinite alternate, ink3 10s ease-in-out -6s infinite alternate, ink4 14s ease-in-out -2s infinite alternate, ink5 11s ease-in-out -8s infinite alternate; }
#hcar { position: absolute; left: 0; top: 0; width: .045em; border-radius: 1px; background: var(--ink); opacity: 0; pointer-events: none; }
#hcar.on { opacity: 1; }
#hcar.blink { animation: hblink .4s steps(1) 2; }
#hcar.off { opacity: 0; transition: opacity .3s ease; }
@keyframes hblink { 0% { opacity: 1; } 50% { opacity: 0; } }
.ty .cta { opacity: 0; transform: translateY(10px); }
.ty .cta.in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
#hcar.wait { opacity: 1; }
/* typing is the product moment, so it plays for everyone; reduced motion only drops the flowing colour and the bloom */
@media (prefers-reduced-motion: reduce) { .ty #hl .cr, .ty #hl .cr.bl { animation: none; --b: 0; } .ty .cta.in { transition: none; } }
