/* Klára Scholleová — homepage (scenes, keycap, plucked staff) */
@font-face {
  font-family: 'Geist Pixel Square';
  src: url('fonts/geist-pixel-square.woff2') format('woff2');
  font-display: swap;
}

:root {
  --blue: #2B3BFF;
  --ink: #0B0B0B;
  --lime: #DCFF3D;
  --mist: #F6F7F9;
  --grey: #474C53;
  --grey-2: #6A7078;
  --pad: clamp(20px, 5vw, 80px);
  --H: 900px;            /* viewport height, capped; set by JS */
  --hdr: 64px;           /* height scenes must clear on phones */
  --pix: 'Geist Pixel Square', ui-monospace, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
@media (max-width: 719px) { :root { --pad: 20px; --hdr: 60px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--mist);
  color: var(--ink);
  font-family: 'Schibsted Grotesk', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--lime); color: var(--ink); }
.pix { font-family: var(--pix); font-weight: 400; }
.lnk { transition: opacity .2s; }
.lnk:hover { opacity: .6; }
.u { border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- background ---------- */
#bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, #F6F7F9 0%, #EEF1F5 100%);
}

/* ---------- keycap ---------- */
.key {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--pix); color: var(--ink); background: var(--lime);
  border: 1.5px solid var(--ink); border-bottom-width: 6px; border-radius: 10px;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  transform: perspective(500px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .35s cubic-bezier(.3, 1.9, .45, 1), border-bottom-width .1s;
}
.key:active { transform: perspective(500px) translateY(4px); border-bottom-width: 2px; transition: transform .06s, border-bottom-width .06s; }
.key.sm { font-size: 17px; padding: 9px 16px 7px; }
.key.lg { font-size: clamp(28px, 4vw, 56px); padding: .32em .6em .26em; border-width: 2px; border-bottom-width: 12px; border-radius: 18px; }
.key.lg:active { border-bottom-width: 4px; transform: perspective(500px) translateY(8px); }
.key.ink { background: var(--ink); color: var(--lime); }
.key:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 0) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -70px) scale(1); } }
.pop {
  position: absolute; left: 50%; top: -8px; pointer-events: none;
  font-family: var(--pix); font-size: 28px; color: var(--ink); background: var(--lime);
  padding: 2px 6px; border-radius: 4px; animation: pop 1.1s ease-out forwards;
}

