/* ============================================================
   Queue System — Landing page
   Design tokens & base
   ============================================================ */

:root {
  --bg: #080808;
  --surface: #111111;
  --surface-2: #171717;
  --border: #262626;
  --text: #ffffff;
  --muted: #a1a1aa;
  --accent: #d92d20;
  --accent-hover: #c02626;
  --accent-strong: #ef4444;
  --accent-dim: rgba(239, 68, 68, 0.12);

  --success: #22c55e;
  --success-soft: #4ade80;
  --danger-soft: #fca5a5;
  --text-2: #d4d4d8;
  --border-strong: #3f3f46;
  --border-hover: #333333;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 150ms;
  --t: 200ms;
  --t-slow: 300ms;

  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
}

/* ---------- Reset ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg {
  display: block;
}

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

ul, ol {
  list-style: none;
}

code {
  font-family: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 0.9em;
}

::selection {
  background: rgba(239, 68, 68, 0.35);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}



.command-groups {
  display: grid;
  gap: 28px;
}

.command-group {
  display: grid;
  gap: 16px;
}

.command-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.command-group-head h3 {
  margin: 0 0 5px;
}

.command-group-head p {
  margin: 0;
  color: var(--text-muted, #999);
}

.command-list {
  display: grid;
  gap: 12px;
}

.command-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  transition: border-color .2s, background .2s;
}

.command-item:hover {
  border-color: rgba(214,48,98,.4);
  background: rgba(214,48,98,.035);
}

.command-info > code {
  color: #ef4778;
  font-weight: 700;
  font-size: 14px;
}

.command-info h4 {
  margin: 9px 0 5px;
}

.command-info p {
  margin: 0;
  color: var(--text-muted, #999);
  font-size: 14px;
  line-height: 1.6;
}

.command-usage {
  display: grid;
  gap: 7px;
  padding: 13px;
  border-radius: 10px;
  background: rgba(0,0,0,.2);
}

.command-usage span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #999;
}

.command-usage code {
  color: #fff;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.command-usage small {
  color: #999;
  font-size: 12px;
}

.command-note {
  margin-top: 20px;
  color: #999;
  font-size: 13px;
}

@media (max-width: 640px) {
  .command-item {
    grid-template-columns: 1fr;
  }

  .command-group-head {
    align-items: flex-start;
  }
}


/* ---------- Skip link ---------- */

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 16px;
  border-radius: 8px;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 110px 0;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-head p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 11px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
    color var(--t) var(--ease), transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
  white-space: nowrap;
  font-family: inherit;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-lg {
  padding: 14px 26px;
  font-size: 1rem;
  border-radius: 12px;
}

.btn-sm {
  padding: 11px 14px;
  font-size: 0.88rem;
  border-radius: 9px;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.btn-accent:hover {
  background: var(--accent-hover);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface-2);
}

.btn-icon-only {
  padding: 13px;
  border-radius: 9px;
}

.btn-icon-only svg {
  width: 18px;
  height: 18px;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease),
    backdrop-filter var(--t) var(--ease);
}

.nav.scrolled {
  background: rgba(8, 8, 8, 0.82);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
}

.brand-mark svg {
  width: 17px;
  height: 17px;
}

.brand-mark.sm {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.brand-mark.sm svg {
  width: 14px;
  height: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 12px 14px;
  border-radius: 8px;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ---------- Badge ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--danger-soft);
  background: var(--accent-dim);
  border: 1px solid rgba(239, 68, 68, 0.28);
  padding: 7px 14px;
  border-radius: 999px;
}

.badge-dot, .conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 172px 0 110px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 420px at 12% -5%, rgba(239, 68, 68, 0.07), transparent 65%),
    radial-gradient(700px 500px at 90% 8%, rgba(239, 68, 68, 0.05), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5.2vw, 4.05rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  margin: 22px 0 20px;
}

.hero-copy h1 em {
  font-style: normal;
  color: var(--accent-strong);
}

.hero-sub {
  color: var(--muted);
  font-size: 1.12rem;
  max-width: 460px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 26px;
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}

.hero-meta svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

/* ---------- App preview window ---------- */

.hero-preview {
  position: relative;
}

.window {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.window-dots {
  display: flex;
  gap: 7px;
}

.window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--border-strong);
  border: 1px solid #52525b;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-2);
}

