/* ============================================
   SELFHOSTED.ANCHRAS.COM
   Anchras Brand — Self-Hosted Directory
   ============================================ */

@font-face {
  font-family: 'Domyouji';
  src: url('../fonts/Domyouji Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- RESET & TOKENS ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --black: #0a0b09;
  --lime: #CDFC54;
  --lime-dim: rgba(205, 252, 84, 0.12);
  --lime-glow: rgba(205, 252, 84, 0.3);
  --lime-hover: #e0ff80;
  --dark: #111210;
  --dark-card: #161714;
  --dark-card-hover: #1c1d1a;
  --dark-border: #2a2b28;
  --gray-text: #9a9b98;
  --white: #f0f0ee;
  --font-brand: 'Domyouji', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  --max-width: 1280px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 6px;
  --radius-lg: 10px;
}

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

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img { max-width: 100%; height: auto; display: block; }

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

h1, h2, h3, h4 {
  font-family: var(--font-brand);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

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

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  cursor: pointer; transition: all var(--transition);
  border: none;
  font-family: var(--font-brand);
  border-radius: var(--radius);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.btn-primary {
  background: var(--lime);
  color: var(--black);
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
}
.btn-primary:hover {
  background: var(--lime-hover);
  color: var(--black);
  box-shadow: 0 0 24px var(--lime-glow);
}
.btn-outline {
  background: transparent;
  color: var(--lime);
  border: 1px solid rgba(205, 252, 84, 0.3);
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
}
.btn-outline:hover {
  background: var(--lime-dim);
  border-color: var(--lime);
  color: var(--lime);
}
.btn-sm { font-size: 0.75rem; padding: 0.4rem 0.85rem; }
.btn-lg { font-size: 0.9rem; padding: 0.75rem 1.75rem; }
.btn-arrow::after { content: ' →'; transition: margin-left var(--transition); }
.btn-arrow:hover::after { margin-left: 4px; }

.section-tag {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  background: var(--lime-dim);
  border: 1px solid rgba(205, 252, 84, 0.15);
  color: var(--lime);
  font-size: 0.75rem;
  font-family: var(--font-brand);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  background: rgba(10, 11, 9, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}
.nav.scrolled { border-bottom-color: var(--dark-border); }

.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav-logo img { height: 36px; width: auto; }
.nav-center { flex: 1; }
.nav-title { font-family: var(--font-brand); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--gray-text); }

.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-link { color: var(--gray-text); font-size: 0.85rem; font-family: var(--font-brand); letter-spacing: 0.03em; }
.nav-link:hover { color: var(--white); }

.nav-toggle { display: none; cursor: pointer; padding: 0.5rem; background: none; border: none; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--white); margin: 4px 0; transition: all var(--transition); }

/* ---------- HERO (Index) ---------- */
.hero {
  padding: 7rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--lime-dim) 0%, transparent 60%), radial-gradient(ellipse at 20% 80%, rgba(205, 252, 84, 0.04) 0%, transparent 50%);
  pointer-events: none;
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--dark-border) 1px, transparent 1px), linear-gradient(90deg, var(--dark-border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.08;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-icon { margin-bottom: 1.5rem; }
.hero-icon img { height: 48px; margin: 0 auto; filter: drop-shadow(0 0 30px var(--lime-glow)); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 0.75rem; }
.hero-subtitle { color: var(--gray-text); font-size: 1.05rem; max-width: 520px; margin: 0 auto 2rem; }

/* ---------- SEARCH ---------- */
.search-wrap { position: relative; max-width: 600px; margin: 0 auto 1.75rem; }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--gray-text); pointer-events: none; }
.search-input {
  width: 100%;
  padding: 0.9rem 7rem 0.9rem 2.75rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input::placeholder { color: var(--gray-text); opacity: 0.6; }
.search-input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-dim); }

.search-kbd {
  position: absolute;
  right: 5.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--dark-border);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gray-text);
  line-height: 1.4;
}
.search-input:focus ~ .search-kbd { display: none; }

.search-count { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-size: 0.75rem; color: var(--gray-text); font-family: var(--font-brand); letter-spacing: 0.04em; }

/* ---------- CATEGORIES ---------- */
.categories { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; max-width: 900px; margin: 0 auto; padding-bottom: 1rem; }
.cat-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: 100px;
  color: var(--gray-text);
  font-family: var(--font-body);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.cat-btn:hover { border-color: rgba(205, 252, 84, 0.3); color: var(--white); background: var(--dark-card-hover); }
