/* Dev-Package — npm.dev-package.com */
:root {
  color-scheme: dark;
  --npm-orange: #f97316;
  --npm-orange-dim: #ea580c;
  --npm-blue: #3b82f6;
  --npm-blue-deep: #2563eb;
  --bg-base: #070b12;
  --bg-elevated: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.65);
  --bg-card-solid: #1e293b;
  --border: rgba(148, 163, 184, 0.15);
  --border-glow: rgba(249, 115, 22, 0.35);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --orange-soft: rgba(249, 115, 22, 0.12);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-lg: 22px;
  --font: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  --header-h: 72px;
  --maxw: 1120px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-base: #f4f6fb;
  --bg-elevated: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.1);
  --border-glow: rgba(37, 99, 235, 0.25);
  --text: #0f172a;
  --text-muted: #475569;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --orange-soft: rgba(249, 115, 22, 0.08);
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-base);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main#main-content {
  flex: 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(249, 115, 22, 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(59, 130, 246, 0.12), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(59, 130, 246, 0.08), transparent);
  z-index: -1;
}

[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(249, 115, 22, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(59, 130, 246, 0.06), transparent);
}

a {
  color: var(--npm-blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--npm-orange);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(var(--maxw), calc(100% - 2.5rem));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1rem;
  background: var(--npm-orange);
  color: #fff;
  font-weight: 600;
}
.skip-link:focus {
  left: 1rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg-elevated) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover {
  color: var(--text);
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--npm-orange), var(--npm-blue-deep));
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.35);
}
.brand small {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.nav-desktop ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-desktop a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--text);
}
.nav-desktop a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 var(--npm-orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card-solid);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text);
}
.theme-toggle:hover {
  border-color: var(--border-glow);
}
.theme-toggle-icon::before {
  content: "☀";
  font-size: 1.1rem;
}
[data-theme="light"] .theme-toggle-icon::before {
  content: "☾";
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card-solid);
  cursor: pointer;
  padding: 0;
}
.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
  border-radius: 1px;
}

.mobile-nav {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1rem 0 1.25rem;
}
.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav a {
  display: block;
  padding: 0.6rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 900px) {
  .nav-desktop {
    display: none;
  }
  .nav-toggle {
    display: flex;
  }
}

@media (min-width: 901px) {
  .mobile-nav {
    display: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: linear-gradient(135deg, var(--npm-orange), var(--npm-orange-dim));
  color: #fff;
  box-shadow: 0 8px 28px rgba(249, 115, 22, 0.35);
}
.btn-primary:hover {
  color: #fff;
  box-shadow: 0 10px 36px rgba(249, 115, 22, 0.45);
}
.btn-secondary {
  background: var(--bg-card-solid);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--npm-blue);
  color: var(--npm-blue);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Sections */
.section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}
.section-head {
  max-width: 42rem;
  margin-bottom: 2.5rem;
}
.section-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--npm-orange);
  margin: 0 0 0.5rem;
}
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
.section-lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Hero */
.hero {
  padding: clamp(2.5rem, 5vw, 4rem) 0 3rem;
}
.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--orange-soft);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 1rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}
.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  max-width: 36rem;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.hero-meta strong {
  color: var(--text);
}

.code-window {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: floatUp 0.7s ease-out both;
}
@keyframes floatUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.65rem 1rem;
  background: color-mix(in srgb, var(--bg-base) 70%, var(--bg-elevated));
  border-bottom: 1px solid var(--border);
}
.code-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #64748b;
}
.code-dot:nth-child(1) {
  background: #fb7185;
}
.code-dot:nth-child(2) {
  background: #fbbf24;
}
.code-dot:nth-child(3) {
  background: #34d399;
}
.code-body {
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  overflow-x: auto;
}
.code-body .prompt {
  color: var(--npm-orange);
}
.code-body .pkg {
  color: var(--npm-blue);
}

/* Trust bar */
.trust-bar {
  padding: 1.25rem 0;
  border-block: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 40%, transparent);
}
.trust-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.trust-inner span strong {
  color: var(--text);
}

/* Cards */
.card-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 900px) {
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.card:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 1rem;
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}
.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Package tiles */
.pkg-card h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
}
.pkg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.install-cmd {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text);
  word-break: break-all;
}
.tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--npm-blue-deep);
}
[data-theme="dark"] .tag {
  color: #93c5fd;
}
.tag-verified {
  background: var(--orange-soft);
  color: var(--npm-orange);
}

/* Pricing */
.price-card {
  position: relative;
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.price-card.featured {
  border-color: var(--npm-orange);
  box-shadow: 0 0 0 1px var(--npm-orange), var(--shadow);
}
.price-badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  background: var(--npm-orange);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  text-transform: uppercase;
}
.price-card h3 {
  margin: 0 0 0.25rem;
}
.price-amount {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0.75rem 0;
}
.price-amount small {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}
.price-card ul {
  margin: 1.25rem 0 1.5rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
}
.price-card li {
  margin-bottom: 0.5rem;
}

/* Table */
.compare-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  background: var(--bg-elevated);
}
.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.compare-table th {
  background: var(--bg-card-solid);
  font-weight: 700;
}
.compare-table tr:last-child td {
  border-bottom: none;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 640px) {
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }
}
label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}
input,
textarea,
select {
  width: 100%;
  padding: 0.75rem 1rem;
  font: inherit;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card-solid);
  color: var(--text);
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--npm-blue);
  outline-offset: 1px;
}
textarea {
  min-height: 140px;
  resize: vertical;
}

/* Blog list */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.article-card {
  display: block;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s ease;
}
.article-card:hover {
  border-color: var(--npm-blue);
}
.article-card time {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.article-card h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: 1.25rem;
}
.article-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Docs */
.docs-layout {
  display: grid;
  gap: 2rem;
}
@media (min-width: 900px) {
  .docs-layout {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}
.docs-nav {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
}
.docs-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.docs-nav a {
  display: block;
  padding: 0.4rem 0;
  text-decoration: none;
  font-weight: 600;
  color: var(--text-muted);
}
.docs-nav a:hover {
  color: var(--npm-orange);
}
.doc-content h2 {
  margin-top: 2rem;
}
.doc-content h2:first-child {
  margin-top: 0;
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  padding-top: 3rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }
}
.footer-brand {
  margin-top: 0;
}
.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links li {
  margin-bottom: 0.45rem;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}
.footer-links a:hover {
  color: var(--npm-orange);
}
.footer-address {
  font-style: normal;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}
.footer-bar {
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
}
.footer-bar-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 1rem;
  background: color-mix(in srgb, var(--bg-elevated) 95%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
}
.cookie-banner-inner {
  width: min(var(--maxw), calc(100% - 1rem));
  margin: 0 auto;
}
.cookie-title {
  margin: 0 0 0.35rem;
}
.cookie-banner p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Catalog filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.filter-input {
  flex: 1;
  min-width: 200px;
}
.filter-select {
  max-width: 200px;
}

/* Legal prose */
.legal-prose {
  max-width: 44rem;
}
.legal-prose h1 {
  margin-top: 0;
}
.legal-prose h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}
.legal-prose p,
.legal-prose ul {
  color: var(--text-muted);
}
.legal-prose ul {
  padding-left: 1.25rem;
}

/* Utilities */
.text-center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mb-0 {
  margin-bottom: 0;
}
