:root {
  --navy: #10213f;
  --blue: #2f6fed;
  --teal: #17c3a2;
  --grad: linear-gradient(120deg, var(--blue), var(--teal));
  --bg: #f7f9fc;
  --bg-alt: #eef2f9;
  --card-bg: #ffffff;
  --border: #e1e7f0;
  --text: #16223d;
  --text-muted: #566180;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 33, 63, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; }

code {
  background: rgba(47, 111, 237, 0.08);
  padding: 0.1em 0.4em;
  border-radius: 6px;
  font-size: 0.92em;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 249, 252, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--navy);
}
.brand img { height: 32px; width: 32px; border-radius: 8px; }
.brand em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a:not(.btn) { color: var(--text-muted); font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--navy); }
.nav-toggle { display: none; background: none; border: none; font-size: 1rem; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(47, 111, 237, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(47, 111, 237, 0.4); }
.btn-secondary { background: var(--card-bg); color: var(--navy); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); }
.btn-ghost { background: var(--navy); color: #fff !important; padding: 8px 16px; }
.btn-ghost:hover { background: #0b1730; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 90px 24px 60px;
  text-align: center;
}
.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 480px;
  background: radial-gradient(60% 60% at 50% 30%, rgba(47, 111, 237, 0.18), rgba(23, 195, 162, 0.08) 60%, transparent 80%);
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; }
.hero-logo { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 20px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); color: var(--navy); }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); margin: 20px auto 32px; max-width: 640px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.hero-meta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.badge {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.badge-license { color: var(--teal); border-color: rgba(23, 195, 162, 0.35); }

/* Stats strip */
.strip { background: var(--navy); padding: 28px 24px; }
.strip-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
}
.strip-inner strong { display: block; font-size: 2rem; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.strip-inner span { color: #a9b6d6; font-size: 0.85rem; }

/* Sections */
.section { max-width: 1100px; margin: 0 auto; padding: 80px 24px; }
.section-alt { background: var(--bg-alt); max-width: none; }
.section-alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section h2 { text-align: center; font-size: clamp(1.6rem, 3vw, 2.1rem); color: var(--navy); }
.section-sub { text-align: center; color: var(--text-muted); margin: 0 0 40px; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon { font-size: 1.7rem; margin-bottom: 10px; }
.card h3 { font-size: 1.05rem; color: var(--navy); }
.card p { color: var(--text-muted); font-size: 0.93rem; margin: 0 0 14px; }
.card-planned { border-style: dashed; }

.tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.tag-done { background: rgba(23, 195, 162, 0.14); color: #0d8f76; }
.tag-planned { background: rgba(47, 111, 237, 0.12); color: var(--blue); }

/* Architecture */
.arch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.arch-col {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-width: 220px;
  text-align: center;
}
.arch-col h4 { color: var(--navy); font-size: 0.95rem; margin-bottom: 14px; }
.arch-box {
  background: var(--grad);
  color: #fff;
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 10px;
}
.arch-box small { display: block; font-weight: 400; opacity: 0.9; font-size: 0.78rem; margin-top: 4px; }
.arch-box.arch-sub { background: var(--bg-alt); color: var(--navy); }
.arch-box.arch-highlight { background: var(--navy); }
.arch-arrow { font-size: 1.8rem; color: var(--text-muted); }
.arch-note { max-width: 720px; margin: 0 auto; text-align: center; color: var(--text-muted); font-size: 0.92rem; }

/* Docs links */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}
.link-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.link-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue); }
.link-card h3 { color: var(--navy); font-size: 1rem; }
.link-card p { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

/* Footer */
.footer { background: var(--navy); color: #a9b6d6; padding: 40px 24px; text-align: center; }
.footer-inner { max-width: 700px; margin: 0 auto; }
.footer-inner img { width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 10px; }
.footer-inner p { font-size: 0.9rem; margin: 0 0 14px; }
.footer-inner a { color: #cfe0ff; }
.footer-links { display: flex; gap: 18px; justify-content: center; }

@media (max-width: 720px) {
  .nav-links { position: fixed; top: 64px; left: 0; right: 0; background: var(--bg); flex-direction: column; align-items: flex-start; padding: 20px 24px; border-bottom: 1px solid var(--border); display: none; gap: 16px; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
}