/* jaunt landing page. Tokens follow docs/design.md §11 (the look); dark is the native register. */

:root {
  --bg: #f7f7fa;
  --surface: #ffffff;
  --text: #1f2033;
  --muted: #6b6f85;
  --line: #dcdce6;
  --accent: #5b4bb8;
  --accent-2: #0a7379;   /* deepened from #0b7f85, which is 4.48:1 on --bg */
  --direct: #1f7a3f;
  --relay: #8a6100;
  --alert: #b3364a;
  --on-accent: #ffffff;
  --term-bg: #ffffff;
  --term-bar: #efeff5;
  --shadow: 0 1px 2px rgba(31, 32, 51, .06), 0 8px 24px rgba(31, 32, 51, .06);

  --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: #1b1b26;
    --surface: #22222f;
    --text: #d6d6e3;
    --muted: #8b8ea6;
    --line: #2e2e3d;
    --accent: #b4a0ff;
    --accent-2: #6fe3e1;
    --direct: #8ee6a0;
    --relay: #f2c97d;
    --alert: #f28b9a;
    --on-accent: #1b1b26;
    --term-bg: #1b1b26;
    --term-bar: #22222f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #1b1b26;
  --surface: #22222f;
  --text: #d6d6e3;
  --muted: #8b8ea6;
  --line: #2e2e3d;
  --accent: #b4a0ff;
  --accent-2: #6fe3e1;
  --direct: #8ee6a0;
  --relay: #f2c97d;
  --alert: #f28b9a;
  --on-accent: #1b1b26;
  --term-bg: #1b1b26;
  --term-bar: #22222f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .25);
  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); }
.wm-arrow { color: var(--accent-2); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .wm-arrow {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}
.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(--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: var(--line); display: block; }
.term-title { flex: 1; text-align: center; margin-right: 47px; font-family: var(--mono); font-size: .8rem; color: var(--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(--text);
}
.term-body b { font-weight: 700; }
.ln { display: inline-block; }
.prompt { color: var(--muted); }
.t-dim { color: var(--muted); }
.t-sep { color: var(--muted); }
.t-bright { color: var(--text); }
.t-direct { color: var(--direct); }
.t-relay { color: var(--relay); }
.t-target { color: var(--accent-2); }
.t-accent { color: var(--accent); }
.term figcaption { font-size: .88rem; color: var(--muted); margin-top: 12px; max-width: 760px; }

@media (prefers-reduced-motion: no-preference) {
  .term-body .ln { opacity: 0; animation: line-in .45s ease-out forwards; }
  .term-body .ln:nth-child(1) { animation-delay: .3s; }
  .term-body .ln:nth-child(2) { animation-delay: 1.1s; }
  .term-body .ln:nth-child(3) { animation-delay: 2.2s; }
  .term-body .ln:nth-child(4) { animation-delay: 3.3s; }
  .term-body .ln:nth-child(5) { animation-delay: 4.4s; }
  .term-body .ln:nth-child(6) { animation-delay: 5.2s; }
  .term-body .ln:nth-child(7) { animation-delay: 6.3s; }
}
@keyframes line-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* 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: #1b1b26;
}
.feature h2 { font-size: 1.3rem; }

/* How it works */
.how, .install { padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.diagram, .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;
}
.diagram { color: var(--muted); font-size: clamp(11px, 2.4vw, 14px); }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 40px; }

/* Install */
.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; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .how, .install { padding-top: 40px; padding-bottom: 40px; }
  .term-body { padding: 12px 12px 14px; }
  .term-title { margin-right: 0; }
}
