:root{
  --bg:#0b0a09; --fg:#f2eee6; --text:#cfc9bd; --mute:#9a9386; --rule:rgba(242,238,230,.12);
  --sans:"Inter",-apple-system,"Segoe UI",system-ui,sans-serif;
  --pad:max(5vw,22px);
}
*{box-sizing:border-box;margin:0;padding:0}
html{background:var(--bg);scroll-behavior:smooth}
body{color:var(--fg);font-family:var(--sans);font-size:17px;line-height:1.6;-webkit-font-smoothing:antialiased;overflow-x:hidden;font-feature-settings:"cv11","ss01"}
a{color:inherit;text-decoration:none}
::selection{background:var(--fg);color:var(--bg)}
#scene{position:fixed;inset:0;width:100vw;height:100vh;z-index:-1;display:block}
h1,h2,h3{font-weight:600;letter-spacing:-.035em}

.eyebrow{font-size:14px;font-weight:500;color:var(--mute)}

/* top bar */
.bar{position:fixed;top:0;left:0;right:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:24px;
  padding:18px var(--pad) 24px;background:linear-gradient(var(--bg) 35%,rgba(11,10,9,.8) 65%,rgba(11,10,9,0))}
.mark{font-size:18px;font-weight:600;letter-spacing:-.02em}
.bar nav{display:flex;gap:32px;font-size:15px;color:var(--text)}
.bar nav a{transition:color .2s}.bar nav a:hover{color:var(--fg)}
.bar-cta{font-size:14px;font-weight:500;padding:9px 18px;border-radius:999px;border:1px solid var(--rule);transition:background .25s,color .25s}
.bar-cta:hover{background:var(--fg);color:var(--bg)}
.bar-right{display:flex;align-items:center;gap:8px}
.bar-qq{display:inline-flex;align-items:center;gap:7px;font-size:14px;font-weight:500;padding:9px 14px;border-radius:999px;color:var(--text);transition:color .2s,background .2s}
.bar-qq:hover{color:var(--fg);background:rgba(242,238,230,.06)}
.qq-ic{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linejoin:round}
.qq-link{font-size:15px;color:var(--text);text-decoration:underline;text-decoration-color:rgba(242,238,230,.3);text-underline-offset:4px;transition:color .2s,text-decoration-color .2s}
.qq-link:hover{color:var(--fg);text-decoration-color:var(--fg)}
.foot a{color:var(--text);text-decoration:underline;text-decoration-color:rgba(242,238,230,.25);text-underline-offset:3px}
.foot a:hover{color:var(--fg)}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;font-size:16px;font-weight:500;padding:15px 28px;border-radius:999px;transition:background .25s,color .25s,border-color .25s}
.btn.primary{background:var(--fg);color:var(--bg)}
.btn.primary:hover{background:#fff}
.btn.ghost{border:1px solid var(--rule);color:var(--fg)}
.btn.ghost:hover{border-color:rgba(242,238,230,.4)}

/* everything is centred on one vertical axis: the moon's path */
.dim{color:var(--mute)}

/* hero: moonrise. The moon's lit limb is the horizon below the text */
.hero{min-height:100svh;display:flex;flex-direction:column;align-items:center;text-align:center;padding:19vh var(--pad) 0}
.hero .eyebrow{margin-bottom:28px}
h1{font-size:clamp(52px,8.4vw,136px);line-height:.98;letter-spacing:-.05em}
h1 span{display:block}
.hero-sub{margin-top:26px;color:var(--text);font-size:19px}
.hero-actions{display:flex;gap:12px;flex-wrap:wrap;justify-content:center;margin-top:34px}

/* intro */
.intro{min-height:90svh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:10vh var(--pad)}
.intro h2{font-size:clamp(44px,6.4vw,104px);line-height:1}
.intro p{margin-top:24px;color:var(--text);font-size:19px}

/* dial: fixed to the moon's centre, shown only while the features section is pinned */
.dial-wrap{height:calc(100svh + 6 * 62vh)}
.dial{position:fixed;left:50%;top:50%;width:0;height:0;z-index:2;opacity:0;visibility:hidden}
.dial-items{list-style:none}
.dial-items li{position:absolute;left:0;top:0;white-space:nowrap}
.dial-items p{display:none}
.dial-items button{all:unset;display:flex;align-items:baseline;gap:10px;padding:8px 14px;border-radius:999px;color:var(--mute);opacity:.55;
  transition:opacity .4s,color .4s,background .4s}
.dial-items button:hover{opacity:.9}
.dial-items button:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
.dial-items b{font-size:30px;font-weight:600;letter-spacing:-.04em;line-height:1;font-variant-numeric:tabular-nums}
.dial-items span{font-size:16px;font-weight:500}
.dial-items li.on button{opacity:1;color:var(--fg);background:rgba(242,238,230,.07)}
.dial-hand{position:absolute;left:0;top:0;height:1px;margin-top:-.5px;transform-origin:0 50%;
  background:linear-gradient(90deg,rgba(242,238,230,0),rgba(242,238,230,.7))}
.dial-hand::after{content:"";position:absolute;right:-3px;top:-3px;width:7px;height:7px;border-radius:50%;background:var(--fg)}
.dial-caption{position:fixed;left:0;right:0;bottom:8vh;z-index:2;text-align:center;opacity:0;pointer-events:none;padding:0 var(--pad)}
.dial-caption b{display:block;font-size:clamp(28px,2.6vw,40px);font-weight:600;letter-spacing:-.035em;line-height:1.1}
.dial-caption span{display:block;margin-top:8px;color:var(--text);font-size:18px}
.dial-caption.swap b,.dial-caption.swap span{animation:capIn .6s cubic-bezier(.2,.8,.2,1) both}
.dial-caption.swap span{animation-delay:.06s}
@keyframes capIn{from{opacity:0;transform:translateY(10px)}}

/* split: the moon sits between the two words, terminator vertical */
.split{position:relative;min-height:100svh;display:flex;align-items:center;justify-content:center;padding:0 var(--pad)}
.split-row{display:flex;align-items:center;justify-content:center;gap:calc(42vh + 7vw)}
.side{font-size:clamp(44px,6.4vw,112px);font-weight:600;letter-spacing:-.05em;line-height:1}
.side:first-child{text-align:right}
.split > p{position:absolute;left:50%;bottom:9vh;translate:-50% 0;width:min(34em,calc(100% - 2 * var(--pad)));text-align:center;color:var(--text);font-size:18px}
.split > p.rv{translate:-50% 30px}.split > p.rv.in{translate:-50% 0}

/* scripting teaser (full docs live in /wiki/) */
.scripting{min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24vh var(--pad) 10vh}
.scripting h2{font-size:clamp(40px,5.4vw,84px);line-height:1.02;margin-top:14px}
.scripting-copy p:not(.eyebrow){margin:22px auto 30px;color:var(--text);font-size:19px;max-width:30em}
.code-card{margin-top:52px;width:min(660px,100%);text-align:left;background:rgba(19,17,15,.82);border:1px solid var(--rule);border-radius:16px;
  padding:22px 24px;overflow:auto;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);box-shadow:0 30px 80px -30px rgba(0,0,0,.8)}
