/* Mirrors the Zuco logo: graphite tile, soft white ink, teal → blue → violet band. */
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --bg: #09090b;
  --tile: #131418;
  --tile-hi: #1c1d22;
  --tile-top: #25262c;
  --ink: #f4f4f5;
  --ink-soft: #c9cad0;
  --muted: #9fa1a8;
  --faint: #5d5f66;
  --rule: rgb(255 255 255 / 0.08);
  --rule-strong: rgb(255 255 255 / 0.14);
  --teal: #19ddba;
  --blue: #2388ff;
  --violet: #7a4bff;
  --band: linear-gradient(120deg, var(--teal), var(--blue) 50%, var(--violet));
  --font-sans: "Instrument Sans", -apple-system, "Helvetica Neue", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --content-max: 74rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --radius: 14px;
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);

  /* GitHub Dark Default, one of Zuco's built-in themes. */
  --gh-bg: #0d1117;
  --gh-panel: #010409;
  --gh-border: #30363d;
  --gh-fg: #e6edf3;
  --gh-dim: #8b949e;
  --gh-faint: #6e7681;
  --gh-keyword: #ff7b72;
  --gh-type: #79c0ff;
  --gh-func: #d2a8ff;
  --gh-comment: #8b949e;
  --gh-add: #3fb950;
  --gh-del: #f85149;
  --gh-mod: #58a6ff;
  --gh-selected: #161b22;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  color-scheme: dark;
}

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: rgb(35 136 255 / 0.4);
}

img,
svg {
  display: block;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
}

kbd {
  display: inline-block;
  min-width: 1.6em;
  padding: 0.05em 0.4em;
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--tile-hi);
  color: var(--ink-soft);
  font-family: var(--font-mono);
  font-size: 0.82em;
  text-align: center;
}

.sprite {
  display: none;
}

.shell {
  width: min(100% - 2 * var(--gutter), var(--content-max));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.gradient-text {
  background: var(--band);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition:
    transform 160ms var(--ease-out),
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out),
    box-shadow 160ms var(--ease-out);
}

.button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button-primary {
  position: relative;
  color: var(--bg);
  background: linear-gradient(180deg, #ffffff, var(--ink-soft));
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.2),
    0 10px 30px -10px rgb(35 136 255 / 0.6);
}

.button-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.3),
    0 14px 36px -10px rgb(122 75 255 / 0.7);
}

.button-ghost {
  border-color: var(--rule-strong);
  color: var(--ink);
  background: rgb(255 255 255 / 0.03);
}

.button-ghost:hover {
  border-color: rgb(255 255 255 / 0.28);
  background: rgb(255 255 255 / 0.06);
}

.button-ghost kbd {
  font-size: 0.75em;
}

.button-small {
  padding: 0.45rem 0.9rem;
  border-color: var(--rule-strong);
  border-radius: 8px;
  font-size: 0.88rem;
  background: rgb(255 255 255 / 0.04);
}

.button-small:hover {
  border-color: rgb(255 255 255 / 0.28);
  background: rgb(255 255 255 / 0.08);
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--rule);
  background: rgb(9 9 11 / 0.72);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 3.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.site-nav nav {
  margin-left: auto;
}

.site-nav ul {
  display: flex;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav nav a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  transition:
    color 140ms,
    background-color 140ms;
}

.site-nav nav a:hover {
  color: var(--ink);
  background: rgb(255 255 255 / 0.06);
}

.nav-ext {
  color: var(--faint);
  font-size: 0.75rem;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(4rem, 10vw, 7.5rem) clamp(3rem, 7vw, 5.5rem);
}

/* The diagonal band from the logo, blurred into light. */
.hero-band {
  position: absolute;
  inset: -20% -10% auto auto;
  z-index: -1;
  width: min(70rem, 120vw);
  height: 16rem;
  background: var(--band);
  opacity: 0.32;
  filter: blur(80px);
  transform: rotate(-38deg) translate(18%, 30%);
  transform-origin: top right;
}

.hero-grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 55% at 50% 30%, #000 20%, transparent 75%);
  opacity: 0.6;
}

.hero-copy {
  display: grid;
  justify-items: center;
  text-align: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.85rem 0.35rem 0.6rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.03);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.chip-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--band);
  box-shadow: 0 0 12px var(--teal);
}

.hero h1 {
  margin-top: 1.6rem;
  font-size: clamp(2.8rem, 8vw, 5.8rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 40rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2.2rem;
}

.hero-note {
  margin-top: 1rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

/* Editor illustration */
.editor {
  position: relative;
  max-width: 62rem;
  margin: clamp(3rem, 7vw, 4.5rem) auto 0;
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: var(--radius);
  background: var(--gh-bg);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.6),
    0 40px 120px -30px rgb(35 136 255 / 0.35),
    0 30px 60px -30px rgb(0 0 0 / 0.9);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Window accent: the logo band as a hairline across the top. */
.editor::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--band);
  opacity: 0.9;
}

