/* ============================================================
   Catalyst — marketing site
   Design tokens copied from the app (src/css/styles.css).
   The theme engine in site.js overwrites these custom props
   live, so picking a theme in the demo re-themes the whole page.
   ============================================================ */
:root {
  --bg: #000000;
  --bg-1: #060608;
  --surface: #0e0e11;
  --surface-2: #151519;
  --surface-3: #1c1c21;
  --surface-4: #25252c;
  --border: #1f1f24;
  --border-2: #2c2c33;
  --border-strong: #3a3a43;
  --text: #f5f5f7;
  --text-2: #9b9ba6;
  --text-3: #62626c;
  --text-4: #3f3f47;
  --on: #ffffff;
  --on-soft: rgba(255, 255, 255, 0.08);
  --on-softer: rgba(255, 255, 255, 0.04);
  --danger: #ff5460;
  --radius: 12px;
  --radius-sm: 9px;
  --radius-xs: 6px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.5, 1);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.45);

  /* ambient glow (theme-driven) */
  --glow: rgba(255, 255, 255, 0.06);
  --glow-strong: rgba(255, 255, 255, 0.14);

  /* editor + syntax tokens (theme-driven) — defaults = "Mono" preset */
  --ed-bg: #08080a;
  --ed-fg: #e9e9ee;
  --ed-ln: #34343b;
  --ed-cursor: #ffffff;
  --ed-sel: rgba(255, 255, 255, 0.12);
  --tk-com: #5a5a63;
  --tk-key: #ffffff;
  --tk-str: #b7b7c0;
  --tk-num: #8c8c95;
  --tk-fn: #d6d6dc;

  /* site-specific */
  --nav-h: 64px;
  --maxw: 1120px;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Menlo", monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background 0.5s var(--ease), color 0.5s var(--ease);
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

::selection {
  background: var(--on-soft);
}

/* ambient backdrop glows (tint with theme accent) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 50% -8%, var(--glow), transparent 70%),
    radial-gradient(40% 40% at 85% 8%, var(--glow), transparent 70%);
  transition: background 0.5s var(--ease);
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.18s var(--ease-spring), background 0.18s var(--ease),
    border-color 0.18s var(--ease), opacity 0.18s var(--ease);
}
.btn:hover {
  background: var(--surface-3);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn svg {
  width: 17px;
  height: 17px;
}
.btn.primary {
  background: var(--on);
  border-color: var(--on);
  color: #000;
}
.btn.primary:hover {
  filter: brightness(0.95);
  box-shadow: 0 10px 32px -10px var(--on);
}
.btn.ghost {
  background: transparent;
  border-color: var(--border-2);
}
.btn.ghost:hover {
  background: var(--on-softer);
}
.btn.sm {
  height: 38px;
  padding: 0 16px;
  font-size: 13px;
}
.btn:disabled,
.btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   Brand / logo
   ============================================================ */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}
.brand .logo {
  color: var(--on);
  display: grid;
  place-items: center;
}
.brand .badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 2px 7px;
  text-transform: uppercase;
}

/* ============================================================
   Navbar
   ============================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  background: var(--glow), rgba(6, 6, 8, 0.6);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.scrolled {
  border-bottom-color: var(--border);
}
.nav .wrap {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}
.nav .brand {
  justify-self: start;
}
.nav .nav-right {
  justify-self: end;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.16s var(--ease), background 0.16s var(--ease);
}
.nav-links a:hover {
  color: var(--text);
  background: var(--on-softer);
}
.nav-links a.active {
  color: var(--text);
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg {
  width: 20px;
  height: 20px;
}
/* lock background scroll while the mobile nav drawer is open */
body.nav-open {
  overflow: hidden;
}

/* ============================================================
   Section scaffolding
   ============================================================ */
