:root {
  --bg: #0b0f14;
  --bg-elev: #0f141b;
  --text: #e6eef7;
  --muted: #a7b4c2;
  --border: #1b2530;
  --accent: #00dc82; /* Nuxt green */
  --accent-2: #00a76f; /* darker companion */
  --danger: #ff6b6b;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: linear-gradient(180deg, var(--bg) 0%, #091018 100%);
  color: var(--text);
  font:
    16px/1.6 ui-sans-serif,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Inter,
    Helvetica,
    Arial,
    'Apple Color Emoji',
    'Segoe UI Emoji';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: saturate(140%) blur(6px);
  background: rgba(11, 15, 20, 0.7);
  border-bottom: 1px solid var(--border);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}
.brand img {
  display: inline-block;
  width: 28px;
  height: 28px;
}
.brand span {
  font-size: 18px;
}
.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background:
    radial-gradient(120% 120% at 20% 20%, var(--accent) 0%, var(--accent-2) 60%, transparent 60%),
    linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow:
    inset 0 0 20px rgba(255, 255, 255, 0.15),
    0 10px 20px rgba(0, 0, 0, 0.3);
}
.nav {
  display: flex;
  gap: 18px;
}
.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
}
.nav a[aria-current='page'],
.nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-color: rgba(0, 220, 130, 0.35);
}

.footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--muted);
}
.footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 0;
}

.hero {
  padding: 88px 0 56px;
  overflow: hidden; /* cut off anything that bleeds beyond the viewport */
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: center;
}
.hero-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-art img {
  width: clamp(600px, 80vw, 1000px);
  max-width: none;
  height: auto;
  margin-right: -30vw; /* bleed off the right edge */
  opacity: 0;
  transform: translateX(100%); /* start completely off-screen to the right */
  filter: drop-shadow(0 14px 40px rgba(0, 0, 0, 0.6));
  transition:
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 900ms ease;
  pointer-events: none;
}
.hero-art img.enter {
  opacity: 1;
  transform: translateX(0);
}
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
}
.hero p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(16px, 1.6vw, 20px);
}
.typewriter {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  color: #cfeede;
}

.cta {
  display: flex;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 220, 130, 0.22), rgba(0, 167, 111, 0.18));
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.btn:hover {
  border-color: rgba(0, 220, 130, 0.5);
  transform: translateY(-1px);
}
.btn.secondary {
  background: rgba(255, 255, 255, 0.04);
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.features {
  padding: 24px 0 82px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.feature {
  padding: 16px;
}
.feature h3 {
  margin: 4px 0 8px;
}
.feature p {
  margin: 0;
  color: var(--muted);
}

.kicker {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  font-size: 12px;
}

/* Docs layout */
.docs-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 14px;
  padding: 26px 0 48px;
}
.sidebar {
  position: sticky;
  top: 76px;
  align-self: start;
  height: calc(100vh - 100px);
  overflow: auto;
  padding-right: 6px;
}
.sidebar .search {
  position: sticky;
  top: 0;
  padding-bottom: 12px;
  background: var(--bg-elev);
}
.search input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0a121a;
  border: 1px solid var(--border);
  color: var(--text);
}
.search input:focus {
  outline: none;
  border-color: rgba(0, 220, 130, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 220, 130, 0.15);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.nav-list a {
  display: block;
  padding: 6px 8px;
  margin: 1px 0;
  border-radius: 8px;
  color: var(--muted);
}
.nav-list a.active,
.nav-list a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.nav-list a .icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: middle;
  color: var(--accent);
}
.nav-list a .label {
  vertical-align: middle;
}
.nav-sublist {
  list-style: none;
  padding: 0 0 0 28px;
  margin: 0;
  position: relative;
}
.nav-sublist::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 2px;
  bottom: 2px;
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
}
.nav-sublist a {
  display: block;
  padding: 3px 6px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 14px;
}
.nav-sublist a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.search-results {
  margin-top: 10px;
}
.search-results .result {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  margin-bottom: 8px;
}
.search-results .result small {
  color: var(--muted);
}

.doc-content {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0));
}
.doc-content h1,
.doc-content h2,
.doc-content h3 {
  margin-top: 12px;
  line-height: 1.18;
}
.doc-content h1,
.doc-content h2 {
  color: var(--accent);
}
.doc-content h3 {
  color: var(--text);
}
.doc-content h4,
.doc-content h5,
.doc-content h6 {
  color: #d7e0ea;
}
.doc-content h1 {
  font-size: clamp(26px, 3.2vw, 34px);
}
.doc-content h2 {
  font-size: clamp(20px, 2.4vw, 26px);
}
.doc-content h3 {
  font-size: clamp(18px, 2vw, 22px);
}
.doc-content h1,
.doc-content h2,
.doc-content h3,
.doc-content h4,
.doc-content h5,
.doc-content h6 {
  scroll-margin-top: 84px;
}
.doc-content p,
.doc-content li {
  color: #d7e0ea;
}
.doc-content p {
  margin: 0 0 8px;
}
.doc-content ul,
.doc-content ol {
  padding-left: 20px;
  margin: 0 0 8px;
}
.doc-content li {
  margin: 2px 0;
}
.doc-content pre {
  background: #0a121a;
  padding: 10px;
  border-radius: 10px;
  overflow: auto;
  border: 1px solid var(--border);
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
  font-size: 13px;
}
.doc-content code {
  color: #c6afff;
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
    monospace;
}
.doc-content a {
  color: var(--accent);
}
.doc-content a:hover {
  text-decoration: underline;
}
.doc-content hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 220, 130, 0.35), rgba(0, 0, 0, 0));
  margin: 14px 0;
}
.doc-content blockquote {
  margin: 12px 0;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.03);
  color: #cfd9e3;
}
.doc-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
}
.doc-content th,
.doc-content td {
  border: 1px solid var(--border);
  padding: 5px 6px;
  text-align: left;
  font-size: 14px;
}
.doc-content thead th {
  background: rgba(255, 255, 255, 0.03);
}
.doc-content .contact-info {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 16px;
  margin: 8px 0 16px;
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-art {
    order: 2;
  }
  .hero-art img {
    width: clamp(600px, 120vw, 1200px);
    left: 10%;
    transform: translateX(100%);
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: static;
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-art img {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* BOM widget */
.bom-controls {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}
.bom-controls input,
.bom-controls select {
  padding: 8px 10px;
  border-radius: 8px;
  background: #0a121a;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
}
.bom-wrap {
  display: block;
}
.bom-table {
  width: 100%;
}
.bom-table th {
  cursor: pointer;
}
.bom-summary {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  margin-top: 12px;
}
.bom-summary .total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 16px;
}
.bom-summary .total .value {
  color: var(--accent);
  font-weight: 600;
}
.bom-summary .split .row {
  display: flex;
  justify-content: space-between;
  margin: 2px 0;
  color: var(--muted);
  font-size: 13px;
}
