/* ═══════════════════════════════════════════════════════════
   Megicula Stake — GitHub Pages Landing
   Dark theme · Purple primary · Blue accent
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --bg:          #0f0f1a;
  --bg-card:     #1a1a2e;
  --bg-elevated: #16213e;
  --fg:          #f0f0ff;
  --fg-muted:    #9898b0;
  --border:      rgba(255,255,255,0.06);
  --primary:     #a855f7;
  --primary-dim: rgba(168,85,247,0.15);
  --accent:      #3b82f6;
  --accent-dim:  rgba(59,130,246,0.15);
  --green:       #22c55e;
  --yellow:      #eab308;
  --red:         #ef4444;
  --radius:      0.75rem;
  --radius-lg:   1rem;
  --radius-xl:   1.5rem;
  --shadow-glow: 0 0 30px rgba(168,85,247,0.15);
  --transition:  0.25s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
code { font-family: "JetBrains Mono", "Fira Code", monospace; font-size: 0.85em; background: rgba(168,85,247,0.1); padding: 0.15em 0.4em; border-radius: 4px; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Typography ─────────────────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section { padding: 6rem 0; }
.section-alt { background: rgba(26,26,46,0.5); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-title { font-size: 2.25rem; font-weight: 800; margin-bottom: 0.75rem; }
.section-desc { color: var(--fg-muted); max-width: 540px; margin: 0 auto; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-sm  { height: 2.25rem; padding: 0 1rem; font-size: 0.8rem; }
.btn-lg  { height: 3rem; padding: 0 2rem; font-size: 0.95rem; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  box-shadow: 0 4px 20px rgba(168,85,247,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 30px rgba(168,85,247,0.45); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--fg);
}
.btn-outline:hover { border-color: rgba(168,85,247,0.4); background: rgba(255,255,255,0.04); }
.btn-ghost {
  background: transparent;
  color: var(--fg-muted);
}
.btn-ghost:hover { color: var(--fg); background: rgba(255,255,255,0.05); }

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15,15,26,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.15rem;
}
.logo-icon { font-size: 1.25rem; }
.logo-text { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
  padding: 0.4rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-links a:hover { color: var(--fg); background: rgba(255,255,255,0.05); }
.nav-actions { display: flex; gap: 0.5rem; align-items: center; }

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: all var(--transition);
}

@media (max-width: 768px) {
  .nav-links, .nav-actions { display: none; }
  .mobile-toggle { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0.25rem;
  }
  .nav-actions.open {
    display: flex;
    position: absolute;
    top: calc(4rem + 200px);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    justify-content: center;
  }
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 8rem 0 6rem;
}
.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(168,85,247,0.12), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(168,85,247,0.25);
  background: rgba(168,85,247,0.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: var(--fg-muted);
  max-width: 580px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Overview ───────────────────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition);
}
.overview-card:hover {
  border-color: rgba(168,85,247,0.2);
  box-shadow: var(--shadow-glow);
}
.overview-icon { font-size: 2rem; margin-bottom: 1rem; }
.overview-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.overview-card p { font-size: 0.9rem; color: var(--fg-muted); }

/* ── Features ───────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all var(--transition);
}
.feature-card:hover {
  border-color: rgba(168,85,247,0.25);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.feature-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.875rem; color: var(--fg-muted); line-height: 1.65; }

/* ── Steps ──────────────────────────────────────────────────── */
.steps-grid {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.step-card {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem 1.25rem;
  position: relative;
  transition: all var(--transition);
}
.step-card:hover {
  border-color: rgba(168,85,247,0.25);
  box-shadow: var(--shadow-glow);
}
.step-number {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.step-icon { font-size: 2rem; margin: 0.75rem 0; }
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.4rem; }
.step-card p { font-size: 0.8rem; color: var(--fg-muted); }
.step-arrow {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  color: var(--primary);
  padding-top: 2.5rem;
  opacity: 0.4;
}

@media (max-width: 768px) {
  .step-arrow { display: none; }
  .steps-grid { flex-direction: column; align-items: center; }
  .step-card { max-width: 100%; width: 100%; }
}

/* ── Stats ──────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.stat-card {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 1.5rem;
  transition: all var(--transition);
}
.stat-card:hover {
  border-color: rgba(168,85,247,0.25);
  box-shadow: var(--shadow-glow);
}
.stat-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.85rem; color: var(--fg-muted); }

/* ── Contracts ──────────────────────────────────────────────── */
.contracts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.contract-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  transition: all var(--transition);
}
.contract-card:hover {
  border-color: rgba(168,85,247,0.25);
  box-shadow: var(--shadow-glow);
}
.contract-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.contract-badge {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--primary-dim);
  color: var(--primary);
}
.contract-badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
}
.contract-header h3 { font-size: 1rem; font-weight: 700; }
.contract-address {
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
  word-break: break-all;
}
.contract-address code { background: none; padding: 0; }
.contract-links { display: flex; gap: 0.75rem; }
.contract-address-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}
.contract-addr-text {
  flex: 1;
  font-size: 0.8rem;
  word-break: break-all;
  background: none;
  padding: 0;
  color: var(--primary);
}
.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(168,85,247,0.25);
  border-radius: var(--radius);
  background: rgba(168,85,247,0.08);
  color: var(--primary);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-copy:hover {
  background: rgba(168,85,247,0.2);
  border-color: var(--primary);
}

