/* Brand home: one screen, nothing to scroll.
   Top: the promise. Bottom: the whole path, drawn as one curve from the origin to a locked pool. */

html:has(.lp) body::before { display: none; }

.lp { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; isolation: isolate; }
.lp::before {
  content: ''; position: absolute; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse 58% 50% at 10% 100%, rgba(168,240,224,0.09), transparent 70%),
    radial-gradient(ellipse 40% 36% at 82% 64%, rgba(168,240,224,0.05), transparent 72%),
    radial-gradient(ellipse 46% 26% at 50% 30%, rgba(168,240,224,0.028), transparent 72%);
}
.lp-spot { position: absolute; left: 0; top: 0; width: 680px; height: 680px; margin: -340px 0 0 -340px; border-radius: 50%; z-index: -2; pointer-events: none; opacity: 0; transition: opacity .6s var(--ease);
  background: radial-gradient(circle, rgba(168,240,224,0.07), transparent 64%); will-change: transform; }
.lp-spot.on { opacity: 1; }

/* ---------- top ---------- */
.lp-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: 28px clamp(24px, 4.4vw, 64px) 0; }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; }
.lp-brand .brand-mark { width: 30px; height: 30px; overflow: visible; }
.lp-brand .arc { stroke: var(--signal); stroke-width: 1.6; fill: none; stroke-linecap: round; opacity: .9; }
.lp-brand .ring { stroke: var(--text-3); stroke-width: 1.2; fill: none; }
.lp-brand .dot { fill: var(--signal); }
.lp-brand b { font: 700 21px/1 var(--f-display); letter-spacing: -0.04em; }
.lp-nav { display: flex; align-items: center; gap: 30px; font: 500 14px/1 var(--f-ui); color: var(--text-2); }
.lp-nav a { transition: color .2s var(--ease); }
.lp-nav a:hover { color: var(--text); }
.lp-lang { display: inline-flex; align-items: center; gap: 6px; padding: 8px 4px; font: 500 12px/1 var(--f-ui); letter-spacing: .04em; color: rgba(154,160,171,0.5); transition: color .2s var(--ease); }
.lp-lang i { font-style: normal; opacity: .5; }
.lp-lang span { transition: color .2s var(--ease); }
.lp-lang span.on { color: var(--text-2); }
.lp-lang:hover span:not(.on) { color: var(--text); }