.editor-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 2.5rem;
  padding-inline: 0.9rem;
  border-bottom: 1px solid var(--gh-border);
  background: linear-gradient(90deg, rgb(25 221 186 / 0.06), rgb(122 75 255 / 0.06)), var(--gh-panel);
  color: var(--gh-dim);
}

.dots {
  display: flex;
  gap: 0.45rem;
}

.dots span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #ff5f57;
}

.dots span:nth-child(2) {
  background: #febc2e;
}

.dots span:nth-child(3) {
  background: #28c840;
}

.editor-title {
  color: var(--gh-fg);
  font-size: 0.78rem;
}

.editor-title i {
  color: var(--gh-faint);
  font-style: normal;
}

.editor-palette {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  justify-self: end;
  padding: 0.2rem 0.3rem 0.2rem 0.6rem;
  border: 1px solid var(--gh-border);
  border-radius: 7px;
  background: var(--gh-bg);
  font-size: 0.72rem;
}

.editor-palette svg {
  width: 0.8rem;
  height: 0.8rem;
  fill: currentColor;
}

.editor-palette kbd {
  border-radius: 5px;
  font-size: 0.68rem;
}

.editor-body {
  display: grid;
  grid-template-columns: 2.75rem 13.5rem 1fr;
  min-height: 22rem;
}

.editor-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  padding-top: 0.9rem;
  border-right: 1px solid var(--gh-border);
  background: var(--gh-panel);
}

.editor-rail svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: var(--gh-faint);
}

.editor-rail svg.active {
  fill: var(--gh-fg);
}

.editor-tree {
  padding: 0.6rem 0;
  border-right: 1px solid var(--gh-border);
  background: var(--gh-panel);
  color: var(--gh-dim);
}

.editor-tree p {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.18rem 0.9rem;
  white-space: nowrap;
}

.tree-head {
  margin-bottom: 0.3rem;
  color: var(--gh-faint);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tree-dir {
  color: var(--gh-fg);
}

.nested {
  padding-left: 1.7rem !important;
}

.nested-2 {
  padding-left: 2.5rem !important;
}

.tree-file.active {
  color: var(--gh-fg);
  background: var(--gh-selected);
  box-shadow: inset 2px 0 0 var(--gh-mod);
}

.tree-file.modified {
  color: #e3b341;
}

.tree-file.modified i {
  margin-left: auto;
  font-style: normal;
  font-size: 0.7rem;
}

/* Seti-style file glyphs. */
b.rs,
b.toml {
  flex: none;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  background: #e37933;
}

b.toml {
  background: var(--gh-dim);
}

.editor-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.editor-tabs {
  display: flex;
  border-bottom: 1px solid var(--gh-border);
  background: var(--gh-panel);
}

.tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-right: 1px solid var(--gh-border);
  color: var(--gh-dim);
}

.tab.active {
  position: relative;
  color: var(--gh-fg);
  background: var(--gh-bg);
}

.tab.active::after {
  content: "";
  position: absolute;
  inset: auto 0 -1px;
  height: 1px;
  background: var(--gh-bg);
}

.tab i {
  color: var(--gh-dim);
  font-style: normal;
  font-size: 0.65rem;
}

.editor-code {
  flex: 1;
  margin: 0;
  padding: 0.9rem 0;
  overflow: hidden;
  color: var(--gh-fg);
  font: inherit;
  line-height: 1.75;
}

.editor-code .cur {
  display: inline-block;
  min-width: 100%;
  background: rgb(110 118 129 / 0.1);
}

.ln {
  display: inline-block;
  width: 3rem;
  padding-right: 1rem;
  color: var(--gh-faint);
  text-align: right;
  user-select: none;
}

.cur .ln {
  color: var(--gh-fg);
}

.gutter {
  display: inline-block;
  width: 3px;
  height: 1.2em;
  margin-right: 1rem;
  vertical-align: -0.25em;
}

.gutter.add {
  background: var(--gh-add);
}

.gutter.mod {
  background: var(--gh-mod);
}

.k {
  color: var(--gh-keyword);
}

.t {
  color: var(--gh-type);
}

.f {
  color: var(--gh-func);
}

.c {
  color: var(--gh-comment);
  font-style: italic;
}

