/* =========================================================
   NoorDeFi — Design System v2
   Palette: deep indigo-navy base, mint accent (verified/real),
   periwinkle secondary. No black+gold — deliberately distinct
   from typical crypto-MLM visual language.
   Type: Sora (display) / Inter (body) / Spline Sans Mono (data)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=Spline+Sans+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #0E1016;
  --surface: #161923;
  --surface-2: #1D202C;
  --border: #272B38;
  --border-soft: #1E212C;

  --mint: #00D9A3;
  --mint-dim: #0A9E77;
  --periwinkle: #8B85F5;
  --amber: #F5B85B;
  --coral: #F0705B;

  --text: #F5F6F8;
  --text-dim: #9C9FAD;
  --text-faint: #5E6272;

  --font-display: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'Spline Sans Mono', monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------- Navigation ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 16, 22, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
}

.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }

.nav-links { display: flex; gap: 30px; align-items: center; }

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a:focus-visible { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.btn:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

.btn-primary { background: var(--mint); color: #06110D; }
.btn-primary:hover { opacity: 0.88; }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-dim); }

/* ---------- Hero ---------- */

.hero { padding: 88px 0 40px; position: relative; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--mint);
  background: rgba(0, 217, 163, 0.08);
  border: 1px solid rgba(0, 217, 163, 0.25);
  border-radius: 100px;
  padding: 6px 14px;
  margin-bottom: 24px;
}

.dot-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(0, 217, 163, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 6px rgba(0, 217, 163, 0); }
}

.hero h1 {
  font-size: clamp(36px, 4.6vw, 54px);
  line-height: 1.08;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--mint); }

.hero p.lead {
  color: var(--text-dim);
  font-size: 17px;
  max-width: 460px;
  margin: 0 0 32px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Flow diagram (signature element) ---------- */

.flow-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.flow-card-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.flow-diagram { display: flex; flex-direction: column; gap: 0; }

.flow-sources {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.flow-source {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
}

.flow-source .amount { font-family: var(--font-mono); color: var(--mint); font-size: 13px; }

.flow-arrow-down {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.flow-arrow-down svg { animation: flowPulse 2.4s ease-in-out infinite; }

@keyframes flowPulse {
  0%, 100% { opacity: 0.4; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(3px); }
}

.flow-treasury {
  background: rgba(0, 217, 163, 0.06);
  border: 1px solid rgba(0, 217, 163, 0.3);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  margin-bottom: 4px;
}

.flow-treasury-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.flow-treasury-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 600;
}

.flow-outputs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.flow-output {
  background: var(--surface-2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.flow-output .label { font-size: 11.5px; color: var(--text-dim); margin-bottom: 4px; }
.flow-output .pct { font-family: var(--font-mono); font-size: 15px; color: var(--periwinkle); font-weight: 600; }

/* ---------- Sections ---------- */

.section { padding: 80px 0; border-top: 1px solid var(--border-soft); }

.section-head { max-width: 600px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--periwinkle);
  margin-bottom: 12px;
}

.section-head h2 { font-size: clamp(26px, 3.4vw, 34px); margin-bottom: 12px; }
.section-head p { color: var(--text-dim); font-size: 15.5px; }

/* ---------- Step list (how it works — real sequence, so numbering is earned) ---------- */

.steps { display: flex; flex-direction: column; }

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--border-soft);
}
.step:first-child { border-top: none; }

.step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-faint);
  padding-top: 4px;
}

.step-body h3 { font-size: 18px; margin-bottom: 8px; }
.step-body p { color: var(--text-dim); font-size: 14.5px; margin: 0; max-width: 520px; }

/* ---------- Stat blocks (transparency) ---------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  overflow: hidden;
}

@media (max-width: 800px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-block { background: var(--surface); padding: 26px; }

.stat-block .label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 10px;
}

.stat-block .value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; }
.stat-block .value.mint { color: var(--mint); }

/* ---------- Data table ---------- */

.data-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table.clean-table { width: 100%; border-collapse: collapse; }

.clean-table th, .clean-table td {
  padding: 15px 20px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border-soft);
}

.clean-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  background: var(--surface-2);
  font-weight: 500;
}

