/* herdr-stith homepage. Aylith family tokens: warm neutrals, copper accent,
   DM Sans body, Space Grotesk headings. Light and dark follow the system
   unless the reader picks one (html[data-theme]). */

:root {
  --bg: #f8f7f4;
  --bg-2: #f0eee9;
  --surface: #fffdf9;
  --line: #e1ddd3;
  --line-strong: #c9c3b3;
  --text: #1c1a16;
  --muted: #5a544a;
  --faint: #7a7365;
  --accent: oklch(0.66 0.13 50);
  --accent-ink: oklch(0.5 0.12 50);
  --accent-soft: oklch(0.94 0.03 50);
  --on-accent: #fff;
  --term-bg: #15130f;
  --term-line: #2c2822;
  --term-text: #e8e0d4;
  --term-dim: #8d8576;
  --term-accent: oklch(0.76 0.11 55);
  --term-good: #9fc48a;
  --term-warn: #e3b56b;
  --shadow: 0 1px 2px rgb(28 26 22 / 0.06), 0 18px 48px -16px rgb(28 26 22 / 0.22);
  --radius: 14px;
  --wrap: 1180px;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #0d0c0a;
    --bg-2: #141210;
    --surface: #1a1814;
    --line: #2c2823;
    --line-strong: #46423a;
    --text: #f3efe8;
    --muted: #c3b8a6;
    --faint: #9a8f7d;
    --accent: oklch(0.73 0.115 50);
    --accent-ink: oklch(0.78 0.1 52);
    --accent-soft: oklch(0.23 0.03 50);
    --on-accent: #1c1a16;
    --term-bg: #090807;
    --term-line: #2a2621;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 60px -20px rgb(0 0 0 / 0.7);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #0d0c0a;
  --bg-2: #141210;
  --surface: #1a1814;
  --line: #2c2823;
  --line-strong: #46423a;
  --text: #f3efe8;
  --muted: #c3b8a6;
  --faint: #9a8f7d;
  --accent: oklch(0.73 0.115 50);
  --accent-ink: oklch(0.78 0.1 52);
  --accent-soft: oklch(0.23 0.03 50);
  --on-accent: #1c1a16;
  --term-bg: #090807;
  --term-line: #2a2621;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 60px -20px rgb(0 0 0 / 0.7);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 'DM Sans', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
code, pre, kbd { font-family: var(--mono); }

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

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10;
  padding: 10px 14px;
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 20px;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font: 600 18px/1 'Space Grotesk', sans-serif;
  letter-spacing: -0.01em;
}
.wordmark svg { width: 30px; height: 30px; flex: none; }
.site-header nav { display: flex; gap: 4px; margin-left: auto; }
.site-header nav a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.site-header nav a:hover { color: var(--text); background: var(--bg-2); }

.theme {
  display: inline-flex;
  margin: 0;
  min-width: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.theme button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
}
.theme button svg { width: 16px; height: 16px; }
.theme button:hover { color: var(--text); }
.theme button[aria-pressed='true'] { background: var(--bg-2); color: var(--text); }

/* Hero */
.hero { padding-block: clamp(56px, 9vw, 112px) 40px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 {
  margin-top: 22px;
  max-width: 17ch;
  font-size: clamp(42px, 7.2vw, 88px);
  letter-spacing: -0.035em;
  line-height: 0.98;
}
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 32px 64px;
  margin-top: 28px;
}
.lead { max-width: 60ch; font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); }
.lead strong { color: var(--text); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.button:hover { transform: translateY(-1px); }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 5px;
}
.text-link:hover { text-decoration-color: var(--accent); }