section {
  position: relative;
  z-index: 1;
  padding: 96px 0;
}
.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--on);
  background: var(--on-softer);
  border: 1px solid var(--on-soft);
  border-radius: 999px;
  padding: 5px 13px;
  margin-bottom: 16px;
  transition: color 0.5s var(--ease), background 0.5s var(--ease), border-color 0.5s var(--ease);
}
.section-head {
  max-width: 660px;
  margin: 0 auto 56px;
  text-align: center;
}
h1,
h2,
h3 {
  letter-spacing: -0.6px;
  line-height: 1.1;
  font-weight: 700;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 42px);
  background: linear-gradient(180deg, var(--text) 40%, var(--text-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-head p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 17px;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 72px) 0 80px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.02fr 1.05fr;
  gap: 52px;
  align-items: center;
}
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 13px;
  margin-bottom: 22px;
}
.hero-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #43d17a;
  box-shadow: 0 0 0 3px rgba(67, 209, 122, 0.18);
}
.hero h1 {
  font-size: clamp(36px, 5.4vw, 62px);
  font-weight: 800;
  letter-spacing: -1.4px;
}
.hero h1 .accent {
  background: linear-gradient(105deg, var(--on) 0%, var(--text) 55%, var(--text-2) 110%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lede {
  margin-top: 20px;
  font-size: 18px;
  color: var(--text-2);
  max-width: 520px;
}
.hero-cta {
  margin-top: 30px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-meta {
  margin-top: 22px;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: 13px;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hero-meta svg {
  width: 15px;
  height: 15px;
  color: var(--text-2);
}

/* ============================================================
   App-window chrome (shared by hero + demo)
   ============================================================ */
.mock {
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  background: var(--ed-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  transition: border-color 0.5s var(--ease), background 0.5s var(--ease);
}
/* ----- faithful app titlebar (mirrors the real GUI) ----- */
.aw-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 8px 0 14px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
}
.aw-tb-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.aw-tb-left .logo {
  color: var(--on);
  display: flex;
  filter: drop-shadow(0 0 3px var(--on));
}
.aw-name {
  font-weight: 650;
  font-size: 13px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.aw-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--text-2);
  border: 1px solid var(--border-2);
  border-radius: 5px;
  padding: 2px 5px;
}
.aw-tb-center {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}
.aw-tb-right {
  display: flex;
  gap: 2px;
}
/* hero demo has no center session box — keep window controls at the edge */
#heroDemo .aw-tb-right {
  margin-left: auto;
}
.aw-win {
  width: 30px;
  height: 26px;
  display: grid;
  place-items: center;
  color: var(--text-3);
  border-radius: 7px;
  background: none;
  border: 0;
  cursor: default;
  transition: background 0.15s var(--ease), color 0.15s;
}
.aw-win svg {
  width: 11px;
  height: 11px;
}
.aw-win:hover {
  background: var(--surface-2);
  color: var(--text);
}
.aw-win.close:hover {
  background: var(--danger);
  color: #fff;
}

/* ----- session selector (centered) ----- */
.aw-account-wrap {
  position: relative;
}
.aw-account {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  max-width: 240px;
  padding: 0 10px 0 5px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.18s var(--ease), background 0.18s var(--ease);
}
.aw-account:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.aw-account .chev {
  width: 14px;
  height: 14px;
  color: var(--text-3);
  transition: transform 0.22s var(--ease);
}
.aw-account-wrap.open .aw-account .chev {
  transform: rotate(180deg);
}
.aw-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--bg);
  background: linear-gradient(150deg, var(--on), var(--text-2));
  flex: 0 0 auto;
}
.aw-acc-summary {
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aw-acc-menu {
  position: absolute;
  top: 38px;
  left: 50%;
  width: 296px;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 30;
  overflow: hidden;
}
.aw-acc-menu[hidden] {
  display: none;
}
.aw-acc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border-bottom: 1px solid var(--border);
  font-weight: 650;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
}
.aw-acc-head .h-actions {
  display: flex;
  gap: 6px;
}
.aw-icon-btn {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.aw-icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}
.aw-icon-btn svg {
  width: 14px;
  height: 14px;
}
.aw-acc-list {
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.aw-sess {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.16s var(--ease);
}
.aw-sess:hover {
  background: var(--on-softer);
}
.aw-sess.selected {
  background: var(--on-soft);
}
.aw-sess .s-main {
  flex: 1;
  min-width: 0;
}
.aw-sess .s-name {
  font-size: 13px;
  font-weight: 560;
}
.aw-sess .s-sub {
  font-size: 10.5px;
  color: var(--text-3);
}
.aw-check {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  border-radius: 6px;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  background: transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.aw-check svg {
  width: 11px;
  height: 11px;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
}
.aw-sess.selected .aw-check {
  background: var(--on);
  border-color: var(--on);
}
.aw-sess.selected .aw-check svg {
  opacity: 1;
}
.aw-check svg path {
  fill: none;
  stroke: var(--bg);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.aw-acc-foot {
  display: flex;
  gap: 7px;
  padding: 11px 13px;
  border-top: 1px solid var(--border);
}

/* tabs (interactive) */
.mock-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: none;
}
.mock-tabs::-webkit-scrollbar {
  display: none;
}
.mock-tabs .tab {
  font-size: 12px;
  color: var(--text-3);
  padding: 7px 14px;
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
  border-bottom: none;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.mock-tabs .tab:hover {
  color: var(--text-2);
}
.mock-tabs .tab.active {
  color: var(--text);
  background: var(--ed-bg);
  border-color: var(--border);
}

/* ============================================================
   Live editor (textarea over highlighted <pre>)
   ============================================================ */
.ed {
  display: flex;
  background: var(--ed-bg);
  height: 300px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  transition: background 0.5s var(--ease);
}
.ed-gutter {
  flex: 0 0 auto;
  min-width: 44px;
  padding: 14px 10px 14px 16px;
  text-align: right;
  color: var(--ed-ln);
  background: var(--ed-bg);
  overflow: hidden;
  user-select: none;
  white-space: pre;
}
.ed-area {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
}
.ed-hl,
.ed-input {
  margin: 0;
  border: 0;
  padding: 14px 16px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0;
  tab-size: 2;
  white-space: pre;
  word-wrap: normal;
  overflow-wrap: normal;
}
.ed-hl {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  color: var(--ed-fg);
}
.ed-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  color: transparent;
  caret-color: var(--ed-cursor);
  resize: none;
  outline: none;
  overflow: auto;
}
.ed-input::selection {
  background: var(--ed-sel);
}
.ed-input::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.ed-input::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 6px;
  border: 2px solid var(--ed-bg);
}
.tk-com {
  color: var(--tk-com);
  font-style: italic;
}
.tk-key {
  color: var(--tk-key);
}
.tk-str {
  color: var(--tk-str);
}
.tk-num {
  color: var(--tk-num);
}
.tk-fn {
  color: var(--tk-fn);
}

/* hero editor: fixed height so switching tabs never resizes the page */
#heroDemo .ed {
  height: 286px;
  flex: 0 0 auto;
}

