/* =========================================================
   8-Diverge Website — Shared Stylesheet
   Theme: Dark, matching the mobile app palette
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --primary:       #667eea;
  --primary-dark:  #764ba2;
  --secondary:     #10b981;
  --accent:        #ff6b6b;
  --yellow:        #fbbf24;
  --yellow-dark:   #f59e0b;
  --bg:            #000000;
  --bg-1:          #0a0a0a;
  --bg-2:          #111111;
  --bg-card:       #1a1a1a;
  --bg-card-2:     #222222;
  --text:          #ffffff;
  --text-muted:    #a0a0a0;
  --text-dim:      #555555;
  --border:        rgba(255,255,255,0.08);
  --border-bright: rgba(255,255,255,0.15);
  --grad-brand:    linear-gradient(135deg, var(--primary), var(--primary-dark));
  --grad-yellow:   linear-gradient(135deg, var(--yellow), var(--yellow-dark));
  --grad-hero:     radial-gradient(ellipse 120% 80% at 50% -10%, rgba(102,126,234,0.25) 0%, transparent 60%);
  --shadow-card:   0 4px 24px rgba(0,0,0,0.6);
  --shadow-glow:   0 0 40px rgba(102,126,234,0.2);
  --radius:        14px;
  --radius-sm:     8px;
  --radius-pill:   999px;
  --nav-h:         64px;
  --max-w:         1140px;
  --transition:    0.2s ease;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}
ul { list-style: none; }

/* ── Utility ───────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Gradient text helper */
.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.grad-text-yellow {
  background: var(--grad-yellow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Typography ────────────────────────────────────────── */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.2rem; font-weight: 600; line-height: 1.3; }
h4 { font-size: 1rem; font-weight: 600; }
p  { color: var(--text-muted); font-size: 1rem; }

/* Section label (small caps above heading) */
.label {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn:hover  { transform: translateY(-2px); filter: brightness(1.1); }
.btn:active { transform: translateY(0);    filter: brightness(0.95); }

.btn-yellow {
  background: var(--grad-yellow);
  color: #000;
  box-shadow: 0 4px 20px rgba(251,191,36,0.35);
}
.btn-purple {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 4px 20px rgba(102,126,234,0.4);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover { color: var(--text); border-color: var(--primary); }

.btn-sm { padding: 9px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

/* ── Navigation ────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.nav-logo-icon {
  width: 32px; height: 32px;
  background: var(--grad-brand);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1rem; color: #fff;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background var(--transition), color var(--transition);
}
.nav-link:hover, .nav-link.active {
  background: rgba(255,255,255,0.07);
  color: var(--text);
}
.nav-link.active { color: var(--primary); }
.nav-cta { margin-left: 12px; }

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
  padding: calc(var(--nav-h) + 80px) 0 80px;
  background: var(--grad-hero), var(--bg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -200px; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(102,126,234,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(102,126,234,0.12);
  border: 1px solid rgba(102,126,234,0.25);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}
.hero-title { margin-bottom: 20px; }
.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ── Section ───────────────────────────────────────────── */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-1); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-header p { max-width: 560px; margin: 12px auto 0; }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover {
  border-color: var(--border-bright);
  box-shadow: var(--shadow-card);
  transform: translateY(-4px);
}
.card-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
  background: rgba(102,126,234,0.12);
}

/* ── Grid helpers ──────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Divider ───────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 0; }

/* ── Badge ─────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-green  { background: rgba(16,185,129,0.15); color: var(--secondary); }
.badge-yellow { background: rgba(251,191,36,0.15);  color: var(--yellow); }
.badge-purple { background: rgba(102,126,234,0.15); color: var(--primary); }
.badge-red    { background: rgba(255,107,107,0.15); color: var(--accent); }

/* ── Forms ─────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.88rem; font-weight: 500; color: var(--text); }
.form-control {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.15);
}
.form-control::placeholder { color: var(--text-dim); }
textarea.form-control { resize: vertical; min-height: 130px; }
select.form-control { cursor: pointer; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── Stars ─────────────────────────────────────────────── */
.stars { display: flex; gap: 6px; font-size: 1.6rem; }
.star { cursor: pointer; color: var(--text-dim); transition: color 0.15s; }
.star.active, .star:hover { color: var(--yellow); }

/* ── FAQ accordion (CSS-only) ──────────────────────────── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 8px;
}
.faq-item input[type="checkbox"] { display: none; }
.faq-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.95rem;
  background: var(--bg-card);
  transition: background var(--transition);
}
.faq-label:hover { background: var(--bg-card-2); }
.faq-label::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--primary);
  transition: transform 0.25s;
  flex-shrink: 0;
  margin-left: 12px;
}
.faq-item input:checked + .faq-label { background: var(--bg-card-2); }
.faq-item input:checked + .faq-label::after { transform: rotate(45deg); }
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  background: var(--bg-2);
}
.faq-item input:checked ~ .faq-body { max-height: 400px; }
.faq-body-inner { padding: 16px 20px 20px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }

/* ── Stat strip ────────────────────────────────────────── */
.stat-strip {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.stat-item {
  flex: 1;
  min-width: 160px;
  text-align: center;
  padding: 36px 24px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
.stat-value {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--grad-yellow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-top: 6px; }

/* ── Topic cards (support) ─────────────────────────────── */
.topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.topic-icon {
  font-size: 1.8rem;
  width: 52px; height: 52px;
  background: var(--bg-card-2);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}

/* ── Contact box ───────────────────────────────────────── */
.contact-box {
  background: linear-gradient(135deg, rgba(102,126,234,0.1), rgba(118,75,162,0.1));
  border: 1px solid rgba(102,126,234,0.2);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
}

/* ── Team card ─────────────────────────────────────────── */
.team-card { text-align: center; }
.team-avatar {
  width: 88px; height: 88px;
  border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
}
.team-name  { font-weight: 700; margin-bottom: 4px; font-size: 1rem; }
.team-role  { font-size: 0.85rem; color: var(--primary); margin-bottom: 8px; }
.team-bio   { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }

/* ── Value card ────────────────────────────────────────── */
.value-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.value-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}

/* ── Timeline ──────────────────────────────────────────── */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 8px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), transparent);
}
.timeline-item { position: relative; margin-bottom: 36px; }
.timeline-dot {
  position: absolute;
  left: -28px; top: 4px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--grad-brand);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(102,126,234,0.3);
}
.timeline-year { font-size: 0.78rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.timeline-title { font-weight: 600; margin-bottom: 4px; }
.timeline-desc { font-size: 0.88rem; color: var(--text-muted); }

/* ── Community channel cards ───────────────────────────── */
.channel-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), transform var(--transition);
  cursor: pointer;
}
.channel-card:hover { border-color: var(--primary); transform: translateX(4px); }
.channel-icon {
  width: 48px; height: 48px; flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.channel-info h4 { margin-bottom: 2px; }
.channel-info p  { font-size: 0.83rem; margin: 0; }

/* ── Rule list ─────────────────────────────────────────── */
.rule-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.rule-num {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad-brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

/* ── Newsletter strip ──────────────────────────────────── */
.newsletter-wrap {
  background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.08));
  border: 1px solid rgba(102,126,234,0.18);
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
}
.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 460px;
  margin: 24px auto 0;
}
.newsletter-form .form-control { border-radius: var(--radius-pill); }

