/* ============================================
   Allowance Design System
   Dark + Green | Developer-native | Techy
   ============================================ */

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

:root {
  /* Background */
  --bg-primary: #0a0e17;
  --bg-secondary: #0f1420;
  --bg-card: #141a27;
  --bg-card-hover: #1a2233;
  --bg-code: #0d1117;

  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-tertiary: #555d68;

  /* Accent */
  --accent: #3cffa0;
  --accent-dim: rgba(60, 255, 160, 0.12);
  --accent-border: rgba(60, 255, 160, 0.25);
  --accent-hover: #2de88d;

  /* Borders */
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;

  /* Layout */
  --max-width: 1080px;
  --section-gap: 7rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

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

body {
  font-family: var(--font-sans);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  color: var(--accent-hover);
}

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

/* === Nav === */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 0;
  background: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

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

.nav-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 0.45rem 1rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  letter-spacing: 0.01em;
}

.nav-cta:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

/* === Hero === */
.hero {
  padding: 10rem 0 6rem;
  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, rgba(60, 255, 160, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

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

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

.hero h1 {
  font-size: 3.8rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  position: relative;
}

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

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

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--accent);
  color: var(--bg-primary);
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  letter-spacing: -0.01em;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  color: var(--text-secondary);
  padding: 0.75rem 1.75rem;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  letter-spacing: -0.01em;
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: var(--text-tertiary);
}

/* === Code Block (Hero) === */
.hero-code {
  max-width: 540px;
  margin: 3.5rem auto 0;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-align: left;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text-tertiary);
  opacity: 0.4;
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.code-body {
  padding: 1.25rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
}

.code-body .comment { color: var(--text-tertiary); }
.code-body .keyword { color: #ff7b72; }
.code-body .func { color: #d2a8ff; }
.code-body .string { color: #a5d6ff; }
.code-body .prop { color: var(--text-primary); }
.code-body .val { color: var(--accent); }
.code-body .num { color: #79c0ff; }

/* === Sections === */
section {
  padding: var(--section-gap) 0;
}

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

section h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1rem;
}

section .section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.65;
}

/* === Features Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all 0.25s;
}

.feature-card:hover {
  border-color: var(--accent-border);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

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

/* === How It Works === */
.steps-container {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
}

.step {
  position: relative;
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.step-connector {
  display: none;
}

/* Connector lines between steps */
@media (min-width: 769px) {
  .step-connector {
    display: block;
    position: absolute;
    top: 2rem;
    right: -0.75rem;
    width: calc(1.5rem);
    height: 1px;
    background: var(--border-hover);
    transform: translateY(15px);
  }

  .step:last-child .step-connector {
    display: none;
  }
}

/* === Use Cases === */
.usecases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 3rem;
}

.usecase {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: border-color 0.2s;
}

.usecase:hover {
  border-color: var(--border-hover);
}

.usecase-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.usecase h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.usecase p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* === CTA Section === */
.cta-section {
  text-align: center;
  padding: 5rem 0 6rem;
}

.cta-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(60, 255, 160, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  position: relative;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.05rem;
  position: relative;
}

/* === Footer === */
footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

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

footer a {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  transition: color 0.15s;
}

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

/* === Divider === */
.divider {
  height: 1px;
  background: var(--border);
  max-width: var(--max-width);
  margin: 0 auto;
}

/* === Responsive === */
@media (max-width: 768px) {
  :root {
    --section-gap: 4.5rem;
  }

  .container {
    padding: 0 1.25rem;
  }

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

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

  .hero .subtitle {
    font-size: 1.05rem;
  }

  .hero-code {
    margin-top: 2.5rem;
  }

  .code-body {
    font-size: 0.72rem;
  }

  section h2 {
    font-size: 1.7rem;
  }

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

  .steps-container {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .step {
    text-align: left;
    padding: 1.25rem 0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
  }

  .step-number {
    margin-bottom: 0;
    flex-shrink: 0;
    margin-top: 0.15rem;
  }

  .usecases-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cta-box {
    padding: 3rem 1.5rem;
  }

  footer .container {
    flex-direction: column;
    gap: 0.75rem;
  }
}

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

  .hero .subtitle {
    font-size: 0.95rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}
