@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=IBM+Plex+Sans:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  --bg-base: #10141a;
  --bg-surface: #171c23;
  --bg-raised: #1f252d;
  --bg-raised-hover: #262d36;
  --border: #2a313b;
  --border-soft: #22282f;
  --text-primary: #e7e5e0;
  --text-secondary: #9198a1;
  --text-tertiary: #666e79;
  --accent: #4fb55c;
  --accent-soft: #4fb55c1a;
  --accent-text: #6fcf7e;
  --font-display: "Bricolage Grotesque", -apple-system, "Segoe UI", sans-serif;
  --font-ui: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SF Mono", ui-monospace, monospace;
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg-base);
  background-image: radial-gradient(ellipse 900px 500px at 50% -10%, #4fb55c14, transparent);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; }

p {
  color: var(--text-secondary);
  margin: 0 0 1em;
  max-width: 68ch;
}

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

code {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.88em;
  color: var(--accent-text);
}

pre {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-primary);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---- Header ---- */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  background: #10141aee;
  backdrop-filter: blur(10px);
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  height: 30px;
  width: auto;
}

.brand .accent {
  color: var(--accent);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.site-nav a {
  color: var(--text-secondary);
  font-size: 0.94rem;
  font-weight: 500;
}

.site-nav a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 9px 18px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text-primary);
  cursor: pointer;
}

.btn:hover {
  background: var(--bg-raised-hover);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b1d0f;
}

.btn-primary:hover {
  background: var(--accent-text);
}

/* ---- Hero ---- */

.hero {
  position: relative;
  padding: 96px 0 64px;
  text-align: center;
  overflow: hidden;
}

/* The Lines map, tilted and faded, behind the headline. Masked out
   toward the bottom so the feature grid starts on a clean ground. */
.hero-backdrop {
  position: absolute;
  top: 6%;
  right: -4%;
  width: 52%;
  z-index: 0;
  pointer-events: none;
  perspective: 1200px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 60%, transparent 100%);
}

.hero-backdrop img {
  width: 100%;
  max-width: none;
  border-radius: 12px;
  opacity: 0.2;
  transform: rotateY(-22deg) rotateX(10deg) rotateZ(2deg);
  transform-origin: 50% 50%;
  filter: saturate(0.85);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid #4fb55c33;
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 22px;
}

.hero h1 {
  max-width: 16ch;
  margin-left: auto;
  margin-right: auto;
}

.hero .lede {
  max-width: 56ch;
  margin: 18px auto 34px;
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---- Sections ---- */

section {
  padding: 64px 0;
}

.section-head {
  max-width: 60ch;
  margin: 0 auto 44px;
  text-align: center;
}

.section-head p {
  max-width: none;
  margin: 0 auto;
}

/* ---- Feature grid ---- */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.card p {
  max-width: none;
  font-size: 0.95rem;
  margin-bottom: 0;
}

.card .tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 2px 7px;
  margin-bottom: 12px;
}

/* ---- Notation tokens (matches the app's own line-token pill) ---- */

.token-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: 5px;
  padding: 2px 8px;
  margin: 0 2px;
}

/* ---- Comparison / table ---- */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}

th {
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

td {
  color: var(--text-secondary);
}

td:first-child, th:first-child {
  color: var(--text-primary);
}

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

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
  padding: 48px 0 96px;
}

.docs-nav {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-nav-group {
  margin-bottom: 18px;
}

.docs-nav-group h4 {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.docs-nav a {
  display: block;
  padding: 5px 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.docs-nav a:hover, .docs-nav a.active {
  color: var(--accent-text);
  text-decoration: none;
}

.docs-content h2 {
  margin-top: 2.2em;
}

.docs-content h2:first-child {
  margin-top: 0;
}

.docs-content ul, .docs-content ol {
  color: var(--text-secondary);
  max-width: 68ch;
  padding-left: 1.3em;
}

.docs-content li {
  margin-bottom: 0.5em;
}

.callout {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 0.92rem;
}

.callout p {
  margin: 0;
  max-width: none;
}

.callout-title {
  font-weight: 700;
  color: var(--text-primary);
  display: block;
  margin-bottom: 4px;
}

.docs-prev-next {
  display: flex;
  justify-content: space-between;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
  font-size: 0.9rem;
}

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 48px 0;
  margin-top: 60px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer .brand img {
  height: 22px;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 0.88rem;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

@media (max-width: 860px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-nav {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 20px;
  }
  .site-nav {
    display: none;
  }
}

/* ---- Screenshots ---- */

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 22px;
}

.shot {
  margin: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border-soft);
}

.shot figcaption {
  padding: 14px 18px 16px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.shot figcaption strong {
  display: block;
  color: var(--text-primary);
  font-family: var(--font-display);
  margin-bottom: 4px;
}

.legal {
  max-width: 72ch;
  margin: 0 auto;
}

.legal h2 {
  margin-top: 36px;
}
