:root {
  --bg: #07060c;
  --surface: rgba(22, 18, 34, 0.6);
  --surface-2: rgba(30, 24, 46, 0.45);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --text: #f5f5f7;
  --text-dim: #a4a0b2;
  --text-faint: #6a6680;
  --accent: #fc72ff;
  --accent-2: #a855f7;
  --accent-glow: rgba(252, 114, 255, 0.4);
  --bronze: #cd7f32;
  --silver: #c0c0c8;
  --gold: #f5c542;
  --maxw: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% -5%, rgba(168, 85, 247, 0.22) 0%, transparent 60%),
    radial-gradient(40% 40% at 90% 10%, rgba(252, 114, 255, 0.12) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
code, .mono { font-family: 'JetBrains Mono', monospace; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  background: rgba(7, 6, 12, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 0.6rem; }

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, #fc72ff 0%, #a855f7 100%);
  box-shadow: 0 0 18px var(--accent-glow);
}

.brand-name {
  font-family: 'Inter', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fc72ff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links { display: flex; gap: 1.5rem; margin-left: auto; }

.nav-link {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.18s ease;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover { color: var(--text); }

.nav-link.active { color: var(--text); }

.nav-link.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px var(--accent-glow);
}

.nav-actions { display: flex; gap: 0.6rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0.6rem 1.15rem;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-lg { font-size: 0.98rem; padding: 0.85rem 1.6rem; border-radius: 13px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #fc72ff 0%, #a855f7 100%);
  box-shadow: 0 0 0 rgba(0, 0, 0, 0);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.btn-ghost:hover { border-color: var(--border-hover); background: rgba(255, 255, 255, 0.07); transform: translateY(-1px); }

/* ---------- Layout ---------- */
main { position: relative; z-index: 1; }

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 5.5rem 1.5rem;
  border-top: 1px solid var(--border);
}

.section-head { max-width: 760px; margin-bottom: 2.5rem; }

.kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.section h2 {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}

.lead {
  margin-top: 1rem;
  font-size: 1.1rem;
  color: var(--text-dim);
}

.section-note {
  max-width: 820px;
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--text-dim);
  padding-left: 1rem;
  border-left: 2px solid var(--accent);
}

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6rem 1.5rem 5rem;
  position: relative;
  z-index: 1;
}

.hero-inner { max-width: 880px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 1.6rem;
}

.hero-title {
  font-family: 'Inter', sans-serif;
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.02;
}

.grad {
  background: linear-gradient(135deg, #fc72ff 0%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 28px rgba(252, 114, 255, 0.28));
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--text-dim);
  max-width: 640px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }

.badges { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2.75rem; }

.chip {
  font-size: 0.82rem;
  color: var(--text-dim);
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  backdrop-filter: blur(10px);
}

/* ---------- Cards / grids ---------- */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 45%), var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.6rem;
  backdrop-filter: blur(18px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 12px 32px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 18px 44px rgba(0, 0, 0, 0.5);
}

.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.6rem; letter-spacing: -0.01em; }
.card p { color: var(--text-dim); font-size: 0.96rem; }

