/* Catppuccin Mocha palette */
:root {
  --base:     #1e1e2e;
  --mantle:   #181825;
  --crust:    #11111b;
  --surface0: #313244;
  --surface1: #45475a;
  --surface2: #585b70;
  --overlay0: #6c7086;
  --overlay1: #7f849c;
  --subtext0: #a6adc8;
  --subtext1: #bac2de;
  --text:     #cdd6f4;
  --lavender: #b4befe;
  --blue:     #89b4fa;
  --sapphire: #74c7ec;
  --teal:     #94e2d5;
  --green:    #a6e3a1;
  --yellow:   #f9e2af;
  --peach:    #fab387;
  --mauve:    #cba6f7;
  --pink:     #f5c2e7;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--base);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ─────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(24, 24, 37, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--surface0);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.nav-brand img {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.nav-brand span {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--lavender);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-right a.nav-link {
  color: var(--subtext1);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.18s;
}

.nav-right a.nav-link:hover { color: var(--text); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--mauve);
  color: var(--crust);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  transition: opacity 0.18s, transform 0.15s;
  white-space: nowrap;
}
.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface0);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--surface1);
  transition: background 0.18s, transform 0.15s;
  white-space: nowrap;
}
.btn-secondary:hover { background: var(--surface1); transform: translateY(-1px); }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5.5rem 2rem 3rem;
  text-align: center;
}

.hero-icon {
  display: block;
  width: 176px;
  height: 176px;
  border-radius: 38px;
  margin: 0 auto 2rem;
  box-shadow: 0 26px 64px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(203, 166, 247, 0.12);
  border: 1px solid rgba(203, 166, 247, 0.3);
  color: var(--mauve);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 2rem;
  letter-spacing: 0.04em;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 1.4rem;
}

h1 .accent { color: var(--mauve); }

.hero-desc {
  font-size: 1.1rem;
  color: var(--subtext1);
  max-width: 580px;
  margin: 0 auto 2.75rem;
  line-height: 1.75;
}

.hero-desc strong { color: var(--text); font-weight: 600; }

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 4.5rem;
}

.hero-cta .btn-primary,
.hero-cta .btn-secondary {
  font-size: 0.975rem;
  padding: 0.7rem 1.75rem;
}

.screenshot-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--surface1);
  box-shadow:
    0 0 0 1px rgba(203, 166, 247, 0.06),
    0 40px 100px rgba(0, 0, 0, 0.7),
    0 0 140px rgba(203, 166, 247, 0.06);
}

.screenshot-wrap img {
  width: 100%;
  display: block;
}

/* ── Stats bar ───────────────────────────────────────────── */
.stats-bar {
  background: var(--mantle);
  border-top: 1px solid var(--surface0);
  border-bottom: 1px solid var(--surface0);
}

.stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.stat {
  text-align: center;
  padding: 0 1rem;
}

.stat + .stat {
  border-left: 1px solid var(--surface1);
}

.stat-value {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--mauve);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--subtext0);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ── Generic section wrapper ─────────────────────────────── */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 5.5rem 2rem;
}

.section-label {
  display: inline-block;
  color: var(--mauve);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.section-sub {
  font-size: 1.025rem;
  color: var(--subtext1);
  max-width: 520px;
  line-height: 1.75;
  margin-bottom: 3.5rem;
}

/* ── Features grid ───────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
  gap: 1.25rem;
}

.feat {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 16px;
  padding: 1.75rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feat:hover {
  border-color: var(--surface2);
  transform: translateY(-3px);
}

.feat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  flex-shrink: 0;
}

.ic-mauve   { background: rgba(203,166,247,0.15); color: var(--mauve); }
.ic-blue    { background: rgba(137,180,250,0.15); color: var(--blue); }
.ic-teal    { background: rgba(148,226,213,0.15); color: var(--teal); }
.ic-green   { background: rgba(166,227,161,0.15); color: var(--green); }
.ic-peach   { background: rgba(250,179,135,0.15); color: var(--peach); }
.ic-sapp    { background: rgba(116,199,236,0.15); color: var(--sapphire); }
.ic-lav     { background: rgba(180,190,254,0.15); color: var(--lavender); }
.ic-yellow  { background: rgba(249,226,175,0.15); color: var(--yellow); }
.ic-pink    { background: rgba(245,194,231,0.15); color: var(--pink); }

.feat h3 {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.feat p {
  font-size: 0.875rem;
  color: var(--subtext0);
  line-height: 1.65;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  max-width: 1100px;
  margin: 0 auto;
  height: 1px;
  background: var(--surface0);
}

/* ── Changelog ───────────────────────────────────────────── */
.changelog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.cl-entry {
  background: var(--mantle);
  border: 1px solid var(--surface0);
  border-radius: 16px;
  padding: 1.75rem;
}

.ver-tag {
  display: inline-flex;
  align-items: center;
  background: rgba(203,166,247,0.12);
  border: 1px solid rgba(203,166,247,0.25);
  color: var(--mauve);
  font-size: 0.775rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

.cl-entry h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.9rem;
  line-height: 1.3;
}

.cl-entry ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cl-entry li {
  font-size: 0.875rem;
  color: var(--subtext1);
  line-height: 1.55;
  padding-left: 1.2rem;
  position: relative;
}

.cl-entry li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mauve);
  opacity: 0.65;
}