.cat-btn.active { background: var(--lime); border-color: var(--lime); color: var(--black); }
.cat-btn.active .cat-count { background: rgba(10, 11, 9, 0.2); color: var(--black); }
.cat-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.cat-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 18px; padding: 0 5px; font-size: 0.65rem; font-weight: 600; background: rgba(255,255,255,0.08); border-radius: 100px; line-height: 1; }

/* ---------- PROJECT GRID ---------- */
.main { padding: 2rem 0 4rem; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.25rem; }

/* ---------- PROJECT CARD ---------- */
.project-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.project-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}
.project-card[data-href] { cursor: pointer; }
.project-card:hover { border-color: rgba(205, 252, 84, 0.25); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.3); }
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover .card-title { color: var(--lime); }

/* Card top: logo + badges */
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }

.card-logo {
  width: 48px; height: 48px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
}
.card-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.card-logo-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-brand);
  font-size: 1.25rem;
  color: var(--lime);
  background: var(--lime-dim);
}

.card-badges { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-radius: 100px;
  white-space: nowrap;
}
.badge-license { background: rgba(205,252,84,0.08); color: var(--lime); border: 1px solid rgba(205,252,84,0.12); }
.badge-platform { background: rgba(255,255,255,0.04); color: var(--gray-text); border: 1px solid rgba(255,255,255,0.08); }
.badge-score {
  background: transparent;
  border: 1px solid;
  font-weight: 600;
  font-family: var(--font-brand);
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
}
.badge-oss { background: rgba(205,252,84,0.08); color: var(--lime); border: 1px solid rgba(205,252,84,0.12); }
.badge-maintained { border: 1px solid rgba(255,255,255,0.08); color: var(--gray-text); background: rgba(255,255,255,0.04); }
.badge-maintained--active { color: var(--lime); border-color: rgba(205,252,84,0.2); background: rgba(205,252,84,0.08); }

.card-title { font-size: 1.15rem; font-family: var(--font-brand); transition: color var(--transition); }

.card-desc { color: var(--gray-text); font-size: 0.85rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.tag { display: inline-block; padding: 0.15rem 0.5rem; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.06); border-radius: 100px; font-size: 0.7rem; color: var(--gray-text); }

.card-meta { display: flex; align-items: center; gap: 0.75rem; }
.card-category { font-family: var(--font-brand); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lime); opacity: 0.7; }
.card-platform { font-size: 0.7rem; color: var(--gray-text); }

/* Install CTA on card */
.card-install-cta { margin-top: 0.25rem; }
.install-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  font-family: var(--font-brand);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: default;
  transition: all var(--transition);
}
.install-btn--locked {
  background: rgba(255,255,255,0.03);
  color: var(--gray-text);
  border-color: var(--dark-border);
  text-decoration: none;
}
.install-btn--locked svg { opacity: 0.5; }
.install-btn--locked:hover {
  background: rgba(205,252,84,0.06);
  border-color: rgba(205,252,84,0.2);
  color: var(--lime);
}
.install-btn--locked:hover svg { opacity: 0.8; stroke: var(--lime); }

.install-hint {
  text-align: center;
  font-size: 0.7rem;
  color: var(--gray-text);
  margin-top: 0.4rem;
  opacity: 0.7;
}
.install-hint a { color: var(--lime); font-weight: 500; }

/* Card bottom links */
.card-actions {
  display: flex; gap: 0.75rem; flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid var(--dark-border);
}
.card-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--gray-text);
  transition: color var(--transition);
}
.card-link:hover { color: var(--lime); }
.card-link--primary { color: var(--lime); font-family: var(--font-brand); letter-spacing: 0.03em; }

/* ---------- SOVEREIGNTY EXPLAINER (Index) ---------- */
.sovereignty-explainer { padding: 5rem 0; border-top: 1px solid var(--dark-border); }
.sov-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.sov-content h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1rem; }
.sov-content p { color: var(--gray-text); font-size: 1rem; line-height: 1.7; }

