/* Regium Docs — Dark techy theme */

:root {
  --bg: #09090b;
  --bg-subtle: #0f0f12;
  --surface: #18181b;
  --surface-hover: #1f1f23;
  --border: #27272a;
  --border-light: #3f3f46;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-subtle: #71717a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --gradient: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --gradient-text: linear-gradient(135deg, #c7d2fe, #a5b4fc, #818cf8);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: "JetBrains Mono", "Fira Code", "SF Mono", Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
code {
  font-family: var(--mono);
  font-size: 0.875em;
}

/* Nav */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(12px) saturate(180%);
  background: rgba(9, 9, 11, 0.8);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.nav__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 14px;
  color: #fff;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav__links a:hover {
  color: var(--text);
}

.nav__link--active {
  color: var(--accent-light) !important;
  font-weight: 600;
  position: relative;
}

.nav__link--active::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient);
  border-radius: 1px;
}

.nav__gh,
.nav__npm {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 150ms;
}

.nav__gh:hover,
.nav__npm:hover {
  border-color: var(--border-light);
  background: var(--surface);
  color: var(--text);
}

/* Hero */
.hero {
  position: relative;
  padding: 160px 24px 100px;
  text-align: center;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero__title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.hero__gradient {
  background: var(--gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 60px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: all 150ms;
}

.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn--ghost {
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.btn--ghost:hover {
  border-color: var(--border-light);
  color: var(--text);
  background: var(--surface);
}

.btn--lg {
  padding: 14px 28px;
  font-size: 16px;
}

/* Code block in hero */
.hero__code {
  max-width: 680px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  text-align: left;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.code__header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.code__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.code__dot--red {
  background: #ef4444;
}
.code__dot--yellow {
  background: #eab308;
}
.code__dot--green {
  background: #22c55e;
}
.code__filename {
  margin-left: 12px;
  font-size: 13px;
  color: var(--text-subtle);
  font-family: var(--mono);
}

.code__body {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-muted);
}

.code__body code {
  font-size: inherit;
}

.hl-kw {
  color: #c084fc;
}
.hl-str {
  color: #86efac;
}
.hl-fn {
  color: #93c5fd;
}
.hl-cmt {
  color: #52525b;
  font-style: italic;
}

/* Stats */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  padding: 32px 24px;
}

.stats__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}
.stat__num {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}
.stat__label {
  font-size: 13px;
  color: var(--text-subtle);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sections */
.section__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px;
}

.section__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-align: center;
  margin-bottom: 12px;
}

.section__sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 600px;
  margin: 0 auto 48px;
}

/* Features grid */
.features {
  background: var(--bg);
}

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

.feature {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 200ms;
}

.feature:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.feature__icon {
  font-size: 28px;
  margin-bottom: 16px;
}
.feature h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.feature p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Install */
.install {
  background: var(--bg-subtle);
}

.install__tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.install__tab {
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 150ms;
}

.install__tab.active {
  background: var(--accent);
  color: #fff;
}

.install__tab:hover:not(.active) {
  color: var(--text);
}

.install__code {
  position: relative;
  max-width: 560px;
  margin: 0 auto 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 15px;
}

.install__code pre {
  margin: 0;
}
.install__code code {
  color: var(--text);
}

.install__copy {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 16px;
  opacity: 0.5;
  transition: opacity 150ms;
}

.install__copy:hover {
  opacity: 1;
}

.install__hint {
  text-align: center;
  font-size: 14px;
  color: var(--text-subtle);
}

.install__hint code {
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Validators */
.validators {
  background: var(--bg);
}

.validators__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.validator-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all 150ms;
}

.validator-card:hover {
  border-color: var(--border-light);
  background: var(--surface-hover);
}

.validator-card__flag {
  font-size: 20px;
}
.validator-card__name {
  font-weight: 600;
  font-size: 14px;
}
.validator-card__example {
  font-size: 12px;
  color: var(--text-subtle);
  grid-column: 1 / -1;
}
.validator-card__algo {
  font-size: 11px;
  color: var(--accent-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Countries */
.countries {
  background: var(--bg-subtle);
}

.countries__t1 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.country-chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
}

.country-chip--t1 {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: var(--accent-light);
}

.countries__plus {
  text-align: center;
  color: var(--text-subtle);
  font-size: 14px;
}

/* Use cases */
.use-cases {
  background: var(--bg);
}

.use-cases__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.use-case {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.use-case h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}
.use-case p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA */
.cta {
  text-align: center;
  padding: 100px 24px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
}

.cta__title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta__sub {
  color: var(--text-muted);
  font-size: 17px;
  margin-bottom: 32px;
}

.cta__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 24px;
  background: var(--bg);
}

.footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.footer__links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-subtle);
}

.footer__links a:hover {
  color: var(--text);
}

.footer__copy {
  font-size: 13px;
  color: var(--text-subtle);
}

