:root {
  --bg: #05070a;
  --bg-alt: #0b0e14;
  --surface: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.1);
  --text: #e0e6ed;
  --muted: #94a3b8;
  --accent: #7a9bff;
  --accent-violet: #9b8cff;
  --accent-dim: #6b7fd7;
  --accent-glow: rgba(122, 155, 255, 0.2);
  --danger: #f87171;
  --radius: 14px;
  --font: "Inter", "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 18% 8%, rgba(122, 155, 255, 0.14), transparent 38%),
    radial-gradient(circle at 82% 12%, rgba(155, 140, 255, 0.1), transparent 32%),
    radial-gradient(circle at 50% 0%, rgba(224, 230, 237, 0.04), transparent 28%);
  min-height: 100vh;
}

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

a:hover {
  text-decoration: underline;
}

code,
pre code {
  font-family: var(--mono);
  font-size: 0.88em;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 10, 0.85);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  align-items: center;
  font-size: 0.95rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

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

.nav-cta {
  color: var(--accent) !important;
  font-weight: 600;
}

.hero {
  position: relative;
  padding: 3.5rem 0 0.5rem;
  overflow: hidden;
  background: #000;
}

/* Fade hero into page background below */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5rem;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 1.5rem;
  align-items: start;
}

/* Keep copy readable over the image on small screens */
.hero-grid::before {
  content: "";
  position: absolute;
  inset: -2rem -1rem;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    #000 0%,
    rgba(0, 0, 0, 0.92) 28%,
    rgba(0, 0, 0, 0.45) 48%,
    transparent 72%
  );
}

@media (min-width: 900px) {
  .hero {
    padding: 3rem 0 0.35rem;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.38fr);
    gap: 1rem;
    align-items: start;
  }

  .hero-copy {
    align-self: start;
  }

  .hero-grid::before {
    background: linear-gradient(
      100deg,
      #000 0%,
      rgba(0, 0, 0, 0.96) 22%,
      rgba(0, 0, 0, 0.55) 38%,
      transparent 58%
    );
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy .lead {
  margin-bottom: 1.35rem;
}

.hero-copy .hero-actions {
  margin-bottom: 0;
}

.hero-copy h1,
.hero-copy .lead,
.hero-copy .eyebrow,
.hero-copy .release-meta {
  text-shadow: 0 1px 24px rgba(0, 0, 0, 0.9);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 36ch;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: relative;
  z-index: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 -0.5rem;
  background: #000;
}

@media (min-width: 900px) {
  .hero-visual {
    justify-content: flex-end;
    align-self: start;
    margin: 0 -3rem 0 0;
    line-height: 0;
  }
}

/* Soft green glow so the laptop stands out on pure black */
.hero-visual::before {
  content: "";
  position: absolute;
  width: min(100%, 980px);
  height: 70%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%);
  pointer-events: none;
  background: radial-gradient(
    ellipse 70% 55% at 50% 50%,
    rgba(34, 197, 94, 0.14) 0%,
    transparent 72%
  );
}

.hero-image {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  border: none;
  border-radius: 0;
  pointer-events: none;
  user-select: none;
  background: #000;
  filter: drop-shadow(0 20px 48px rgba(0, 0, 0, 0.85))
    drop-shadow(0 0 40px rgba(34, 197, 94, 0.12));
}

@media (min-width: 900px) {
  .hero-image {
    max-width: 1100px;
    max-height: 28rem;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: top right;
  }
}

@media (min-width: 1200px) {
  .hero-image {
    max-width: min(98vw, 1180px);
    max-height: 30rem;
  }
}

@media (min-width: 900px) {
  .hero + .section {
    padding-top: 2.75rem;
  }
}

.hero-image-shade {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-violet) 100%);
  color: #05070a;
  font-weight: 600;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--muted);
}

.release-meta {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.hero-copy .release-meta {
  margin-bottom: 0;
}

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: #0d1219;
  border-bottom: 1px solid var(--border);
}

.terminal-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #334155;
}

.terminal-bar span:first-child {
  background: #ef4444;
}
.terminal-bar span:nth-child(2) {
  background: #eab308;
}
.terminal-bar span:nth-child(3) {
  background: #22c55e;
}

.terminal pre {
  margin: 0;
  padding: 1.25rem;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.55;
}

.terminal .dim {
  color: var(--muted);
}

.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--border);
}

