/* ============================================================
   MacroRift — styles.css
   Dark "rift" theme · violet → cyan · glassmorphism
   ============================================================ */

:root {
  --bg:        #08080c;
  --bg-2:      #0c0c14;
  --surface:   rgba(255,255,255,.025);
  --surface-2: rgba(255,255,255,.05);
  --border:    rgba(255,255,255,.08);
  --border-2:  rgba(255,255,255,.15);

  --text:   #f4f4f8;
  --dim:    #a5a5bd;
  --faint:  #6c6c83;

  --violet:  #8b5cf6;
  --violet-l:#a78bfa;
  --purple:  #a855f7;
  --cyan:    #22d3ee;
  --magenta: #e879f9;

  --grad:      linear-gradient(120deg,#c084fc 0%,#8b5cf6 42%,#22d3ee 100%);
  --grad-soft: linear-gradient(120deg,#a855f7,#8b5cf6 45%,#22d3ee);

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --pill: 999px;

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', var(--font);
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --maxw: 1180px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section[id], main { scroll-margin-top: 84px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }

/* ambient page glow */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(680px 480px at 78% -4%, rgba(139,92,246,.22), transparent 70%),
    radial-gradient(620px 520px at 8% 8%, rgba(34,211,238,.12), transparent 70%);
  pointer-events: none; z-index: 0;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
::selection { background: rgba(139,92,246,.4); color: #fff; }

/* scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--violet),var(--cyan));
  border-radius: 99px; border: 3px solid var(--bg);
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }
.container-narrow { max-width: 780px; }

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -.02em; }

.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.grad-flow {
  background: linear-gradient(120deg,#c084fc,#8b5cf6,#22d3ee,#e879f9,#8b5cf6,#c084fc);
  background-size: 280% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: flow 9s linear infinite;
}
@keyframes flow { to { background-position: 280% center; } }

.eyebrow {
  display: inline-block;
  font-family: var(--display);
  font-size: .82rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--violet-l);
  padding: 6px 14px;
  border: 1px solid var(--border-2);
  border-radius: var(--pill);
  background: rgba(139,92,246,.08);
  margin-bottom: 20px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 9px;
  font-family: var(--display);
  font-weight: 600; font-size: .96rem;
  padding: 13px 24px;
  border-radius: var(--pill);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease),
              background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap; user-select: none;
}
.btn .ic { width: 18px; height: 18px; }
.btn-sm { padding: 9px 17px; font-size: .88rem; }
.btn-lg { padding: 16px 30px; font-size: 1.04rem; }

.btn-primary {
  background: var(--grad-soft);
  color: #0a0913; font-weight: 700;
  box-shadow: 0 10px 34px -8px rgba(139,92,246,.6), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 46px -8px rgba(139,92,246,.8), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-primary:active { transform: translateY(-1px); }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.28);
  transform: translateY(-3px);
}
.btn-ghost:active { transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

/* ============ REVEAL ============ */
.reveal {
  opacity: 0; transform: translateY(34px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
.reveal[data-delay="5"] { transition-delay: .40s; }

/* ============ GLOBAL OVERLAYS ============ */
.cursor-glow {
  position: fixed; top: 0; left: 0;
  width: 460px; height: 460px;
  margin: -230px 0 0 -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,.16), transparent 62%);
  pointer-events: none; z-index: 9998;
  mix-blend-mode: screen;
  transition: opacity .3s ease; opacity: 0;
}
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--grad); z-index: 9999;
  box-shadow: 0 0 12px rgba(139,92,246,.8);
}
.toast {
  position: fixed; left: 50%; bottom: 34px;
  transform: translate(-50%, 140%);
  background: rgba(18,18,28,.96);
  border: 1px solid var(--border-2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--text);
  padding: 14px 22px; border-radius: var(--pill);
  font-size: .92rem; font-weight: 500;
  box-shadow: 0 20px 50px -12px rgba(0,0,0,.7), 0 0 0 1px rgba(139,92,246,.2);
  z-index: 9999; max-width: 90vw;
  transition: transform .45s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }
.toast::before { content: "◆ "; color: var(--cyan); }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 900;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,8,12,.78);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 22px; height: 74px; }

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 32px; height: 32px; filter: drop-shadow(0 2px 8px rgba(139,92,246,.5)); }
.brand-name {
  font-family: var(--display); font-weight: 700;
  font-size: 1.32rem; letter-spacing: -.02em;
}