/* Terminal frame */
.screen {
  margin-top: clamp(40px, 6vw, 64px);
  border-radius: var(--radius);
  background: var(--term-bg);
  color: var(--term-text);
  box-shadow: var(--shadow);
  border: 1px solid var(--term-line);
  overflow: hidden;
}
.screen-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--term-line);
  font: 500 12px/1 var(--mono);
  color: var(--term-dim);
}
.screen-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--term-line);
}
.screen-bar span { margin-left: 8px; }
.screen-scroll { overflow-x: auto; }
.screen pre {
  margin: 0;
  padding: 18px 20px 20px;
  font-size: clamp(11.5px, 1.02vw, 14.5px);
  line-height: 1.55;
  white-space: pre;
  width: max-content;
  min-width: 100%;
}
.screen .d { color: var(--term-dim); }
.screen .a { color: var(--term-accent); }
.screen .g { color: var(--term-good); }
.screen .w { color: var(--term-warn); }
.screen .sel { background: rgb(232 224 212 / 0.1); color: #fff; }
.screen .b { font-weight: 700; color: #fff; }
.caption {
  margin-top: 14px;
  font-size: 14px;
  color: var(--faint);
}

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 52px); }
.section-head p { font-size: 18px; color: var(--muted); }
.section-head .eyebrow { font-size: 13px; color: var(--accent-ink); }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.feature {
  padding: 28px 28px 32px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.feature .num {
  font: 500 12px/1 var(--mono);
  color: var(--accent-ink);
  letter-spacing: 0.08em;
}
.feature h3 { margin: 18px 0 10px; font-size: 22px; }
.feature p { color: var(--muted); font-size: 16px; }
.feature code {
  font-size: 0.88em;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  white-space: nowrap;
}

/* Panel showcase */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.split ul { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.split li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; color: var(--muted); }
.split li::before { content: '→'; color: var(--accent-ink); font-weight: 600; }
.split li strong { color: var(--text); font-weight: 600; }

.rail {
  max-width: 420px;
  justify-self: center;
  width: 100%;
  border-radius: var(--radius);
  background: var(--term-bg);
  color: var(--term-text);
  border: 1px solid var(--term-line);
  box-shadow: var(--shadow);
  font: 13px/1.6 var(--mono);
  padding: 18px 18px 16px;
}
.rail-head { display: flex; justify-content: space-between; color: var(--term-dim); }
.rail-head b { color: var(--term-accent); font-weight: 600; }
.rail-title { margin: 12px 0 14px; color: #fff; font-weight: 600; line-height: 1.45; }
.rail-tabs { display: flex; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--term-line); color: var(--term-dim); }
.rail-tabs span:first-child { color: var(--term-text); box-shadow: 0 2px 0 var(--term-accent); }
.rail dl { display: grid; grid-template-columns: 72px 1fr; gap: 6px 12px; margin: 14px 0 0; }
.rail dt { color: var(--term-dim); }
.rail dd { margin: 0; overflow-wrap: anywhere; }
.rail .dot { color: var(--term-warn); }
.rail-foot { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--term-line); color: var(--term-dim); font-size: 12px; }

/* Honest limits */
.limits { background: var(--bg-2); border-block: 1px solid var(--line); }
.limits-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}
.claims { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.claim { padding: 22px 0; border-bottom: 1px solid var(--line-strong); display: grid; grid-template-columns: 140px 1fr; gap: 20px; }
.claim h3 { font-size: 18px; }
.claim p { color: var(--muted); font-size: 16px; }
.dialog-frame { position: sticky; top: 24px; }
.dialog-frame .screen { margin-top: 0; }
.dialog-frame pre { font-size: 12.5px; }

/* Install */
.install-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.card + .card { margin-top: 20px; }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 20px;
  border-bottom: 1px solid var(--line);
  font: 600 12px/1 var(--mono);
  letter-spacing: 0.08em;
  color: var(--faint);
  text-transform: uppercase;
}
.card pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
}
.card pre .d { color: var(--faint); }
.card pre .a { color: var(--accent-ink); }
.copy {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: 600 13px/1 'DM Sans', sans-serif;
  cursor: pointer;
}
.copy:hover { border-color: var(--line-strong); }
.card-note { padding: 0 20px 16px; font-size: 14px; color: var(--faint); }

.status {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--accent-soft);
}
.status .eyebrow { font-size: 12px; }
.status h3 { margin: 14px 0 12px; font-size: 24px; }
.status p { color: var(--muted); font-size: 16px; }
.status p + p { margin-top: 12px; }
.status ul { margin: 16px 0 0; padding-left: 20px; color: var(--muted); font-size: 16px; display: grid; gap: 6px; }
.status code { font-size: 0.9em; }

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 32px 48px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--faint);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer .aylith, .site-footer nav a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.site-footer .aylith:hover, .site-footer nav a:hover { color: var(--text); text-decoration: underline; }
.site-footer .aylith { display: inline-flex; align-items: center; gap: 8px; }
.site-footer .aylith b { color: var(--text); font-weight: 600; }

@media (max-width: 960px) {
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .limits-grid, .install-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-row { grid-template-columns: minmax(0, 1fr); }
  .dialog-frame { position: static; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header { gap: 12px; }
  .site-header nav { display: none; }
  .theme { margin-left: auto; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .feature { padding: 24px 20px 26px; }
  .claim { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .actions .button { width: 100%; justify-content: center; }
  .screen pre { padding: 14px 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after { transition: none; animation: none; }
}
.screen .mk { display: inline-block; width: 1ch; color: var(--term-accent); }

.card-note code { white-space: nowrap; }