.sov-breakdown { display: flex; flex-direction: column; gap: 1.25rem; }
.sov-axis { background: var(--dark-card); border: 1px solid var(--dark-border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.sov-axis-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.sov-axis-name { font-family: var(--font-brand); font-size: 0.9rem; }
.sov-axis-pts { font-family: var(--font-brand); font-size: 0.85rem; color: var(--lime); }
.sov-axis-bar { height: 4px; background: var(--dark-border); border-radius: 2px; overflow: hidden; margin-bottom: 0.5rem; }
.sov-axis-fill { height: 100%; background: var(--lime); border-radius: 2px; transition: width 0.6s ease; }
.sov-axis-desc { font-size: 0.8rem; color: var(--gray-text); line-height: 1.4; }

/* ---------- CTA BANNER (Index) ---------- */
.cta-banner { padding: 5rem 0; text-align: center; position: relative; overflow: hidden; }
.cta-bg { position: absolute; inset: 0; background: radial-gradient(ellipse at center, var(--lime-dim) 0%, transparent 70%); pointer-events: none; }
.cta-content { position: relative; }
.cta-content h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin-bottom: 1rem; }
.cta-content p { color: var(--gray-text); margin-bottom: 2rem; max-width: 480px; margin-left: auto; margin-right: auto; font-size: 1.05rem; }
.cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ============================================
   PROJECT DETAIL PAGE
   ============================================ */

/* Project Hero */
.project-hero {
  padding: 6.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.project-hero-inner {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 3rem;
  align-items: start;
}

.breadcrumb {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: var(--gray-text);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}
.breadcrumb:hover { color: var(--lime); }

.project-hero-header { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.25rem; }

.project-logo-lg {
  width: 72px; height: 72px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  display: flex; align-items: center; justify-content: center;
}
.project-logo-lg img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.logo-fallback-lg {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-brand); font-size: 2rem; color: var(--lime); background: var(--lime-dim);
}

.project-hero-left h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
.project-hero-cat { font-family: var(--font-brand); font-size: 0.85rem; color: var(--lime); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.25rem; }

.project-hero-desc { color: var(--gray-text); font-size: 1.05rem; line-height: 1.7; margin-bottom: 1.25rem; max-width: 580px; }

.project-hero-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.5rem; }

.project-hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }

.install-btn--locked-hero {
  opacity: 0.6;
  cursor: default;
}
.install-btn--locked-hero:hover {
  opacity: 0.8;
  box-shadow: none;
}

.install-hint-hero {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--gray-text);
}
.install-hint-hero a { color: var(--lime); font-weight: 500; }

/* Sovereignty Score Card */
.score-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.score-header {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-brand);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-text);
  margin-bottom: 1.5rem;
}

.score-gauge {
  position: relative;
  width: 140px; height: 140px;
  margin: 0 auto 1.5rem;
}
.score-ring { width: 100%; height: 100%; }
.score-ring-fill { transition: stroke-dasharray 0.8s ease; }
.score-value {
  position: absolute;
  inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.score-number { font-family: var(--font-brand); font-size: 2.5rem; line-height: 1; }
.score-label { font-size: 0.75rem; color: var(--gray-text); margin-top: 0.2rem; text-transform: uppercase; letter-spacing: 0.06em; }

.score-axes { display: flex; flex-direction: column; gap: 0.85rem; }
.score-axis-row { display: flex; align-items: center; gap: 0.75rem; }
.score-axis-info { flex: 1; min-width: 0; }
.score-axis-name { display: block; font-size: 0.75rem; font-weight: 500; color: var(--white); }
.score-axis-detail { display: block; font-size: 0.65rem; color: var(--gray-text); text-transform: capitalize; }
.score-axis-bar-wrap { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; width: 120px; }
.score-axis-bar { flex: 1; height: 4px; background: var(--dark-border); border-radius: 2px; overflow: hidden; }
.score-axis-fill { height: 100%; background: var(--lime); border-radius: 2px; }
.score-axis-pts { font-size: 0.65rem; color: var(--gray-text); font-family: var(--font-mono); white-space: nowrap; }

/* Project Main */
.project-main { padding: 2rem 0 4rem; }

.detail-section { margin-bottom: 3rem; }
.detail-section h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); margin-bottom: 1.25rem; }

.detail-prose {
  color: var(--gray-text);
  font-size: 0.95rem;
  line-height: 1.8;
  max-width: 720px;
}
.detail-prose p { margin-bottom: 1rem; }

/* Features grid */
.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; }
.feature-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.feature-bullet { flex-shrink: 0; }

/* Info grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--dark-border);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.info-item {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1rem 1.25rem;
  background: var(--dark-card);
}
.info-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-text); font-family: var(--font-brand); }
.info-value { font-size: 0.9rem; color: var(--white); }
.info-link { color: var(--lime); word-break: break-all; }

/* Detail CTA */
.detail-cta { margin-bottom: 3rem; }
.detail-cta-inner {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  overflow: hidden;
}
.detail-cta-inner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 0% 50%, var(--lime-dim) 0%, transparent 60%);
  pointer-events: none;
}
.detail-cta-text { position: relative; }
.detail-cta-text h2 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.detail-cta-text p { color: var(--gray-text); font-size: 0.95rem; max-width: 420px; }
.detail-cta-actions { position: relative; display: flex; gap: 1rem; flex-wrap: wrap; flex-shrink: 0; }