.window-ver {
  color: var(--muted);
  font-weight: 400;
}

.conn-pill {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--success-soft);
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.22);
  padding: 4px 10px;
  border-radius: 999px;
}

.conn-pill .conn-dot {
  background: var(--success-soft);
}

.window-body {
  display: grid;
  grid-template-columns: 168px 1fr;
  min-height: 400px;
}

/* sidebar */
.win-side {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 14px 10px;
}

.win-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.win-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.win-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  transition: background var(--t) var(--ease), color var(--t) var(--ease);
}

.win-nav a svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.win-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.win-nav a.active {
  color: var(--text);
  background: var(--accent-dim);
}

.win-nav a.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--accent-strong);
}

.win-nav a.active svg {
  color: var(--accent-strong);
}

.win-side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.win-status-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.win-status-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.win-status-head strong {
  font-weight: 600;
}

.win-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
  flex-shrink: 0;
}

.win-status-sub {
  font-size: 0.68rem;
  color: var(--muted);
}

.win-author {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  font-size: 0.64rem;
  color: var(--muted);
}

/* main panel */
.win-main {
  background: var(--bg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.win-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.win-head > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.win-head strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.win-head > div span {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  white-space: nowrap;
  flex-shrink: 0;
}

.win-btn svg {
  width: 11px;
  height: 11px;
}

.win-btn-accent {
  background: var(--accent-strong);
  border-color: transparent;
  color: #fff;
}

.win-btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

.win-btn-icon {
  padding: 6px;
}

.win-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.win-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.win-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.win-card-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  flex-shrink: 0;
}

.win-card-icon svg {
  width: 13px;
  height: 13px;
}

.win-card-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.win-card-title strong {
  font-size: 0.72rem;
  font-weight: 600;
}

.win-card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-style: normal;
  font-size: 0.62rem;
  color: var(--success-soft);
}

.win-card-status .win-status-dot {
  width: 6px;
  height: 6px;
}

.win-card-sub {
  font-size: 0.62rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-big-num {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: auto;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.win-big-num em {
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 500;
  color: var(--muted);
}

.win-badge-subtle {
  align-self: flex-start;
  margin-top: auto;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--accent-strong);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 999px;
  padding: 3px 8px;
}

.win-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  color: var(--muted);
  font-family: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 0.62rem;
}

.win-url {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.win-url code {
  flex: 1;
  min-width: 0;
  font-size: 0.6rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-np {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: auto;
}

.win-np-art {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  flex-shrink: 0;
}

.win-np-art svg {
  width: 20px;
  height: 20px;
}

.win-np-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.win-np-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}

.win-np-info strong {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-np-req {
  font-size: 0.66rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.win-np-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* window status bar */
.window-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-size: 0.7rem;
  color: var(--muted);
}

.status-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.status-item svg {
  width: 13px;
  height: 13px;
  color: var(--accent-strong);
  flex-shrink: 0;
}

.status-item b {
  color: var(--text-2);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-item.right {
  color: var(--success-soft);
  flex-shrink: 0;
}

.status-item.right svg {
  color: var(--success-soft);
}

/* hero glow */
.hero-glow {
  position: absolute;
  inset: -40px -40px -60px -40px;
  z-index: -1;
  background: radial-gradient(420px 300px at 60% 40%, rgba(239, 68, 68, 0.12), transparent 65%);
  pointer-events: none;
}

/* ---------- Cards (features) ---------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: transform var(--t-slow) var(--ease), border-color var(--t-slow) var(--ease),
    box-shadow var(--t-slow) var(--ease);
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.feature-card .card-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  margin-bottom: 18px;
}

.feature-card .card-icon svg {
  width: 20px;
  height: 20px;
}

.feature-card .card-icon.accent {
  color: var(--accent-strong);
}

.feature-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.93rem;
  line-height: 1.6;
}

/* ---------- How it works ---------- */

.steps {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--border);
}

.step {
  position: relative;
  display: flex;
  gap: 26px;
  padding: 8px 0 34px;
}

.step:last-child {
  padding-bottom: 0;
}

.step-num {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-strong);
  flex-shrink: 0;
  z-index: 1;
  box-shadow: 0 0 0 6px var(--bg);
}

.step-body h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 4px 0 6px;
}

