:root {
  --bg: #1c2023;
  --surface: #23282c;
  --raised: #2d3338;
  --line: #393f45;
  --fg: #c7ccd1;
  --bright: #f3f4f5;
  --dim: #8a929a;
  --accent: #ae95c7;
  --accent-2: #95aec7;
  --radius: 12px;
  --slide: 60px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd, pre { font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace; }
.muted { color: var(--dim); }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 50%, transparent);
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--bright); font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.top nav { display: flex; gap: clamp(12px, 2.5vw, 28px); align-items: center; }
.top nav a { color: var(--fg); font-size: 15px; }

.cta {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  background: var(--accent); color: var(--bg); font-weight: 650;
  box-shadow: 0 6px 24px -10px var(--accent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.cta:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 10px 30px -10px var(--accent); }
.cta.small { padding: 7px 14px; font-size: 14px; }
.cta.big { font-size: 18px; padding: 16px 28px; }
.ghost { color: var(--fg); padding: 12px 8px; }

main { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
section { padding: clamp(40px, 7vw, 88px) 0; }
h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.035em; color: var(--bright); margin: 0 0 18px; max-width: 16ch; }
h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.02em; color: var(--bright); margin: 0 0 18px; }
h3 { color: var(--bright); margin: 0 0 8px; font-size: 18px; }
.hero { padding-bottom: 24px; }
.lede { font-size: clamp(17px, 2vw, 21px); max-width: 60ch; color: var(--fg); margin: 0 0 28px; }
.actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

