@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap");

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

:root {
  --bg: #09090b;
  --surface: #111113;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.1);
  --text: #e4e4e7;
  --dim: rgba(255, 255, 255, 0.38);
  --accent: #818cf8;
  --green: #4ade80;
  --yellow: #fbbf24;
  --red: #f87171;
  --mono: "JetBrains Mono", monospace;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Hero ────────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: glowPulse 6s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { transform: translate(-50%, -55%) scale(1); opacity: 1; }
  50% { transform: translate(-50%, -55%) scale(1.15); opacity: 0.6; }
}

.hero h1 {
  font-size: clamp(64px, 12vw, 140px);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #fff 40%, rgba(255, 255, 255, 0.4));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  animation: heroFadeUp 0.8s ease-out both;
}

.hero-tagline {
  font-family: var(--mono);
  font-size: clamp(14px, 1.8vw, 17px);
  color: var(--dim);
  max-width: 560px;
  line-height: 1.5;
  margin-bottom: 40px;
  position: relative;
  animation: heroFadeUp 0.8s ease-out 0.15s both;
}

.hero-tagline span {
  display: block;
}

.hero-body {
  font-family: var(--mono);
  font-size: 15px;
  color: rgba(255, 255, 255, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  position: relative;
  animation: heroFadeUp 0.8s ease-out 0.3s both;
}

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

.hero-body p {
  margin: 0;
}

.install-sub {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.46);
}

.install-sub code {
  font-family: var(--mono);
  font-size: 0.95em;
  color: var(--accent);
}

.install-alt-line {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.32);
}

/* ── Scroll hint ─────────────────────────────────────────── */

.scroll-hint {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.2);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.06em;
  transition: color 0.3s;
  position: relative;
  animation: heroFadeUp 0.8s ease-out 0.6s both;
}

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

.scroll-hint i {
  font-size: 14px;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(6px); }
  60% { transform: translateY(3px); }
}

/* ── Install box ─────────────────────────────────────────── */

.install-box {
  font-family: var(--mono);
  font-size: 14px;
  padding: 14px 24px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.install-box:hover {
  border-color: rgba(129, 140, 248, 0.4);
  background: rgba(129, 140, 248, 0.06);
}

.install-box code {
  color: var(--text);
}

.install-box.active {
  border-color: rgba(129, 140, 248, 0.3);
  animation: installGlow 3s ease-in-out infinite;
}

@keyframes installGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(129, 140, 248, 0); }
  50% { box-shadow: 0 0 20px rgba(129, 140, 248, 0.12), 0 0 40px rgba(129, 140, 248, 0.06); }
}

.install-alt-cmd {
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: color 0.2s;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.14);
  text-underline-offset: 0.22em;
}

.install-alt-cmd:hover {
  color: var(--accent);
  text-decoration-color: rgba(129, 140, 248, 0.45);
}

.copy-icon {
  color: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  transition: color 0.2s;
}

.install-box:hover .copy-icon {
  color: var(--accent);
}

/* ── Hero steps ──────────────────────────────────────────── */

.hero-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-steps code {
  color: var(--accent);
  font-weight: 500;
}

.hero-arrow {
  color: rgba(255, 255, 255, 0.12);
  margin: 0 6px;
}

.hero-step-muted {
  opacity: 0.55;
  font-size: 13px;
  margin-top: 6px;
}

.hero-step-muted code {
  color: var(--accent);
  font-weight: 500;
}

/* ── Centered sections ───────────────────────────────────── */

.centered-section {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px;
}

.centered-section h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.section-sub {
  font-size: 15px;
  color: var(--dim);
  margin-bottom: 32px;
}

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

.section-sub a:hover {
  text-decoration: underline;
}

.flow-group {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 0 24px;
  position: relative;
}

.flow-group-commands {
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.03), rgba(129, 140, 248, 0));
}

.flow-group-files {
  background: linear-gradient(180deg, rgba(74, 222, 128, 0.03), rgba(74, 222, 128, 0));
  border-top: 1px solid var(--border);
  margin-top: 24px;
}

.flow-intro {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px 12px;
}

.flow-intro h2 {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.flow-intro p {
  color: var(--dim);
  font-size: 15px;
  line-height: 1.7;
}

/* ── Command Sections ────────────────────────────────────── */

.cmd-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.cmd-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.cmd-section.reverse .cmd-info {
  order: 2;
}

.cmd-section.reverse .terminal {
  order: 1;
}

.cmd-info {
  max-width: 480px;
}

.cmd-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}

.cmd-info h2 {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.cmd-info p {
  color: var(--dim);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.cmd-traits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cmd-traits li {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  padding-left: 20px;
  position: relative;
}

.cmd-traits li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.4);
}

.cmd-traits code {
  font-family: var(--mono);
  font-size: 12px;
  background: rgba(129, 140, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent);
}

/* ── Optional command section ───────────────────────────── */

.cmd-section-optional {
  opacity: 0;
}

.cmd-section-optional.visible {
  opacity: 0.7;
}

