/* Landing page. CSS-only animation (the CSP allows no scripts). Loaded only by landing.html. */
body.landing {
  color-scheme: dark; color: #ecebfa; min-height: 100vh; overflow-x: hidden;
  background: #090817;
}
.landing .sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.landing .glow { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.landing .g1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: #2f5bff; }
.landing .g2 { width: 40vw; height: 40vw; right: -10vw; top: 10vh; background: #8b2cf5; animation-duration: 22s; }
.landing .g3 { width: 36vw; height: 36vw; left: 30vw; bottom: -20vw; background: #3b82f6; opacity: .35; animation-duration: 26s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(6vw, 4vh) scale(1.15); } }

/* drifting pixel particles */
.landing .particles { position: absolute; left: 0; top: 100%; width: 4px; height: 4px; background: transparent;
  box-shadow: 5vw 10vh #8b5cf6, 12vw 40vh #3b82f6, 20vw 75vh #a78bfa, 27vw 22vh #60a5fa, 33vw 60vh #c4b5fd,
    41vw 15vh #8b5cf6, 48vw 85vh #3b82f6, 55vw 35vh #a78bfa, 61vw 70vh #60a5fa, 68vw 5vh #c4b5fd,
    74vw 50vh #8b5cf6, 80vw 90vh #3b82f6, 86vw 28vh #a78bfa, 93vw 65vh #60a5fa, 97vw 12vh #c4b5fd,
    8vw 95vh #60a5fa, 37vw 45vh #8b5cf6, 64vw 92vh #a78bfa, 89vw 42vh #3b82f6, 16vw 58vh #c4b5fd;
  animation: rise 40s linear infinite; opacity: .7; }
@keyframes rise { from { transform: translateY(0); } to { transform: translateY(-200vh); } }

/* floating blocks */
.landing .float { position: absolute; display: block; filter: drop-shadow(0 18px 24px rgba(10, 5, 40, .55)); animation: bob 7s ease-in-out infinite; }
.landing .float svg { display: block; border-radius: 6px; }
.landing .f1 { left: 2%; top: 9%; animation-duration: 8s; }
.landing .f2 { right: 8%; top: 14%; animation-delay: -2s; }
.landing .f3 { right: 18%; top: 62%; animation-duration: 9s; animation-delay: -4s; }
.landing .f4 { left: 14%; top: 70%; animation-delay: -1s; animation-duration: 6.5s; }
.landing .f5 { left: 46%; top: 8%; animation-delay: -3s; opacity: .7; }
.landing .f6 { right: 4%; top: 86%; animation-duration: 10s; opacity: .8; }
.landing .f7 { left: 3%; top: 48%; animation-delay: -5s; opacity: .6; }
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-22px) rotate(6deg); }
}

/* layout */
.land-top, .land { position: relative; z-index: 1; }
.land-top { max-width: 1180px; margin: 0 auto; padding: 1.1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; }
.land-signin { color: #cfcdf3; text-decoration: none; font-weight: 600; padding: .45rem .9rem; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; backdrop-filter: blur(6px); transition: background .2s, border-color .2s; }
.land-signin:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }
.land { max-width: 1180px; margin: 0 auto; padding: 2rem 1.25rem 3.5rem; display: grid; gap: 4.5rem; }

.land-hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 3rem; align-items: center; min-height: min(62vh, 640px); }
@media (max-width: 900px) { .land-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; } }
.land-eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #c4b5fd;
  padding: .35rem .75rem; border-radius: 999px; background: rgba(139, 92, 246, .14); border: 1px solid rgba(139, 92, 246, .35); margin-bottom: 1.2rem; }