.nav-links { display: flex; gap: 6px; margin-left: 8px; }
.nav-links a {
  position: relative;
  font-size: .94rem; font-weight: 500;
  color: var(--dim);
  padding: 8px 14px; border-radius: var(--r-sm);
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--grad);
}
.nav-actions { display: flex; gap: 10px; margin-left: auto; align-items: center; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 42px; height: 42px; margin-left: auto;
  align-items: center; justify-content: center;
  border: 1px solid var(--border-2); border-radius: var(--r-sm);
  background: var(--surface-2);
}
.nav-toggle span {
  width: 18px; height: 2px; border-radius: 2px; background: var(--text);
  transition: transform .3s var(--ease), opacity .2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; top: 74px; left: 0; right: 0; z-index: 850;
  background: rgba(10,10,16,.98);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px 26px 26px;
  transform: translateY(-130%);
  transition: transform .4s var(--ease);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  padding: 13px 8px; font-size: 1.05rem; font-weight: 500;
  color: var(--dim); border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-of-type {
  border: none; margin-top: 12px; justify-content: center;
}
.mobile-menu a.btn { color: #0a0913; }

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 132px 0 90px;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.hero-orbs { position: absolute; inset: 0; z-index: 0; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .5;
}
.orb-1 { width: 460px; height: 460px; top: -120px; left: -80px;
  background: radial-gradient(circle,#7c3aed,transparent 68%); }
.orb-2 { width: 520px; height: 520px; top: 4%; right: -160px;
  background: radial-gradient(circle,#0891b2,transparent 68%);
  animation: float 14s ease-in-out infinite; }
.orb-3 { width: 380px; height: 380px; bottom: -80px; left: 38%;
  background: radial-gradient(circle,#c026d3,transparent 68%); opacity: .35;
  animation: float 18s ease-in-out infinite reverse; }
@keyframes float {
  50% { transform: translate(40px,-36px) scale(1.12); }
}
.hero-grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 18%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 18%, #000 30%, transparent 75%);
}

.hero-inner {
  position: relative; z-index: 3;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .85rem; font-weight: 500;
  padding: 7px 8px 7px 14px;
  border: 1px solid var(--border-2); border-radius: var(--pill);
  background: var(--surface-2);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  margin-bottom: 30px;
  transition: border-color .2s ease, transform .2s ease;
}
.badge:hover { border-color: rgba(167,139,250,.5); transform: translateY(-2px); }
.badge .ic { width: 15px; height: 15px; color: var(--violet-l); }
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 0 4px rgba(34,211,238,.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(34,211,238,0); } }

.hero-title {
  font-size: clamp(2.7rem, 7.2vw, 5.2rem);
  line-height: 1.04;
  margin-bottom: 22px;
}
.hero-lead {
  max-width: 620px;
  font-size: clamp(1.04rem, 1.7vw, 1.28rem);
  color: var(--dim);
  margin-bottom: 34px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-bottom: 28px; }
.hero-chips { display: flex; gap: 22px; flex-wrap: wrap; justify-content: center; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .9rem; color: var(--dim);
}
.chip-tick {
  display: grid; place-items: center;
  width: 19px; height: 19px; border-radius: 50%;
  background: rgba(34,211,238,.14); color: var(--cyan);
  font-size: .68rem; font-weight: 700;
}

/* hero app window */
.hero-window-wrap {
  position: relative; z-index: 3;
  width: 100%; max-width: 920px;
  margin-top: 70px; padding: 0 26px;
  perspective: 1800px;
}
.window-glow {
  position: absolute; inset: -10% 6% 12%;
  background: radial-gradient(ellipse at 50% 40%, rgba(139,92,246,.4), transparent 68%);
  filter: blur(50px); z-index: -1;
}
.app-window {
  border-radius: 14px;
  border: 1px solid var(--border-2);
  background: linear-gradient(180deg,#13131d,#0c0c14);
  box-shadow: 0 50px 100px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(139,92,246,.12);
  overflow: hidden;
  transform: rotateX(11deg) scale(.99);
  transform-origin: 50% 100%;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.app-window:hover {
  transform: rotateX(0deg) scale(1);
  box-shadow: 0 60px 120px -28px rgba(0,0,0,.9), 0 0 0 1px rgba(139,92,246,.3);
}
.aw-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 11px 16px;
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--border);
}
.aw-traffic { display: flex; gap: 7px; }
.aw-traffic span { width: 11px; height: 11px; border-radius: 50%; background: #2c2c3a; }
.aw-traffic span:first-child { background: #ff5f57; }
.aw-traffic span:nth-child(2) { background: #febc2e; }
.aw-traffic span:nth-child(3) { background: #28c840; }
.aw-title {
  font-size: .82rem; color: var(--faint);
  font-family: var(--mono); margin: 0 auto;
}
.aw-rec {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  color: #ff6b6b;
}
.rec-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ff5f57;
  box-shadow: 0 0 10px #ff5f57; animation: pulse-rec 1.4s ease-in-out infinite;
}
@keyframes pulse-rec { 50% { opacity: .25; } }

.aw-body { display: grid; grid-template-columns: 200px 1fr; min-height: 320px; }
.aw-side {
  border-right: 1px solid var(--border);
  padding: 16px 12px; background: rgba(0,0,0,.25);
}
.aw-side-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint);
  padding: 0 8px; margin: 6px 0 8px;
}
.aw-side-label:not(:first-child) { margin-top: 20px; }
.aw-macro {
  display: flex; align-items: center; gap: 9px;
  font-size: .85rem; color: var(--dim);
  padding: 8px; border-radius: 8px;
}
.aw-macro.active { background: rgba(139,92,246,.16); color: var(--text); }
.aw-mi {
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--violet); flex-shrink: 0;
}
.aw-mi.tri { border-radius: 50%; background: var(--cyan); }

.aw-main { display: flex; flex-direction: column; }
.aw-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.aw-tool {
  font-size: .78rem; font-weight: 600;
  padding: 6px 12px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--dim);
}
.aw-tool.rec { color: #ff8585; border-color: rgba(255,95,87,.3); }
.aw-tool.play { color: var(--cyan); border-color: rgba(34,211,238,.3); }
.aw-tool.ghost { color: var(--faint); }
.aw-tool-spacer { flex: 1; }
.aw-steps { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.aw-step {
  display: flex; align-items: center; gap: 10px;
  font-size: .86rem; color: var(--dim);
  padding: 10px 12px; border-radius: 9px;
  background: var(--surface); border: 1px solid var(--border);
}
.aw-step b { color: var(--text); font-weight: 600; }
.aw-step.running {
  border-color: rgba(34,211,238,.5);
  background: rgba(34,211,238,.07);
  box-shadow: 0 0 22px -6px rgba(34,211,238,.5);
}
.aw-num {
  width: 20px; height: 20px; border-radius: 6px;
  background: var(--surface-2); color: var(--faint);
  font-size: .72rem; font-weight: 700;
  display: grid; place-items: center; flex-shrink: 0;
}
.aw-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.aw-dot.k { background: var(--violet-l); }
.aw-dot.m { background: var(--cyan); }
.aw-dot.d { background: #fbbf24; }
.aw-dot.s { background: var(--magenta); }
.aw-meta { margin-left: auto; font-size: .76rem; color: var(--faint); }
.aw-status {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-top: 1px solid var(--border);
  font-size: .76rem; color: var(--faint);
  font-family: var(--mono);
}
.aw-stat-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #28c840;
  box-shadow: 0 0 8px #28c840;
}
.aw-status-right { margin-left: auto; }

.scroll-cue {
  position: relative; z-index: 3;
  margin-top: 56px;
  display: grid; place-items: center;
}
.mouse-ico {
  width: 26px; height: 40px; border-radius: 14px;
  border: 2px solid var(--border-2);
  display: flex; justify-content: center; padding-top: 7px;
}
.mouse-ico span {
  width: 4px; height: 8px; border-radius: 2px; background: var(--violet-l);
  animation: scroll-dot 1.8s ease-in-out infinite;
}
@keyframes scroll-dot { 50% { transform: translateY(8px); opacity: .3; } }

/* ============ STATS BAND ============ */
.stats-band {
  position: relative; z-index: 2;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}
.stats-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 1px; background: var(--border);
}
.stat {
  background: var(--bg-2);
  padding: 44px 22px; text-align: center;
}
.stat-num {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.2rem,4vw,3rem);
  line-height: 1; margin-bottom: 8px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat-suffix { font-size: .65em; }
.stat-label { color: var(--dim); font-size: .94rem; }

/* ============ SECTIONS ============ */
.section { position: relative; z-index: 2; padding: 116px 0; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 64px; }
.section-head h2 { font-size: clamp(2rem,4.4vw,3.2rem); margin-bottom: 16px; }
.section-sub { color: var(--dim); font-size: 1.1rem; }

/* ============ FEATURES ============ */
.feature-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 22px;
}
.feature-card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform .3s var(--ease), border-color .3s ease, background .3s ease;
}
.feature-card::before {
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  top: var(--my,50%); left: var(--mx,50%);
  transform: translate(-50%,-50%);
  background: radial-gradient(circle, rgba(139,92,246,.16), transparent 65%);
  opacity: 0; transition: opacity .3s ease; pointer-events: none;
}
.feature-card:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(139,92,246,.25), rgba(34,211,238,.15));
  border: 1px solid var(--border-2);
  margin-bottom: 20px;
  transition: transform .3s var(--ease), box-shadow .3s ease;
}
.feature-icon svg { width: 26px; height: 26px; color: var(--violet-l); }
.feature-card:hover .feature-icon {
  transform: scale(1.08) rotate(-4deg);
  box-shadow: 0 10px 30px -8px rgba(139,92,246,.6);
}
.feature-card h3 { font-size: 1.26rem; margin-bottom: 9px; position: relative; }
.feature-card p { color: var(--dim); font-size: .96rem; position: relative; }