/* ============================================================
   Features
   ============================================================ */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
    background 0.22s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
  background: var(--surface-2);
}
.card .ico {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--on);
  margin-bottom: 18px;
}
.card .ico svg {
  width: 20px;
  height: 20px;
}
.card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.card p {
  color: var(--text-2);
  font-size: 14px;
}

/* ============================================================
   Live demo section — faithful app window
   ============================================================ */
.demo-stage {
  max-width: 940px;
  margin: 0 auto;
}
.app-window {
  background: var(--bg);
}

/* shell = sidebar + content */
.aw-shell {
  display: flex;
  height: 372px;
  min-height: 0;
}
.aw-sidebar {
  width: 168px;
  flex: 0 0 168px;
  background: var(--bg-1);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  gap: 2px;
}
.aw-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 12px;
  color: var(--text-2);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 540;
  text-align: left;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s;
}
.aw-nav::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 3px;
  height: 17px;
  border-radius: 0 3px 3px 0;
  background: var(--on);
  transform: translateY(-50%) scaleY(0);
  transition: transform 0.24s var(--ease-spring);
}
.aw-nav svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: var(--text-3);
  transition: color 0.16s;
}
.aw-nav:hover {
  background: var(--on-softer);
  color: var(--text);
}
.aw-nav.active {
  background: var(--surface-2);
  color: var(--text);
}
.aw-nav.active::before {
  transform: translateY(-50%) scaleY(1);
}
.aw-nav.active svg {
  color: var(--text);
}
.aw-side-foot {
  margin-top: auto;
  padding-top: 6px;
}
.aw-attach {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  font-weight: 600;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: color 0.2s, border-color 0.2s;
}
.aw-attach .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-4);
  flex: 0 0 8px;
  transition: background 0.2s;
}
.aw-attach.attached {
  color: var(--text);
  border-color: var(--border-strong);
}
.aw-attach.attached .dot {
  background: var(--on);
}