/* ---------- demo ---------- */
.demo-wrap { padding-top: 24px; }
.demo { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; outline: none; }
@media (max-width: 980px) { .demo { grid-template-columns: 1fr; } }
.stage { min-width: 0; }
.monitor {
  background: #0f1113; border-radius: 16px; padding: 12px;
  box-shadow: 0 40px 80px -40px #000, inset 0 0 0 1px #2a2f34;
}
.screen {
  position: relative; aspect-ratio: 21 / 9; border-radius: 6px; overflow: hidden;
  background:
    radial-gradient(1200px 500px at 70% 110%, #2b2238 0%, transparent 60%),
    radial-gradient(900px 400px at 10% -20%, #1f2b36 0%, transparent 60%),
    #15181b;
  display: flex; flex-direction: column;
}
.stand { width: 18%; height: 34px; margin: 0 auto; background: linear-gradient(#15181b, #0c0e10); clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.demo:focus-visible .monitor { box-shadow: 0 0 0 2px var(--accent), 0 40px 80px -40px #000; }

.bar {
  height: 30px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 8px;
  background: var(--bg); font-size: 12.5px; color: var(--fg); user-select: none;
}
.pills { display: flex; gap: 3px; }
.pill {
  display: flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border: 0; border-radius: 4px;
  background: transparent; color: var(--fg); font: 600 12px/1 inherit; cursor: pointer;
}
.pill.empty { color: var(--dim); }
.pill.active { background: var(--accent); color: var(--bg); }
.pill:hover:not(.active) { background: var(--raised); }
.icon { width: 16px; height: 16px; flex: none; }
.icon.tiny { width: 13px; height: 13px; }
.layout-name { color: var(--dim); }
.title { display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.title .icon { color: var(--accent); }
.spacer { flex: 1; }
.clock { color: var(--fg); font-variant-numeric: tabular-nums; }
.gear { border: 0; background: none; color: var(--dim); width: 22px; height: 22px; padding: 2px; cursor: pointer; border-radius: 4px; }
.gear:hover { color: var(--fg); background: var(--raised); }
.gear svg { width: 16px; height: 16px; }

.desk { position: relative; flex: 1; }
.win {
  position: absolute; left: 0; top: 0; display: flex; flex-direction: column;
  background: #20252a; border-radius: 7px; overflow: hidden;
  box-shadow: 0 10px 30px -12px #000, inset 0 0 0 1px #2e343a;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), width .28s cubic-bezier(.2, .8, .2, 1), height .28s cubic-bezier(.2, .8, .2, 1), opacity .22s ease, box-shadow .15s ease;
  will-change: transform;
}
.win.entering { opacity: 0; }
.win.closing { opacity: 0; transform: scale(.94) !important; }
.win.hidden { opacity: 0; pointer-events: none; }
.win.focused { box-shadow: 0 0 0 3px var(--accent), 0 16px 40px -14px #000; }
.win.dragging { transition: none; z-index: 5; opacity: .92; box-shadow: 0 0 0 3px var(--accent), 0 30px 60px -20px #000; }
.win.drop-target::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--accent) 22%, transparent); border: 2px dashed var(--accent); border-radius: 7px; }
.win header {
  flex: none; display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 8px;
  background: #1a1e22; color: var(--fg); font-size: 11.5px; cursor: grab; user-select: none; touch-action: none;
}
.win header .icon { color: var(--app); width: 14px; height: 14px; }
.win header span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win header i { width: 9px; height: 9px; border-radius: 50%; background: #3a4147; flex: none; }
.win header i.x { background: #6b4b55; cursor: pointer; }
.win header i.x:hover { background: #c7657c; }
.win.dragging header { cursor: grabbing; }
.body { flex: 1; padding: 10px 12px; overflow: hidden; font-size: 11px; color: #9aa3ab; }
.body pre { margin: 0; font-size: 10.5px; line-height: 1.55; white-space: pre; }
.terminal { background: #15191c; }
.terminal pre { color: #95c7ae; }
.caret { display: inline-block; width: 6px; height: 11px; background: #95c7ae; vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.editor pre em { color: #ae95c7; font-style: normal; }
.editor pre u { color: #95aec7; text-decoration: none; }
.editor pre s { color: #6b737a; text-decoration: none; }
.b-url { display: flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px; border-radius: 10px; background: #2a3035; font-size: 10px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; }
.b-url span { width: 8px; height: 8px; border-radius: 50%; background: #95c7ae; flex: none; }
.b-hero i, .b-cards i { display: block; background: #2c3338; border-radius: 4px; }
.b-hero i { height: 10px; margin: 6px 0; width: 80%; }
.b-hero i:first-child { height: 16px; width: 60%; background: #3a3348; }
.b-hero i.short { width: 45%; }
.b-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.b-cards i { height: 44px; }
.c-msg { background: #2a3035; border-radius: 10px; padding: 5px 9px; margin: 0 0 7px; width: fit-content; max-width: 85%; }
.c-msg.me { margin-left: auto; background: #3a3348; color: #d8cce6; }
.music { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.m-art { width: min(40%, 90px); aspect-ratio: 1; border-radius: 8px; background: linear-gradient(135deg, #c7ae95, #ae95c7 60%, #95aec7); }
.m-meta { display: flex; flex-direction: column; align-items: center; }
.m-meta b { color: var(--fg); }
.m-bar { width: 70%; height: 4px; border-radius: 2px; background: #2c3338; overflow: hidden; }
.m-bar i { display: block; height: 100%; width: 40%; background: #c7ae95; animation: play 14s linear infinite; }
@keyframes play { from { width: 5%; } to { width: 100%; } }
.n-list { margin: 0; padding-left: 18px; }
.n-list li { margin: 4px 0; }
.n-list .done { text-decoration: line-through; color: #6b737a; }

.caption {
  position: absolute; left: 50%; bottom: 18px; z-index: 8; transform: translate(-50%, 10px);
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px;
  background: color-mix(in srgb, #0f1113 88%, transparent); backdrop-filter: blur(8px);
  box-shadow: 0 10px 30px -10px #000; opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none;
  font-size: 13px; white-space: nowrap;
}
.caption.show { opacity: 1; transform: translate(-50%, 0); }
.caption b { color: var(--dim); font-weight: 400; }
.caption span { margin-left: 8px; color: var(--fg); }
kbd {
  display: inline-block; min-width: 22px; padding: 2px 7px; border-radius: 6px; text-align: center;
  background: var(--raised); color: var(--bright); font-size: 12px; box-shadow: inset 0 -2px 0 #1a1e22, inset 0 0 0 1px #3d444a;
}
.touch-keys { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 4px; }
.touch-keys button {
  border: 1px solid var(--line); background: var(--surface); color: var(--fg); border-radius: 9px;
  padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; display: flex; gap: 4px; align-items: center;
}
.touch-keys button:hover { background: var(--raised); }
.touch-keys kbd { font-size: 11px; padding: 1px 5px; min-width: 0; }
.replay { color: var(--accent) !important; }

.panel {
  background: var(--surface); border-radius: var(--radius); padding: 20px; align-self: start;
  box-shadow: inset 0 0 0 1px #2c3237;
}
.panel.pulse { animation: pulse .9s ease 1; }
@keyframes pulse { 30% { box-shadow: inset 0 0 0 2px var(--accent); } }
.panel h3 { margin-bottom: 4px; }
.panel > p { font-size: 13.5px; margin: 0 0 16px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--fg); }
.field small { display: block; margin-top: 5px; font-size: 12px; }
.seg { display: flex; background: var(--bg); border-radius: 9px; padding: 3px; gap: 3px; }
.seg.wrap { flex-wrap: wrap; }
.seg button {
  flex: 1; border: 0; border-radius: 6px; background: transparent; color: var(--fg); padding: 6px 8px;
  font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.seg button:hover { background: var(--raised); }
.seg button.on { background: var(--accent); color: var(--bg); font-weight: 600; }
.stepper { display: inline-flex; align-items: center; background: var(--bg); border-radius: 9px; padding: 3px; }
.stepper button { width: 34px; height: 30px; border: 0; border-radius: 6px; background: transparent; color: var(--bright); font-size: 18px; cursor: pointer; }
.stepper button:hover { background: var(--raised); }
.stepper b { min-width: 44px; text-align: center; color: var(--bright); font-variant-numeric: tabular-nums; }
.gap { width: 100%; accent-color: var(--accent); }
.keys-mini { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 7px; font-size: 12.5px; }
.keys-mini div { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.keys-mini span { color: var(--dim); margin-left: 6px; }
.keys-mini kbd { font-size: 11px; padding: 1px 5px; min-width: 0; }
.keys-mini .drag { margin: 0; color: var(--bright); background: var(--raised); border-radius: 6px; padding: 1px 6px; }
.demo.demoing .panel { opacity: .92; }

/* ---------- sections ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.cards article { background: var(--surface); border-radius: var(--radius); padding: 22px; box-shadow: inset 0 0 0 1px #2c3237; }
.cards p { margin: 0; color: var(--fg); font-size: 15px; }
.keys table { width: 100%; border-collapse: collapse; font-size: 15px; }
.keys td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.keys td:nth-child(odd) { white-space: nowrap; width: 1%; }
.keys td:nth-child(even) { color: var(--fg); }
@media (max-width: 760px) { .keys table, .keys tbody, .keys tr, .keys td { display: block; } .keys td { border: 0; padding: 4px 0; } .keys tr { padding: 10px 0; border-bottom: 1px solid var(--line); } }
.download { text-align: center; }
.download p { max-width: 62ch; margin: 0 auto 22px; }
.checksum { font-family: "JetBrains Mono", Consolas, monospace; font-size: 12px; word-break: break-all; margin-top: 14px !important; }
footer { text-align: center; padding: 40px 16px 60px; color: var(--dim); font-size: 14px; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
  .win, .caption { transition: none; }
  .caret, .m-bar i { animation: none; }
}