/* Responsive */
@media (max-width: 768px) {
  .nav__links a:not(.nav__gh):not(.nav__npm) {
    display: none;
  }
  .hero {
    padding: 120px 16px 60px;
  }
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
  .stats__inner {
    gap: 24px;
  }
  .features__grid {
    grid-template-columns: 1fr;
  }
  .validators__grid {
    grid-template-columns: 1fr;
  }
  .use-cases__grid {
    grid-template-columns: 1fr;
  }
  .cta__actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ─── Granular imports section ─────────────────────────────────────────────── */
.granular { background: var(--bg); }

.granular__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.granular__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 150ms;
}

.granular__card:hover { border-color: var(--border-light); }

.granular__card-label {
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-subtle);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.granular__code {
  margin: 0;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--text-muted);
}

.granular__table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.granular__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

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

.granular__table th {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-subtle);
  background: var(--bg-subtle);
}

.granular__table tr:last-child td { border-bottom: none; }
.granular__table code {
  color: var(--accent-light);
  background: var(--accent-glow);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ─── Country code examples ─────────────────────────────────────────────────── */
.country-examples { background: var(--bg-subtle); }

.country-example__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.country-example__tab {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 150ms;
}

.country-example__tab:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.country-example__tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.country-code__block {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.country-code__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.code__dots { display: flex; gap: 6px; }

.country-code__install {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-subtle);
}

.country-code__copy {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
}

.country-code__pre {
  margin: 0;
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-muted);
  max-height: 480px;
  overflow-y: auto;
}

.country-code__pre code { color: inherit; }

/* ─── Clean install block ───────────────────────────────────────────────────── */
.install__block {
  max-width: 600px;
  margin: 0 auto 48px;
}

.install__pm-tabs {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 6px 6px 0;
  width: fit-content;
}

.install__tab {
  padding: 7px 16px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-subtle);
  background: transparent;
  border: none;
  transition: all 120ms;
}

.install__tab:hover { color: var(--text); }

.install__tab.active {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--bg);
  margin-bottom: -1px;
}

.install__terminal {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
  padding: 14px 18px;
}

.install__prompt {
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  user-select: none;
}

.install__terminal pre {
  flex: 1;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
}

.install__terminal code { font-size: inherit; }

.install__copy {
  font-size: 16px;
  opacity: 0.5;
  transition: opacity 150ms;
  background: none;
  border: none;
  cursor: pointer;
}

.install__copy:hover { opacity: 1; }

/* Granular snippets */
.install__subpaths { margin-top: 0; }

.install__subpaths-title {
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
  color: var(--text);
}

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

.install__snippet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.install__snippet-label {
  padding: 8px 14px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-subtle);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.install__snippet-code {
  margin: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--text-muted);
}

/* ─── IDE window ────────────────────────────────────────────────────────────── */
.ide-window {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #0d0d0f;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.ide-window__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: #161618;
  border-bottom: 1px solid #2a2a2e;
}

.ide-window__dots { display: flex; gap: 6px; }

.ide-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.ide-dot--red    { background: #ff5f57; }
.ide-dot--yellow { background: #febc2e; }
.ide-dot--green  { background: #28c840; }

.ide-window__filename {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #8b8b9a;
  flex: 1;
}

.ide-window__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ide-window__install {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #5a5a6e;
}

.ide-window__copy {
  padding: 4px 12px;
  border-radius: 4px;
  border: 1px solid #3a3a4a;
  background: #1e1e24;
  color: #8b8b9a;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 120ms;
}

.ide-window__copy:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.ide-window__body {
  display: flex;
  overflow: hidden;
}

.ide-window__lines {
  padding: 20px 0;
  min-width: 44px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: #3a3a4e;
  background: #0d0d0f;
  border-right: 1px solid #1e1e24;
  user-select: none;
  padding-right: 12px;
  padding-left: 8px;
}

.ide-window__code {
  flex: 1;
  margin: 0;
  padding: 20px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
  color: #c9d1d9;
}

.ide-window__code code { color: inherit; }

/* IDE syntax colors */
.ide-window__code .hl-kw  { color: #ff7b72; }
.ide-window__code .hl-str { color: #a5d6ff; }
.ide-window__code .hl-fn  { color: #d2a8ff; }
.ide-window__code .hl-cmt { color: #8b949e; font-style: italic; }
.ide-window__code .hl-num { color: #79c0ff; }
.ide-window__code .hl-var { color: #ffa657; }

/* Country example tabs */
.country-examples { background: var(--bg-subtle); }

.country-example__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.country-example__tab {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  transition: all 150ms;
}

.country-example__tab:hover {
  border-color: var(--border-light);
  color: var(--text);
}

.country-example__tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

@media (max-width: 768px) {
  .install__subpaths-grid { grid-template-columns: 1fr; }
  .ide-window__lines { display: none; }
  .ide-window__install { display: none; }
}