/* content area + views */
.aw-content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.aw-view {
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 0; /* override the global `section` padding leaking in */
  display: flex;
  flex-direction: column;
}
.aw-view[hidden] {
  display: none;
}
.aw-view.panel {
  padding: 18px 20px;
  gap: 14px;
  overflow-y: auto;
}
.aw-view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.aw-view-head h3 {
  font-size: 15px;
  font-weight: 650;
}
.aw-muted {
  color: var(--text-3);
  font-size: 12.5px;
}

/* editor view */
.aw-view[data-panel="editor"] {
  justify-content: flex-start;
}
.app-window [data-panel="editor"] .mock-tabs {
  flex: 0 0 auto;
}
.app-window .ed {
  flex: 1 1 0;
  height: auto;
  min-height: 0;
}
.app-window .aw-toolbar,
.app-window .aw-console {
  flex: 0 0 auto;
}
.aw-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.aw-sp {
  flex: 1;
}
.awbtn {
  height: 33px;
  padding: 0 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s, transform 0.08s;
}
.awbtn:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}
.awbtn:active {
  transform: scale(0.97);
}
.awbtn.primary {
  background: var(--on);
  border-color: var(--on);
  color: #000;
}
.awbtn.ghost {
  background: transparent;
}

/* console */
.aw-console {
  border-top: 1px solid var(--border);
  background: var(--bg);
  max-height: 132px;
  display: flex;
  flex-direction: column;
}
.aw-console[hidden] {
  display: none;
}
.aw-console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
}
.aw-console-body {
  padding: 8px 12px;
  overflow-y: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}
.aw-console-body .cl {
  white-space: pre-wrap;
}
.aw-console-body .cl .ts {
  color: var(--text-4);
  margin-right: 8px;
}
.aw-console-body .ok {
  color: #43d17a;
}
.aw-console-body .exec {
  color: var(--on);
}
.aw-console-body .warn {
  color: #f0b35e;
}

/* statusbar */
.aw-status {
  height: 26px;
  flex: 0 0 26px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-2);
}
.aw-status .st-attach {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.aw-status .st-attach .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--surface-4);
}
.aw-status .st-attach.attached {
  color: var(--text);
}
.aw-status .st-attach.attached .dot {
  background: var(--on);
}
.aw-status .st-ready {
  color: var(--text);
  font-weight: 600;
}
.aw-status .st-ver {
  color: var(--text-4);
}

/* themes view — big square preset cards */
.aw-theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}
.aw-theme-card {
  text-align: left;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.16s var(--ease), transform 0.16s var(--ease), box-shadow 0.16s;
}
.aw-theme-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.aw-theme-card.active {
  border-color: var(--on);
  box-shadow: 0 0 0 1px var(--on), 0 8px 24px rgba(0, 0, 0, 0.5);
}
.aw-theme-prev {
  height: 62px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
}
.aw-theme-prev .ln {
  height: 5px;
  border-radius: 3px;
}
.aw-theme-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 11px;
  border-top: 1px solid var(--border);
}
.aw-theme-name {
  font-size: 12px;
  font-weight: 600;
}
.aw-theme-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* simple placeholder list rows (hub / autoload / scripts) */
.aw-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.aw-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.aw-row .r-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  color: var(--text-2);
  flex: 0 0 auto;
}
.aw-row .r-ico svg {
  width: 16px;
  height: 16px;
}
.aw-row .r-main {
  flex: 1;
  min-width: 0;
}
.aw-row .r-title {
  font-size: 13px;
  font-weight: 560;
}
.aw-row .r-sub {
  font-size: 11px;
  color: var(--text-3);
}
.aw-row .awbtn {
  height: 28px;
  padding: 0 12px;
}

