:root {
  --bg: #0b0d10;
  --bg-elevated: #101319;
  --surface: #15181d;
  --surface-2: #1c2028;
  --border: #23272e;
  --border-strong: #2f3441;
  --text: #e6e8eb;
  --text-muted: #8b93a1;
  --accent: #a78bfa;
  --accent-strong: #8b5cf6;
  --accent-soft: rgba(167, 139, 250, 0.14);
  --accent-glow: rgba(167, 139, 250, 0.35);
  --max-width: 1180px;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv11';
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

img,
svg {
  display: block;
}

/* ---------- Layout ---------- */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

section {
  padding: clamp(64px, 10vw, 120px) 0;
}

.section-head {
  margin-bottom: clamp(32px, 5vw, 56px);
  max-width: 720px;
}

.section-eyebrow {
  display: inline-block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.section-lede {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--text-muted);
  max-width: 60ch;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #6366f1);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 20px var(--accent-glow);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.brand-name {
  font-size: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  color: var(--text-muted);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.site-nav .nav-cta {
  margin-left: 6px;
  background: var(--accent);
  color: #0b0d10;
  font-weight: 600;
  padding: 8px 14px;
}

.site-nav .nav-cta:hover {
  background: var(--accent-strong);
  color: #fff;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #0b0d10;
}

.btn-primary:hover {
  background: var(--accent-strong);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: clamp(80px, 14vw, 160px) 0 clamp(72px, 10vw, 120px);
  text-align: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -200px 0 auto;
  height: 600px;
  background: radial-gradient(50% 60% at 50% 0%, var(--accent-soft) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  max-width: 18ch;
  margin: 0 auto 20px;
}

.hero h1 .accent {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lede {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 auto 36px;
}

.hero-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

/* ---------- Features ---------- */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

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

/* ---------- Supported software ---------- */

.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 32px;
}

.software-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.software-pill:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.software-pill .swatch {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ---------- Signup ---------- */

.signup {
  background: linear-gradient(160deg, var(--surface), var(--bg-elevated));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 64px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.signup::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 70% at 50% 0%, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}

.signup > * {
  position: relative;
  z-index: 1;
}

.signup h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.signup p {
  color: var(--text-muted);
  margin-bottom: 28px;
  max-width: 50ch;
  margin-left: auto;
  margin-right: auto;
}

.signup-form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.signup-form input[type='email'] {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease;
}

.signup-form input[type='email']:focus {
  border-color: var(--accent);
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
  min-height: 1.4em;
}

.form-status.success {
  color: #34d399;
}

.form-status.error {
  color: #f87171;
}

/* ---------- Download ---------- */

.download-card {
  margin-top: 32px;
  padding: clamp(28px, 5vw, 44px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.download-card h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.download-card p {
  color: var(--text-muted);
  font-size: 14px;
}

.download-card .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 80px;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

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

.footer-nav {
  display: inline-flex;
  gap: 22px;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: 13px;
  transition: color 0.15s ease;
}

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

/* ---------- Directory page ---------- */

.directory-head {
  padding: clamp(56px, 8vw, 100px) 0 clamp(28px, 4vw, 44px);
}

.search-wrapper {
  position: relative;
  max-width: 560px;
  margin-top: 28px;
}

.search-wrapper svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 42px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.search-wrapper input:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding-bottom: 80px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
  min-height: 180px;
}

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

.category-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.category-icon svg {
  width: 20px;
  height: 20px;
}

.category-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.category-card p {
  color: var(--text-muted);
  font-size: 13px;
  flex: 1;
}

.category-card .view-link {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-card.is-hidden {
  display: none;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  font-size: 14px;
  display: none;
}

.empty-state.is-visible {
  display: block;
}

/* ---------- Resource listings (category page) ---------- */

.breadcrumb {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

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

.breadcrumb .sep {
  margin: 0 8px;
  color: var(--border-strong);
}

.resource-list {
  display: grid;
  gap: 14px;
  padding-bottom: 80px;
}

.resource {
  position: relative;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.resource:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.resource.featured {
  border-color: rgba(167, 139, 250, 0.4);
}

.resource-info h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.resource-info p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 3px 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 12px;
}

.resource-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.resource-cta:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

/* ---------- Responsive tweaks ---------- */

@media (max-width: 720px) {
  .site-header .container {
    height: 56px;
  }

  .site-nav a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .resource {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .resource-cta {
    justify-self: flex-start;
  }

  .download-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .signup-form {
    flex-direction: column;
  }

  .signup-form input[type='email'],
  .signup-form button {
    width: 100%;
  }
}
