/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0f1117;
  --bg-2:        #161b27;
  --bg-3:        #1e2436;
  --surface:     rgba(255,255,255,0.04);
  --border:      rgba(255,255,255,0.08);
  --accent:      #4f7bef;
  --accent-glow: rgba(79,123,239,0.35);
  --accent-dim:  rgba(79,123,239,0.15);
  --text:        #e2e8f0;
  --text-muted:  #8b95a8;
  --text-faint:  #4a5568;
  --radius:      10px;
  --nav-h:       64px;
  --transition:  0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: #7fa3f7; }

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

/* ─── Nav ───────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(15,17,23,0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 2rem;
  gap: 1.5rem;
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  flex: 1;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}
.nav-links a.active { color: var(--accent); }

.nav-links .nav-external::after {
  content: '↗';
  font-size: 0.7em;
  margin-left: 3px;
  opacity: 0.6;
}

.nav-discord {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--accent);
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  transition: box-shadow var(--transition), background var(--transition);
}
.nav-discord:hover {
  background: #6690f5;
  box-shadow: 0 0 18px var(--accent-glow);
  color: #fff !important;
}
.nav-discord svg { flex-shrink: 0; }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 4rem 2rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('../img/hero.png');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.72;
  mask-image:
    radial-gradient(ellipse 55% 55% at 18% 100%, transparent 0%, black 55%),
    linear-gradient(to bottom, black 50%, rgba(0,0,0,0.85) 80%, rgba(0,0,0,0.5) 100%);
  -webkit-mask-image:
    radial-gradient(ellipse 55% 55% at 18% 100%, transparent 0%, black 55%),
    linear-gradient(to bottom, black 50%, rgba(0,0,0,0.85) 80%, rgba(0,0,0,0.5) 100%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  z-index: 0;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(79,123,239,0.10) 0%, transparent 70%),
    linear-gradient(180deg, rgba(15,17,23,0.35) 0%, rgba(15,17,23,0.6) 60%, #0f1117 100%);
  z-index: 1;
}

/* subtle grid */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 80%);
  z-index: 1;
  opacity: 0.25;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(79,123,239,0.3);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.hero-title span {
  background: linear-gradient(135deg, #7fa3f7 0%, #4f7bef 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  transition: box-shadow var(--transition), background var(--transition), color var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: #6690f5;
  box-shadow: 0 0 22px var(--accent-glow);
  color: #fff;
}
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.07);
  color: var(--text);
}

/* ─── Section Layout ────────────────────────────────────────────────────────── */
.section {
  padding: 5rem 2rem;
}
.section-alt { background: var(--bg-2); }

.container {
  max-width: 960px;
  margin: 0 auto;
}
.container-sm {
  max-width: 720px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

/* ─── Cards ─────────────────────────────────────────────────────────────────── */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.card:hover {
  border-color: rgba(79,123,239,0.4);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), 0 0 0 1px rgba(79,123,239,0.12);
  transform: translateY(-2px);
}

.card-icon {
  font-size: 1.6rem;
  margin-bottom: 0.25rem;
}
.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}
.card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.card-link:hover { color: #7fa3f7; }

a.card { color: inherit; }
a.card .card-title { transition: color var(--transition); }
a.card:hover .card-title { color: var(--accent); }

/* ─── Details Page ──────────────────────────────────────────────────────────── */
.page-hero {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.page-hero .section-label { margin-bottom: 0.75rem; }
.page-hero .section-title { margin-bottom: 0.5rem; }
.page-hero p { color: var(--text-muted); max-width: 520px; margin: 0 auto; }

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
@media (max-width: 640px) { .details-grid { grid-template-columns: 1fr; } }

.info-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.info-block h3 {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.info-block p, .info-block li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}
.info-block ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.info-block li::before { content: '—  '; color: var(--accent); }
.info-block .highlight {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.steps { list-style: none; padding: 0; counter-reset: steps; display: flex; flex-direction: column; gap: 1.1rem; }
.steps li {
  counter-increment: steps;
  padding-left: 3rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(79,123,239,0.35);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.steps li strong { color: var(--text); }
.steps li code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85em;
  color: var(--accent);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.full-width { grid-column: 1 / -1; }

/* ─── FAQ Page ──────────────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: 0.6rem; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.faq-item.open { border-color: rgba(79,123,239,0.35); }

.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }
.faq-item.open .faq-question { color: var(--accent); }

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: transform var(--transition), color var(--transition);
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-answer-inner {
  padding: 0 1.5rem 1.35rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.faq-answer-inner a { color: var(--accent); }
.faq-answer-inner a:hover { color: #7fa3f7; }
.faq-answer-inner code {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  font-size: 0.85em;
  color: var(--accent);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ─── Image Fade Utility ────────────────────────────────────────────────────── */
.fade-img {
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  opacity: 0.7;
}

/* ─── Divider ───────────────────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  line-height: 1.8;
}
footer a { color: var(--text-muted); }
footer a:hover { color: var(--text); }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; gap: 0.75rem; }
  .nav-links { gap: 0; }
  .nav-links a { padding: 0.4rem 0.5rem; font-size: 0.82rem; }
  .nav-brand { font-size: 0.95rem; }
  .section { padding: 3.5rem 1.25rem; }
  .page-hero { padding: 3rem 1.25rem 2.5rem; }
}

@media (max-width: 520px) {
  .nav { flex-wrap: wrap; height: auto; padding: 0.75rem 1rem; }
  .nav-links { order: 3; width: 100%; flex-wrap: wrap; }
  .nav-brand { flex: 1; }
  .hero-ctas { flex-direction: column; align-items: center; }
}
