/* hue-shift docs — one page, no dependencies. */

:root {
  --bg: #0a0b0e;
  --bg-soft: #11141a;
  --line: #232833;
  --ink: #e9ecf3;
  --ink-dim: #9aa3b5;
  --ink-faint: #626c80;
  --accent: #6d28d9;
  --accent-bright: #a78bfa;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: var(--mono); }

/* ---------- header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(20px, 5vw, 64px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.wordmark::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 9px;
  border-radius: 3px;
  background: var(--accent-bright);
  vertical-align: 1px;
}

.top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.top nav a {
  color: var(--ink-dim);
  font-size: 14px;
  letter-spacing: 0.01em;
}
.top nav a:hover { color: var(--ink); text-decoration: none; }

/* ---------- layout ---------- */

main {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

section { padding: clamp(56px, 9vw, 104px) 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }

h1 {
  font-size: clamp(34px, 6.2vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 10px 0 22px;
  font-weight: 650;
}
h1 em { font-style: normal; color: var(--accent-bright); }

h2 {
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 600;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.lede {
  font-size: clamp(17px, 2.1vw, 20px);
  color: var(--ink-dim);
  max-width: 60ch;
  margin: 0 0 30px;
}

.hint { color: var(--ink-faint); font-size: 15px; }

:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 3px; }

/* ---------- hero + live preview ---------- */

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(26px, 4vw, 44px);
  align-items: start;
}
.hero-copy { min-width: 0; }
.hero > .stats { grid-column: 1 / -1; margin-top: clamp(8px, 2vw, 20px); }

.preview {
  --c: #6d28d9;
  --fg: #ffffff;
  position: relative;
  isolation: isolate;
  min-width: 0;
  margin: 0;
}
.preview::before {
  content: "";
  position: absolute;
  inset: -16% -12%;
  z-index: 0;
  background: radial-gradient(58% 58% at 56% 24%, color-mix(in srgb, var(--c) 44%, transparent), transparent 72%);
  filter: blur(36px);
  opacity: 0.85;
  pointer-events: none;
}

.preview-label {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.preview-label .live { display: inline-flex; align-items: center; gap: 7px; }
.preview-label .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: live-pulse 2.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); }
}
.preview-hex { color: var(--ink-dim); letter-spacing: 0.02em; text-transform: none; }

.win {
  position: relative;
  z-index: 1;
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line));
  border-radius: 11px;
  overflow: hidden;
  background: #0b0d12;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
}

.win-title {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  padding: 0 13px;
  background: var(--c);
  color: var(--fg);
  font-size: 12px;
  transition: background 0.35s ease, color 0.35s ease;
}
.dots { display: flex; gap: 5px; flex: none; }
.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.18);
}
.dots i:nth-child(1) { background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.win-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0.94; }