/* settings view — panels, switches, slider */
.aw-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.aw-panel h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 8px;
}
.aw-set-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.aw-set-row:last-child {
  border-bottom: none;
}
.aw-set-row > label {
  flex: 1;
  font-weight: 550;
  font-size: 13px;
  color: var(--text);
}
.aw-set-value {
  width: 26px;
  text-align: right;
  color: var(--text-2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.aw-license-time {
  font-weight: 650;
  color: var(--on);
  font-size: 13px;
}
.aw-license-hwid {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}
.aw-switch {
  width: 44px;
  height: 25px;
  flex: 0 0 44px;
  border-radius: 999px;
  border: 1px solid var(--border-2);
  background: var(--surface-3);
  position: relative;
  cursor: pointer;
  transition: background 0.22s var(--ease), border-color 0.22s;
}
.aw-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform 0.28s var(--ease-spring), background 0.22s;
}
.aw-switch.on {
  background: var(--on);
  border-color: var(--on);
}
.aw-switch.on::after {
  transform: translateX(19px);
  background: #000;
}
.aw-slider {
  position: relative;
  flex: 1;
  max-width: 200px;
  height: 26px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.aw-slider-track {
  position: relative;
  width: 100%;
  height: 4px;
  background: var(--surface-4);
  border-radius: 99px;
}
.aw-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--on);
  border-radius: 99px;
}
.aw-slider-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 9px rgba(0, 0, 0, 0.7);
  transition: transform 0.16s var(--ease-spring);
}
.aw-slider:hover .aw-slider-thumb,
.aw-slider.grabbing .aw-slider-thumb {
  transform: translate(-50%, -50%) scale(1.25);
}
.demo-hint {
  text-align: center;
  margin-top: 16px;
  color: var(--text-3);
  font-size: 13px;
}

/* ============================================================
   Pricing
   ============================================================ */
.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
    box-shadow 0.22s var(--ease);
}
.plan:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.plan.featured {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    linear-gradient(165deg, var(--on) -20%, var(--border-2) 45%, var(--on-soft) 110%) border-box;
  box-shadow: 0 24px 70px -28px var(--glow-strong), var(--shadow-sm);
}
.plan.featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 80px -26px var(--glow-strong), var(--shadow-sm);
}
.plan .tag {
  position: absolute;
  top: 18px;
  right: 18px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #000;
  background: var(--on);
  border-radius: 999px;
  padding: 3px 9px;
}
.plan .plan-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-2);
}
.plan .price {
  margin: 14px 0 4px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.plan .price .amount {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -1.5px;
}
.plan .price .per {
  color: var(--text-3);
  font-size: 14px;
}
.plan .blurb {
  color: var(--text-3);
  font-size: 13px;
  min-height: 20px;
}
.plan ul {
  list-style: none;
  margin: 22px 0 26px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.plan li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: var(--text);
}
.plan li svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: #43d17a;
}
.plan .btn {
  margin-top: auto;
  width: 100%;
}
.price-note {
  text-align: center;
  margin-top: 26px;
  color: var(--text-3);
  font-size: 13px;
}

