/* ============================================
   Sluice -- Dark theme landing page
   ============================================ */

:root {
  --bg: #09090b;
  --bg-raised: #111114;
  --bg-card: #16161a;
  --bg-card-hover: #1c1c21;
  --border: #27272a;
  --border-light: #3f3f46;
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.15);
  --green: #22c55e;
  --mono: 'JetBrains Mono', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
}

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

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.15s;
}

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

.nav-cta {
  background: var(--accent);
  color: var(--text) !important;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.15s;
}

.nav-cta:hover {
  background: var(--accent-hover) !important;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  font-family: var(--sans);
}

.btn-primary {
  background: var(--accent);
  color: var(--text);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-light);
  background: var(--bg-raised);
}

/* ---- Section shared ---- */
.section-label {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

section h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 24px;
}

/* ---- Hero ---- */
.hero {
  padding: 160px 0 80px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 32px;
  letter-spacing: 0.03em;
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 40px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 64px;
}

/* Terminal */
.hero-terminal {
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
}

.terminal-bar {
  display: flex;
  gap: 6px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-light);
}

.hero-terminal pre {
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  overflow-x: auto;
  color: var(--text-secondary);
}

.t-comment { color: var(--text-muted); }
.t-keyword { color: #c084fc; }
.t-fn { color: #60a5fa; }
.t-string { color: var(--green); }
.t-prop { color: #f9a8d4; }
.t-num { color: #fbbf24; }

/* ---- Problem ---- */
.problem {
  padding: 100px 0;
}

.problem h2 {
  max-width: 600px;
}

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.problem-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: border-color 0.2s;
}

.problem-card:hover {
  border-color: var(--border-light);
}

.problem-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.problem-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.problem-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Solution ---- */
.solution {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.solution-desc {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  margin-bottom: 48px;
}

.solution-features {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sf-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s;
}

.sf-item:hover {
  border-color: var(--border-light);
}

.sf-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.sf-item div:last-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sf-item strong {
  font-size: 15px;
  font-weight: 600;
}

.sf-item span {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ---- How it works ---- */
.how-it-works {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  margin-top: 48px;
}

.step {
  flex: 1;
  padding: 0 24px;
}

.step-num {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.6;
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-line {
  width: 1px;
  height: 120px;
  background: var(--border);
  flex-shrink: 0;
  margin-top: 24px;
}

/* ---- Features ---- */
.features {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: all 0.2s;
}

.feature-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.feature-card-highlight {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
  border-color: rgba(99, 102, 241, 0.2);
}

.feature-card-highlight:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.feature-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
}

.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Waitlist ---- */
.waitlist {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.waitlist-box {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}

.waitlist-box h2 {
  margin-bottom: 12px;
}

.waitlist-box > p {
  color: var(--text-secondary);
  font-size: 16px;
  margin-bottom: 32px;
}

.waitlist-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.waitlist-form input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 15px;
  font-family: var(--sans);
  outline: none;
  transition: border-color 0.15s;
}

.waitlist-form input::placeholder {
  color: var(--text-muted);
}

.waitlist-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.waitlist-form button {
  white-space: nowrap;
}

.waitlist-msg {
  font-size: 14px;
  min-height: 20px;
  margin-bottom: 8px;
}

.waitlist-msg.success {
  color: var(--green);
}

.waitlist-msg.error {
  color: #ef4444;
}

.waitlist-note {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer a {
  color: var(--text-secondary);
  transition: color 0.15s;
}

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

.footer-sep {
  color: var(--border-light);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .problem-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    gap: 32px;
  }

  .step-line {
    width: 40px;
    height: 1px;
    margin-top: 0;
    margin-left: 24px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card-highlight {
    grid-column: span 1;
  }

  .waitlist-form {
    flex-direction: column;
  }

  .hero-terminal pre {
    font-size: 12px;
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 32px;
  }

  section h2 {
    font-size: 24px;
  }
}