.win-tabs {
  display: flex;
  height: 29px;
  background: color-mix(in srgb, var(--c) 10%, #0b0d12);
  border-bottom: 1px solid color-mix(in srgb, var(--c) 20%, var(--line));
}
.win-tabs span {
  display: inline-flex;
  align-items: center;
  padding: 0 13px;
  font-size: 10.5px;
  color: var(--ink-faint);
  border-right: 1px solid rgba(255, 255, 255, 0.045);
}
.win-tabs .on {
  color: var(--ink);
  background: color-mix(in srgb, var(--c) 20%, #0b0d12);
  box-shadow: inset 0 2px 0 var(--c);
}

.win-main { display: flex; height: 204px; }

.win-activity {
  width: 40px;
  flex: none;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  background: color-mix(in srgb, var(--c) 13%, #0b0d12);
}
.win-activity i {
  width: 13px;
  height: 13px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--fg) 32%, transparent);
}
.win-activity i.on {
  background: var(--fg);
  box-shadow: 0 0 12px color-mix(in srgb, var(--fg) 55%, transparent);
}

.win-side {
  width: 116px;
  flex: none;
  padding: 11px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 10px;
  color: var(--ink-faint);
  background: color-mix(in srgb, var(--c) 6%, #0b0d12);
  border-right: 1px solid rgba(255, 255, 255, 0.045);
}
.win-side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win-side .indent { padding-left: 10px; }
.win-side .on { color: var(--ink); }

.win-editor {
  flex: 1;
  min-width: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  background: #0a0c11;
}
.line { height: 6px; border-radius: 3px; background: #1d222c; }
.line.tint { background: color-mix(in srgb, var(--c) 26%, #1d222c); }
.line.indent { margin-left: 18px; }
.w30 { width: 30%; }
.w40 { width: 40%; }
.w52 { width: 52%; }
.w64 { width: 64%; }
.w72 { width: 72%; }
.w80 { width: 80%; }

.win-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 27px;
  padding: 0 12px;
  background: var(--c);
  color: var(--fg);
  font-size: 10px;
  letter-spacing: 0.02em;
  transition: background 0.35s ease, color 0.35s ease;
}

.preview-note {
  position: relative;
  z-index: 1;
  margin: 13px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-dim);
}

/* ---------- install ---------- */

.install {
  display: flex;
  align-items: stretch;
  gap: 0;
  max-width: 560px;
  margin: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft);
}

.install code {
  flex: 1;
  padding: 15px 18px;
  font-size: 15.5px;
  color: var(--ink);
  overflow-x: auto;
  white-space: nowrap;
}

.copy {
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 13px;
  padding: 0 18px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.copy:hover { color: var(--ink); background: #161a22; }
.copy.done { color: #34d399; }

/* ---------- stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.stats div {
  background: var(--bg-soft);
  padding: 18px 20px;
}
.stats b {
  display: block;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stats span {
  color: var(--ink-faint);
  font-size: 13px;
  letter-spacing: 0.02em;
}

/* ---------- demo grid ---------- */

.demo-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.shuffle {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 13px;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.shuffle:hover { color: var(--ink); border-color: var(--accent-bright); }

.demo-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 12px;
  margin-top: 26px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-soft);
  transition: transform 0.18s, border-color 0.18s;
}
.card:hover { transform: translateY(-2px); border-color: #3a4150; }

.card .bar {
  width: 100%;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 11px;
  border: 0;
  text-align: left;
  cursor: pointer;
  appearance: none;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  transition: background 0.35s ease, color 0.35s ease;
}
.card .bar:hover { filter: brightness(1.09); }
.card .bar:focus-visible { outline-offset: -3px; }

.card .meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.card .meta .hex { color: var(--ink-dim); }
.card .meta .ratio { color: var(--ink-faint); }
.card .meta .card-copy {
  border: 0; background: none; color: var(--ink-faint); font: inherit;
  padding: 0; cursor: pointer; margin-left: auto;
}
.card .meta .card-copy:hover { color: var(--accent-bright); }
.card .meta .card-copy.done { color: #34d399; }

/* ---------- comparison ---------- */

.table-wrap { overflow-x: auto; margin-top: 26px; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 620px;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 500;
}
td:first-child { color: var(--ink-dim); white-space: normal; }
th.us, td.us { background: #141022; color: var(--ink); }
th.us { color: var(--accent-bright); }
.yes { color: #34d399; text-align: center; }
.no { color: #3f4757; text-align: center; }
td.us.yes { color: #34d399; font-weight: 600; }

/* ---------- commands ---------- */

.cmd { margin-top: 26px; }
.cmd p {
  margin: 0 0 8px;
  color: var(--ink-dim);
  font-size: 14.5px;
}
pre {
  margin: 0;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 15px 18px;
  overflow-x: auto;
}
pre code { font-size: 14px; color: var(--ink); }

/* ---------- lists ---------- */

.safety ul, .limits ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.safety li, .limits li {
  padding-left: 22px;
  position: relative;
  color: var(--ink-dim);
}
.safety li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #34d399;
}
.limits li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--ink-faint);
}
.safety b { color: var(--ink); }
.safety code { color: var(--accent-bright); font-size: 0.92em; }

/* ---------- footer ---------- */

footer {
  max-width: 1140px;
  margin: 0 auto;
  padding: 34px clamp(20px, 5vw, 64px) 60px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 13.5px;
  border-top: 1px solid var(--line);
}

@media (max-width: 880px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 38px; }
  .hero > .stats { margin-top: 0; }
  .preview { max-width: 520px; }
}

@media (max-width: 640px) {
  .top { flex-wrap: wrap; gap: 8px 18px; padding: 13px 20px; }
  .top nav { width: 100%; flex-wrap: wrap; gap: 8px 12px; }
  .top nav a { font-size: 13px; }
  .install code { font-size: 12.5px; padding: 14px 12px; }
  .copy { padding: 0 12px; font-size: 12px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  h1 br { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