.clean-table tr:last-child td { border-bottom: none; }
.clean-table td.no { color: var(--coral); }
.clean-table td.yes { color: var(--mint); }

/* ---------- Footer ---------- */

footer { border-top: 1px solid var(--border-soft); padding: 44px 0; }

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 28px;
}

.footer-links { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-links a { font-size: 13.5px; color: var(--text-dim); }
.footer-links a:hover { color: var(--text); }

.footer-note {
  color: var(--text-faint);
  font-size: 12.5px;
  margin-top: 22px;
  max-width: 640px;
}

/* =========================================================
   Dashboard-specific
   ========================================================= */

.hidden-panel { display: none !important; }

.dash-wrap { display: grid; grid-template-columns: 232px 1fr; min-height: calc(100vh - 68px); }

@media (max-width: 900px) {
  .dash-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

.sidebar { border-right: 1px solid var(--border-soft); padding: 26px 16px; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; }

.sidebar a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text-dim); font-weight: 500;
}
.sidebar a.active, .sidebar a:hover { background: var(--surface); color: var(--text); }

.dash-main { padding: 30px 30px 80px; }

.dash-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 28px; flex-wrap: wrap; gap: 14px;
}

.wallet-pill {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 100px; padding: 8px 16px;
  font-family: var(--font-mono); font-size: 12.5px;
}

.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.status-dot.connected { background: var(--mint); }

.stat-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--border-soft); border: 1px solid var(--border-soft);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 32px;
}

@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }

.stat-card { background: var(--surface); padding: 20px; }

.stat-label {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-faint); margin-bottom: 10px;
}

.stat-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; }
.stat-value.mint { color: var(--mint); }
.stat-value.peri { color: var(--periwinkle); }

.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; margin-bottom: 22px;
}

.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.panel-head h3 { font-size: 16px; }

.tier-tabs { display: flex; gap: 8px; margin-bottom: 18px; }

.tier-tab {
  flex: 1; padding: 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface-2);
  text-align: center; cursor: pointer; transition: border-color 0.15s ease;
}
.tier-tab.active { border-color: var(--mint); background: rgba(0, 217, 163, 0.06); }
.tier-tab .tier-name { font-weight: 600; font-size: 13.5px; margin-bottom: 4px; }
.tier-tab .tier-mult { font-family: var(--font-mono); font-size: 11.5px; color: var(--mint); }

.input-row { display: flex; gap: 10px; margin-bottom: 16px; }

.input-field {
  flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 13px 15px; color: var(--text);
  font-family: var(--font-mono); font-size: 14.5px;
}
.input-field:focus { outline: none; border-color: var(--mint); }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 11px 8px; text-align: left; font-size: 13px; border-bottom: 1px solid var(--border-soft); }
.data-table th { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; color: var(--text-faint); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 100px; font-size: 11.5px; font-family: var(--font-mono); }
.badge.locked { background: rgba(139, 133, 245, 0.12); color: var(--periwinkle); }
.badge.flexible { background: rgba(0, 217, 163, 0.12); color: var(--mint); }

.empty-state { text-align: center; padding: 36px 20px; color: var(--text-faint); font-size: 13.5px; }

.rank-track { display: flex; justify-content: space-between; position: relative; margin: 30px 0 8px; }
.rank-track::before {
  content: ''; position: absolute; top: 16px; left: 18px; right: 18px;
  height: 2px; background: var(--border);
}

.rank-step { position: relative; text-align: center; flex: 1; }
.rank-dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2);
  border: 2px solid var(--border); margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 12.5px; position: relative; z-index: 1;
}
.rank-step.achieved .rank-dot { border-color: var(--mint); background: var(--mint); color: #06110D; }
.rank-step-label { font-size: 12px; color: var(--text-dim); max-width: 96px; margin: 0 auto; }

.notice {
  display: flex; gap: 10px; background: rgba(245, 184, 91, 0.08);
  border: 1px solid rgba(245, 184, 91, 0.28); border-radius: var(--radius-sm);
  padding: 13px 16px; font-size: 13px; color: var(--text-dim); margin-bottom: 22px;
}

.locked-screen {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 120px 20px; text-align: center;
}
.locked-screen p { color: var(--text-dim); max-width: 340px; margin: 10px 0 22px; font-size: 14.5px; }
