:root {
  --rust: #ce422b;
  --rust-dim: #9c3220;
  --rust-glow: rgba(206, 66, 43, 0.25);
  --amber: #f5a623;
  --bg: #0c0c0e;
  --bg2: #111114;
  --bg3: #18181d;
  --surface: #1e1e24;
  --border: rgba(255, 255, 255, 0.07);
  --text: #f0eff4;
  --muted: #6e6d7a;
  --mono: "JetBrains Mono", monospace;
  --sans: "Syne", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  line-height: 1.6;
}

/* NOISE OVERLAY */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1000;
  opacity: 0.35;
}

/* NAV */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 3rem;
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.nav-logo .crab {
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a, .external-link {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--rust);
  color: white !important;
  padding: 0.45rem 1.1rem !important;
  border-radius: 4px;
  transition: background 0.2s !important;
}

.nav-cta:hover {
  background: #e04d36 !important;
  color: white !important;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 40% at 50% 20%,
      rgba(206, 66, 43, 0.12) 0%,
      transparent 60%
    ),
    radial-gradient(
    ellipse 40% 30% at 80% 70%,
    rgba(206, 66, 43, 0.06) 0%,
    transparent 50%
  );
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rust);
  border: 1px solid rgba(206, 66, 43, 0.3);
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  margin-bottom: 2rem;
  animation: fadeUp 0.6s ease both;
}

.badge .dot {
  width: 6px;
  height: 6px;
  background: var(--rust);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

h1 {
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.6s 0.1s ease both;
}

h1 em {
  font-style: normal;
  color: var(--rust);
}

.hero-sub {
  max-width: 540px;
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 3rem;
  animation: fadeUp 0.6s 0.3s ease both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--rust);
  color: white;
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.btn-primary:hover {
  background: #e04d36;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(206, 66, 43, 0.35);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.85rem;
  padding: 0.75rem 1.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s;
  letter-spacing: 0.02em;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
}

.stats-row {
  display: flex;
  gap: 2.5rem;
  justify-content: center;
  animation: fadeUp 0.6s 0.4s ease both;
  margin-bottom: 20px;
}

.stat {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.stat strong {
  color: var(--text);
  font-size: 0.85rem;
}

/* DEMO WINDOW */
.demo-section {
  padding: 4rem 2rem 6rem;
  display: flex;
  justify-content: center;
  animation: fadeUp 0.6s 0.5s ease both;
}

.window {
  width: 100%;
  max-width: 640px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(206, 66, 43, 0.15),
    0 40px 80px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(206, 66, 43, 0.08);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

.dot-r {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f57;
}
.dot-y {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ffbd2e;
}
.dot-g {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #28ca41;
}

.window-title {
  flex: 1;
  text-align: center;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.window-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--border);
}

.search-icon {
  color: var(--muted);
  font-size: 1rem;
}

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--text);
  caret-color: var(--rust);
}

.search-hint {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.window-results {
  padding: 0.5rem 0;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1.2rem;
  cursor: pointer;
  transition: background 0.1s;
}

.result-item:hover, .result-item.active {
  background: rgba(206, 66, 43, 0.1);
}

.result-item.active .result-name {
  color: var(--rust);
}

.result-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.result-name {
  font-family: var(--mono);
  font-size: 0.85rem;
  flex: 1;
}

.result-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

.window-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.2rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.kbd {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.15rem 0.4rem;
  display: inline-block;
}

.footer-hint {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
}

/* SECTIONS */
section {
  padding: 6rem 2rem;
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.section-desc {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.7;
}

/* FEATURES GRID */
.features-section {
  max-width: 1100px;
  margin: 0 auto;
}

.features-header {
  margin-bottom: 3.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.feature-card {
  background: var(--bg2);
  padding: 2rem;
  transition: background 0.2s;
  position: relative;
}

.feature-card:hover {
  background: var(--bg3);
}

.feature-icon {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  display: block;
}

.feature-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.feature-desc {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}

.feature-new {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rust);
  border: 1px solid rgba(206, 66, 43, 0.4);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
}

/* CONFIG SECTION */
.config-section {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

@media (max-width: 768px) {
  .config-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  nav {
    padding: 1rem 1.5rem;
  }
  .nav-links {
    display: none;
  }
}

.config-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.config-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.config-filename {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: auto;
}

pre {
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: #b0afc0;
  overflow-x: auto;
}

.c-comment {
  color: #4d4c5f;
}
.c-key {
  color: #cf8470;
}
.c-val {
  color: #8bbf8c;
}
.c-str {
  color: #7ec8e3;
}
.c-head {
  color: var(--rust);
}

/* MODES SECTION */
.modes-section {
  max-width: 1100px;
  margin: 0 auto;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.mode-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.mode-card:hover {
  border-color: rgba(206, 66, 43, 0.3);
  transform: translateY(-2px);
}

.mode-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--rust);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.mode-tag::before {
  content: ">";
  opacity: 0.6;
}

.mode-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.mode-desc {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}

/* INSTALL */
.install-section {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.install-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  margin: 2.5rem 0 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2.5rem;
}

.tab-btn {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.6rem 1.4rem;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
  border-right: 1px solid var(--border);
  letter-spacing: 0.04em;
}

.tab-btn:last-child {
  border-right: none;
}

.tab-btn.active {
  background: var(--surface);
  color: var(--text);
}

.install-block {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
  display: none;
  text-align: left;
}

.install-block.active {
  display: block;
}

.install-block-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.install-block-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
}

.copy-btn {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.2rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.04em;
}

.copy-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.install-code {
  padding: 1.5rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.9;
}

.install-code .comment {
  color: var(--muted);
}
.install-code .cmd {
  color: var(--amber);
}

/* SOCIAL PROOF */
.contrib-section {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.contrib-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 2.5rem;
}

.contrib-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 0.5rem 0.9rem;
  border-radius: 99px;
  text-decoration: none;
  transition: all 0.2s;
}

.contrib-chip:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.15);
}

.contrib-chip .gh-icon {
  color: var(--rust);
}

.easter-note {
  margin-top: 2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--muted);
  padding: 1rem 1.5rem;
  border: 1px dashed rgba(206, 66, 43, 0.25);
  border-radius: 8px;
  display: inline-block;
}

.easter-note strong {
  color: var(--amber);
}

/* CTA */
.cta-section {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  padding: 8rem 2rem;
}

.cta-section h2 {
  margin-bottom: 1rem;
}

.cta-section p {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: gap;
  gap: 1rem;
}

.footer-left {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* DIVIDER */
.divider {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  height: 1px;
  background: var(--border);
}

/* TYPING ANIMATION */
.typed-text::after {
  content: "|";
  animation: blink 1s step-end infinite;
  color: var(--rust);
}

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

/* SCROLLBAR */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--surface);
  border-radius: 2px;
}