.cmd-section-optional .cmd-name {
  color: var(--dim);
}

.cmd-section-optional .terminal {
  border-style: dashed;
}

.cmd-optional-note {
  font-size: 13px !important;
  color: rgba(255, 255, 255, 0.3) !important;
  font-style: italic;
}

/* ── Section rule ────────────────────────────────────────── */

.section-rule {
  border: none;
  height: 1px;
  max-width: 120px;
  margin: 0 auto;
  background: var(--border-strong);
}

/* ── Terminal ────────────────────────────────────────────── */

.terminal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 20px 60px rgba(0, 0, 0, 0.35);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.terminal:hover {
  border-color: var(--border-strong);
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.2),
    0 24px 64px rgba(0, 0, 0, 0.45);
}

.terminal-chrome {
  display: flex;
  gap: 7px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
}

.terminal-chrome span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.terminal-body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.8;
  padding: 28px 32px;
  overflow-x: auto;
  color: var(--text);
  white-space: pre;
}

.terminal-compact .terminal-body {
  font-size: 13px;
  line-height: 1.65;
  padding-top: 20px;
  padding-bottom: 22px;
}

.terminal-body::-webkit-scrollbar {
  height: 6px;
}

.terminal-body::-webkit-scrollbar-track {
  background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 3px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.15);
}

.terminal-wide {
  max-width: 900px;
  margin: 0 auto;
}

/* ── Terminal tokens ─────────────────────────────────────── */

.t-prompt { color: var(--accent); font-weight: 600; }
.t-title { color: #fff; font-weight: 600; }
.t-dim { color: rgba(255, 255, 255, 0.28); }
.t-section { color: var(--accent); font-weight: 500; opacity: 0.7; }
.t-ok { color: var(--green); }
.t-cmd { color: var(--accent); font-weight: 500; }
.t-green { color: var(--green); }
.t-yellow { color: var(--yellow); }
.t-red { color: var(--red); }
.t-key { color: var(--accent); }
.t-str { color: var(--green); }

.t-label {
  display: inline-block;
  min-width: 18ch;
  color: rgba(255, 255, 255, 0.45);
}

/* Command separator in boot terminal */
.t-sep {
  display: block;
  height: 1px;
  background: var(--border);
  margin: 12px 0;
}

/* ── Repo table ──────────────────────────────────────────── */

.repo-table-wrap {
  overflow-x: auto;
  margin-top: 24px;
}

.repo-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 13px;
  text-align: left;
}

.repo-table th {
  color: var(--dim);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-strong);
}

.repo-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: rgba(255, 255, 255, 0.5);
}

.repo-table .repo-name {
  color: var(--text);
  font-weight: 500;
}

/* ── Footer ──────────────────────────────────────────────── */

footer {
  text-align: center;
  padding: 80px 24px;
  border-top: 1px solid var(--border);
}

.footer-install {
  margin-bottom: 16px;
}

.footer-install code {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  padding: 14px 28px;
  border: 1px solid rgba(129, 140, 248, 0.2);
  border-radius: 12px;
  display: inline-block;
  transition: border-color 0.2s, background 0.2s;
  user-select: none;
}

.footer-install code:hover {
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(129, 140, 248, 0.06);
}

.footer-then {
  font-size: 14px;
  color: var(--dim);
  margin-bottom: 8px;
}

.footer-switch {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.38);
  margin-bottom: 18px;
}

.footer-switch code {
  font-family: var(--mono);
  color: var(--accent);
}

.footer-alt-cmd {
  font-family: var(--mono);
  color: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.16);
  text-underline-offset: 0.22em;
  transition: color 0.2s, text-decoration-color 0.2s;
}

.footer-alt-cmd:hover {
  color: var(--accent);
  text-decoration-color: rgba(129, 140, 248, 0.45);
}

.footer-cmds {
  margin-bottom: 16px;
}

.footer-cmds code {
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.footer-json {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  margin-bottom: 32px;
}

.footer-json code {
  font-family: var(--mono);
  color: rgba(255, 255, 255, 0.35);
}

.footer-links {
  font-size: 14px;
  color: var(--dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.footer-links a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-sep {
  opacity: 0.3;
}

.footer-brand {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Toast ───────────────────────────────────────────────── */

#copy-toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 1000;
}

#copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Reveal animation ────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .cmd-section {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 60px 20px;
  }

  .flow-group {
    padding-top: 24px;
  }

  .flow-intro {
    padding: 0 20px 6px;
  }

  .flow-intro h2 {
    font-size: 28px;
  }

  .cmd-section.reverse .cmd-info,
  .cmd-section.reverse .terminal {
    order: unset;
  }

  .cmd-info {
    max-width: 100%;
  }

  .terminal-body {
    font-size: 12px;
    padding: 20px;
  }

  .hero h1 {
    font-size: clamp(48px, 14vw, 96px);
  }

  .centered-section {
    padding: 60px 20px;
  }

  .repo-table {
    font-size: 11px;
  }

  .repo-table th,
  .repo-table td {
    padding: 10px 8px;
  }
}