/* ── Rating row (feedback) ─────────────────────────────── */
.rating-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 10px;
}
.rating-category:last-child { border-bottom: none; }
.rating-category-name { font-weight: 500; font-size: 0.92rem; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  background: var(--bg-1);
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 0.88rem; line-height: 1.7; margin: 12px 0 20px; max-width: 280px; }
.footer-col h5 { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { font-size: 0.88rem; color: var(--text-muted); transition: color var(--transition); }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; margin: 0; }
.footer-social { display: flex; gap: 10px; }
.social-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: border-color var(--transition), background var(--transition);
}
.social-btn:hover { border-color: var(--primary); background: rgba(102,126,234,0.1); }

/* ── Page-specific accent strips ───────────────────────── */
.page-stripe {
  height: 3px;
  background: var(--grad-brand);
}

/* ── Alert / info box ──────────────────────────────────── */
.info-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(16,185,129,0.07);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.info-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }

/* ── Animations ────────────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fade-up 0.6s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-item { min-width: 140px; }
}

@media (max-width: 720px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat-strip { flex-direction: column; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--border); }
  .stat-item:last-child { border-bottom: none; }
  .newsletter-form { flex-direction: column; }
  .hero-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  /* Mobile nav */
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(0,0,0,0.97);
    backdrop-filter: blur(20px);
    padding: 20px 24px 28px;
    border-bottom: 1px solid var(--border);
    gap: 4px;
    z-index: 99;
  }
  .nav-links.open .nav-cta { margin-left: 0; margin-top: 8px; width: 100%; }
  .nav-links.open .nav-cta .btn { width: 100%; }
  .nav-toggle { display: flex; }
}

@media (max-width: 480px) {
  :root { --max-w: 100%; }
  .section { padding: 56px 0; }
  .hero { padding: calc(var(--nav-h) + 56px) 0 56px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .card { padding: 20px; }
}
