/* ── Reset & Global Transitions ──────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── View Transitions ────────────────────────────────────────────── */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: page-fade-out 0.25s ease both;
}

::view-transition-new(root) {
  animation: page-fade-in 0.25s ease both;
}

@keyframes page-fade-out {
  to { opacity: 0; transform: translateY(-4px); }
}

@keyframes page-fade-in {
  from { opacity: 0; transform: translateY(4px); }
}

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:          #000000;
  --surface:     #0a0a0a;
  --surface-hover:#121212;
  --border:      #1a1a1a;
  --border-subtle:#262626;
  --muted:       #3a3a3a;
  --subtle:      #888888;
  --body:        #c8c8c8;
  --heading:     #ffffff;

  /* Unified Accent Palette (#4a7bc0) */
  --accent:      #4a7bc0;
  --accent-glow: rgba(74, 123, 192, 0.2);
  --accent-glow-strong: rgba(74, 123, 192, 0.4);
  --accent-hover:#5b8cd1;
  --on-accent:   #ffffff;

  --nav-bg:      rgba(0, 0, 0, 0.85);

  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;

  --font-mono: "JetBrains Mono", "Fira Code", "ui-monospace", "SF Mono", monospace;
  --font-sans: var(--font-mono);

  --max-w:     1050px;
  --nav-h:     60px;

  --shadow:    0 14px 32px rgba(0, 0, 0, 0.45);
}

/* ── Base ────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.88em;
  border: 1px solid var(--border);
  color: var(--heading);
}

pre {
  background: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88em;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

/* ── Navigation ──────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}

.nav__container {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
}

.nav__brand {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--heading);
}

.nav__brand svg {
  width: 22px;
  height: 22px;
}

.nav__brand-badge {
  font-size: 0.7rem;
  background: rgba(74, 123, 192, 0.12);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 123, 192, 0.25);
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav__link {
  font-size: 0.85rem;
  color: var(--body);
}

.nav__link:hover { color: var(--accent); }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  padding: clamp(4rem, 8vw, 6.5rem) 1.5rem 3rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  animation: heroFadeIn 0.5s ease-out;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--accent);
  background: rgba(74, 123, 192, 0.08);
  border: 1px solid rgba(74, 123, 192, 0.2);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--heading);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.hero__title-highlight {
  color: var(--accent);
}

.hero__sub {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  color: var(--subtle);
  max-width: 620px;
  margin: 0 auto 2rem;
}

/* ── Unified Terminal Installation Box ────────────────────────────── */
.terminal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 580px;
  margin: 0 auto 1.5rem;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 1px rgba(74, 123, 192, 0.2);
  transition: border-color 0.25s, box-shadow 0.25s;
}

.terminal-box:hover {
  border-color: rgba(74, 123, 192, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 16px var(--accent-glow);
}

.terminal-header {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.6;
}

.terminal-tabs {
  display: flex;
  gap: 4px;
}

.terminal-tab {
  background: transparent;
  border: none;
  color: var(--subtle);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.terminal-tab:hover { color: var(--heading); }

.terminal-tab.is-active {
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
}

.terminal-body {
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.terminal-cmd {
  color: var(--body);
  overflow-x: auto;
  white-space: nowrap;
}

.terminal-prompt {
  color: var(--accent);
  margin-right: 0.5rem;
  user-select: none;
}

.copy-btn {
  background: rgba(74, 123, 192, 0.12);
  border: 1px solid rgba(74, 123, 192, 0.25);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

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

.hero-footer-link {
  font-size: 0.85rem;
  color: var(--subtle);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.hero-footer-link:hover { color: var(--accent); }

/* ── Features ────────────────────────────────────────────────────── */
.features {
  padding: 3.5rem 1.5rem;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-label {
  font-size: 0.72rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.section-heading {
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  color: var(--heading);
  margin-bottom: 2.5rem;
  line-height: 1.25;
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.feature-card:hover {
  border-color: rgba(74, 123, 192, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.feature-card__number {
  font-size: 0.72rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.feature-card__title {
  font-size: 1.05rem;
  color: var(--heading);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.feature-card__body {
  font-size: 0.85rem;
  color: var(--subtle);
  line-height: 1.6;
}

/* ── Content Layout (Docs) ───────────────────────────────────────── */
.main-content {
  flex: 1;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.docs-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
}

.sidebar {
  border-right: 1px solid var(--border);
  padding-right: 1.5rem;
}

.sidebar__title {
  font-size: 0.75rem;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.85rem;
}

.sidebar__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar__link {
  font-size: 0.85rem;
  color: var(--body);
  display: block;
  padding: 0.25rem 0;
}

.sidebar__link.is-active {
  color: var(--accent);
  font-weight: 600;
}

/* ── Footer ──────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
  background: var(--surface);
}

.footer__container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--subtle);
}

@media (max-width: 768px) {
  .docs-grid { grid-template-columns: 1fr; }
  .sidebar { border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 1.5rem; }
}
