/* ============================================
   muxforge — terminal-native dark theme
   ============================================ */

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

:root {
  --bg: #0a0e14;
  --bg-alt: #0f1319;
  --bg-card: #111820;
  --fg: #b8c4d0;
  --fg-muted: #5c6a77;
  --fg-bright: #e6edf3;
  --accent: #53a5ff;
  --accent-dim: rgba(83, 165, 255, 0.15);
  --accent-glow: rgba(83, 165, 255, 0.06);
  --green: #41d47e;
  --green-dim: rgba(65, 212, 126, 0.12);
  --amber: #e5a644;
  --red: #e55561;
  --border: #1e2733;
  --border-bright: #2a3544;
  --code-bg: #0c1018;
  --font-mono: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;
  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* Noise texture overlay */
.noise {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

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

a:hover {
  color: var(--fg-bright);
}

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

/* Fade-in animation for sections */
.section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ===================== HERO ===================== */

.hero {
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}

/* Radial glow behind hero */
.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 600px;
  background:
    radial-gradient(ellipse 350px 250px at 50% 40%, rgba(83, 165, 255, 0.07) 0%, transparent 100%),
    radial-gradient(ellipse 200px 300px at 40% 60%, rgba(65, 212, 126, 0.04) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.3rem 1rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: var(--font-mono);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--fg-bright);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tagline {
  font-size: 1.15rem;
  color: var(--fg-muted);
  margin: 1rem 0 2.5rem;
  line-height: 1.6;
}

/* Terminal window */
.terminal-window {
  display: inline-block;
  text-align: left;
  border-radius: 10px;
  border: 1px solid var(--border-bright);
  background: var(--code-bg);
  overflow: hidden;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 60px var(--accent-glow);
}

.terminal-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0.6rem 0.85rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: var(--red); opacity: 0.8; }
.dot-yellow { background: var(--amber); opacity: 0.8; }
.dot-green { background: var(--green); opacity: 0.8; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--fg-muted);
  margin-left: auto;
  margin-right: auto;
  padding-right: 30px; /* balance the dots */
}

.terminal-body {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.prompt {
  color: var(--green);
  font-weight: 600;
  user-select: none;
}

.terminal-body code {
  color: var(--fg-bright);
  font-size: 0.9rem;
}

.terminal-body code::after {
  content: '\2588';
  animation: blink 1.1s step-end infinite;
  color: var(--fg-muted);
  margin-left: 1px;
}

@keyframes blink {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0; }
}

.copy-btn {
  background: var(--border);
  border: 1px solid var(--border-bright);
  border-radius: 4px;
  color: var(--fg-muted);
  cursor: pointer;
  padding: 0.2rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  transition: all 0.2s;
  white-space: nowrap;
}

.copy-btn:hover {
  color: var(--fg-bright);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.copy-btn.copied {
  border-color: var(--green);
  color: var(--green);
  background: var(--green-dim);
}

/* Hero buttons */
.hero-links {
  margin-top: 2rem;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.3rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s;
}

.btn svg {
  flex-shrink: 0;
}

.btn-primary {
  background: var(--fg-bright);
  color: var(--bg);
}

.btn-primary:hover {
  background: #fff;
  color: var(--bg);
  text-decoration: none;
  box-shadow: 0 0 20px rgba(230, 237, 243, 0.1);
}

.btn-secondary {
  background: transparent;
  color: var(--fg-muted);
  border: 1px solid var(--border-bright);
}

.btn-secondary:hover {
  color: var(--fg-bright);
  border-color: var(--fg-muted);
  text-decoration: none;
}

/* Section divider */
.section-divider {
  max-width: 750px;
  margin: 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-bright) 50%, transparent 100%);
}

/* ===================== SECTIONS ===================== */

.section {
  padding: 4rem 1.5rem;
}

.section-inner {
  max-width: 750px;
  margin: 0 auto;
}

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

.section h2 {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin-bottom: 1.25rem;
}

.h2-prefix {
  color: var(--fg-muted);
  margin-right: 0.3rem;
  font-weight: 400;
}

.section-intro {
  color: var(--fg-muted);
  margin-bottom: 1.75rem;
  line-height: 1.7;
}

/* ===================== FEATURES ===================== */

.features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.features li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  transition: background 0.25s;
}

.features li:hover {
  background: rgba(83, 165, 255, 0.04);
}

