/* Nislo landing page, "The Climb". Spec: Koava Vault 01 Projects/Nislo/Features/landing-page-the-climb.md
   Palette and fonts follow the Nislo Brand Guide (Figma 27:444). */

@font-face{font-family:"Libre Baskerville";font-style:normal;font-weight:400 700;font-display:swap;src:url(fonts/libre-baskerville-latin-wght-normal.woff2) format("woff2")}
@font-face{font-family:"Libre Baskerville";font-style:italic;font-weight:400 700;font-display:swap;src:url(fonts/libre-baskerville-latin-wght-italic.woff2) format("woff2")}
@font-face{font-family:Lato;font-style:normal;font-weight:400;font-display:swap;src:url(fonts/lato-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:Lato;font-style:normal;font-weight:700;font-display:swap;src:url(fonts/lato-latin-700-normal.woff2) format("woff2")}

:root{
  --night:#14122A; --ink:#1D1D1F; --violet:#6938EF; --violet-deep:#5427D6; --blush:#FFD3EA; --white:#FFFFFF;
  --serif:"Libre Baskerville",Georgia,serif;
  --sans:Lato,system-ui,-apple-system,"Segoe UI",sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{background:var(--night)}
body{margin:0;font-family:var(--sans);color:var(--ink);background:var(--night);-webkit-font-smoothing:antialiased}
a{color:var(--violet)}
a:hover{color:var(--violet-deep)}
:focus-visible{outline:3px solid var(--blush);outline-offset:3px}

/* ---------- the pinned scene ---------- */
.climb{position:relative;height:740vh;height:740svh;background:var(--night)}
.stage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;
  --ww:100vw;--wx:-7.5%;--wy:0px;--wz:1.15;--mwx:-7.5%;--mwy:0px;--mwz:1.15;--nwx:-7.5%;--nwy:0px;--nwz:1.15;
  --p:0;--h:0;--hv:1;--o1:0;--o2:0;--o3:0;--o4:0;--o5:0;--a2:0;--a3:0;--sf:0}

/* The layers are laid out --k times larger than drawn and scaled back down by climb.js, so the browser paints them at full sharpness at the closest zoom. */
.world{position:absolute;left:0;bottom:0;width:var(--ww);aspect-ratio:1200/2150;transform-origin:0 100%;will-change:transform;pointer-events:none}
.world img{position:absolute;display:block}
.world-back>img:first-child{inset:0;width:100%;height:100%}
/* cropped layers: box as a percent of the 1200 x 2150 painting (tools/build_art.py prints the boxes) */
.lay-mid{left:0;top:17.6744%;width:100%;height:52.093%}
.lay-near{left:23.3333%;top:13.9535%;width:55%;height:86.0465%}
.summit-fig{left:43.3333%;top:7.4419%;width:13.3333%;height:8.3721%;opacity:var(--sf)}
.world-back{transform:translate3d(var(--wx),var(--wy),0) scale(var(--wz))}
.world-mid{transform:translate3d(var(--mwx),var(--mwy),0) scale(var(--mwz))}
.world-near{transform:translate3d(var(--nwx),var(--nwy),0) scale(var(--nwz))}

.pose{height:auto;transform:translate3d(-50%,-97%,0);opacity:var(--op,0)}
.pose-1{--op:var(--o1)} .pose-2{--op:var(--o2)} .pose-3{--op:var(--o3)} .pose-4{--op:var(--o4)}

/* floating pages, books and a lotus; they grow in with their stop */
.fl{height:auto;--s:var(--a2);
  transform:translate3d(-50%,-50%,0) scale(calc(.4 + var(--s) * .6));opacity:var(--s);
  animation:float var(--d,6s) ease-in-out infinite;animation-delay:var(--dl,0s);will-change:transform,opacity}
.fl[style*="--a:a3"]{--s:var(--a3)}
@keyframes float{0%{translate:0 0;rotate:-2.5deg}50%{translate:calc(6px * var(--k,1)) calc(-16px * var(--k,1));rotate:3deg}100%{translate:0 0;rotate:-2.5deg}}

.scrim{position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(rgba(20,18,42,.86) 0%,rgba(20,18,42,.62) 38%,rgba(20,18,42,.2) 68%,rgba(20,18,42,0) 90%);
  opacity:calc(1 - var(--p) * .65)}
.fx{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}

.drift img{position:absolute;top:40%;height:auto;filter:blur(1.5px);pointer-events:none;will-change:transform;
  transform:translate3d(0,calc((var(--p) - var(--k)) * 640vh),0) rotate(calc(var(--p) * var(--r)))}

/* ---------- copy ---------- */
.co{position:absolute;color:var(--white);will-change:transform,opacity}
.co:not(.co-hero){left:50%;top:45%;width:min(720px,calc(100% - 48px));margin-left:calc(min(720px,calc(100% - 48px)) / -2);
  display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.co[data-co=o1]{opacity:var(--o1);transform:translate3d(0,calc(-50% + (1 - var(--o1)) * 28px),0)}
.co[data-co=o2]{opacity:var(--o2);transform:translate3d(0,calc(-50% + (1 - var(--o2)) * 28px),0)}
.co[data-co=o3]{opacity:var(--o3);transform:translate3d(0,calc(-50% + (1 - var(--o3)) * 28px),0)}
.co[data-co=o4]{opacity:var(--o4);transform:translate3d(0,calc(-50% + (1 - var(--o4)) * 28px),0)}
.co.co-end{top:46%;opacity:var(--o5);transform:translate3d(0,calc((1 - var(--o5)) * 28px),0)}
.co[data-vis=off]{visibility:hidden}   /* hidden callouts are not focusable */

.backing{position:absolute;left:-22%;right:-22%;top:-46%;bottom:-46%;pointer-events:none;
  background:radial-gradient(ellipse at center,rgba(20,18,42,.86) 0%,rgba(20,18,42,.66) 42%,rgba(20,18,42,0) 72%)}
.co-end .backing{top:-10%}

h1,h2{margin:0;font-family:var(--serif);font-weight:400;letter-spacing:-.02em;text-wrap:balance}
h2{position:relative;font-size:clamp(34px,4.4vw,68px);line-height:1.06}
h1{font-size:clamp(40px,5.6vw,88px);line-height:1.04;text-shadow:0 4px 30px rgba(20,18,42,.6)}
em{font-style:italic;font-weight:400;color:var(--blush)}
.co p{margin:0}
.co:not(.co-hero)>p{position:relative;max-width:560px;font-size:clamp(18px,1.65vw,24px);line-height:1.45;text-wrap:balance}

/* opening */
.co-hero{inset:0;display:flex;flex-direction:column;align-items:center;
  padding:clamp(20px,4vh,40px) clamp(20px,5vw,64px) 22vh;
  opacity:var(--hv);transform:translate3d(0,calc(var(--h) * -40vh),0)}
.bar{align-self:stretch;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}
.wordmark{font-family:var(--serif);font-size:20px;font-weight:600}
.pill{display:inline-flex;align-items:center;min-height:44px;padding:0 20px;border-radius:999px;background:var(--white);color:var(--ink);font-size:15px;font-weight:700;text-decoration:none}
.bar-actions{display:flex;align-items:center;gap:20px}
.login{display:inline-flex;align-items:center;min-height:44px;color:var(--white);font-size:15px;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.login:hover{color:var(--blush)}
.pill:hover{color:var(--ink);background:var(--blush)}
.hero-body{margin:auto 0;display:flex;flex-direction:column;align-items:center;gap:18px;max-width:820px;text-align:center}
.lede{font-size:clamp(18px,1.7vw,26px);text-shadow:0 2px 16px rgba(20,18,42,.8)}

/* forms */
.wl{position:relative;margin:10px 0 0;width:min(480px,100%);display:flex;flex-direction:column;align-items:center;gap:10px}
.co-end .wl{margin-top:8px}
.row{align-self:stretch;display:flex;flex-wrap:wrap;gap:10px}
.wl input{flex:1 1 220px;min-width:0;height:54px;padding:0 18px;border:0;border-radius:999px;font:400 16px var(--sans);background:var(--white);color:var(--ink)}
.wl input::placeholder{color:#6b6b73}
.btn{min-height:54px;padding:0 26px;border:0;border-radius:999px;background:var(--violet);color:var(--white);font:700 16px var(--sans);cursor:pointer}
.btn:hover{background:var(--violet-deep)}
.wl .note{font-size:14px}
.wl .fine{font-size:12px;line-height:1.5;color:rgba(255,255,255,.8);text-shadow:0 1px 8px rgba(20,18,42,.9)}
.wl .fine-end{font-size:13px;line-height:1.55;color:rgba(255,255,255,.75)}
.status{align-self:stretch;display:none;align-items:center;gap:8px;padding:10px 14px;border-radius:14px;background:rgba(255,255,255,.96);color:var(--ink);font-size:14px;text-align:left;text-shadow:none}
.status.on{display:flex}
.status svg{flex:none}
.status-error svg{color:#d04040}
.status-info svg{color:var(--violet)}

/* footer */
.foot{position:absolute;left:0;right:0;bottom:0;padding:28px 16px 12px;text-align:center;
  background:linear-gradient(rgba(20,18,42,0),rgba(20,18,42,.72))}
.foot p{margin:0;font-size:11px;line-height:1.5;color:rgba(255,255,255,.8);text-shadow:0 1px 8px rgba(20,18,42,.95)}
.foot a{color:inherit}
.foot a:hover{color:var(--white)}

#join{position:absolute;left:0;bottom:0;width:1px;height:1px}

/* ---------- small screens ---------- */
@media (max-width:640px){
  .co-hero{padding-bottom:16vh}
  .co.co-end{top:28%}
  .co-end .backing{top:-14%;bottom:-24%}
  .co:not(.co-hero) p{font-size:18px}
  .wl input,.btn{height:50px;min-height:50px}
  /* stack the field and button, both full width, so neither wraps off-centre */
  .row{flex-direction:column;flex-wrap:nowrap;align-items:stretch}
  .wl input{flex:none;width:100%}
  .btn{width:100%;padding:0 20px}
  .wl .note,.wl .fine{text-align:center}
  .foot{padding-top:20px}
}
@media (max-height:640px) and (min-width:641px){ .co.co-end{top:36%} }

/* ---------- reduced motion: nothing flies, bobs, spins or rises; the camera still follows the reader's own scroll ---------- */
@media (prefers-reduced-motion:reduce){
  .drift{display:none}
  .fl{animation:none}
  .co[data-co]:not(.co-hero){transform:translate3d(0,-50%,0)}
  .co.co-end[data-co]{transform:none}
  .co-hero{transform:none}
}

/* spam trap: hidden from people and screen readers, bots fill it */
.hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;opacity:0!important;flex:none!important}
