/* ── GateStack Design System ─────────────────────────────── */

:root {
  --bg: #1e1e1e;
  --surface: #2a2a2a;
  --card: #252525;
  --card-border: #333;
  --text: #e2dfd8;
  --text-dim: #888;
  --text-ghost: #555;
  --accent: #ff8345;
  --accent-hover: #e5733d;
  --pro: #22c55e;
  --gamma: #8b5cf6;
  --free: #60a5fa;
  --max-w: 1200px;
  --nav-h: 64px;
  --radius: 12px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
}

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

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ── NAV ──────────────────────────────────────────────────── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(30, 30, 30, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--card-border);
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
}

.nav-logo-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

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

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

.btn-nav {
  background: var(--accent) !important;
  color: #000 !important;
  padding: 8px 20px;
  border-radius: 8px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.85rem !important;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* Clerk UserButton — blend with dark nav */
#clerk-auth .cl-userButtonBox {
  height: 32px;
  width: 32px;
}

#clerk-auth .cl-userButtonTrigger {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.2s;
}

/* ── HERO ─────────────────────────────────────────────────── */

.hero {
  padding: calc(var(--nav-h) + var(--space-md)) 0 var(--space-sm);
  text-align: center;
  background: linear-gradient(180deg, #0e0e0e 0%, var(--bg) 100%);
}

.hero .container {
  width: 100%;
}

.hero-tag {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--text-dim);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  max-width: 640px;
  margin: 0 auto 0;
  line-height: 1.4;
}

.hero-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

/* ── BUTTONS ──────────────────────────────────────────────── */

.btn-cta {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

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

.btn-secondary {
  display: inline-block;
  color: var(--text-dim);
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--card-border);
  transition: color 0.2s, border-color 0.2s;
}

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

/* ── SECTIONS ─────────────────────────────────────────────── */

.section {
  padding: var(--space-md) 0;
}

.section-dark {
  background: #161616;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
}

.section-sub {
  color: var(--text-dim);
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-lg);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ── PRODUCT CARDS ────────────────────────────────────────── */

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.product-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  position: relative;
  transition: border-color 0.3s, transform 0.2s;
}

.product-card:hover {
  border-color: var(--text-dim);
  transform: translateY(-4px);
}

.product-thumb {
  width: 100%;
  border-radius: 8px;
  margin-bottom: var(--space-sm);
  border: 1px solid var(--card-border);
  opacity: 0.9;
  transition: opacity 0.3s;
}

.product-card:hover .product-thumb {
  opacity: 1;
}

.product-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.product-tagline {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.product-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.badge-free {
  background: rgba(96, 165, 250, 0.15);
  color: var(--free);
  border: 1px solid rgba(96, 165, 250, 0.3);
}

.badge-pro {
  background: rgba(34, 197, 94, 0.15);
  color: var(--pro);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-gamma {
  background: rgba(139, 92, 246, 0.15);
  color: var(--gamma);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.product-features {
  list-style: none;
  margin-bottom: var(--space-md);
}

.product-features li {
  padding: 6px 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.product-features li::before {
  content: '>';
  color: var(--accent);
  margin-right: 8px;
  font-weight: 700;
  font-family: monospace;
}

.card-pro {
  border-color: rgba(34, 197, 94, 0.3);
}

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

.card-gamma {
  border-color: rgba(139, 92, 246, 0.3);
}

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

.btn-product {
  display: block;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: background 0.2s;
  background: rgba(255, 131, 69, 0.1);
  color: var(--accent);
  border: 1px solid rgba(255, 131, 69, 0.3);
}

.btn-product:hover {
  background: rgba(255, 131, 69, 0.2);
}

.btn-pro {
  background: rgba(34, 197, 94, 0.1);
  color: var(--pro);
  border-color: rgba(34, 197, 94, 0.3);
}

.btn-pro:hover {
  background: rgba(34, 197, 94, 0.2);
}

.btn-gamma {
  background: rgba(139, 92, 246, 0.1);
  color: var(--gamma);
  border-color: rgba(139, 92, 246, 0.3);
}

.btn-gamma:hover {
  background: rgba(139, 92, 246, 0.2);
}

/* ── FEATURE GRID ─────────────────────────────────────────── */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.feature-card {
  padding: var(--space-md);
  border-left: 3px solid var(--accent);
  transition: border-color 0.3s;
}

.feature-card:nth-child(2) { border-color: var(--pro); }
.feature-card:nth-child(3) { border-color: var(--free); }
.feature-card:nth-child(4) { border-color: var(--gamma); }

.feature-icon {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.feature-card:nth-child(2) .feature-icon { color: var(--pro); }
.feature-card:nth-child(3) .feature-icon { color: var(--free); }
.feature-card:nth-child(4) .feature-icon { color: var(--gamma); }

.feature-card h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

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

/* ── SIGNUP ────────────────────────────────────────────────── */

.signup-container {
  text-align: center;
  max-width: 600px;
}

.signup-form {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  justify-content: center;
}

.signup-input {
  flex: 1;
  min-width: 200px;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.signup-input:focus {
  border-color: var(--accent);
}

.signup-select {
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  cursor: pointer;
}

.signup-note {
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ── FOOTER ───────────────────────────────────────────────── */

.footer {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--card-border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
}

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

.footer-links a:hover {
  text-decoration: underline;
}

/* ── RESPONSIVE ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.98);
    flex-direction: column;
    padding: var(--space-md);
    gap: var(--space-sm);
    border-bottom: 1px solid var(--card-border);
  }

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

  .nav-toggle {
    display: flex;
  }

  .hero {
    min-height: 70vh;
  }

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

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

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

  .footer-inner {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }
}