/* ============================================================
   Download
   ============================================================ */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.dl-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease);
}
.dl-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.dl-card .os {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.dl-card .os svg {
  width: 26px;
  height: 26px;
  color: var(--text);
}
.dl-card .os h3 {
  font-size: 18px;
}
.dl-card .meta {
  color: var(--text-3);
  font-size: 13px;
}
.dl-card .btn {
  margin-top: 16px;
}
/* terminal-style command box (darker than the cards, same palette) */
.cmdbox {
  max-width: 760px;
  margin: 18px auto 0;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cmdbox-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cmdbox-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text-3);
}
.cmdbox-tag svg {
  width: 15px;
  height: 15px;
  color: var(--on);
}
.cmdbox-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.cmd-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-2);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background 0.18s var(--ease), color 0.18s var(--ease),
    border-color 0.18s var(--ease), transform 0.2s var(--ease-spring);
}
.cmd-btn:hover {
  background: var(--surface-3);
  color: var(--text);
  transform: translateY(-1px);
}
.cmd-btn:active {
  transform: translateY(0) scale(0.9);
}
.cmd-btn svg {
  width: 16px;
  height: 16px;
  grid-area: 1 / 1;
}
/* copy: icon swap with a little spring */
.cmd-btn .ic-copy {
  transition: opacity 0.16s var(--ease), transform 0.18s var(--ease);
}
.cmd-btn .ic-check {
  opacity: 0;
  transform: scale(0.4) rotate(-25deg);
  transition: opacity 0.18s var(--ease), transform 0.28s var(--ease-spring);
}
#installCopy.copied {
  background: var(--on);
  color: #000;
  border-color: var(--on);
}
#installCopy.copied .ic-copy {
  opacity: 0;
  transform: scale(0.4);
}
#installCopy.copied .ic-check {
  opacity: 1;
  transform: scale(1) rotate(0);
}
/* info: highlights + rotates while the panel is open */
#installInfo svg {
  transition: transform 0.3s var(--ease-spring);
}
#installInfo.active {
  background: var(--on-soft);
  color: var(--on);
  border-color: var(--on);
}
#installInfo.active svg {
  transform: rotate(360deg);
}
.cmdbox-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cmdbox-body::-webkit-scrollbar {
  display: none;
}
.cmdbox-prompt {
  flex: none;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--on);
  user-select: none;
}
.cmdbox-body code {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}
/* info panel — animated open/close */
.cmdbox-info {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border-top: 1px solid transparent;
  background: var(--surface);
  transition: max-height 0.32s var(--ease), opacity 0.26s var(--ease),
    border-color 0.32s var(--ease);
}
.cmdbox-info.open {
  opacity: 1;
  border-top-color: var(--border);
}
.cmdbox-info p {
  margin: 0;
  padding: 14px 16px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.65;
}
.cmdbox-info strong {
  color: var(--text);
}

/* ============================================================
   FAQ
   ============================================================ */
.faq {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qa {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}
.qa-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.qa-q .chev {
  width: 18px;
  height: 18px;
  color: var(--text-3);
  transition: transform 0.25s var(--ease);
  flex: 0 0 auto;
}
.qa.open .qa-q .chev {
  transform: rotate(180deg);
}
.qa-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.qa-a-inner {
  padding: 0 20px 18px;
  color: var(--text-2);
  font-size: 15px;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 40px;
  position: relative;
  z-index: 1;
}
.footer .wrap {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.footer .f-brand p {
  margin-top: 12px;
  color: var(--text-3);
  font-size: 13px;
  max-width: 320px;
}
.footer .f-cols {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer .f-col h4 {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 14px;
}
.footer .f-col a {
  display: block;
  color: var(--text-2);
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.16s var(--ease);
}
.footer .f-col a:hover {
  color: var(--text);
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-3);
  font-size: 13px;
}

/* ============================================================
   Modal (checkout stub)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s var(--ease);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.26s var(--ease-spring);
}
.modal-overlay.open .modal {
  transform: none;
}
.modal .m-ico {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--on);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}
.modal .m-ico svg {
  width: 22px;
  height: 22px;
}
.modal h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.modal p {
  color: var(--text-2);
  font-size: 14px;
}
.modal .summary {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.modal .summary .s-name {
  font-weight: 600;
}
.modal .summary .s-price {
  font-family: var(--mono);
  color: var(--text);
}
.modal .m-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.modal .m-actions .btn {
  flex: 1;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

/* ============================================================
   Scroll-reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Toast
   ============================================================ */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  z-index: 700;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease-spring);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .price-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin: 0 auto;
  }
}