.code-card code{font-variant-ligatures:none;font-feature-settings:"calt" 0,"liga" 0;font-family:ui-monospace,"Cascadia Code","SF Mono",Consolas,monospace;font-size:13.5px;line-height:1.75;color:#ddd6c8;white-space:pre}
.code-card .k{color:#e6b98a}.code-card .s{color:#b9d79a}.code-card .n{color:#d9a6e8}.code-card .c{color:#7d776c}.code-card .g{color:#9ec5e8}

/* compat */
.compat{min-height:80svh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:16vh var(--pad) 10vh}
.compat-list{font-size:clamp(28px,3.6vw,52px);font-weight:600;letter-spacing:-.03em;line-height:1.3;margin-top:20px;max-width:16em}
.compat-list i{color:var(--mute);font-style:normal;padding:0 .12em;font-weight:400}

/* finale: full moon above the call to action */
.finale{min-height:100svh;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;text-align:center;padding:10vh var(--pad) 13vh;gap:20px}
.finale h2{font-size:clamp(44px,6.6vw,108px);line-height:1;letter-spacing:-.05em;text-shadow:0 2px 40px rgba(11,10,9,.9)}
.finale p{color:var(--text);font-size:19px}
.finale .btn{margin-top:8px}

.foot{display:flex;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:24px var(--pad) 32px;border-top:1px solid var(--rule);font-size:14px;color:var(--mute)}

/* reveal */
.rv{opacity:0;translate:0 30px;transition:opacity 1.1s cubic-bezier(.2,.7,.1,1),translate 1.1s cubic-bezier(.2,.7,.1,1)}
.rv.in{opacity:1;translate:0 0}

/* custom cursor: main.js adds .has-cursor on fine pointers. Outer elements are moved
   by JS (translate); the inner <i> handles size/fill so the two transforms never fight. */
.cursor{display:none}
.has-cursor, .has-cursor *{cursor:none!important}
.has-cursor .cursor{display:block;position:fixed;inset:0;pointer-events:none;z-index:100}
.cursor-dot,.cursor-ring{position:fixed;left:0;top:0;width:0;height:0;will-change:transform}
.cursor i{position:absolute;border-radius:50%;transition:transform .45s cubic-bezier(.2,.9,.25,1.2),background-color .3s,border-color .3s,opacity .3s}
.cursor-dot i{width:6px;height:6px;left:-3px;top:-3px;background:var(--fg)}
.cursor-ring i{width:40px;height:40px;left:-20px;top:-20px;border:1.5px solid rgba(242,238,230,.5);background:rgba(242,238,230,0)}
.cursor.hover .cursor-ring i{transform:scale(1.65);border-color:rgba(242,238,230,.95);background:rgba(242,238,230,.12)}
.cursor.hover .cursor-dot i{transform:scale(.5);opacity:.6}
.cursor.down .cursor-ring i{transform:scale(.8);background:rgba(242,238,230,.22);transition-duration:.15s}
.cursor.hover.down .cursor-ring i{transform:scale(1.35)}
.cursor.down .cursor-dot i{transform:scale(.7)}
.cursor.away i{opacity:0}

@media (max-width:900px){
  .bar nav{display:none}
  .bar-qq .g{display:none}
  .bar-qq{padding:9px 10px}
  .hero{padding-top:16vh}
  .dial-items span{display:none}
  .dial-items b{font-size:20px}
  .dial-items button{padding:6px 9px}
  .dial-caption{bottom:7vh}
  .split-row{gap:calc(17vh + 18px)}
  .side{font-size:clamp(26px,7.4vw,44px)}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}.rv{opacity:1;translate:none}}
