/* ============================================================
   dont-rust-bro landing page
   Dark code-editor aesthetic, monospace vibes
   ============================================================ */

/* ---------- Reset & base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg:        #0d1117;
  --bg-raised: #161b22;
  --bg-card:   #1c2128;
  --border:    #30363d;
  --text:      #c9d1d9;
  --text-dim:  #8b949e;
  --heading:   #e6edf3;
  --accent:    #4CAF50;
  --accent-dim:#2ea04370;
  --red:       #f85149;
  --yellow:    #e3b341;
  --blue:      #58a6ff;
  --mono:      'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
  --sans:      'Inter', system-ui, -apple-system, sans-serif;
  --max-w:     1080px;
}

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

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

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

/* ---------- Alpha banner ---------- */
.alpha-banner {
  margin-top: 3.5rem; /* clear the fixed nav */
  background: #2d1b00;
  border-bottom: 1px solid var(--yellow);
  color: var(--yellow);
  text-align: center;
  padding: .6rem 1rem;
  font-size: .9rem;
}
.alpha-banner a {
  color: var(--yellow);
  text-decoration: underline;
}

/* ---------- Requirements list ---------- */
.requirements-list {
  list-style: none;
  margin: 1rem 0 2rem;
  padding: 0;
}
.requirements-list li {
  color: var(--text);
  padding: .3rem 0;
  font-size: 1rem;
}
.requirements-list li::before {
  content: "\2713 ";
  color: var(--accent);
  font-weight: bold;
  margin-right: .4rem;
}

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

section + section {
  border-top: 1px solid var(--border);
}

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

.section-title {
  font-size: 2rem;
  color: var(--heading);
  margin-bottom: 1.25rem;
  line-height: 1.3;
}

/* ---------- Nav ---------- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
}

nav .logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
  color: var(--heading);
}

nav .logo span {
  color: var(--accent);
}

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

nav .nav-links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  padding: 6rem 0 5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: var(--heading);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero h1 .green {
  color: var(--accent);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.terminal-box {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 640px;
  margin: 0 auto;
  overflow: hidden;
}

.terminal-titlebar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}

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

.terminal-dot.red    { background: var(--red); }
.terminal-dot.yellow { background: var(--yellow); }
.terminal-dot.green  { background: var(--accent); }

.terminal-titlebar span:last-child {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-left: auto;
}

.terminal-body {
  padding: 1.25rem 1.5rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.8;
  min-height: 60px;
  position: relative;
}

.terminal-body .prompt {
  color: var(--accent);
}

.terminal-body .command {
  color: var(--heading);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.1em;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Copy button */
.copy-wrap {
  position: relative;
  display: inline-block;
  width: 100%;
}

.copy-btn {
  position: absolute;
  top: -4px;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

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

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

/* ---------- Problem section ---------- */
.reasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.reason-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.reason-card .icon {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.reason-card h3 {
  font-size: 1rem;
  color: var(--heading);
  margin-bottom: 0.4rem;
}

.reason-card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- How It Works ---------- */
.steps {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
}

.step {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--accent);
}

.step-content h3 {
  color: var(--heading);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.step-content p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- Video embed ---------- */
.video-container {
  position: relative;
  width: 100%;
  margin: 2rem auto 0;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* ---------- Features grid ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
}

.feature-card h3 {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--heading);
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ---------- Problem Packs ---------- */
.packs-list {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.pack-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem 2rem;
  min-width: 180px;
}

.pack-card.active {
  border-color: var(--accent);
}

.pack-card h3 {
  font-family: var(--mono);
  font-size: 1rem;
  color: var(--heading);
  margin-bottom: 0.25rem;
}

.pack-card .badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.pack-card .badge.available {
  background: var(--accent-dim);
  color: var(--accent);
}

.pack-card .badge.soon {
  background: rgba(227, 179, 65, 0.15);
  color: var(--yellow);
}

.pack-card p {
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---------- Install ---------- */
.commands-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.88rem;
}

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

.commands-table th {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.commands-table code {
  font-family: var(--mono);
  color: var(--heading);
  font-size: 0.85rem;
}

.commands-table td:last-child {
  color: var(--text-dim);
}

/* ---------- CTA / Philosophy ---------- */
.cta-section {
  text-align: center;
}

.cta-section .tagline {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  color: var(--heading);
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-section .tagline .green {
  color: var(--accent);
}

.cta-section .cta-sub {
  color: var(--text-dim);
  max-width: 540px;
  margin: 0 auto 2rem;
  font-size: 1rem;
}

.gh-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 28px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
  text-decoration: none;
}

.gh-btn:hover {
  opacity: 0.85;
  text-decoration: none;
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
  font-family: var(--mono);
}

/* ---------- Utility classes ---------- */
.text-dim { color: var(--text-dim); }
.text-heading { color: var(--heading); }
code.text-heading { color: var(--heading); }
.section-intro { color: var(--text-dim); max-width: 640px; margin-bottom: 1rem; }
.demo-intro { color: var(--text-dim); margin-bottom: 0.5rem; }
.packs-hint { color: var(--text-dim); margin-bottom: 0; }
.packs-hint code { font-family: var(--mono); color: var(--heading); }
.install-terminal { margin-bottom: 2.5rem; }
.cli-heading { color: var(--heading); margin-bottom: 0.5rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cursor { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  nav .nav-links {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  nav .nav-links.open {
    display: flex;
  }

  .hero {
    padding: 7rem 0 3rem;
  }

  section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .terminal-body {
    font-size: 0.78rem;
    padding: 1rem;
    overflow-x: auto;
  }

  .packs-list {
    flex-direction: column;
  }
}