@media (max-width: 720px) {
  section {
    padding: 60px 0;
  }
  .hero {
    padding: calc(var(--nav-h) + 36px) 0 52px;
  }
  .section-head {
    margin-bottom: 36px;
  }
  .nav .wrap {
    display: flex;
    justify-content: space-between;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px 16px 18px;
    background: rgba(6, 6, 8, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
  .nav-links a {
    padding: 12px 14px;
    font-size: 15px;
  }
  .nav-right .btn {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .dl-grid {
    grid-template-columns: 1fr;
  }
  .hero p.lede {
    font-size: 16px;
  }
  .section-head p {
    font-size: 15px;
  }
  .footer .wrap {
    flex-direction: column;
    gap: 28px;
  }
  .footer .f-cols {
    gap: 40px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 6px;
  }
}

@media (max-width: 460px) {
  .wrap {
    padding: 0 18px;
  }
  .hero-cta {
    flex-direction: column;
  }
  .hero-cta .btn {
    width: 100%;
  }
  .hero-meta {
    gap: 10px 18px;
  }
  .qa-q {
    font-size: 15px;
    padding: 16px 16px;
  }
  .qa-a-inner {
    font-size: 14px;
  }
}

/* ============================================================
   Hero decor — aurora blobs + masked grid (all theme-driven)
   ============================================================ */
.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.aurora {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, var(--glow-strong), transparent 65%);
  filter: blur(48px);
  opacity: 0.85;
  animation: aurora-drift 18s ease-in-out infinite alternate;
  transition: background 0.5s var(--ease);
}
.aurora.a1 {
  top: -180px;
  left: 6%;
}
.aurora.a2 {
  top: -140px;
  right: 2%;
  animation-duration: 24s;
  animation-delay: -6s;
}
.aurora.a3 {
  top: 36%;
  left: 36%;
  width: 640px;
  height: 420px;
  opacity: 0.45;
  animation-duration: 30s;
  animation-delay: -12s;
}
@keyframes aurora-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(60px, 36px, 0) scale(1.12);
  }
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 54px 54px;
  -webkit-mask-image: radial-gradient(75% 65% at 50% 0%, rgba(0, 0, 0, 0.55), transparent 78%);
  mask-image: radial-gradient(75% 65% at 50% 0%, rgba(0, 0, 0, 0.55), transparent 78%);
  transition: background-image 0.5s var(--ease);
}

/* hero window: tilt + under-glow */
.hero-art {
  position: relative;
  perspective: 1200px;
}
.hero-art .mock {
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.18s ease-out, border-color 0.5s var(--ease),
    background 0.5s var(--ease);
  will-change: transform;
}
.window-glow {
  position: absolute;
  inset: 6% -8% -12% -8%;
  background: radial-gradient(60% 60% at 50% 58%, var(--glow-strong), transparent 70%);
  filter: blur(30px);
  pointer-events: none;
  transition: background 0.5s var(--ease);
}
.hero-art .mock {
  position: relative;
  z-index: 1;
}

/* ============================================================
   Stats band
   ============================================================ */
.stats {
  padding: 0 0 24px;
}
.stats-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), transparent 140%);
  padding: 24px 26px;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.stat-v {
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--on);
  font-variant-numeric: tabular-nums;
}
.stat-l {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ============================================================
   How it works — numbered steps
   ============================================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  overflow: hidden;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
    background 0.22s var(--ease);
}
.step:hover {
  transform: translateY(-3px);
  border-color: var(--border-2);
}
.step::after {
  content: attr(data-num);
  position: absolute;
  top: 2px;
  right: 16px;
  font-size: 74px;
  font-weight: 800;
  letter-spacing: -3px;
  line-height: 1;
  color: var(--text);
  opacity: 0.05;
  pointer-events: none;
}
.step .step-ico {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--on-softer);
  border: 1px solid var(--on-soft);
  color: var(--on);
  margin-bottom: 18px;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease),
    color 0.5s var(--ease);
}
.step .step-ico svg {
  width: 20px;
  height: 20px;
}
.step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}
.step p {
  color: var(--text-2);
  font-size: 14px;
}

/* ============================================================
   Roadmap
   ============================================================ */
.road {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.road-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.road-item:hover {
  border-color: var(--border-2);
  transform: translateX(3px);
}
.chip {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid;
  white-space: nowrap;
}
.chip.done {
  color: #43d17a;
  border-color: rgba(67, 209, 122, 0.35);
  background: rgba(67, 209, 122, 0.08);
}
.chip.now {
  color: #f0b35e;
  border-color: rgba(240, 179, 94, 0.35);
  background: rgba(240, 179, 94, 0.08);
}
.chip.next {
  color: var(--text-2);
  border-color: var(--border-2);
  background: var(--surface-2);
}
.road-item .r-t {
  font-weight: 600;
  font-size: 14px;
}
.road-item .r-d {
  margin-left: auto;
  text-align: right;
  color: var(--text-3);
  font-size: 12.5px;
  white-space: nowrap;
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band {
  padding: 24px 0 110px;
}
.cta-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 68px 32px;
  border-radius: 20px;
  border: 1px solid var(--border-2);
  background:
    radial-gradient(110% 130% at 50% -10%, var(--glow-strong), transparent 55%),
    var(--surface);
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease);
}
.cta-card h2 {
  font-size: clamp(28px, 4vw, 42px);
}
.cta-card p {
  margin-top: 12px;
  color: var(--text-2);
  font-size: 16px;
}
.cta-actions {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   Hover glow that follows the cursor (cards, plans, steps)
   ============================================================ */
.card,
.dl-card {
  position: relative;
}
.card::before,
.plan::before,
.dl-card::before,
.step::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    420px circle at var(--mx, 50%) var(--my, 50%),
    var(--on-softer),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  pointer-events: none;
}
.card:hover::before,
.plan:hover::before,
.dl-card:hover::before,
.step:hover::before {
  opacity: 1;
}