/* ============ HOW IT WORKS ============ */
.how { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.steps {
  position: relative;
  display: grid; grid-template-columns: repeat(4,1fr); gap: 24px;
}
.step-line {
  position: absolute; top: 38px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--violet), var(--cyan), transparent);
  opacity: .5;
}
.step { position: relative; text-align: center; padding: 0 6px; }
.step-num {
  font-family: var(--display); font-weight: 700; font-size: .82rem;
  letter-spacing: .1em; color: var(--faint); margin-bottom: 14px;
}
.step-icon {
  width: 70px; height: 70px; margin: 0 auto 20px;
  border-radius: 20px;
  display: grid; place-items: center;
  background: linear-gradient(150deg,#15151f,#0d0d15);
  border: 1px solid var(--border-2);
  box-shadow: 0 14px 34px -14px rgba(139,92,246,.5);
  position: relative;
}
.step-icon::after {
  content: ""; position: absolute; inset: -1px; border-radius: 20px;
  padding: 1px;
  background: linear-gradient(150deg, rgba(167,139,250,.6), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.step-icon svg { width: 30px; height: 30px; color: var(--violet-l); }
.step h3 { font-size: 1.22rem; margin-bottom: 8px; }
.step p { color: var(--dim); font-size: .93rem; }

/* ============ PLAYGROUND ============ */
.playground { overflow: hidden; }
.builder {
  display: grid;
  grid-template-columns: 264px minmax(0,1fr) minmax(0,1.04fr);
  gap: 18px;
  align-items: start;
}
.builder-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}
.panel-label {
  font-family: var(--display);
  font-size: .74rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* palette */
.palette-btn {
  width: 100%;
  display: flex; align-items: center; gap: 12px;
  padding: 12px; margin-bottom: 9px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-align: left;
  transition: transform .2s var(--ease), border-color .2s ease, background .2s ease;
}
.palette-btn:hover {
  transform: translateX(4px);
  border-color: var(--border-2);
  background: rgba(139,92,246,.1);
}
.pb-icon {
  width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center; font-size: 1.05rem;
  flex-shrink: 0; border: 1px solid var(--border);
}
.pb-icon.k { background: rgba(167,139,250,.16); }
.pb-icon.m { background: rgba(34,211,238,.16); }
.pb-icon.v { background: rgba(232,121,249,.16); }
.pb-icon.d { background: rgba(251,191,36,.16); }
.pb-text { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.pb-text b { font-size: .9rem; font-weight: 600; }
.pb-text small { font-size: .76rem; color: var(--faint); }
.pb-plus {
  font-size: 1.2rem; color: var(--faint); font-weight: 300;
  transition: color .2s ease, transform .2s ease;
}
.palette-btn:hover .pb-plus { color: var(--violet-l); transform: scale(1.3) rotate(90deg); }

.preset-label { margin-top: 22px; }
.builder-select {
  width: 100%;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text); font-family: inherit; font-size: .88rem;
  cursor: pointer;
}
.builder-select:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.builder-select option { background: #14141c; }

/* sequence */
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.panel-head .panel-label { margin-bottom: 0; }
.step-count {
  font-family: var(--font); font-size: .72rem; font-weight: 600;
  letter-spacing: 0; text-transform: none;
  color: var(--violet-l);
  background: rgba(139,92,246,.14);
  padding: 3px 9px; border-radius: var(--pill);
}
.repeat-control {
  display: flex; align-items: center; gap: 7px;
  font-size: .8rem; color: var(--dim);
}
.rep-btn {
  width: 24px; height: 24px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 1rem; line-height: 1;
  display: grid; place-items: center;
  transition: background .15s ease, transform .15s ease;
}
.rep-btn:hover { background: rgba(139,92,246,.2); transform: scale(1.1); }
.rep-val { font-weight: 700; color: var(--text); min-width: 14px; text-align: center; }
.rep-x { color: var(--faint); }

.seq-list {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 220px; margin-bottom: 16px;
}
.seq-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  text-align: center; color: var(--faint);
  font-size: .9rem; padding: 30px 16px;
  border: 1.5px dashed var(--border-2); border-radius: var(--r);
}
.seq-empty-glyph { font-size: 1.8rem; color: var(--violet); opacity: .5; }

.seq-step {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: border-color .25s ease, background .25s ease, transform .25s var(--ease);
  animation: stepIn .35s var(--ease);
}
@keyframes stepIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } }
.seq-step.active {
  border-color: var(--cyan);
  background: rgba(34,211,238,.1);
  box-shadow: 0 0 26px -6px rgba(34,211,238,.6);
  transform: scale(1.02);
}
.seq-step.done { opacity: .5; }
.step-idx {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: var(--bg); border: 1px solid var(--border);
  font-size: .72rem; font-weight: 700; color: var(--faint);
  display: grid; place-items: center;
}
.seq-step.active .step-idx { background: var(--cyan); color: #04121a; border-color: var(--cyan); }
.step-ico {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: .95rem;
  border: 1px solid var(--border);
}
.step-ico.key   { background: rgba(167,139,250,.18); }
.step-ico.click { background: rgba(34,211,238,.18); }
.step-ico.move  { background: rgba(232,121,249,.18); }
.step-ico.delay { background: rgba(251,191,36,.18); }
.step-name { font-size: .88rem; font-weight: 600; min-width: 78px; }
.step-value {
  margin-left: auto;
  padding: 6px 9px; border-radius: 7px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font-family: var(--mono); font-size: .8rem;
  cursor: pointer; max-width: 116px;
}
.step-value:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.step-value[type="number"] { width: 78px; }
.step-del {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--faint); font-size: 1rem; line-height: 1;
  display: grid; place-items: center;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.step-del:hover { background: rgba(255,95,87,.18); color: #ff8585; transform: scale(1.12); }

.builder-controls { display: flex; gap: 9px; flex-wrap: wrap; }
.builder-controls .btn { padding: 11px 18px; font-size: .9rem; }
.btn-clear { margin-left: auto; }

/* visualizer */
.viz-status {
  font-family: var(--font); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint);
  padding: 3px 9px; border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid var(--border);
}
.viz-status.running { color: var(--cyan); border-color: rgba(34,211,238,.4); background: rgba(34,211,238,.1); }
.viz-status.done { color: #28c840; border-color: rgba(40,200,64,.4); }

.viz-screen {
  position: relative;
  min-height: 250px;
  border-radius: var(--r);
  background:
    radial-gradient(circle at 50% 40%, rgba(139,92,246,.1), transparent 70%),
    #0a0a11;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  gap: 26px; flex-wrap: wrap;
  padding: 26px 20px; margin-bottom: 14px;
  overflow: hidden;
}
.viz-target {
  position: absolute; width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid var(--border-2);
}
.viz-target[data-pos="tl"] { top: 16px; left: 16px; }
.viz-target[data-pos="tr"] { top: 16px; right: 16px; }
.viz-target[data-pos="c"]  { top: 50%; left: 50%; transform: translate(-50%,-50%); }
.viz-target[data-pos="bl"] { bottom: 16px; left: 16px; }
.viz-target[data-pos="br"] { bottom: 16px; right: 16px; }
.cursor-dot {
  position: absolute; width: 16px; height: 16px; border-radius: 50%;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  background: radial-gradient(circle,#fff,var(--cyan));
  box-shadow: 0 0 16px 4px rgba(34,211,238,.7);
  z-index: 5; pointer-events: none;
  transition: top .55s var(--ease), left .55s var(--ease), transform .15s ease;
}
.cursor-dot.click { transform: translate(-50%,-50%) scale(.55); }

/* keyboard */
.keyboard { display: flex; flex-direction: column; gap: 7px; align-items: center; }
.kb-row { display: flex; gap: 7px; }
.key {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: .82rem; font-weight: 600;
  color: var(--dim);
  background: linear-gradient(180deg,#1c1c28,#13131c);
  border: 1px solid var(--border-2);
  box-shadow: 0 3px 0 #07070b, inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .1s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.key-wide { width: 64px; font-size: .74rem; }
.key-space { width: 132px; }
.key-sm { width: 34px; height: 34px; font-size: .9rem; }
.kb-arrows { display: flex; flex-direction: column; gap: 6px; align-items: center; margin-top: 4px; }
.kb-arrow-row { display: flex; gap: 6px; }
.key.active {
  color: #fff;
  background: var(--grad-soft);
  border-color: var(--violet-l);
  box-shadow: 0 0 22px 2px rgba(139,92,246,.8), inset 0 1px 0 rgba(255,255,255,.4);
  transform: translateY(3px) scale(1.04);
}

/* mouse */
.mouse-viz { display: grid; place-items: center; }
.mouse-shell {
  position: relative;
  width: 66px; height: 102px;
  border-radius: 33px 33px 28px 28px;
  background: linear-gradient(180deg,#1c1c28,#101018);
  border: 1px solid var(--border-2);
  box-shadow: inset 0 2px 8px rgba(0,0,0,.6);
}
.mouse-btn {
  position: absolute; top: 0; height: 46px;
  transition: background .12s ease, box-shadow .12s ease;
}
.mouse-btn.left  { left: 0; width: 50%; border-radius: 32px 0 0 0; border-right: 1px solid var(--border-2); }
.mouse-btn.right { right: 0; width: 50%; border-radius: 0 32px 0 0; }
.mouse-wheel {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 7px; height: 20px; border-radius: 4px;
  background: #2a2a3a; border: 1px solid var(--border-2);
  transition: background .12s ease, box-shadow .12s ease;
}
.mouse-btn.active {
  background: var(--grad-soft);
  box-shadow: 0 0 22px rgba(34,211,238,.7);
}
.mouse-wheel.active { background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }

/* console */
.console {
  height: 124px; overflow-y: auto;
  border-radius: var(--r-sm);
  background: #07070c;
  border: 1px solid var(--border);
  padding: 12px 14px;
  font-family: var(--mono); font-size: .79rem; line-height: 1.7;
}
.console-line { color: var(--cyan); white-space: pre-wrap; }
.console-line.muted { color: var(--faint); }
.console-line.key   { color: var(--violet-l); }
.console-line.click { color: var(--cyan); }
.console-line.move  { color: var(--magenta); }
.console-line.delay { color: #fbbf24; }
.console-line.sys   { color: #28c840; }

/* ============ COMPARE ============ */
.compare-section { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.compare {
  max-width: 880px; margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.compare-row {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}
.compare-row:last-child { border-bottom: none; }
.compare-row > div { padding: 17px 20px; display: flex; align-items: center; }
.compare-head { background: var(--surface-2); }
.compare-head > div { font-family: var(--display); font-weight: 600; font-size: .92rem; }
.compare-feat { color: var(--dim); font-size: .94rem; }
.compare-us {
  background: rgba(139,92,246,.07);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  font-weight: 600;
}
.compare-head .compare-us { color: var(--violet-l); }
.compare-them { color: var(--faint); }
.compare-row:not(.compare-head):hover { background: rgba(255,255,255,.02); }
.yes { color: #4ade80; font-size: .92rem; font-weight: 600; }
.no { color: var(--faint); font-size: .9rem; }

/* ============ DOWNLOAD ============ */
.download-card {
  position: relative;
  max-width: 760px; margin: 0 auto;
  text-align: center;
  padding: 64px 44px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(139,92,246,.12), var(--surface));
  border: 1px solid var(--border-2);
  overflow: hidden;
}
.download-card .download-glow {
  position: absolute; top: -60%; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(34,211,238,.2), transparent 62%);
  filter: blur(40px);
}
.download-card > * { position: relative; }
.download-card h2 { font-size: clamp(2rem,4vw,2.9rem); margin-bottom: 12px; }
.download-sub { color: var(--dim); font-size: 1.08rem; margin-bottom: 30px; }
.download-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }
.download-meta {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  font-size: .84rem; color: var(--faint); font-family: var(--mono);
  margin-bottom: 28px;
}
.download-meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }
.download-includes {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px;
}
.download-includes li { font-size: .9rem; color: var(--dim); }

/* ============ FAQ ============ */
.faq { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color .25s ease, background .25s ease;
}
.faq-item[open] { border-color: var(--border-2); background: var(--surface-2); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; cursor: pointer;
  padding: 20px 22px;
  font-family: var(--display); font-weight: 600; font-size: 1.04rem;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chev {
  flex-shrink: 0;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 1.2rem; font-weight: 300; color: var(--violet-l);
  transition: transform .3s var(--ease), background .2s ease;
}
.faq-item[open] .faq-chev { transform: rotate(135deg); background: rgba(139,92,246,.2); }
.faq-body {
  padding: 0 22px 22px;
  color: var(--dim); font-size: .98rem;
}

/* ============ CTA STRIP ============ */
.cta-strip { position: relative; z-index: 2; padding: 30px 0 120px; }
.cta-strip-inner {
  position: relative;
  text-align: center;
  padding: 64px 40px;
  border-radius: var(--r-lg);
  background: linear-gradient(125deg, rgba(139,92,246,.18), rgba(34,211,238,.1));
  border: 1px solid var(--border-2);
  overflow: hidden;
}
.cta-strip-inner::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(232,121,249,.18), transparent 55%);
}
.cta-strip-inner > * { position: relative; }
.cta-strip-inner h2 { font-size: clamp(1.7rem,3.6vw,2.6rem); margin-bottom: 12px; }
.cta-strip-inner p { color: var(--dim); margin-bottom: 28px; font-size: 1.05rem; }

/* ============ FOOTER ============ */
.footer {
  position: relative; z-index: 2;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 64px 0 30px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 44px;
  border-bottom: 1px solid var(--border);
}
.footer-tag { color: var(--dim); font-size: .92rem; margin-top: 16px; max-width: 320px; }
.footer-col h4 {
  font-size: .82rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); margin-bottom: 16px;
}
.footer-col a {
  display: block; color: var(--dim); font-size: .94rem;
  padding: 6px 0; transition: color .2s ease, transform .2s ease;
}
.footer-col a:hover { color: var(--violet-l); transform: translateX(4px); }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-top: 26px;
  font-size: .84rem; color: var(--faint);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1080px) {
  .builder { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 940px) {
  .nav-links { display: none; }
  .nav-actions { display: none; }
  .nav-toggle { display: flex; }
  .steps { grid-template-columns: repeat(2,1fr); gap: 40px 24px; }
  .step-line { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 680px) {
  .container { padding: 0 18px; }
  .section { padding: 84px 0; }
  .section-head { margin-bottom: 44px; }
  .hero { padding-top: 116px; }
  .hero-window-wrap { margin-top: 50px; padding: 0; }
  .app-window { transform: none; }
  .app-window:hover { transform: none; }
  .aw-body { grid-template-columns: 1fr; }
  .aw-side { display: none; }
  .aw-meta { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { padding: 32px 16px; }
  .compare-row { grid-template-columns: 1.3fr 1fr 1fr; }
  .compare-row > div { padding: 13px 11px; font-size: .82rem; }
  .compare-feat { font-size: .82rem; }
  .download-card { padding: 44px 22px; }
  .cta-strip-inner { padding: 44px 22px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .btn-lg { padding: 14px 24px; font-size: .98rem; }
  .hero-cta { width: 100%; }
  .hero-cta .btn { flex: 1; min-width: 0; }
}
@media (max-width: 420px) {
  .key { width: 36px; height: 36px; }
  .key-space { width: 104px; }
  .key-wide { width: 54px; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important;
      transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .cursor-glow { display: none; }
}