/* ── Deployment Status ────────────────────────────────────── */
.deployment-status {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.deployment-status h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }
.status-list {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.status-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg-muted);
}
.status-live { color: var(--green); }
.status-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(34,197,94,0.15);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
}

.network-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
}
.network-info h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.network-table { width: 100%; border-collapse: collapse; }
.network-table td {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}
.network-table td:first-child { color: var(--fg-muted); width: 40%; }
.network-table a { color: var(--primary); text-decoration: underline; }

/* ── Screenshots ────────────────────────────────────────────── */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.screenshot-placeholder {
  aspect-ratio: 16/10;
  background: var(--bg-card);
  border: 1px dashed rgba(168,85,247,0.3);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}
.placeholder-inner {
  text-align: center;
  color: var(--fg-muted);
}
.placeholder-inner span { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.placeholder-inner p { font-size: 0.85rem; }

/* ── Team ───────────────────────────────────────────────────── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  justify-items: center;
}
.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  text-align: center;
  max-width: 400px;
  transition: all var(--transition);
}
.team-card:hover {
  border-color: rgba(168,85,247,0.25);
  box-shadow: var(--shadow-glow);
}
.team-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 1rem;
}
.team-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.25rem; }
.team-role { font-size: 0.85rem; color: var(--primary); font-weight: 600; margin-bottom: 0.75rem; }
.team-bio { font-size: 0.85rem; color: var(--fg-muted); margin-bottom: 1rem; line-height: 1.6; }
.team-links { display: flex; gap: 1rem; justify-content: center; }
.team-links a {
  font-size: 0.8rem;
  color: var(--fg-muted);
  transition: color var(--transition);
}
.team-links a:hover { color: var(--primary); }

/* ── Roadmap ────────────────────────────────────────────────── */
.roadmap-timeline {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding-left: 2.5rem;
}
.roadmap-timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--accent), rgba(168,85,247,0.1));
}
.roadmap-item {
  position: relative;
  margin-bottom: 2.5rem;
}
.roadmap-item:last-child { margin-bottom: 0; }
.roadmap-marker {
  position: absolute;
  left: -2.5rem;
  top: 0.25rem;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(168,85,247,0.3);
  background: var(--bg);
  transition: all var(--transition);
}
.roadmap-item.completed .roadmap-marker {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 12px rgba(168,85,247,0.5);
}
.roadmap-phase {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.roadmap-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0.25rem 0 0.75rem;
}
.roadmap-content ul {
  list-style: disc;
  padding-left: 1.25rem;
}
.roadmap-content li {
  font-size: 0.85rem;
  color: var(--fg-muted);
  margin-bottom: 0.35rem;
  list-style: disc;
}
.roadmap-item.completed .roadmap-content { opacity: 0.8; }

/* ── FAQ ────────────────────────────────────────────────────── */
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.faq-item:hover { border-color: rgba(168,85,247,0.15); }
.faq-item summary {
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--primary);
  transition: transform var(--transition);
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item p {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--fg-muted);
  line-height: 1.7;
}

/* ── Contact ────────────────────────────────────────────────── */
.contact-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 2rem;
  font-weight: 600;
  transition: all var(--transition);
}
.contact-card:hover {
  border-color: rgba(168,85,247,0.3);
  box-shadow: var(--shadow-glow);
  color: var(--primary);
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  background: rgba(26,26,46,0.5);
  padding: 3rem 0;
}
.footer-inner { text-align: center; }
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.footer-tagline { color: var(--fg-muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.footer-links a {
  font-size: 0.85rem;
  color: var(--fg-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--primary); }
.footer-copy { font-size: 0.75rem; color: rgba(152,152,176,0.5); }

/* ── Animations ─────────────────────────────────────────────── */
.animate-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 5rem 0 4rem; }
  .hero-title { font-size: 2.25rem; }
  .section { padding: 4rem 0; }
  .section-title { font-size: 1.75rem; }
  .stats-grid { grid-template-columns: 1fr; }
  .contracts-grid { grid-template-columns: 1fr; }
  .status-list { flex-direction: column; align-items: center; gap: 0.75rem; }
  .submission-value-row { flex-direction: column; align-items: flex-start; }
  .submission-info-grid { grid-template-columns: 1fr; }
}

/* ── Submission Info ──────────────────────────────────────── */
.submission-grid {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.submission-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  transition: all var(--transition);
}
.submission-card:hover {
  border-color: rgba(168,85,247,0.25);
  box-shadow: var(--shadow-glow);
}
.submission-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.submission-value-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.submission-addr {
  flex: 1;
  font-size: 0.85rem;
  word-break: break-all;
  background: rgba(168,85,247,0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}
.submission-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
}
.submission-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.submission-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.submission-info-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
}
.submission-link {
  color: var(--primary) !important;
  text-decoration: underline;
}
