/* Astrolabe CLI landing page. Tokens follow the terminal themes: onyx (dark, the
   native register) and parchment (light). Gold is the only accent. */

:root {
  --bg: #f2ebda;
  --surface: #f8f3e6;
  --text: #33291a;
  --muted: #6b5d45;
  --line: #ddd0b4;
  --accent: #7a5f14;
  --accent-2: #7a5f14;
  --alert: #a8362c;
  --on-accent: #fffaf0;
  --term-bg: #111111;
  --term-text: #e4e4e4;
  --term-muted: #9c9c9c;
  --term-faint: #686868;
  --term-gold: #d4a72c;
  --term-bar: #1a1a1a;
  --term-line: #2a2a2a;
  --shadow: 0 1px 2px rgba(51, 41, 26, .08), 0 10px 28px rgba(51, 41, 26, .10);

  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --measure: 66ch;
  --gutter: 16px;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111;
    --surface: #1a1a1a;
    --text: #e4e4e4;
    --muted: #9c9c9c;
    --line: #2a2a2a;
    --accent: #d4a72c;
    --accent-2: #e3b341;
    --alert: #e5675f;
    --on-accent: #111111;
    --term-bg: #0c0c0c;
    --term-bar: #161616;
    --term-line: #2a2a2a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111111;
  --surface: #1a1a1a;
  --text: #e4e4e4;
  --muted: #9c9c9c;
  --line: #2a2a2a;
  --accent: #d4a72c;
  --accent-2: #e3b341;
  --alert: #e5675f;
  --on-accent: #111111;
  --term-bg: #0c0c0c;
  --term-bar: #161616;
  --term-line: #2a2a2a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  overflow-wrap: break-word;
}

h1, h2, h3 { font-family: var(--mono); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4.2vw, 2.5rem); margin: 0 0 .6em; max-width: 26ch; }
h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); margin: 0 0 .7em; }
p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

code, kbd, pre { font-family: var(--mono); font-size: .9em; }
:not(pre) > code {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: .05em .35em;
  overflow-wrap: anywhere;
}
kbd {
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0 .35em;
  background: var(--surface);
}

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: var(--gutter); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.wordmark { font-family: var(--mono); font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--accent); white-space: nowrap; }
.wm-text, .wm-arrow { color: var(--accent); }
.wordmark svg { width: 26px; height: 26px; vertical-align: -6px; margin-right: 8px; color: var(--accent); }
.site-header nav ul, .site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-header nav a { color: var(--text); text-decoration: none; font-family: var(--mono); font-size: .92rem; }
.site-header nav a:hover { color: var(--accent); }

/* Hero */
.hero { padding-top: clamp(40px, 8vw, 88px); padding-bottom: 56px; }
.lede { font-size: 1.1rem; color: var(--text); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 2.4em; }

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: .95rem;
  padding: .6em 1.1em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(1.08); }

/* Terminal frame */
.term { margin: 0; max-width: 760px; }
.term-bar, .term-body { border: 1px solid var(--term-line); }
.term-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--term-bar);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 9px 14px;
}
.dots { display: flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #333; display: block; }
.term-title { flex: 1; text-align: center; margin-right: 47px; font-family: var(--mono); font-size: .8rem; color: var(--term-muted); }
.term-body {
  margin: 0;
  background: var(--term-bg);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px 18px;
  font-size: clamp(11.5px, 3vw, 15px);
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  color: var(--term-text);
}
.term-body b { font-weight: 700; }
.ln { display: block; }
.prompt { color: var(--term-faint); }
.t-muted { color: var(--term-muted); }
.t-faint { color: var(--term-faint); }
.t-gold { color: var(--term-gold); }
.t-bold { color: var(--term-text); font-weight: 700; }
.t-gap { display: block; height: .8em; }
.term figcaption { font-size: .88rem; color: var(--muted); margin-top: 12px; max-width: 760px; }

/* Feature rows */
.features { display: grid; gap: 64px; padding-top: 24px; padding-bottom: 72px; }
.feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.feature.flip figure { order: 2; }
.feature figure { margin: 0; }
.feature img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #111111;
}
.feature h2 { font-size: 1.3rem; }

/* Install */
.install { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.codebox pre, pre.plain {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  overflow-x: auto;
  line-height: 1.5;
  margin: 0 0 1.4em;
}
.codebox { position: relative; max-width: 820px; }
.codebox pre { padding-right: 84px; }
.copy {
  position: absolute; top: 9px; right: 9px;
  font: .8rem var(--mono);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
}
.copy:hover { border-color: var(--accent); }
pre.plain { display: inline-block; max-width: 100%; }
.release { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 18px 20px 6px; margin: 1.6em 0; max-width: 820px; }
.release-line { font-family: var(--mono); font-size: .92rem; color: var(--muted); }
.release-line [data-release-tag] { color: var(--text); font-weight: 600; }
.assets { list-style: none; padding: 0; margin: 0 0 1em; }
.assets li { padding: 6px 0; border-top: 1px solid var(--line); }
.assets code { font-size: .8em; }
.assets .size { color: var(--muted); font-size: .85em; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .92rem; }
.site-footer nav { margin-bottom: 1em; }
.site-footer nav a { font-family: var(--mono); }

@media (max-width: 719px) {
  body { font-size: 16px; }
  .feature { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .feature.flip figure { order: 0; }
  .features { gap: 48px; }
  .install { padding-top: 40px; padding-bottom: 40px; }
  .term-body { padding: 12px 12px 14px; }
  .term-title { margin-right: 0; }
}

/* The hero capture */
.shot { margin: 0; }
.shot img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: #111111; }
.shot figcaption, .feature figcaption { font-size: .88rem; color: var(--muted); margin-top: 12px; max-width: 760px; }
.feature .term-body { font-size: clamp(10.5px, 2.6vw, 13.5px); }
