/* ============================================
   ARK — Dark Tech Aesthetic
   ============================================ */

:root {
  /* Colors */
  --bg-base: #050507;
  --bg-elevated: #0a0a0f;
  --bg-card: #0d0d14;
  --bg-card-hover: #12121c;
  --border: rgba(255, 255, 255, 0.06);
  --border-bright: rgba(255, 255, 255, 0.12);
  --text-primary: #f0f0f5;
  --text-secondary: #9999a8;
  --text-muted: #5a5a6a;
  --accent: #d4a933;
  --accent-bright: #f0c040;
  --accent-glow: rgba(212, 169, 51, 0.4);
  --cyan: #00e5d0;
  --cyan-glow: rgba(0, 229, 208, 0.2);
  --danger: #ff4444;

  /* Typography */
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Noto Sans SC', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Sizing */
  --nav-h: 64px;
  --max-w: 1200px;
  --radius: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Particle Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ==============================
   Navigation
   ============================== */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--nav-h);
  z-index: 1000;
  background: rgba(5, 5, 7, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
#navbar.scrolled {
  border-bottom-color: var(--border);
}
.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}
.nav-logo {
  text-decoration: none;
}
.logo-mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: 4px;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-link:hover {
  color: var(--text-primary);
}
.nav-link:hover::after {
  width: 100%;
}
.nav-cta {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 18px;
  border: 1px solid var(--accent);
  border-radius: 100px;
  transition: all 0.3s ease;
}
.nav-cta:hover {
  background: var(--accent);
  color: var(--bg-base);
  box-shadow: 0 0 20px var(--accent-glow);
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ==============================
   Buttons
   ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg-base);
  box-shadow: 0 0 30px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-bright);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: translateY(-2px);
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-full {
  width: 100%;
  justify-content: center;
}

/* ==============================
   Hero
   ============================== */
#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px 40px;
  overflow: hidden;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(212, 169, 51, 0.08) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(0, 229, 208, 0.05) 0%, transparent 40%);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(212, 169, 51, 0.08);
  border: 1px solid rgba(212, 169, 51, 0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 32px;
  letter-spacing: 1px;
}
.pulse-dot {
  width: 8px;
  height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--cyan-glow); }
  50% { opacity: 0.5; box-shadow: 0 0 0 6px transparent; }
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 24px;
}
.title-line {
  display: block;
}
.title-line.accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-bright) 50%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 40px;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 60px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
  flex-wrap: wrap;
}
.stat-item {
  text-align: center;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.scroll-indicator {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--border-bright);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-indicator span {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDown 1.5s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { opacity: 0; transform: translateY(0); }
  50% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ==============================
   Sections
   ============================== */
.section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}
.section-alt {
  background: var(--bg-elevated);
}
.container {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-header {
  margin-bottom: 60px;
}
.section-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
}
.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
}
.text-accent {
  color: var(--accent);
}

/* ==============================
   About
   ============================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text .lead {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.5;
}
.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.8;
}
.about-quote {
  margin-top: 32px;
  padding: 20px 24px;
  border-left: 3px solid var(--accent);
  background: rgba(212, 169, 51, 0.04);
  border-radius: 0 8px 8px 0;
}
.about-quote p {
  font-style: italic;
  color: var(--text-primary);
  margin: 0;
}
.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.visual-card {
  position: relative;
  width: 360px;
  height: 360px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.visual-ring {
  position: absolute;
  border: 1px solid var(--border-bright);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: rotate 30s linear infinite;
}
.visual-ring.outer { width: 340px; height: 340px; border-color: rgba(212, 169, 51, 0.15); }
.visual-ring.middle { width: 240px; height: 240px; border-color: rgba(212, 169, 51, 0.25); animation-duration: 20s; animation-direction: reverse; }
.visual-ring.inner { width: 160px; height: 160px; border-color: rgba(0, 229, 208, 0.2); animation-duration: 15s; }
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.visual-core {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 60px var(--accent-glow);
  animation: corePulse 3s ease-in-out infinite;
}
.visual-core span {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--bg-base);
  letter-spacing: 2px;
}
@keyframes corePulse {
  0%, 100% { box-shadow: 0 0 60px var(--accent-glow); }
  50% { box-shadow: 0 0 80px rgba(212, 169, 51, 0.6); }
}
.visual-orbit-labels {
  position: absolute;
  inset: 0;
  animation: rotate 30s linear infinite reverse;
}
.orbit-label {
  position: absolute;
  top: 50%;
  left: 50%;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  transform: rotate(var(--angle)) translateY(-170px) rotate(calc(var(--angle) * -1));
  padding: 4px 8px;
  background: var(--bg-base);
  border: 1px solid var(--border-bright);
  border-radius: 4px;
}

/* ==============================
   Modules
   ============================== */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.module-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}