h2 {
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.section-lead {
  color: var(--muted);
  max-width: 52ch;
  margin: 0 0 2rem;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.guardrail-table-wrap {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.guardrail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.guardrail-table th,
.guardrail-table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.guardrail-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.boundaries h3 {
  margin: 0 0 1rem;
}

.boundary-cols {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .boundary-cols {
    grid-template-columns: 1fr 1fr;
  }
}

.boundary-cols h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.boundary-cols ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.steps {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 1.25rem;
}

.steps li {
  padding-left: 0.35rem;
}

.inline-code,
pre.inline-code {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow-x: auto;
}

.download-section {
  padding: 2.75rem 0 4rem;
  background: #000;
}

.download-section-title {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  text-align: center;
}

.download-card {
  max-width: min(100%, 56rem);
  margin: 0 auto;
  background: #000;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.download-lead {
  margin: 0 auto 0.85rem;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.download-cta-content .download-lead {
  text-align: center;
}

.download-card-cta {
  padding: 2rem 2rem 1.75rem;
}

.download-cta-content {
  min-width: 0;
  text-align: center;
}

.download-cta-content .loading {
  color: var(--muted);
  margin: 0;
}

.download-cta-content .version {
  font-size: 0.9rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.download-cta-content .built-at {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.download-cta-content .filename {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
  margin: 0 0 1.25rem;
}

.download-cta-content .meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.download-platforms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0 1.5rem;
  text-align: center;
}

.download-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1.25rem 1.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.download-platform-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.download-platform-icon {
  width: 3rem;
  height: 3rem;
}

.download-platform-label {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
}

.download-platform .meta {
  margin: 0 0 1rem;
  min-height: 1.35rem;
}

.download-platform-btn,
.download-platform .btn-disabled,
.download-platform-actions {
  margin-top: auto;
}

.download-platform .loading {
  margin: 0 0 1rem;
  min-height: 1.35rem;
}

.download-platform .btn-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.download-platform-soon {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.35);
}

.download-platform-error .meta.error {
  margin-bottom: 1rem;
}

.badge-soon {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.2em 0.55em;
  border-radius: 999px;
}

.download-btn-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.download-footer-link {
  margin-top: 1rem;
}

.download-cta-content .error {
  color: var(--danger);
  margin: 0;
}

@media (max-width: 640px) {
  .download-platforms {
    grid-template-columns: 1fr;
  }

  .download-card-cta {
    padding: 1.5rem 1.25rem 1.25rem;
  }
}

.download-card-install {
  padding: 1.5rem 1.75rem 1.25rem;
  text-align: left;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.download-card-install h3 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.download-card-install .guide-steps {
  margin-bottom: 0;
}

.step-mandatory {
  padding: 1.15rem 1.25rem;
  margin-top: 0.25rem;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.35);
  border-radius: 8px;
}

.step-mandatory-title {
  margin: 0.5rem 0 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.step-mandatory-why {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.55;
}

.badge-mandatory {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #052e16;
  background: var(--accent);
  padding: 0.2em 0.5em;
  border-radius: 4px;
}

.code-copy-block {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
  margin-top: 0;
}

.code-copy-block .inline-code {
  width: 100%;
  margin: 0;
  overflow-x: visible;
  overflow-y: visible;
}

.code-copy-block .inline-code code {
  display: block;
  white-space: pre;
  font-size: 0.82rem;
  line-height: 1.5;
}

.btn-copy {
  align-self: flex-start;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  cursor: pointer;
}

.btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-copy-done {
  border-color: var(--accent);
  color: var(--accent);
}

.download-card .download-note {
  margin: 0;
  padding: 1rem 1.75rem 1.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.footer-inner p {
  margin: 0;
}

/* Guides page */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-hero .lead {
  max-width: 52ch;
  color: var(--muted);
  margin: 0;
}

.guide-layout {
  display: grid;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

@media (min-width: 900px) {
  .guide-layout {
    grid-template-columns: 220px 1fr;
    align-items: start;
  }
}

.guide-toc {
  position: sticky;
  top: 5rem;
  font-size: 0.9rem;
}

.guide-toc-title {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.guide-toc ol {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
}

.guide-toc a {
  color: var(--muted);
  text-decoration: none;
}

.guide-toc a:hover {
  color: var(--accent);
}

.guide-content {
  min-width: 0;
}

.guide-section {
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.guide-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.guide-section h2 {
  margin-top: 0;
  scroll-margin-top: 5rem;
}

.guide-section h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
}

.guide-steps {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 1rem;
}

.guide-list {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  color: var(--muted);
}

.guide-list li {
  margin-bottom: 0.35rem;
}

.guide-figure {
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.guide-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.guide-figure figcaption {
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.callout-warn {
  border-color: rgba(234, 179, 8, 0.45);
  background: rgba(234, 179, 8, 0.08);
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.callout ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.command-grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

@media (min-width: 640px) {
  .command-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.command-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.command-name {
  margin: 0 0 0.35rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  line-height: 1.4;
}

.command-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.nav-active {
  color: var(--text) !important;
  font-weight: 600;
}

kbd {
  font-family: var(--mono);
  font-size: 0.8em;
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Releases page */
.releases-list {
  display: grid;
  gap: 1.25rem;
  margin-top: 2rem;
}

.release-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
}

.release-card-latest {
  border-color: rgba(34, 197, 94, 0.45);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12);
}

.release-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.release-version {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.release-meta-line {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.badge-latest {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #052e16;
  background: var(--accent);
  padding: 0.18em 0.45em;
  border-radius: 4px;
  vertical-align: middle;
}

.badge-universal {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #1e3a5f;
  background: #bfdbfe;
  padding: 0.18em 0.45em;
  border-radius: 4px;
  vertical-align: middle;
}

.download-universal-note {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.release-notes,
.release-notes-preview {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.release-notes-preview {
  margin: 0 0 1rem;
  text-align: left;
}

@media (max-width: 640px) {
  .release-card-head {
    flex-direction: column;
    align-items: stretch;
  }
}
