/* ============================================================
   CAP-K Home Page Styles
   Clean Alliance Party of Kenya - Landing Page
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: #0a0f1e;
  color: #e2e8f0;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Design Tokens ── */
:root {
  --green:      #1a7a4a;
  --green-dk:   #145e38;
  --green-lt:   rgba(26,122,74,0.15);
  --green-glow: rgba(26,122,74,0.4);
  --gold:       #c9a227;
  --gold-lt:    rgba(201,162,39,0.15);
  --surface:    rgba(255,255,255,0.04);
  --border:     rgba(255,255,255,0.08);
  --text-dim:   rgba(255,255,255,0.55);
}

/* ── App Shell ── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(10,15,30,0.8);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.top-bar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
}

.top-bar-brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.top-bar-brand-name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.top-bar-badge {
  font-size: 0.625rem;
  font-weight: 600;
  background: var(--green-lt);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,0.2);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 0.4375rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.btn-ghost:hover {
  background: var(--surface);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}

.btn-accent {
  background: var(--green);
  border: 1px solid var(--green);
  color: #fff;
  border-radius: 8px;
  padding: 0.4375rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.btn-accent:hover {
  background: var(--green-dk);
  color: #fff;
  box-shadow: 0 0 20px var(--green-glow);
}

/* ── Main Content ── */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  position: relative;
}

/* Background grid */
.app-main::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,122,74,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,122,74,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Glow orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(26,122,74,0.18) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201,162,39,0.1) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
}

/* ── Hero ── */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 680px;
  margin: 0 auto 3rem;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green-lt);
  border: 1px solid rgba(74,222,128,0.2);
  color: #4ade80;
  border-radius: 100px;
  padding: 0.3125rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero-eyebrow-dot {
  width: 6px;
  height: 6px;
  background: #4ade80;
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.8); }
}

.hero-title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 1.25rem;
}

.hero-title .line-green {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.0625rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Action Cards ── */
.action-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 3rem;
}

.action-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}

.action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.action-card:hover {
  border-color: rgba(255,255,255,0.15);
  transform: translateY(-2px);
  color: inherit;
}

.action-card:hover::before { opacity: 1; }

.action-card.primary {
  background: linear-gradient(135deg, rgba(26,122,74,0.2) 0%, rgba(20,94,56,0.15) 100%);
  border-color: rgba(74,222,128,0.2);
}

.action-card.primary:hover {
  border-color: rgba(74,222,128,0.4);
  box-shadow: 0 0 40px rgba(26,122,74,0.2);
}

.action-card.secondary {
  background: linear-gradient(135deg, rgba(201,162,39,0.12) 0%, rgba(201,162,39,0.06) 100%);
  border-color: rgba(201,162,39,0.2);
}

.action-card.secondary:hover {
  border-color: rgba(201,162,39,0.4);
  box-shadow: 0 0 40px rgba(201,162,39,0.15);
}

.action-card.tertiary {
  background: linear-gradient(135deg, rgba(99,102,241,0.12) 0%, rgba(99,102,241,0.06) 100%);
  border-color: rgba(99,102,241,0.2);
}

.action-card.tertiary:hover {
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 0 40px rgba(99,102,241,0.15);
}

.card-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.action-card.primary   .card-icon-wrap { background: rgba(74,222,128,0.15); color: #4ade80; }
.action-card.secondary .card-icon-wrap { background: rgba(201,162,39,0.15); color: var(--gold); }
.action-card.tertiary  .card-icon-wrap { background: rgba(99,102,241,0.15); color: #818cf8; }

.card-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.action-card.primary   .card-label { color: #4ade80; }
.action-card.secondary .card-label { color: var(--gold); }
.action-card.tertiary  .card-label { color: #818cf8; }

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.375rem;
}

.card-desc {
  font-size: 0.8125rem;
  color: var(--text-dim);
  line-height: 1.6;
}

.card-arrow {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  transition: gap 0.15s ease;
}

.action-card.primary   .card-arrow { color: #4ade80; }
.action-card.secondary .card-arrow { color: var(--gold); }
.action-card.tertiary  .card-arrow { color: #818cf8; }

.action-card:hover .card-arrow { gap: 0.625rem; }

/* ── Stats Strip ── */
.stats-strip {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem 2.25rem;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 2.5rem;
}

.stat-item {
  flex: 1;
  text-align: center;
  padding: 0 1.5rem;
}

.stat-item + .stat-item {
  border-left: 1px solid var(--border);
}

.stat-num {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-num.green { color: #4ade80; }
.stat-num.gold  { color: var(--gold); }

.stat-lbl {
  font-size: 0.6875rem;
  color: var(--text-dim);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

/* ── Module Pills ── */
.modules-row {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  max-width: 1120px;
  margin: 0 auto 2rem;
}

.module-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.3125rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: all 0.15s ease;
}

.module-pill:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.15);
  color: #fff;
}

.module-pill i {
  font-size: 0.6875rem;
  opacity: 0.7;
}

/* ── Public legal / help links (below module pills) ── */
.home-legal-links {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  max-width: 1120px;
  margin: 0 auto 2.25rem;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-legal-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  padding: 0.25rem 0.35rem;
  border-radius: 0.5rem;
  transition: color 0.15s ease, background 0.15s ease;
}

.home-legal-links a:hover {
  color: var(--gold);
  background: rgba(255, 255, 255, 0.06);
}

.home-legal-links a i {
  font-size: 0.75rem;
  opacity: 0.85;
}

.home-legal-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 0.75rem;
  user-select: none;
}

@media (max-width: 575.98px) {
  .home-legal-sep { display: none; }
  .home-legal-links {
    flex-direction: column;
    gap: 0.15rem;
  }
}

/* ── Footer ── */
.app-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

.app-footer a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.15s;
}

.app-footer a:hover { color: rgba(255,255,255,0.6); }

/* ── Responsive ── */
@media (max-width: 575.98px) {
  .top-bar { padding: 0.875rem 1rem; }
  .top-bar-badge { display: none; }
  .action-grid { grid-template-columns: 1fr; }
  .stats-strip { flex-direction: column; gap: 1rem; padding: 1.25rem; }
  .stat-item + .stat-item { border-left: none; border-top: 1px solid var(--border); padding-top: 1rem; }
  .hero-title { font-size: 2rem; }
}

@media (min-width: 768px) {
  .action-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
  .app-main { padding: 3.25rem 2.5rem; }
  .action-card { padding: 2rem; }
  .action-grid { gap: 1.5rem; }
}