.step-body p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.chat-bubble {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.88rem;
  margin-top: 2px;
}

.chat-bubble svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.chat-user {
  color: var(--muted);
  font-size: 0.8rem;
}

.chat-bubble code {
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 0.84rem;
}

.step-mini {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 14px;
}

.step-mini svg {
  width: 15px;
  height: 15px;
  color: var(--accent-strong);
}

.step-mini b {
  color: var(--text);
  font-weight: 600;
}

.cmd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.84rem;
  color: var(--danger-soft);
  transition: border-color var(--t) var(--ease), color var(--t) var(--ease);
}

.chip:hover {
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

/* ---------- Permissions ---------- */

.perm-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.perm-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.5), transparent);
}

.perm-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}

.perm-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 14px;
}

.perm-lead {
  color: var(--muted);
  font-size: 1.02rem;
  margin-bottom: 30px;
  max-width: 440px;
}

.perm-modes {
  display: grid;
  gap: 12px;
}

.perm-mode {
  display: grid;
  grid-template-columns: 40px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.perm-mode:hover {
  border-color: var(--border-hover);
  transform: translateX(3px);
}

.perm-icon {
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
}

.perm-icon svg {
  width: 18px;
  height: 18px;
}

.perm-mode h3 {
  font-size: 0.98rem;
  font-weight: 600;
}

.perm-mode p {
  font-size: 0.85rem;
  color: var(--muted);
}

/* permission mockup */
.perm-mock {
  position: relative;
}

.window-sm .window-bar {
  padding: 9px 14px;
}

.mock-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mock-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.mock-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 14px;
}

.mock-select code {
  color: var(--danger-soft);
  font-size: 0.9rem;
  font-weight: 600;
}

.mock-select svg {
  width: 15px;
  height: 15px;
  color: var(--muted);
}

.mock-seg {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}

.mock-seg button {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 8px 6px;
  cursor: pointer;
  transition: background var(--t) var(--ease), color var(--t) var(--ease),
    border-color var(--t) var(--ease);
  white-space: nowrap;
}

.mock-seg button:hover {
  color: var(--text);
}

.mock-seg button.active {
  background: var(--surface);
  border-color: rgba(239, 68, 68, 0.45);
  color: var(--text);
}

.mock-whitelist textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  padding: 11px 14px;
  resize: none;
  transition: border-color var(--t) var(--ease);
}

.mock-whitelist textarea:focus {
  outline: none;
  border-color: rgba(239, 68, 68, 0.55);
}

.mock-feedback {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
}

.mock-feedback .conn-dot {
  background: var(--success-soft);
  width: 7px;
  height: 7px;
}

.mock-feedback code {
  color: var(--danger-soft);
  font-size: 0.78rem;
}

.hidden {
  display: none !important;
}

/* ---------- Commands ---------- */

.cmd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.cmd-card {
  padding: 24px;
}

.cmd-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cmd-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-strong);
  flex-shrink: 0;
}

.cmd-icon svg {
  width: 16px;
  height: 16px;
}

.cmd-icon.accent {
  background: var(--accent-dim);
  border-color: rgba(239, 68, 68, 0.35);
}

.cmd-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.perm-badge {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--success-soft);
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.25);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.perm-badge.mod {
  color: var(--danger-soft);
  background: var(--accent-dim);
  border-color: rgba(239, 68, 68, 0.35);
}

.cmd-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---------- OBS Overlay ---------- */

.overlay-stage {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(500px 320px at 50% 30%, rgba(239, 68, 68, 0.05), transparent 70%),
    var(--surface);
  padding: 56px 24px;
  margin-bottom: 26px;
  overflow: hidden;
}

.overlay-view {
  max-width: 400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
  z-index: 1;
}

.ov-glass {
  width: 100%;
  background: rgba(12, 12, 12, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.ov-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text);
  opacity: 0.7;
  margin-bottom: 12px;
}

