/* =========================================================================
   dustdu — static site styles
   Sections:
   1. Design tokens (CSS variables)
   2. Reset & base
   3. Typography & helpers
   4. Layout
   5. Components (header, buttons, terminal, cards)
   6. Sections (hero, features, how, install, terminal, cta, footer)
   7. Animations
   8. Responsive
   ========================================================================= */

/* 1. Design tokens -------------------------------------------------------- */
:root {
  --background: #0b0e13;
  --surface: #11151c;
  --foreground: #e9e3d6;
  --muted: #8b8f98;
  --muted-soft: #6b6f78;
  --card: rgba(255, 255, 255, 0.025);
  --card-hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent: #e0a458;
  --accent-soft: rgba(224, 164, 88, 0.18);
  --accent-foreground: #1a1206;

  --primary: #5b8bd0;
  --primary-soft: rgba(91, 139, 208, 0.22);

  --terminal-bg: #0e1118;
  --terminal-bar: rgba(255, 255, 255, 0.05);

  --maxw: 1120px;
  --radius: 14px;
  --radius-sm: 10px;

  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-display: "Fraunces", Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: var(--accent-foreground);
}

/* 3. Typography & helpers ------------------------------------------------- */
.mono {
  font-family: var(--font-mono);
}
.display {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.italic-accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
.muted {
  color: var(--muted);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
}

/* 4. Layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.section {
  padding-block: 96px;
  border-top: 1px solid var(--border);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.section-lead {
  margin-top: 1rem;
  max-width: 56ch;
  color: var(--muted);
}

/* 5. Components ----------------------------------------------------------- */
/* Header */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 72%, transparent);
  backdrop-filter: blur(14px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
}
.brand-mark {
  position: relative;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 8px;
  background: var(--accent-soft);
  filter: blur(8px);
}
.brand-mark span {
  position: relative;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
}
.brand-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  letter-spacing: -0.02em;
}
.brand-name b {
  color: var(--accent);
  font-weight: 400;
}

.nav-links {
  display: none;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}
.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  padding: 9px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  transition: background 0.2s, border-color 0.2s;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--accent-foreground);
  border-color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-foreground);
}
.btn-primary:hover {
  transform: translateX(2px);
  box-shadow: 0 0 40px -10px var(--accent);
}
.btn-ghost {
  border: 1px solid var(--border-strong);
  color: var(--foreground);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Terminal mock */
.terminal {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--terminal-bg);
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8);
}
.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--terminal-bar);
}
.terminal-dots {
  display: flex;
  gap: 6px;
}
.terminal-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.terminal-dots i:last-child {
  background: var(--accent-soft);
}
.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted-soft);
}
.terminal pre {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--muted);
  overflow-x: auto;
}
.terminal .t-accent {
  color: var(--accent);
}
.terminal .t-fg {
  color: var(--foreground);
}
.terminal .t-dim {
  color: var(--muted-soft);
}

/* Hero */
.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
.hero-copy {
  max-width: 620px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent-soft);
  animation: pulse 2s infinite;
}
.hero-title {
  margin-top: 24px;
  font-size: clamp(2.6rem, 7vw, 5rem);
}
.hero-lead {
  margin-top: 28px;
  font-size: 1.05rem;
  max-width: 52ch;
}
.hero-actions {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.hero-meta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-soft);
}
.hero-meta b {
  color: var(--foreground);
  font-weight: 500;
}
.hero-meta .sep {
  width: 1px;
  height: 14px;
  background: var(--border);
}
.hero-terminal {
  position: relative;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent-soft);
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

/* Features — bento grid */
.bento {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 28px;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-soft), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.card:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
  transform: translateY(-2px);
}
.card:hover::after {
  opacity: 1;
}
.card-lg {
  padding: 36px;
}
.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  border: 1px solid var(--border-strong);
  color: var(--accent);
  margin-bottom: 22px;
}
.card-icon svg {
  width: 24px;
  height: 24px;
}
.card-icon.sm {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
}
.card-icon.sm svg {
  width: 20px;
  height: 20px;
}
.card-title {
  position: relative;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.6rem;
  letter-spacing: -0.01em;
}
.card-title.sm {
  font-size: 1.15rem;
}
.card-text {
  position: relative;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}
.card-text.sm {
  font-size: 0.82rem;
}
.card-cli {
  position: relative;
  margin-top: auto;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--muted);
}

@media (min-width: 768px) {
  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
  }
  .card-lg {
    grid-column: span 2;
    grid-row: span 2;
  }
}

/* How */
.how-grid {
  display: grid;
  gap: 48px;
  align-items: start;
}
.how-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.step {
  display: flex;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  transition: border-color 0.25s, background 0.25s;
}
.step:hover {
  border-color: var(--border-strong);
  background: var(--card-hover);
}
.step-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--accent);
  flex-shrink: 0;
  width: 44px;
}
.step-title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 1.2rem;
}
.step-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 900px) {
  .how-grid {
    grid-template-columns: 5fr 7fr;
  }
}

/* Install */
.install-wrap {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}
.install-head {
  margin-bottom: 40px;
}
.install-terminal {
  text-align: left;
  max-width: 620px;
  margin-inline: auto;
}
.copy-btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
}
.copy-btn:hover {
  color: var(--accent);
}
.install-badges {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted-soft);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}

/* Terminal / TUI */
.terminal-grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
.feature-list {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
  list-style: none;
}
.feature-list li {
  display: flex;
  gap: 12px;
}
.tui-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}
.tui-pane {
  background: var(--terminal-bg);
  padding: 18px;
}
.tui-pane.tui-wide {
  grid-column: 1 / -1;
}
.tui-head {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 10px;
}
.tui-pane pre {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  line-height: 1.7;
  color: var(--muted);
  padding: 0;
}

@media (min-width: 900px) {
  .terminal-grid {
    grid-template-columns: 1fr 1.1fr;
  }
}

/* CTA */
.cta {
  text-align: center;
}
.cta-wrap {
  max-width: 640px;
  margin-inline: auto;
}
.cta-lead {
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--muted);
}
.cta-actions {
  margin-top: 32px;
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 40px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: flex-start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-soft);
  margin-left: 10px;
}
.footer-links {
  display: flex;
  gap: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted-soft);
}
@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* Mobile nav */
.nav-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--foreground);
  cursor: pointer;
}
.nav-burger svg {
  stroke: var(--foreground);
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 24px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--background);
}
.mobile-menu[hidden] {
  display: none;
}
.mobile-menu a {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
}
.mobile-menu a:last-child {
  border-bottom: none;
}
.mobile-menu a:hover {
  color: var(--accent);
}

@media (max-width: 767px) {
  .nav-cta {
    display: none;
  }
  .nav-burger {
    display: inline-flex;
  }
}

/* 7. Animations ----------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* 8. Responsive ----------------------------------------------------------- */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  .container {
    padding-inline: 40px;
  }
}