/* Chinese: Syne has no Chinese glyphs, so the headline borrows the system face and gets a little larger */
html:lang(zh) { --f-display: 'Syne', 'Manrope', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; --f-ui: 'Manrope', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', 'Noto Sans SC', system-ui, sans-serif; }
html:lang(zh) .lp-title { font-weight: 700; letter-spacing: -0.02em; font-size: clamp(44px, min(8.4vw, 14vh), 132px); }
html:lang(zh) .pa-cols h3 { font-weight: 700; letter-spacing: 0; }
html:lang(zh) .lp-sub, html:lang(zh) .pa-cols p { letter-spacing: .02em; }
html:lang(zh) .lp-btn { letter-spacing: .06em; }
.lp-net { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; font: 500 12px/1 var(--f-ui); color: var(--text-2); }
.lp-net i { width: 6px; height: 6px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px rgba(168,240,224,0.8); }

/* ---------- promise ---------- */
.lp-main { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 12px 24px 0; min-height: 0; }
.lp-title {
  font-family: var(--f-display); font-weight: 800; font-size: clamp(38px, min(5.9vw, 11.5vh), 112px); line-height: 1.0; letter-spacing: -0.05em;
  color: var(--text); margin: 0;
}
.lp-title .w { display: inline-block; }
.lp-title em { font-style: normal; color: var(--signal); }
.lp-br { display: none; }
.lp-sub { margin-top: clamp(14px, 2.6vh, 26px); font: 400 clamp(15px, 1.3vw, 18px)/1.6 var(--f-ui); color: var(--text-2); max-width: 32em; text-wrap: balance; }
.lp-cta { margin-top: clamp(22px, 4vh, 40px); display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 30px; border-radius: 12px;
  font: 600 15px/1 var(--f-ui); letter-spacing: .01em; transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.lp-btn svg { margin-left: 10px; transition: transform .2s var(--ease); }
.lp-btn.primary { background: var(--signal-2); color: var(--ink); }
.lp-btn.primary:hover { background: var(--signal); transform: translateY(-2px); box-shadow: 0 10px 34px -10px rgba(168,240,224,0.55); }
.lp-btn.primary:hover svg { transform: translateX(4px); }
.lp-btn.ghost { color: var(--text); border: 1px solid var(--border-hi); }
.lp-btn.ghost:hover { border-color: rgba(168,240,224,0.5); transform: translateY(-2px); }
.lp-btn:active { transform: translateY(0); }

/* ---------- the path ---------- */
.lp-path { position: relative; z-index: 0; flex: none; height: clamp(250px, 43vh, 430px); padding: 0 clamp(24px, 4.4vw, 64px) clamp(18px, 3.4vh, 34px); display: flex; }
.lp-path-in { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; display: flex; flex-direction: column; min-height: 0; }
.pa-svg { display: block; flex: 1; width: 100%; min-height: 110px; overflow: visible; pointer-events: none; }
.pa-base { stroke: var(--border-hi); stroke-width: 1; }
#pa-leads line { stroke: rgba(168,240,224,0.28); stroke-width: 1; stroke-dasharray: 2 5; }
#pa-leads circle { fill: var(--bg); stroke: var(--text-3); stroke-width: 1.2; transition: stroke .3s var(--ease), fill .3s var(--ease); }
#pa-leads g.hot circle { stroke: var(--signal); fill: rgba(168,240,224,0.3); }
#pa-leads g.hot line { stroke: rgba(168,240,224,0.7); }
.pa-svg .echo { fill: none; stroke: url(#pa-echo); stroke-width: 1.1; stroke-linecap: round; opacity: calc(.7 - var(--k) * .17);
  transform: translate(calc(var(--mx, 0) * var(--k) * -6px), calc(var(--my, 0) * var(--k) * -3px)); }
.pa-curve { fill: none; stroke: rgba(255,255,255,0.1); stroke-width: 1.4; }
.pa-trail { fill: none; stroke: url(#pa-grad); stroke-width: 2; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(168,240,224,0.45)); }
/* the curve keeps going past graduation, up to the top of the screen, fading as it climbs */
.pa-ext { fill: none; stroke: url(#pa-extg); stroke-width: 1.8; stroke-linecap: round; filter: drop-shadow(0 0 5px rgba(168,240,224,0.35)); }
.pa-pulse { fill: none; stroke: var(--signal); stroke-linecap: round; opacity: 0; }
.pa-pulse.head { stroke-width: 2.6; stroke-dasharray: 5 200; stroke-dashoffset: 6; filter: drop-shadow(0 0 6px rgba(168,240,224,0.9)); }
.pa-pulse.tail { stroke-width: 1.6; stroke-dasharray: 16 200; stroke-dashoffset: 17; stroke-opacity: .4; }

.pa-node { transform-box: fill-box; transform-origin: center; transition: transform .3s var(--ease); }
.pa-node .dot { fill: var(--signal); filter: drop-shadow(0 0 8px rgba(168,240,224,0.85)); }
.pa-node .halo { fill: rgba(168,240,224,0.14); transform-box: fill-box; transform-origin: center; }
.pa-node .rip { fill: none; stroke: rgba(168,240,224,0.32); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pa-node .ring { fill: var(--bg); stroke: var(--signal); stroke-width: 1.4; }
.pa-node .core { fill: var(--signal); }
.pa-node .pool { fill: rgba(168,240,224,0.035); stroke: var(--signal); stroke-width: 1.3; }
.pa-node .dial line { stroke: var(--text-3); stroke-width: 1; }
.pa-node .dial line.major { stroke: var(--signal); stroke-width: 1.4; }
.pa-node .lock rect { fill: var(--bg); }
.pa-node .lock { stroke: var(--signal); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pa-dial-spin { transform-origin: 0 0; }
.pa-node .burst { fill: none; stroke: var(--signal); stroke-width: 1.3; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pa-node.hot { transform: scale(1.22); }
.pa-node.n3.hot { transform: scale(1.07); }

.pa-cols { flex: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.pa-cols li { text-align: center; padding: 14px 12px 0; }
.pa-n { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; color: var(--signal); }
.pa-cols h3 { font: 800 clamp(18px, 1.7vw, 24px)/1.1 var(--f-display); letter-spacing: -0.04em; margin: 9px 0 7px; transition: color .25s var(--ease); }
.pa-cols p { font: 400 13.5px/1.55 var(--f-ui); color: var(--text-2); max-width: 17em; margin: 0 auto; }
.pa-cols li.hot h3 { color: var(--signal); }

/* ---------- motion: everything plays once on load, then the light keeps travelling ---------- */
@media (prefers-reduced-motion: no-preference) {
  .lp-top { animation: lp-fade .8s ease-out both; }
  .lp-title .w { animation: lp-word .9s var(--ease) both; animation-delay: calc(.16s + var(--i) * .1s); }
  .lp-main .lp-sub, .lp-main .lp-cta { animation: lp-up .6s var(--ease) both; }
  .lp-main .lp-sub { animation-delay: .62s; }
  .lp-main .lp-cta { animation-delay: .78s; }
  .lp-net i { animation: lp-blink 2.6s ease-in-out infinite; }

  .pa-base { animation: lp-fade .8s ease-out .6s backwards; }
  .pa-svg .echo { animation: lp-sweep 1.4s var(--ease) calc(1s + var(--k) * .15s) backwards; }
  .pa-trail { animation: pa-draw 2.3s cubic-bezier(.55,0,.2,1) .9s backwards; }
  .pa-ext { animation: pa-draw 1.7s cubic-bezier(.35,0,.2,1) 3s backwards; }
  #pa-leads > * { animation: lp-fade .6s ease-out backwards; animation-delay: var(--d, 1s); }
  .pa-node { animation: pa-pop .55s var(--ease) backwards; animation-delay: var(--d, 1s); }
  .pa-cols li { animation: lp-up .7s var(--ease) backwards; animation-delay: var(--d, 1s); }

  .pa-node.n0 .halo { animation: pa-halo 2.4s ease-in-out 1s infinite alternate; }
  .pa-node.n0 .rip { animation: pa-rip 5s cubic-bezier(.2,.6,.3,1) 1.2s infinite; }
  .pa-node.n0 .rip.r2 { animation-delay: 3.7s; }
  .pa-node.n2 .burst { animation: pa-burst 1.5s cubic-bezier(.2,.6,.3,1) 3.1s 1 both; }
  .pa-dial-spin { animation: pa-spin 70s linear infinite; }
  .pa-pulse.head { animation: lp-run 7.5s linear 4s infinite; }
  .pa-pulse.tail { animation: lp-run-tail 7.5s linear 4s infinite; }
}
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lp-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes lp-word { from { opacity: 0; transform: translateY(.28em); filter: blur(10px); } to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes lp-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes lp-sweep { from { clip-path: inset(-20px 100% -20px 0); } to { clip-path: inset(-20px -20px -20px 0); } }
@keyframes pa-draw { from { stroke-dashoffset: var(--L, 1000); } to { stroke-dashoffset: 0; } }
@keyframes pa-pop { from { opacity: 0; transform: scale(.35); } to { opacity: 1; transform: none; } }
@keyframes pa-halo { from { transform: scale(.8); opacity: .6; } to { transform: scale(1.4); opacity: 1; } }
@keyframes pa-rip { 0% { opacity: 0; transform: scale(.1); } 15% { opacity: .9; } 100% { opacity: 0; transform: scale(1); } }
@keyframes pa-burst { 0% { opacity: .95; transform: scale(1); } 100% { opacity: 0; transform: scale(6); } }
@keyframes pa-spin { to { transform: rotate(360deg); } }
/* offsets are in path units (pathLength = 100); the dash travels from before 0 to past 100 */
@keyframes lp-run {
  0% { stroke-dashoffset: 6; opacity: 0; animation-timing-function: cubic-bezier(.5,0,.3,1); }
  4% { opacity: 1; }
  50% { stroke-dashoffset: -100; opacity: 1; }
  53%, 100% { stroke-dashoffset: -100; opacity: 0; }
}
@keyframes lp-run-tail {
  0% { stroke-dashoffset: 17; opacity: 0; animation-timing-function: cubic-bezier(.5,0,.3,1); }
  4% { opacity: 1; }
  50% { stroke-dashoffset: -89; opacity: 1; }
  53%, 100% { stroke-dashoffset: -89; opacity: 0; }
}

/* ---------- small screens: same screen, shorter words ---------- */
@media (max-width: 767px) {
  .lp-top { padding-top: 22px; }
  .lp-nav a { display: none; }
  .lp-nav { gap: 18px; }
  .lp-nav a.lp-docs { display: inline; }
  html:lang(zh) .lp-title { font-size: clamp(40px, min(13.4vw, 8.4vh), 66px); }
  .lp-br { display: inline; }
  .lp-title { font-size: clamp(34px, min(11.2vw, 7.4vh), 54px); }
  .lp-sub { font-size: 14.5px; }
  .lp-cta { flex-direction: row; width: 100%; max-width: 360px; gap: 10px; flex-wrap: nowrap; }
  .lp-btn { flex: 1; height: 48px; padding: 0 12px; font-size: 14px; }
  .lp-btn svg { display: none; }
  .lp-path { height: clamp(200px, 34vh, 300px); padding-left: 16px; padding-right: 16px; }
  .pa-svg { min-height: 90px; }
  .pa-cols li { padding: 10px 2px 0; }
  .pa-cols h3 { font-size: 15px; margin: 7px 0 0; letter-spacing: -0.03em; }
  .pa-cols p { display: none; }
}
@media (max-width: 767px) and (max-height: 700px) {
  .lp-sub { display: none; }
}