/* ── Download ────────────────────────────────────────────── */
.install-band {
  background: var(--mantle);
  border-top: 1px solid var(--surface0);
  border-bottom: 1px solid var(--surface0);
}

#download .section-sub { margin-bottom: 1.25rem; }

.dl-version {
  display: inline-block;
  margin-top: 4px;
  font-size: 14px;
  color: var(--mauve);
  border: 1px solid var(--surface1);
  border-radius: 999px;
  padding: 4px 14px;
  font-family: 'JetBrains Mono', monospace;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 28px;
}

.dl-card {
  background: var(--crust);
  border: 1px solid var(--surface0);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dl-card .ico { font-size: 30px; }
.dl-card h3 { margin: 4px 0 0; font-size: 18px; color: var(--text); }
.dl-card .req { color: var(--subtext0); font-size: 13px; margin: 0; }
.dl-card .btn-primary { margin: 14px auto 4px; }
.dl-card .meta {
  color: var(--subtext0);
  font-size: 12.5px;
  min-height: 1.2em;
  margin: 0;
}
.dl-card .how { color: var(--subtext0); font-size: 13px; margin: 8px 0 0; }
.dl-card code {
  background: var(--surface0);
  border: 1px solid var(--surface1);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
}

.dl-links {
  text-align: center;
  color: var(--subtext0);
  font-size: 14px;
  margin: 18px 0 0;
}
.dl-links a { color: var(--mauve); text-decoration: none; }
.dl-links a:hover { text-decoration: underline; }

/* ── Footer ──────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--surface0);
  padding: 3rem 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.footer-brand img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.footer-brand span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--subtext1);
}

.footer-links {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--subtext0);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.18s;
}
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  border-top: 1px solid var(--surface0);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--overlay1);
}

.footer-bottom .chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.chip {
  background: var(--surface0);
  color: var(--subtext0);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  nav { padding: 0 1rem; }
  .nav-right .nav-link { display: none; }
  .hero { padding: 3rem 1.25rem 2rem; }
  .section { padding: 3.5rem 1.25rem; }
  .features-grid { grid-template-columns: 1fr; }
  .changelog-grid { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--surface1); }
  .stats-inner { flex-direction: column; gap: 1.25rem; }
}

/* ── MMSP callout band ───────────────────────────────────── */
.mmsp-band {
  background: var(--mantle);
  border-top: 1px solid var(--surface0);
  border-bottom: 1px solid var(--surface0);
}

.mmsp-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.mmsp-pills {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.proto-pill {
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.85rem;
  row-gap: 0.1rem;
  align-items: center;
}

.proto-pill.primary {
  background: rgba(203,166,247,0.1);
  border: 1px solid rgba(203,166,247,0.3);
}

.proto-pill.secondary {
  background: var(--surface0);
  border: 1px solid var(--surface1);
}

.proto-pill-label {
  grid-column: 1;
  grid-row: 1;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--overlay1);
  white-space: nowrap;
}

.proto-pill.primary .proto-pill-label { color: var(--mauve); opacity: 0.85; }

.proto-pill-name {
  grid-column: 2;
  grid-row: 1 / 3;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  font-family: 'JetBrains Mono', monospace;
  align-self: center;
}

.proto-pill.primary .proto-pill-name { color: var(--mauve); }

.proto-pill-desc {
  grid-column: 1;
  grid-row: 2;
  font-size: 0.75rem;
  color: var(--subtext0);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .mmsp-inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

/* ── Entrance animation ──────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade { animation: fadeUp 0.52s ease both; }
.d1 { animation-delay: 0.08s; }
.d2 { animation-delay: 0.18s; }
.d3 { animation-delay: 0.28s; }
.d4 { animation-delay: 0.38s; }

/* ── Long-form prose (the Why this exists page) ───────────── */
.prose p {
  font-size: 1rem;
  color: var(--subtext1);
  line-height: 1.75;
  max-width: 720px;
  margin-bottom: 1.5rem;
}
.prose p:last-child { margin-bottom: 0; }
.prose p a { color: var(--mauve); text-decoration: none; }
.prose p a:hover { text-decoration: underline; }
.prose strong { color: var(--text); font-weight: 600; }