/* ---------- Mechanism ---------- */
.mech {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.mech:first-of-type { border-top: none; }

.mech-num {
  font-family: 'Inter', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(135deg, rgba(252, 114, 255, 0.9) 0%, rgba(168, 85, 247, 0.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mech-body h3 {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.mech-body p { color: var(--text-dim); font-size: 1.02rem; max-width: 720px; }

.inline {
  font-size: 0.92em;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.formula {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.92rem;
  color: var(--text);
  padding: 0.7rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
}

/* ---------- Badge art ---------- */
.badge-row { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.75rem; }

.badge-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 132px;
  text-align: center;
}

.badge-art img {
  width: 132px;
  height: 132px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--border-hover);
  background: rgba(0, 0, 0, 0.4);
}

.badge-art[data-tier="bronze"] img { box-shadow: 0 0 26px rgba(205, 127, 50, 0.4); }
.badge-art[data-tier="silver"] img { box-shadow: 0 0 26px rgba(192, 192, 200, 0.4); }
.badge-art[data-tier="gold"] img   { box-shadow: 0 0 30px rgba(245, 197, 66, 0.45); }

.badge-fallback {
  display: none;
  width: 132px;
  height: 132px;
  border-radius: 22px;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.badge-art.show-fallback .badge-fallback { display: flex; }

.badge-art[data-tier="bronze"] .badge-fallback { background: radial-gradient(circle at 30% 25%, rgba(205,127,50,0.5), rgba(0,0,0,0.4)); color: #f0c79a; box-shadow: 0 0 26px rgba(205,127,50,0.4); }
.badge-art[data-tier="silver"] .badge-fallback { background: radial-gradient(circle at 30% 25%, rgba(192,192,200,0.5), rgba(0,0,0,0.4)); color: #eaeaf0; box-shadow: 0 0 26px rgba(192,192,200,0.4); }
.badge-art[data-tier="gold"] .badge-fallback   { background: radial-gradient(circle at 30% 25%, rgba(245,197,66,0.5), rgba(0,0,0,0.4)); color: #f8e2a0; box-shadow: 0 0 30px rgba(245,197,66,0.45); }

.badge-art figcaption {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.badge-art[data-tier="bronze"] figcaption { color: var(--bronze); }
.badge-art[data-tier="silver"] figcaption { color: var(--silver); }
.badge-art[data-tier="gold"] figcaption { color: var(--gold); }

/* ---------- Architecture diagram ---------- */
.diagram { display: flex; flex-direction: column; gap: 1.5rem; }

.flow {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem;
}

.flow-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 1.1rem;
}

.flow-row { display: flex; align-items: center; gap: 0.85rem; flex-wrap: wrap; }

.node {
  flex: 1 1 0;
  min-width: 130px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.95rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
}

.node small { display: block; margin-top: 0.25rem; color: var(--text-faint); font-weight: 400; font-size: 0.78rem; }

.node-accent {
  border-color: rgba(252, 114, 255, 0.35);
  background: linear-gradient(135deg, rgba(252, 114, 255, 0.12), rgba(168, 85, 247, 0.1));
  box-shadow: 0 0 22px rgba(252, 114, 255, 0.18);
}

.arrow { color: var(--accent); font-size: 1.2rem; flex: 0 0 auto; }

/* ---------- Demo steps ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  counter-reset: step;
}

.step {
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.06) 0%, rgba(0, 0, 0, 0) 50%), var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.6rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.step:hover { border-color: var(--border-hover); transform: translateY(-3px); }

.step-k {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.7rem;
}

.step h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
.step p { color: var(--text-dim); font-size: 0.96rem; }

.tier-tag {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
}
.tier-tag.silver { color: var(--silver); background: rgba(192, 192, 200, 0.14); border: 1px solid rgba(192, 192, 200, 0.3); }

/* ---------- Deploy ---------- */
.addr-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.4rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.addr-card:hover {
  border-color: rgba(252, 114, 255, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.4);
}

.addr-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-dim); }
.addr { font-size: 0.74rem; color: var(--text); word-break: break-all; }
.addr-link { font-size: 0.82rem; color: var(--accent); margin-top: 0.2rem; }

.deploy-cta { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2rem; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-brand { display: flex; align-items: center; gap: 0.6rem; }

.footer-note { color: var(--text-faint); font-size: 0.9rem; max-width: 640px; }

.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 0.25rem; }
.footer-links a { color: var(--text-dim); font-size: 0.9rem; transition: color 0.18s ease; }
.footer-links a:hover { color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .mech { grid-template-columns: 1fr; gap: 0.5rem; }
  .mech-num { font-size: 2rem; }
  .flow-row { flex-direction: column; align-items: stretch; }
  .arrow { transform: rotate(90deg); align-self: center; }
  .node { min-width: 0; }
  .section { padding: 4rem 1.25rem; }
  .hero { padding: 4rem 1.25rem 3.5rem; }
}

@media (max-width: 520px) {
  .nav-actions .btn-ghost { display: none; }
  .badge-row { gap: 1rem; justify-content: center; }
}