/* Related projects */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.related-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  transition: all var(--transition);
  color: var(--white);
  text-decoration: none;
}
.related-card:hover { border-color: rgba(205,252,84,0.2); transform: translateY(-1px); color: var(--white); }
.related-logo { width: 40px; height: 40px; border-radius: var(--radius); overflow: hidden; flex-shrink: 0; background: var(--dark); display: flex; align-items: center; justify-content: center; }
.related-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.logo-fallback-sm { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-family: var(--font-brand); font-size: 1rem; color: var(--lime); background: var(--lime-dim); }
.related-card h4 { font-family: var(--font-brand); font-size: 0.95rem; margin-bottom: 0.15rem; }
.related-card p { font-size: 0.8rem; color: var(--gray-text); line-height: 1.3; }
.related-score { margin-left: auto; font-family: var(--font-brand); font-size: 1.1rem; font-weight: 600; flex-shrink: 0; }

/* ---------- EMPTY STATE ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4rem 2rem; text-align: center; color: var(--gray-text); gap: 1rem; }
.empty-state h3 { font-family: var(--font-brand); color: var(--white); }
.empty-state svg { opacity: 0.4; }

/* ---------- FOOTER ---------- */
.footer { padding: 3rem 0 1.5rem; border-top: 1px solid var(--dark-border); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 2rem; }
.footer-brand img { height: 32px; margin-bottom: 0.75rem; }
.footer-brand p { color: var(--gray-text); font-size: 0.85rem; max-width: 320px; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: var(--gray-text); font-size: 0.85rem; font-family: var(--font-brand); letter-spacing: 0.03em; }
.footer-links a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 1.5rem; border-top: 1px solid var(--dark-border); font-size: 0.75rem; color: var(--gray-text); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 968px) {
  .sov-grid { grid-template-columns: 1fr; gap: 2rem; }
  .project-hero-inner { grid-template-columns: 1fr; }
  .project-hero-right { order: -1; }
  .score-card { max-width: 400px; }
  .detail-cta-inner { flex-direction: column; text-align: center; }
  .detail-cta-actions { justify-content: center; }
}

@media (max-width: 768px) {
  .nav-center { display: none; }
  .nav-right { display: none; }
  .nav-right.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--black); border-bottom: 1px solid var(--dark-border);
    padding: 1rem 2rem; gap: 0.75rem;
  }
  .nav-toggle { display: block; }

  .hero { padding: 6rem 0 1.5rem; }
  .hero h1 { font-size: 1.75rem; }

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

  .footer-inner { flex-direction: column; }
  .footer-links { flex-wrap: wrap; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }

  .categories { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 0.5rem; -webkit-overflow-scrolling: touch; }
  .categories::-webkit-scrollbar { height: 0; }
}

@media (max-width: 480px) {
  .search-count { display: none; }
  .search-kbd { display: none; }
  .container { padding: 0 1rem; }
  .project-hero-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
}


/* ============================================
   NAV — PAGE LINKS (About, Platform, Directory)
   ============================================ */
.nav-pages { display: flex; align-items: center; gap: 1.5rem; }
.nav-page-link {
  font-family: var(--font-brand);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-text);
  transition: color var(--transition);
}
.nav-page-link:hover { color: var(--white); }
.nav-page-link--active { color: var(--lime); }

@media (max-width: 768px) {
  .nav-pages { display: none; }
  .nav-right.open .nav-pages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
}


/* ============================================
   PAGE HERO (About + Platform)
   ============================================ */
.page-hero {
  padding: 8rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3.25rem); margin-bottom: 1.25rem; line-height: 1.15; }
.page-hero-sub { color: var(--gray-text); font-size: 1.1rem; line-height: 1.7; max-width: 600px; margin: 0 auto; }


/* ============================================
   ABOUT PAGE
   ============================================ */
.about-section { padding: 5rem 0; }
.about-section--dark { background: var(--dark); }

.about-prose-block { max-width: 720px; margin: 0 auto; }
.about-prose-content h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1.25rem; }
.about-prose-content p {
  color: var(--gray-text);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}