.ov-np-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.ov-cassette {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cassette-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.ov-cassette .gear {
  animation: spin 2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.ov-np-info {
  flex: 1;
  min-width: 0;
}

.ov-marquee {
  overflow: hidden;
  white-space: nowrap;
  margin-bottom: 4px;
}

.ov-marquee-inner {
  display: inline-block;
  white-space: nowrap;
}

.ov-marquee.scrolling .ov-marquee-inner {
  display: inline-flex;
  animation: marquee 9s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ov-title {
  font-size: 28px;
  font-weight: 700;
  white-space: nowrap;
  line-height: 1.2;
  display: inline-block;
  color: var(--text);
}

.ov-np-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ov-requested {
  font-size: 15px;
  color: var(--text);
  opacity: 0.65;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ov-fast-badge {
  font-size: 10px;
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  background: var(--accent-strong);
  flex-shrink: 0;
}

.ov-sep {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 0 12px;
}

.ov-queue {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ov-queue li {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.ov-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  width: 16px;
  text-align: right;
  flex-shrink: 0;
}

.ov-q-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ov-q-req {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
  margin-right: auto;
}

.ov-queue li.ov-fast .ov-num {
  color: var(--accent-strong);
}

.ov-queue em {
  font-style: normal;
  font-size: 10px;
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 700;
  background: var(--accent-strong);
  flex-shrink: 0;
}

.ov-border {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  border: 1px dashed rgba(239, 68, 68, 0.25);
  pointer-events: none;
}

.overlay-glow {
  position: absolute;
  inset: -60px -100px;
  background: radial-gradient(500px 320px at 50% 45%, rgba(239, 68, 68, 0.1), transparent 65%);
  pointer-events: none;
}

.overlay-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.url-code {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 20px;
}

.url-code svg {
  width: 16px;
  height: 16px;
  color: var(--accent-strong);
}

.url-code code {
  color: var(--text-2);
  font-size: 0.9rem;
}

/* ---------- Tech stack ---------- */

.stack-wrap {
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.stack-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 32px;
}

.stack-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 26px;
}

.stack-item {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.stack-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.stack-item svg {
  width: 17px;
  height: 17px;
  color: var(--accent-strong);
}

.stack-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------- Why ---------- */

.why-wrap {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.why-quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  max-width: 640px;
  margin: 0 auto 44px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.why-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease);
}

.why-item:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.why-item svg {
  width: 18px;
  height: 18px;
  color: var(--accent-strong);
}

/* ---------- CTA ---------- */

.cta-wrap {
  position: relative;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 84px 24px;
  overflow: hidden;
}

.cta-wrap h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.cta-wrap p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 480px;
  margin: 0 auto 36px;
}

.cta-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.cta-note {
  font-size: 0.82rem;
  color: var(--muted);
}

.cta-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 300px at 50% 0%, rgba(239, 68, 68, 0.12), transparent 70%);
  pointer-events: none;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--border);
  padding: 34px 0;
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-brand p {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.footer-brand a {
  color: var(--muted);
  transition: color var(--t) var(--ease);
}

.footer-brand a:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  gap: 8px;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 8px;
  transition: color var(--t) var(--ease), background var(--t) var(--ease);
}

.footer-links a:hover {
  color: var(--text);
  background: var(--surface-2);
}

.footer-links svg {
  width: 15px;
  height: 15px;
}

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .hero-copy {
    max-width: 640px;
  }

  .hero {
    padding-top: 150px;
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .perm-grid {
    grid-template-columns: 1fr;
    gap: 44px;
  }

  .perm-wrap {
    padding: 44px 32px;
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .section {
    padding: 84px 0;
  }

  .window-body {
    grid-template-columns: 1fr;
  }

  .win-side {
    display: none;
  }

  .cmd-grid {
    grid-template-columns: 1fr;
  }

  .window-status {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .container {
    padding: 0 18px;
  }

  .nav-inner {
    padding: 0 18px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .perm-wrap {
    padding: 36px 22px;
    border-radius: var(--radius);
  }

  .hero {
    padding: 128px 0 80px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .cta-wrap {
    padding: 64px 20px;
  }

  .overlay-stage {
    padding: 36px 14px;
  }

  .ov-title {
    font-size: 20px;
  }

  .ov-requested {
    font-size: 13px;
  }

  .overlay-url {
    flex-direction: column;
  }

  .url-code {
    width: 100%;
    justify-content: center;
  }

  .url-code code {
    font-size: 0.78rem;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }

  .win-cards {
    grid-template-columns: 1fr;
  }

  .steps::before {
    left: 23px;
  }

  .step-num {
    width: 48px;
    height: 48px;
    font-size: 0.85rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