/* ---------- nav ---------- */
#navbg {
  position: fixed; top: 0; left: 0; right: 0; z-index: 7; pointer-events: none;
  height: 84px; background: rgba(246, 247, 249, .84);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(11, 11, 11, .06);
  opacity: 0; transition: opacity .3s, background-color .7s var(--ease);
}
/* while a scene is pinned the bar is the scene's own colour: invisible, but Safari tints its toolbar from it */
#navbg.solid { border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: opacity 0s, background-color .7s var(--ease); }
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 0 var(--pad); height: 84px; color: var(--ink); transition: color .4s;
}
#nav .name { font-size: 16px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
#nav .right { display: flex; align-items: center; gap: 28px; }
#nav .links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
@media (max-width: 719px) { #nav .links { display: none; } }
/* the nav's Say hello only shows once the hero's own button has scrolled away (and not over the footer's) */
#navHello { transition: opacity .3s, transform .3s, visibility 0s; }
#navHello.off { opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; transition: opacity .25s, transform .25s, visibility 0s .25s; }

/* ---------- staff ---------- */
#staff { position: fixed; inset: 0; z-index: 9; pointer-events: none; }
#staffTilt { position: absolute; inset: 0; transform-origin: 50% 70%; }
#staff svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#staff path { fill: none; stroke-width: 1.2; }
#playhead { position: absolute; width: 1.5px; transition: opacity .4s; }
#nowTag { position: absolute; font-family: var(--pix); font-size: 12px; white-space: nowrap; color: var(--blue); transition: opacity .3s; }
.nt { position: absolute; padding: 0; border: 0; background: transparent; cursor: pointer; width: 40px; height: 40px; pointer-events: auto; opacity: 0; transition: opacity .5s ease; -webkit-tap-highlight-color: transparent; }
.nt .hd { position: absolute; left: 50%; top: 50%; transition: transform .3s cubic-bezier(.3, 1.7, .5, 1); }
.nt:hover .hd, .nt:focus-visible .hd { transform: scale(1.35) !important; }
.nt .tip { position: absolute; left: 34px; top: 50%; transform: translateY(-50%); white-space: nowrap; font-family: var(--pix); font-size: 14px; opacity: 0; transition: opacity .2s; pointer-events: none; }
.nt:hover .tip, .nt:focus-visible .tip { opacity: 1; }
.nt:focus { outline: none; }

main { position: relative; z-index: 1; }
.wrap { max-width: 1600px; margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.eyebrow { font-family: var(--pix); font-size: 16px; }

/* ---------- hero ---------- */
#top { position: relative; height: calc(var(--H) * .93); }
#heroInner { position: absolute; left: var(--pad); right: var(--pad); top: calc(84px + var(--H) * .05); }
#top h1 { margin: 0; font-size: clamp(34px, min(5vw, calc(var(--H) * .08)), 76px); line-height: 1.02; letter-spacing: -.04em; font-weight: 600; max-width: 13em; }
.hl { font-family: var(--pix); font-weight: 400; font-size: .9em; letter-spacing: -.04em; -webkit-box-decoration-break: clone; box-decoration-break: clone; padding: 0 .14em; margin: 0 .04em; }
.hl.b { background: var(--blue); color: #fff; }
.hl.l { background: var(--lime); color: var(--ink); }
#top .lede { margin: 26px 0 0; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: var(--grey); max-width: 640px; }
#top .ctas { margin-top: 30px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
#top .ctas .lnk { font-size: 15px; font-weight: 500; }
@media (max-width: 719px) {
  #heroInner { top: calc(72px + var(--H) * .03); }
  #top .lede { margin-top: 18px; }
  #top .ctas { margin-top: 22px; }
}

/* ---------- pinned scenes ---------- */
#stage { position: relative; }
/* the scene layout uses --H (capped), but the colour always fills the whole window, Safari's large viewport included */
#stageInner { position: sticky; top: 0; height: 100vh; height: 100lvh; min-height: var(--H); overflow: hidden; background: var(--blue); transition: background .7s var(--ease); }
.scene { position: absolute; inset: 0; pointer-events: none; }
.scene.on { pointer-events: auto; }
.scene .txt, .scene .vis { opacity: 0; }
.scene .txt { transform: translateY(40px); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.scene .vis { transform: translateY(70px) scale(.96); transition: opacity .6s var(--ease), transform .9s var(--ease); }
.scene.past .txt { transform: translateY(-40px); }
.scene.past .vis { transform: translateY(-70px) scale(.96); }
.scene.on .txt { opacity: 1; transform: none; transition-delay: 120ms; }
.scene.on .vis { opacity: 1; transform: translateY(var(--par, 0px)); }

.scene .txt { position: absolute; left: var(--pad); width: 40%; top: calc(var(--H) * .14); }
.scene .vis { position: absolute; right: var(--pad); width: 46%; top: calc(var(--H) * .11); height: calc(var(--H) * .46); }
.scene .vis.wide { height: auto; aspect-ratio: 16 / 9; max-height: calc(var(--H) * .46); }
.scene h2 { margin: 18px 0 0; font-size: clamp(30px, 3.4vw, 54px); line-height: 1.04; letter-spacing: -.03em; font-weight: 600; }
.scene p { margin: 18px 0 0; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.5; opacity: .82; max-width: 520px; }
.scene .eyebrow { opacity: .75; }
.scene .eyebrow:has(.num) { opacity: 1; }
.num { display: inline-block; margin-left: 6px; padding: 1px 6px 2px; border-radius: 4px; font-family: var(--pix); font-size: .85em; line-height: 1.2; vertical-align: 1px; background: var(--ink); color: var(--lime); }
.num.b { background: var(--blue); color: #fff; }
.tags { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { font-family: var(--pix); font-size: 14px; padding: 4px 9px 5px; border-radius: 4px; border: 1px solid rgba(11, 11, 11, .3); }
.dark .tag { border-color: rgba(255, 255, 255, .4); }
.scene .go { display: inline-block; margin-top: 22px; font-size: 15px; font-weight: 500; }

.screen { position: absolute; inset: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .35); }
.screen.sk { padding: 6%; display: flex; flex-direction: column; gap: 12px; }
.sk .row { display: flex; gap: 8px; }
.sk .bar { height: 10px; border-radius: 2px; }
.sk .a { width: 46%; } .sk .b { width: 70%; }
.sk .body { display: flex; gap: 12px; flex: 1; min-height: 0; }
.sk .side { width: 22%; display: flex; flex-direction: column; gap: 9px; }
.sk .main { flex: 1; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }
.sk .cols { display: flex; gap: 8px; align-items: flex-end; height: 55%; }
.sk .cols > div { flex: 1; }
.media-note { position: absolute; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 13px; opacity: .55; }
.screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; pointer-events: none; background: #08080a; }
/* rendered at desktop size, then scaled to fit, so the app shows its desktop layout */
.screen iframe.scaled { inset: auto; left: 0; top: 0; width: 1280px; height: 800px; transform-origin: 0 0; transform: scale(var(--fit, .5)); }

@media (max-width: 719px) {
  /* leaving a scene, the preview moves with the text instead of catching up with it */
  .scene.past .vis { transform: translateY(-40px) scale(.96); }
  .scene { display: flex; flex-direction: column; gap: 32px; padding: calc(var(--hdr) + 14px) 20px 24px; }
  .scene .txt, .scene .vis { position: relative; left: auto; right: auto; top: auto; width: auto; }
  .scene .vis, .scene .vis.wide { height: auto; aspect-ratio: 16 / 10; max-height: none; flex: none; }
  .scene .vis.wide { aspect-ratio: 16 / 9; }
  .scene h2 { margin-top: 12px; font-size: clamp(24px, 7vw, 30px); }
  .scene p { margin-top: 12px; font-size: 15.5px; }
  .tags { margin-top: 14px; }
  .scene .go { margin-top: 14px; }
  .tag { font-size: 12px; }
  .media-note { font-size: 11px; bottom: 8px; }
}
@media (max-width: 719px) {
  /* keep the bottom fifth free for the big staff */
  .scene { gap: 28px; padding-bottom: calc(var(--H) * .2); }
}
@media (max-width: 719px) and (max-height: 760px) {
  .scene .tags { display: none; }
  .scene h2 { font-size: 24px; }
  .scene p { font-size: 14.5px; line-height: 1.45; }
}

/* ---------- reveal ---------- */
.rv { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.rv.seen { opacity: 1; transform: none; }

/* ---------- before ---------- */
#before { padding-top: clamp(140px, 14vw, 220px); }
#before h2, #how h2, #elsewhere h2 { margin: 24px 0 0; font-size: clamp(30px, 3.4vw, 54px); line-height: 1.04; letter-spacing: -.03em; font-weight: 600; max-width: 18em; }
.log { margin: clamp(40px, 5vw, 64px) 0 0; padding: 0; list-style: none; }
.log li { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, .8fr) 2fr; gap: 8px clamp(20px, 3vw, 48px); padding: 22px 0 24px; border-top: 1px solid rgba(11, 11, 11, .12); align-items: baseline; }
.log li:last-child { border-bottom: 1px solid rgba(11, 11, 11, .12); }
.log .org { font-size: clamp(20px, 1.8vw, 26px); font-weight: 600; letter-spacing: -.02em; }
.log .role { font-family: var(--pix); font-size: 15px; color: var(--grey-2); }
.log .what { font-size: 17px; line-height: 1.5; color: var(--grey); margin: 0; max-width: 620px; }
.log li.music { background: var(--ink); color: #fff; border-radius: 14px; padding: 22px 24px 24px; margin-top: 18px; border: 0; }
.log li.music .role { color: var(--lime); }
.log li.music .what { color: rgba(255, 255, 255, .78); }
.clefnote { font-family: var(--pix); color: var(--lime); }
@media (max-width: 860px) {
  .log li { grid-template-columns: 1fr; gap: 4px; }
  .log .what { margin-top: 6px; }
}

/* ---------- how ---------- */
#how { padding-top: clamp(140px, 14vw, 220px); }
.principles { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 40px clamp(24px, 3vw, 48px); }
.principles > div { flex: 1 1 260px; border-top: 1px solid rgba(11, 11, 11, .12); padding-top: 20px; }
.principles > div:nth-child(2) { transition-delay: 120ms; }
.principles > div:nth-child(3) { transition-delay: 240ms; }
.principles .t { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.principles p { margin: 12px 0 0; font-size: 17px; line-height: 1.5; color: var(--grey); }
#words { margin-top: clamp(80px, 9vw, 130px); display: flex; flex-wrap: wrap; gap: 32px clamp(24px, 3vw, 48px); }
#words figure { flex: 1 1 380px; margin: 0; }
#words blockquote { margin: 0; font-size: 20px; line-height: 1.4; letter-spacing: -.01em; }
#words figcaption { margin-top: 14px; font-family: var(--pix); font-size: 15px; color: var(--grey-2); }

/* ---------- elsewhere ---------- */
#elsewhere { padding-top: clamp(140px, 14vw, 220px); }
.cards { margin-top: 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 16px; background: #fff; border: 1px solid rgba(11, 11, 11, .08); min-height: 220px; transition: transform .35s cubic-bezier(.3, 1.9, .45, 1), box-shadow .3s; }
a.card:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -30px rgba(0, 0, 0, .35); }
.card .k { font-family: var(--pix); font-size: 14px; color: var(--grey-2); }
.card .t { font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.card p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--grey); }
.card .more { margin-top: auto; font-size: 15px; font-weight: 500; }
.card.lime { background: var(--lime); border-color: var(--ink); }
.card.lime p, .card.lime .k { color: var(--ink); }

/* ---------- footer ---------- */
#hello { padding-top: clamp(160px, 16vw, 260px); padding-bottom: clamp(120px, 12vw, 180px); }
#hello .eyebrow { color: #5F646B; }
#hello .keys { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 20px 24px; }
#schHint { margin: 20px 0 0; font-family: var(--pix); font-size: 15px; color: var(--grey-2); min-height: 20px; }
#hello .base { margin-top: 72px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 32px; font-family: var(--pix); font-size: 15px; }
#hello .base .l { display: flex; gap: 28px; flex-wrap: wrap; }
#hello .coda { display: flex; align-items: flex-end; gap: 12px; color: var(--grey-2); }
#hello .coda svg { width: 34px; height: 42px; fill: var(--ink); shape-rendering: crispEdges; flex: none; }

/* ---------- short (landscape phones, squat windows): staff lives in the top bar ---------- */
.short #top { height: auto; min-height: calc(var(--H) * .93); }
.short #heroInner { position: relative; left: auto; right: auto; top: auto; padding: 88px var(--pad) 48px; }
.short #top h1 { font-size: clamp(28px, 4.2vw, 44px); max-width: 17em; }
.short #top .lede { margin-top: 14px; font-size: 15.5px; }
.short #top .ctas { margin-top: 20px; }
.short .scene { display: block; padding: 0; }
.short .scene .txt, .short .scene .vis { position: absolute; top: 80px; }
.short .scene .txt { left: var(--pad); right: auto; width: 46%; }
.short .scene .vis, .short .scene .vis.wide { right: var(--pad); left: auto; width: 44%; height: auto; aspect-ratio: 16 / 10; max-height: calc(var(--H) - 104px); flex: none; }
.short .scene h2 { margin-top: 8px; font-size: clamp(20px, 2.9vw, 30px); }
.short .scene p { margin-top: 10px; font-size: 14px; line-height: 1.45; }
.short .scene .eyebrow { font-size: 13px; }
.short .scene .tags { display: none; }
.short .scene .go { margin-top: 10px; font-size: 14px; }
.short .scene.past .vis { transform: translateY(-40px) scale(.96); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .scene .txt, .scene .vis { transition-duration: .01s !important; }
}