.caret {
  display: inline-block;
  width: 2px;
  height: 1.15em;
  margin-left: 1px;
  vertical-align: -0.2em;
  background: var(--gh-mod);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.editor-status {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 0.35rem 0.9rem;
  border-top: 1px solid var(--gh-border);
  background: var(--gh-panel);
  color: var(--gh-dim);
  font-size: 0.7rem;
  white-space: nowrap;
}

.editor-status .spacer {
  flex: 1;
}

.editor-status .branch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.editor-status svg {
  width: 0.75rem;
  height: 0.75rem;
  fill: currentColor;
}

.editor-status .blame {
  color: var(--gh-faint);
}

/* Sections */
.section {
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
  border-top: 1px solid var(--rule);
}

.section-head {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.section-label span {
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
  background: var(--band);
  color: var(--bg);
  font-weight: 600;
}

.section h2 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.section-head > p:last-child:not(.section-label) {
  color: var(--muted);
  font-size: 1.08rem;
  text-wrap: pretty;
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--rule);
  list-style: none;
}

.feature-grid li {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.6rem;
  padding: 1.8rem 1.6rem 2rem;
  background: var(--tile);
  transition: background-color 200ms var(--ease-out);
}

.feature-grid li::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: var(--band);
  opacity: 0;
  transition: opacity 200ms var(--ease-out);
}

.feature-grid li:hover {
  background: var(--tile-hi);
}

.feature-grid li:hover::before {
  opacity: 1;
}

.feature-file {
  margin-bottom: 0.6rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.feature-file::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.5rem;
  border-radius: 2px;
  background: #e37933;
}

.feature-grid h3 {
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.feature-grid p:last-child {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Limits, shown as a diff that only removes lines. */
.limits {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.limits .section-head {
  margin-bottom: 0;
}

.diff {
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: var(--radius);
  background: var(--gh-bg);
  font-family: var(--font-mono);
  font-size: 0.92rem;
}

.diff-head {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--gh-border);
  background: var(--gh-panel);
  color: var(--gh-dim);
  font-size: 0.78rem;
}

.diff-stat b {
  color: var(--gh-add);
  font-weight: 400;
}

.diff-stat i {
  color: var(--gh-del);
  font-style: normal;
}

.limit-list {
  margin: 0;
  padding: 0.6rem 0;
  list-style: none;
  counter-reset: line 3;
}

.limit-list li {
  display: flex;
  gap: 1rem;
  padding: 0.3rem 1rem;
  background: rgb(248 81 73 / 0.1);
  color: #ffa198;
  counter-increment: line;
}

.limit-list li + li {
  margin-top: 1px;
}

.limit-list li::before {
  content: counter(line);
  width: 1.5rem;
  color: rgb(255 161 152 / 0.5);
  text-align: right;
}

.limit-list li::after {
  content: "−";
  order: -1;
  width: 0.6rem;
  color: var(--gh-del);
}

/* Install */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  padding: 1.6rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--tile);
  counter-increment: step;
}

.steps li::before {
  content: "$ step " counter(step);
  margin-bottom: 0.5rem;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.steps h3 {
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.steps p {
  color: var(--muted);
  font-size: 0.95rem;
}

.text-link {
  justify-self: start;
  margin-top: 0.4rem;
  color: var(--teal);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  text-decoration: none;
}

.text-link::after {
  content: " →";
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dmg {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.6rem;
}

.dmg-arrow {
  width: 3.2rem;
  fill: none;
  stroke: var(--faint);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dmg-folder {
  position: relative;
  width: 3rem;
  height: 2.3rem;
  border-radius: 4px 6px 6px 6px;
  background: linear-gradient(180deg, #6cb6ff, #3b82e8);
}

.dmg-folder::before {
  content: "";
  position: absolute;
  top: -0.35rem;
  left: 0;
  width: 1.2rem;
  height: 0.5rem;
  border-radius: 3px 3px 0 0;
  background: #5aa5f5;
}

.cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgb(122 75 255 / 0.22), transparent 60%),
    radial-gradient(ellipse 50% 120% at 0% 100%, rgb(25 221 186 / 0.14), transparent 60%),
    var(--tile);
}

.cta div {
  flex: 1;
  min-width: 14rem;
}

.cta h3 {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
}

.cta p {
  margin-top: 0.3rem;
  color: var(--muted);
}

/* Footer, styled like the editor's status bar. */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--gh-panel);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.5rem;
  min-height: 3rem;
  padding-block: 0.6rem;
}

.footer-inner a {
  color: var(--ink);
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
}

.footer-status {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
  color: var(--faint);
}

@media (max-width: 60rem) {
  .editor-body {
    grid-template-columns: 2.75rem 1fr;
  }

  .editor-tree {
    display: none;
  }

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

  .limits,
  .steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 40rem) {
  .site-nav nav {
    display: none;
  }

  .button-small {
    margin-left: auto;
  }

  .editor-titlebar {
    grid-template-columns: auto 1fr;
    gap: 1rem;
  }

  .editor-palette,
  .editor-rail,
  .editor-status .blame,
  .editor-status span:nth-last-child(-n + 2) {
    display: none;
  }

  .editor-body {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .editor {
    font-size: 0.72rem;
  }

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

  .footer-status {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