.about-prose-content p:last-child { margin-bottom: 0; }

/* Values */
.about-values-header { text-align: center; margin-bottom: 3rem; }
.about-values-header h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 0.5rem; }

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.value-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all var(--transition);
}
.value-card:hover { border-color: rgba(205, 252, 84, 0.2); transform: translateY(-2px); }
.value-icon { margin-bottom: 1.25rem; }
.value-card h3 { font-family: var(--font-brand); font-size: 1.15rem; margin-bottom: 0.75rem; }
.value-card p { color: var(--gray-text); font-size: 0.9rem; line-height: 1.6; }

/* Verticals */
.verticals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 2.5rem;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}
.vertical-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  transition: all var(--transition);
}
.vertical-card:hover { border-color: rgba(205, 252, 84, 0.2); }
.vertical-icon { display: block; color: var(--lime); margin-bottom: 1rem; }
.vertical-card h4 { font-family: var(--font-brand); font-size: 1rem; margin-bottom: 0.5rem; }
.vertical-card p { color: var(--gray-text); font-size: 0.85rem; line-height: 1.5; }


/* ============================================
   PLATFORM PAGE
   ============================================ */

/* Stats strip */
.platform-overview { padding: 0 0 3rem; margin-top: -2rem; position: relative; z-index: 1; }
.platform-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--dark-border);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
  padding: 1.75rem 1rem;
  background: var(--dark-card);
  text-align: center;
}
.stat-value { font-family: var(--font-brand); font-size: 2rem; color: var(--lime); line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--gray-text); text-transform: uppercase; letter-spacing: 0.08em; font-family: var(--font-brand); }

/* Theme sections */
.platform-theme { padding: 5rem 0; }
.platform-theme--alt { background: var(--dark); }

.theme-header { text-align: center; max-width: 680px; margin: 0 auto 4rem; }
.theme-header h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1rem; }
.theme-intro { color: var(--gray-text); font-size: 1.05rem; line-height: 1.7; }

/* Service blocks */
.service-block {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2.5rem;
  align-items: start;
  margin-bottom: 4rem;
}
.service-block:last-child { margin-bottom: 0; }
.service-block--reversed { grid-template-columns: 340px 1fr; }
.service-block--reversed .service-content { order: 2; }
.service-block--reversed .service-meta-card { order: 1; }

.service-icon { margin-bottom: 1rem; }
.service-content h3 { font-family: var(--font-brand); font-size: 1.5rem; margin-bottom: 0.75rem; }
.service-desc { color: var(--gray-text); font-size: 0.95rem; line-height: 1.7; margin-bottom: 1.5rem; }

.service-features { display: flex; flex-direction: column; gap: 0.6rem; }
.sf-item {
  display: flex; align-items: flex-start; gap: 0.65rem;
  font-size: 0.9rem; color: var(--white);
  line-height: 1.4;
}
.sf-item svg { flex-shrink: 0; margin-top: 0.15rem; }

/* Meta card (sidebar spec card) */
.service-meta-card {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: sticky;
  top: 5rem;
}
.smc-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--dark-border);
}
.smc-row:last-child { border-bottom: none; }
.smc-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--gray-text); font-family: var(--font-brand); }
.smc-value { font-size: 0.85rem; color: var(--white); text-align: right; }

/* Compliance strip */
.compliance-strip { padding: 5rem 0; border-top: 1px solid var(--dark-border); }
.compliance-inner { text-align: center; }
.compliance-inner h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 0.75rem; }
.compliance-desc { color: var(--gray-text); font-size: 1rem; max-width: 520px; margin: 0 auto 2.5rem; }

.compliance-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.compliance-badge {
  background: var(--dark-card);
  border: 1px solid var(--dark-border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  text-align: center;
  transition: all var(--transition);
}
.compliance-badge:hover { border-color: rgba(205, 252, 84, 0.2); }
.cb-name { display: block; font-family: var(--font-brand); font-size: 1.1rem; color: var(--lime); margin-bottom: 0.35rem; }
.cb-desc { display: block; font-size: 0.78rem; color: var(--gray-text); line-height: 1.4; }

/* Platform responsive */
@media (max-width: 968px) {
  .service-block,
  .service-block--reversed {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .service-block--reversed .service-content { order: 1; }
  .service-block--reversed .service-meta-card { order: 2; }
  .service-meta-card { position: static; }
  .platform-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .platform-stats { grid-template-columns: 1fr; }
  .compliance-badges { grid-template-columns: 1fr 1fr; }
}