/* ============================================================
   Nav extras — theme cycler + scroll progress
   ============================================================ */
.theme-cycle {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
    background 0.18s var(--ease), transform 0.18s var(--ease-spring);
}
.theme-cycle:hover {
  color: var(--on);
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.theme-cycle:active {
  transform: scale(0.92);
}
.theme-cycle svg {
  transition: transform 0.45s var(--ease-spring);
}
.theme-cycle.spin svg {
  transform: rotate(360deg);
}
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--on);
  box-shadow: 0 0 10px var(--on);
  z-index: 200;
  pointer-events: none;
}

/* ============================================================
   Back to top
   ============================================================ */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  z-index: 150;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease-spring),
    background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}
.to-top:hover {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

/* ============================================================
   Global polish — scrollbar, focus, selection
   ============================================================ */
html {
  scrollbar-color: var(--surface-4) var(--bg);
}
html::-webkit-scrollbar {
  width: 12px;
}
html::-webkit-scrollbar-thumb {
  background: var(--surface-4);
  border-radius: 8px;
  border: 3px solid var(--bg);
}
html::-webkit-scrollbar-thumb:hover {
  background: var(--border-strong);
}
:focus-visible {
  outline: 2px solid var(--on);
  outline-offset: 2px;
}
::selection {
  background: var(--on-soft);
}

/* ============================================================
   Reduced motion — calm everything down
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .aurora {
    animation: none;
  }
  .hero-art .mock {
    transform: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   Responsive — new sections
   ============================================================ */
@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .stats-band {
    grid-template-columns: repeat(2, 1fr);
    gap: 22px 14px;
  }
}
@media (max-width: 720px) {
  .cta-band {
    padding-bottom: 72px;
  }
  .cta-card {
    padding: 46px 22px;
  }
  .road-item {
    flex-wrap: wrap;
  }
  .road-item .r-d {
    margin-left: 0;
    width: 100%;
    text-align: left;
  }
  .to-top {
    right: 16px;
    bottom: 16px;
  }
}
@media (max-width: 460px) {
  .stats-band {
    padding: 18px 16px;
  }
  .stat-v {
    font-size: 22px;
  }
}

@media (max-width: 560px) {
  /* Live demo: instead of hiding the sidebar (which strands every view but
     the editor), turn it into a horizontal, scrollable tab strip so Themes,
     Script Hub, Settings, etc. stay reachable on phones. */
  .aw-shell {
    flex-direction: column;
    height: auto;
  }
  .aw-sidebar {
    width: 100%;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .aw-sidebar::-webkit-scrollbar {
    display: none;
  }
  .aw-nav {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 12px;
    gap: 8px;
  }
  .aw-nav::before {
    display: none; /* drop the vertical active bar in horizontal layout */
  }
  .aw-side-foot {
    display: none; /* attach state still shows in the statusbar */
  }
  .aw-content {
    min-height: 360px;
  }
  .app-window .ed {
    min-height: 232px;
  }
  .aw-view.panel {
    padding: 14px 14px 18px;
  }

  /* Titlebar: free up room for the centered session selector. */
  .aw-badge {
    display: none;
  }
  .aw-tb-right {
    display: none; /* decorative window buttons */
  }
  .aw-account {
    max-width: 200px;
  }
  .aw-acc-menu {
    width: min(284px, calc(100vw - 40px));
  }

  /* Hero editor slightly shorter so the hero fits without a tall scroll. */
  #heroDemo .ed {
    height: 240px;
  }
}