.land h1 { font-size: clamp(2.3rem, 5.6vw, 4.2rem); line-height: 1.04; letter-spacing: -.035em; margin-bottom: 1.4rem; }
.shine-text { background: linear-gradient(100deg, #60a5fa 0%, #a78bfa 30%, #f0abfc 50%, #a78bfa 70%, #60a5fa 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { from { background-position: 0% 0; } to { background-position: 250% 0; } }
.land-lead { font-size: 1.12rem; line-height: 1.65; color: #c9c7e8; max-width: 38rem; margin-bottom: .9rem; }

/* demo card */
.land-demo { perspective: 1200px; }
.demo-card { background: rgba(22, 20, 48, .78); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; padding: 1.3rem;
  backdrop-filter: blur(14px); box-shadow: 0 30px 80px rgba(20, 10, 70, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  transform: rotateY(-10deg) rotateX(6deg); animation: tilt 9s ease-in-out infinite alternate; display: grid; gap: 1rem; }
@keyframes tilt { from { transform: rotateY(-10deg) rotateX(6deg); } to { transform: rotateY(-2deg) rotateX(2deg) translateY(-8px); } }
.demo-head { display: flex; align-items: center; gap: .8rem; position: relative; }
.demo-head svg { border-radius: 8px; }
.demo-head div { display: grid; flex: 1; }
.demo-head div span { font-family: var(--mono); font-size: .8rem; color: #9c9abb; }
.demo-badge { position: absolute; right: 0; top: .2rem; font-size: .74rem; font-weight: 600; line-height: 1; padding: .35rem .65rem; border-radius: 999px; }
.demo-badge.starting { color: #fcd34d; background: rgba(252, 211, 77, .14); animation: badge-a 8s steps(1) infinite; }
.demo-badge.running { color: #c4b5fd; background: rgba(139, 92, 246, .22); animation: badge-b 8s steps(1) infinite; }
@keyframes badge-a { 0%, 72% { opacity: 1; } 73%, 100% { opacity: 0; } }
@keyframes badge-b { 0%, 72% { opacity: 0; } 73%, 100% { opacity: 1; } }
.demo-chips { display: flex; gap: .45rem; flex-wrap: wrap; }
.demo-chips span { font-size: .8rem; color: #a9a7c9; padding: .22rem .65rem; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); }
.demo-chips b { color: #fff; }
.demo-bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.demo-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #3b82f6, #8b5cf6, #3b82f6); background-size: 200% 100%;
  animation: fill 8s ease-in-out infinite, bar-shimmer 1.6s linear infinite; }
@keyframes fill { 0% { width: 4%; } 70% { width: 100%; } 100% { width: 100%; } }
@keyframes bar-shimmer { from { background-position: 200% 0; } to { background-position: 0 0; } }
.demo-log { background: #07071a; border-radius: 12px; padding: .85rem 1rem; font: .78rem/1.7 var(--mono); color: #b8b5de; min-height: 9.2rem; }
.demo-log p { overflow: hidden; white-space: nowrap; width: 0; animation-duration: 8s; animation-iteration-count: infinite; animation-timing-function: steps(36, end); }
.demo-log .ok { color: #c4b5fd; }
.demo-log .t1 { animation-name: type1; } .demo-log .t2 { animation-name: type2; } .demo-log .t3 { animation-name: type3; }
.demo-log .t4 { animation-name: type4; } .demo-log .t5 { animation-name: type5; }
@keyframes type1 { 0% { width: 0; } 10%, 100% { width: 100%; } }
@keyframes type2 { 0%, 14% { width: 0; } 22%, 100% { width: 100%; } }
@keyframes type3 { 0%, 28% { width: 0; } 40%, 100% { width: 100%; } }
@keyframes type4 { 0%, 66% { width: 0; } 74%, 100% { width: 100%; } }
@keyframes type5 { 0%, 82% { width: 0; } 90%, 100% { width: 100%; } }

/* steps + features */
.land-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 760px) { .land-steps { grid-template-columns: minmax(0, 1fr); } }
.step, .feat { background: rgba(22, 20, 48, .6); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 1.4rem; backdrop-filter: blur(10px);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.step:hover, .feat:hover { transform: translateY(-4px); border-color: rgba(167, 139, 250, .45); box-shadow: 0 18px 40px rgba(60, 30, 160, .35); }
.step-n { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 10px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); box-shadow: 0 6px 18px rgba(99, 102, 241, .45); margin-bottom: .9rem; }
.step h2, .feat h3 { font-size: 1.12rem; margin-bottom: .4rem; color: #fff; }
.step p, .feat p { color: #b4b2d6; line-height: 1.55; }
.land-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 1rem; }
.feat svg { display: block; margin-bottom: .9rem; border-radius: 6px; }

/* call to action, bottom middle */
.land-cta { display: grid; justify-items: center; gap: 1rem; text-align: center; padding-top: 1rem; }
.land-cta p { color: #9c9abb; font-size: .9rem; }
.btn-craft { position: relative; display: inline-block; overflow: hidden; padding: 1.1rem 2.8rem; border-radius: 14px; text-decoration: none;
  font-size: 1.2rem; font-weight: 800; letter-spacing: .02em; color: #fff;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6 60%, #c026d3); background-size: 160% 160%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 12px 40px rgba(124, 58, 237, .55);
  animation: pulse-glow 2.8s ease-in-out infinite, grad-move 6s ease infinite;
  transition: transform .15s ease; }
.btn-craft::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); transform: skewX(-20deg); animation: sweep 3.5s ease-in-out infinite; }
.btn-craft span { position: relative; z-index: 1; }
.btn-craft:hover { transform: translateY(-3px) scale(1.03); }
.btn-craft:active { transform: translateY(0) scale(.99); }
.btn-craft:focus-visible { outline: 3px solid #c4b5fd; outline-offset: 4px; }
@keyframes pulse-glow { 0%, 100% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 12px 40px rgba(124, 58, 237, .5); }
  50% { box-shadow: 0 0 0 1px rgba(255, 255, 255, .18) inset, 0 16px 60px rgba(124, 58, 237, .85); } }
@keyframes grad-move { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes sweep { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* entrance: a staggered slide-up. Only position animates, never opacity, so text can't be left
   invisible if a browser delays or skips animations. */
.reveal { animation: reveal .9s cubic-bezier(.2, .7, .2, 1); }
.r1 { animation-duration: .7s; } .r2 { animation-duration: .85s; } .r3 { animation-duration: 1s; } .r4 { animation-duration: 1.15s; }
.r5 { animation-duration: 1.3s; } .r6 { animation-duration: 1.45s; } .r7 { animation-duration: 1.6s; } .r8 { animation-duration: 1.75s; }
@keyframes reveal { 0%, 25% { transform: translateY(26px); } 100% { transform: none; } }

@media (max-width: 700px) {
  .landing .f2, .landing .f3, .landing .f5, .landing .f6 { display: none; }
  .demo-card { transform: none; animation: none; }
  .land { gap: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
  .landing *, .landing *::after { animation: none !important; transition: none !important; }
  .demo-log p { width: 100%; }
  .demo-bar i { width: 100%; }
  .demo-badge.starting { display: none; }
  .demo-badge.running { opacity: 1; }
}