.feature-marker {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 0.55rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-dim);
}

.features li strong {
  color: var(--fg-bright);
}

.features li .dash {
  color: var(--fg-muted);
  margin: 0 0.25rem;
}

/* ===================== INSTALL METHODS ===================== */

.install-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.method {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  transition: all 0.25s;
  position: relative;
}

.method::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 8px 0 0 8px;
  background: var(--green);
  opacity: 0.5;
  transition: opacity 0.25s;
}

.method:hover {
  border-color: var(--border-bright);
  background: rgba(17, 24, 32, 0.9);
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}

.method:hover::before {
  opacity: 1;
  background: var(--accent);
}

.method-info {
  flex-shrink: 0;
  min-width: 150px;
}

.method h3 {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg-bright);
  margin-bottom: 0.1rem;
}

.method-tag {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--green);
  background: var(--green-dim);
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.method-tag-accent {
  color: var(--accent);
  background: var(--accent-dim);
}

/* Multi-line command block inside method cards */
.method pre code {
  display: block;
  line-height: 1.7;
  white-space: pre;
}

/* Compact label pill used in notes (e.g. curl / brew) */
.note-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--fg-muted);
  background: var(--border);
  padding: 0.05rem 0.45rem;
  border-radius: 3px;
  margin-right: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  vertical-align: middle;
  min-width: 38px;
  text-align: center;
}

.method p {
  font-size: 0.78rem;
  color: var(--fg-muted);
  margin-bottom: 0;
}

.method pre {
  margin: 0;
  flex: 1;
  background: transparent;
  border: none;
  padding: 0;
}

.method pre code {
  font-size: 0.82rem;
}

/* Divider between Install and Uninstall within the same section */
.subsection-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border-bright) 50%, transparent 100%);
  margin: 2.5rem 0;
}

/* ===================== CODE BLOCKS ===================== */

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0;
}

pre code {
  color: var(--fg);
  font-size: 0.82rem;
  line-height: 1.6;
}

pre code a {
  color: var(--accent);
}

.prompt-sm {
  color: var(--green);
  user-select: none;
  font-weight: 600;
  margin-right: 0.3rem;
}

.comment { color: var(--fg-muted); }
.kw { color: var(--accent); }
.str { color: var(--green); }

.note {
  color: var(--fg-muted);
  font-size: 0.88rem;
  font-style: italic;
  margin-top: 0.75rem;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border-bright);
}

/* ===================== TABLE ===================== */

/* Subheading used to group related tables (e.g. Plugin / Setup / Maintenance) */
.cmd-group {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 2rem;
  margin-bottom: 0.4rem;
  padding-left: 0.15rem;
  position: relative;
}

.cmd-group::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 0.6rem;
  vertical-align: middle;
  opacity: 0.65;
  box-shadow: 0 0 8px var(--accent-dim);
}

.cmd-group:first-of-type {
  margin-top: 1rem;
}

.table-wrap {
  overflow-x: auto;
  margin-top: 0.4rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  border-bottom: 1px solid var(--border);
}

th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--fg-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

tr {
  transition: background 0.2s;
}

tbody tr:hover {
  background: rgba(83, 165, 255, 0.03);
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

tbody tr:last-child td {
  border-bottom: none;
}

td code {
  color: var(--green);
  font-weight: 500;
  white-space: nowrap;
}

/* ===================== FOOTER ===================== */

footer {
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-inner {
  max-width: 750px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fg-bright);
  margin-bottom: 0.75rem;
}

footer p {
  color: var(--fg-muted);
  font-size: 0.82rem;
}

.footer-sep {
  color: var(--border-bright);
  margin: 0 0.3rem;
}

.footer-credit {
  margin-top: 0.4rem;
  font-size: 0.78rem !important;
  color: var(--fg-muted);
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 640px) {
  .hero {
    padding: 4rem 1rem 3rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .tagline {
    font-size: 1rem;
  }

  .terminal-body {
    font-size: 0.78rem;
    padding: 0.7rem 0.85rem;
    flex-wrap: wrap;
  }

  .terminal-body code {
    font-size: 0.78rem;
  }

  .section {
    padding: 2.5rem 1rem;
  }

  .method {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .method-info {
    min-width: unset;
  }

  .features li {
    padding: 0.5rem;
  }
}
