/* ── Tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:      #f4f1ed;
  --bg-2:    #e9eef2;
  --ink:     #1a1a1a;
  --muted:   #4f5b66;
  --accent:  #0c6b5f;
  --accent-2:#c65b2f;
  --card:    #ffffff;
  --line:    #d9d2c9;
  --shadow:  0 18px 50px rgba(22, 29, 37, 0.12);
  --radius:  20px;
  --mono:    "JetBrains Mono", "Fira Code", "Cascadia Code", "Courier New", monospace;
}

/* ── Reset ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: "Spectral", "Georgia", serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% -10%, #fff6eb 0%, transparent 60%),
    radial-gradient(1000px 700px at 90% 0%,  #e1f2ef 0%, transparent 55%),
    linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Trebuchet MS", sans-serif;
  letter-spacing: -0.02em;
  margin: 0 0 0.6rem 0;
}
p   { margin: 0 0 1rem 0; color: var(--muted); line-height: 1.7; }
a   { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul  { padding-left: 1.4rem; color: var(--muted); }
li  { margin-bottom: 0.4rem; line-height: 1.65; }

/* ── Layout ─────────────────────────────────────────────────────── */
.page { display: flex; flex-direction: column; min-height: 100vh; }

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 6vw;
  position: sticky;
  top: 0;
  background: rgba(244, 241, 237, 0.75);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10;
  border-bottom: 1px solid rgba(217, 210, 201, 0.5);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: inherit;
  text-decoration: none;
}
.brand img {
  width: 36px; height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 3px;
}
.nav-links {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 500;
  color: var(--muted);
}
.nav-links a {
  padding-bottom: 0.2rem;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s, color 0.15s;
}
.nav-links a:hover { border-color: var(--accent); color: var(--ink); }
.nav-links a.active { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.nav-links .nav-cta {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  border-bottom: none;
  font-size: 0.88rem;
  transition: opacity 0.15s, transform 0.15s;
}
.nav-links .nav-cta:hover { opacity: 0.88; transform: translateY(-1px); border-color: transparent; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
  padding: 4.5rem 6vw 3.5rem;
}
.hero-card {
  background: var(--card);
  padding: 2.6rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.hero-title {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  color: var(--ink);
  line-height: 1.1;
}
.hero-subtitle { font-size: 1.05rem; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}
.hero-visual {
  padding: 2.3rem;
  border-radius: var(--radius);
  border: 1px dashed #a0b6b1;
  background: linear-gradient(145deg, rgba(12,107,95,0.07), rgba(198,91,47,0.07));
  min-height: 260px;
}
.hero-visual h2 { font-size: 1.5rem; }

/* ── Shared section ──────────────────────────────────────────────── */
.section { padding: 3.5rem 6vw; }
.section-title { font-size: 1.75rem; margin-bottom: 0.5rem; }
.section-lead  { font-size: 1.05rem; max-width: 600px; margin-bottom: 1.8rem; }
.section-badge {
  display: inline-flex;
  align-items: center;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.divider { height: 1px; background: var(--line); margin: 0; }

/* ── Badges & pills ──────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.83rem;
  color: var(--accent-2);
  border: 1px solid rgba(198, 91, 47, 0.3);
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(198, 91, 47, 0.08);
  margin-bottom: 1rem;
}
.pill {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.83rem;
  background: #f1efe9;
  color: #2f3a40;
  border: 1px solid var(--line);
  font-family: "Space Grotesk", sans-serif;
}
.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(12,107,95,0.1);
  color: var(--accent);
  border: 1px solid rgba(12,107,95,0.25);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
}

/* ── Buttons ─────────────────────────────────────────────────────── */
.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1.8rem; }
.button {
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  border: 1px solid var(--accent);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}
.button.primary  { background: var(--accent); color: #fff; box-shadow: 0 10px 28px rgba(12,107,95,0.3); }
.button.secondary{ background: #fff; color: var(--accent); }
.button:hover    { transform: translateY(-2px); }

/* ── Cards & grid ────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--card);
  padding: 1.8rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(22,29,37,0.07);
}
.card h3 { font-size: 1.15rem; }
.card .card-icon { font-size: 1.6rem; margin-bottom: 0.6rem; }

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  align-items: start;
}
.highlight {
  background: var(--card);
  border-radius: 16px;
  padding: 1.6rem;
  border: 1px solid var(--line);
}
.small { font-size: 0.9rem; color: var(--muted); }

/* ── Code ────────────────────────────────────────────────────────── */
code {
  font-family: var(--mono);
  font-size: 0.87em;
  background: rgba(12,107,95,0.1);
  color: var(--accent);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}
pre {
  background: #1a2232;
  color: #cdd6f4;
  border-radius: 14px;
  padding: 1.5rem 1.8rem;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.75;
  border: 1px solid rgba(255,255,255,0.07);
  margin: 1rem 0;
}
pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.c { color: #6c7086; }        /* comment */
.k { color: #89dceb; }        /* keyword */
.s { color: #a6e3a1; }        /* string */
.n { color: #89b4fa; }        /* name/function */
.o { color: #cba6f7; }        /* output */

.install-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: #1a2232;
  color: #cdd6f4;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  font-family: var(--mono);
  font-size: 0.92rem;
  border: 1px solid rgba(255,255,255,0.08);
  margin: 0.4rem 0;
  width: fit-content;
}
.install-pill .prompt { color: #a6e3a1; user-select: none; }

/* ── Steps ───────────────────────────────────────────────────────── */
.steps { display: flex; flex-direction: column; gap: 1.6rem; margin-top: 1.5rem; }
.step  { display: flex; gap: 1.2rem; align-items: flex-start; }
.step-num {
  flex-shrink: 0;
  width: 2rem; height: 2rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 0.85rem;
  margin-top: 0.15rem;
}
.step h4 { margin: 0 0 0.3rem; font-size: 1rem; }
.step p  { margin: 0; font-size: 0.9rem; }

/* ── Processor cards ─────────────────────────────────────────────── */
.proc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.proc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.2rem 1.3rem;
  box-shadow: 0 4px 12px rgba(22,29,37,0.06);
}
.proc-card .proc-name {
  font-family: var(--mono);
  font-size: 0.83rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.35rem;
  display: block;
}
.proc-card h4 { font-size: 0.93rem; margin: 0 0 0.25rem; }
.proc-card p  { font-size: 0.82rem; margin: 0; }

/* ── Language grid ───────────────────────────────────────────────── */
.lang-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}
.lang-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font-family: "Space Grotesk", sans-serif;
  min-width: 90px;
  text-align: center;
  box-shadow: 0 3px 8px rgba(22,29,37,0.06);
  transition: transform 0.15s, box-shadow 0.15s;
}
.lang-pill:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(22,29,37,0.1); }
.lang-pill .lang-name { font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.lang-pill .lang-code { font-size: 0.7rem; color: var(--muted); font-family: var(--mono); margin-top: 0.1rem; }
.lang-pill .lang-level {
  font-size: 0.68rem;
  margin-top: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
}
.lang-pill.full   .lang-level { background: rgba(12,107,95,0.12); color: var(--accent); }
.lang-pill.morph  .lang-level { background: rgba(198,91,47,0.1);  color: var(--accent-2); }

/* ── Feature table ───────────────────────────────────────────────── */
.feature-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(22,29,37,0.08);
}
.feature-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.88rem;
}
.feature-table th {
  padding: 0.9rem 1.1rem;
  text-align: left;
  background: #f8f7f4;
  border-bottom: 2px solid var(--line);
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.feature-table td {
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid rgba(217,210,201,0.5);
  color: var(--muted);
  vertical-align: middle;
  white-space: nowrap;
}
.feature-table tr:last-child td { border-bottom: none; }
.feature-table tr:hover td { background: rgba(12,107,95,0.025); }
.feature-table .lang-col { font-weight: 600; color: var(--ink); }
.feature-table .code-col { font-family: var(--mono); font-size: 0.78rem; }
.check   { color: #0c6b5f; font-weight: 700; }
.partial { color: var(--accent-2); font-weight: 700; }
.none    { color: #c4bfba; }

/* ── Contributing ────────────────────────────────────────────────── */
.contrib-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 1.5rem;
}
.contrib-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.contrib-card .contrib-icon { font-size: 1.7rem; }
.contrib-card h4 { margin: 0; font-size: 1rem; }
.contrib-card p  { margin: 0; font-size: 0.85rem; }

/* ── Support / Donate ────────────────────────────────────────────── */
.support {
  padding: 4rem 6vw;
  text-align: center;
  background: linear-gradient(135deg,
    rgba(198,91,47,0.06) 0%,
    rgba(12,107,95,0.05) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.support h2 { font-size: 1.85rem; margin-bottom: 0.5rem; }
.support .support-lead {
  max-width: 560px;
  margin: 0 auto 2rem;
  font-size: 1.02rem;
}
.donate-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  justify-content: center;
  margin-top: 0.5rem;
}
.donate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.93rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  border: 2px solid transparent;
}
.donate-btn:hover  { transform: translateY(-2px); opacity: 0.9; }
.donate-btn .icon  { font-size: 1.1rem; }
.donate-btn.coffee { background: #FFDD00; color: #111;     border-color: #e6c800; box-shadow: 0 8px 24px rgba(255,221,0,0.3); }
.donate-btn.paypal { background: #003087; color: #fff;     border-color: #003087; box-shadow: 0 8px 24px rgba(0,48,135,0.25); }
.donate-btn.patreon{ background: #FF424D; color: #fff;     border-color: #e63540; box-shadow: 0 8px 24px rgba(255,66,77,0.25); }
.donate-btn.github { background: #24292f; color: #fff;     border-color: #24292f; box-shadow: 0 8px 24px rgba(36,41,47,0.2); }
.support-note {
  font-size: 0.84rem;
  margin-top: 1.5rem;
  color: var(--muted);
}

/* ── Book / Coming soon ──────────────────────────────────────────── */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}
.chapter-item {
  display: flex;
  gap: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.chapter-item:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(12,107,95,0.1);
}
.chapter-item.done {
  border-left: 3px solid var(--accent);
  background: linear-gradient(to right, rgba(12,107,95,0.04), var(--surface));
}
.ch-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent);
  opacity: 0.45;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 0.15rem;
  min-width: 2.4rem;
}
.chapter-item.done .ch-num { opacity: 1; }
.ch-body { flex: 1; min-width: 0; }
.ch-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  color: var(--text);
}
.ch-body p {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.55;
}
.ch-status {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.chapter-item.done .ch-status { color: var(--accent); }

.cs-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(12,107,95,0.08), rgba(198,91,47,0.06));
  border: 1px dashed #a0b6b1;
  text-align: center;
}
.cs-badge { font-size: 3.5rem; line-height: 1; }
.cs-visual h2 { margin: 0; }
.cs-visual p { max-width: 320px; margin: 0; }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  padding: 2.2rem 6vw;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.87rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-family: "Space Grotesk", sans-serif;
}
.footer a { color: var(--accent); }
.footer a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .nav { flex-direction: column; align-items: flex-start; gap: 0.8rem; }
  .nav-links { flex-wrap: wrap; }
  .hero { padding-top: 2.8rem; }
  .hero-card { padding: 2rem; }
  .feature-table th,
  .feature-table td { padding: 0.65rem 0.75rem; font-size: 0.82rem; }
  .donate-grid { flex-direction: column; align-items: stretch; }
  .donate-btn  { justify-content: center; }
  .support     { padding: 3rem 5vw; }
}