.module-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(212, 169, 51, 0.2);
  transform: translateY(-4px);
}
.module-card:hover::before {
  transform: translateX(0);
}
.module-icon {
  color: var(--accent);
  margin-bottom: 20px;
  opacity: 0.8;
}
.module-code {
  position: absolute;
  top: 24px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 2px;
}
.module-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.module-fullname {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 16px;
}
.module-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==============================
   Governance
   ============================== */
.governance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.gov-feature {
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}
.gov-feature:hover {
  border-color: rgba(0, 229, 208, 0.2);
  transform: translateY(-4px);
}
.gov-number {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.gov-feature h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.gov-feature p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==============================
   Citizen
   ============================== */
.citizen-content {
  max-width: 900px;
  margin: 0 auto;
}
.citizen-intro {
  text-align: center;
  margin-bottom: 48px;
}
.citizen-intro .lead {
  font-size: 1.2rem;
  color: var(--text-primary);
  line-height: 1.6;
}
.citizen-roles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.role-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s ease;
}
.role-card:hover {
  border-color: rgba(212, 169, 51, 0.2);
  background: var(--bg-card-hover);
}
.role-icon {
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.8;
}
.role-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.role-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}
.citizen-cta {
  text-align: center;
  padding: 40px;
  background: linear-gradient(135deg, rgba(212, 169, 51, 0.06), rgba(0, 229, 208, 0.04));
  border: 1px solid rgba(212, 169, 51, 0.15);
  border-radius: var(--radius-lg);
}
.citizen-quote {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ==============================
   Token
   ============================== */
.token-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
}
.token-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.token-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.token-row:last-child {
  border-bottom: none;
}
.token-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.token-value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}
.token-contract {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
}
.contract-row {
  position: relative;
  flex-wrap: wrap;
  gap: 8px;
}
.copy-btn {
  background: none;
  border: 1px solid var(--border-bright);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.copy-btn.copied {
  border-color: var(--cyan);
  color: var(--cyan);
}
.token-action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.token-visual {
  margin-bottom: 24px;
}
.token-orb {
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, var(--accent), var(--accent-bright));
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 40px var(--accent-glow);
  animation: corePulse 3s ease-in-out infinite;
}
.token-orb span {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.4rem;
  color: var(--bg-base);
  letter-spacing: 2px;
}
.token-action-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.token-action-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}
.token-action-card .btn {
  margin-bottom: 12px;
}

/* ==============================
   Footer
   ============================== */
#footer {
  position: relative;
  z-index: 1;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 60px 24px 32px;
}
.footer-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .logo-mark {
  display: inline-block;
  margin-bottom: 16px;
}
.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 300px;
}
.footer-links h4 {
  font-size: 0.8rem;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.footer-links a {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color 0.2s ease;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.disclaimer {
  max-width: 400px;
  text-align: right;
}

/* ==============================
   Toast
   ============================== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--cyan);
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 0.85rem;
  color: var(--cyan);
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==============================
   Reveal Animation
   ============================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================
   Responsive
   ============================== */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--nav-h));
    background: var(--bg-base);
    flex-direction: column;
    padding: 40px 24px;
    gap: 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .token-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .disclaimer {
    text-align: center;
  }
  .hero-stats {
    gap: 24px;
  }
  .visual-card {
    width: 280px;
    height: 280px;
  }
  .visual-ring.outer { width: 260px; height: 260px; }
  .visual-ring.middle { width: 180px; height: 180px; }
  .visual-ring.inner { width: 120px; height: 120px; }
}

@media (max-width: 480px) {
  .section {
    padding: 60px 16px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
  .btn {
    width: 100%;
    justify-content: center;
  }
}
