/* ArcPad — design system */

:root {
  --bg: #05070c;
  --bg-alt: #090d16;
  --surface: #0c1220;
  --surface-2: #121a2c;
  --border: rgba(158, 174, 209, 0.14);
  --border-strong: rgba(190, 203, 230, 0.30);
  --silver: #e6ecf7;
  --silver-bright: #ffffff;
  --blue: #6f8dc9;
  --blue-deep: #2c3e63;
  --text: #eef1f8;
  --muted: #97a1b9;
  --muted-2: #5c6478;
  --danger: #ff6259;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  --grad: linear-gradient(135deg, #ffffff 0%, #d6deef 26%, #97a8ce 58%, #47598a 100%);
  --grad-soft: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(111,141,201,0.06));
  --font-head: "Space Grotesk", "Sora", sans-serif;
  --font-body: "Sora", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(55% 38% at 12% 0%, rgba(111, 141, 201, 0.16), transparent 62%),
    radial-gradient(45% 32% at 100% 100%, rgba(190, 203, 230, 0.08), transparent 62%),
    radial-gradient(80% 60% at 50% 0%, rgba(255,255,255,0.03), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

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

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; margin: 0 0 12px; letter-spacing: -0.015em; }
p { margin: 0 0 12px; color: var(--muted); }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 7, 12, 0.70);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.headbar {
  max-width: 1180px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 28px; display: block; filter: drop-shadow(0 2px 10px rgba(150,170,215,0.25)); }
.brand-word {
  font-family: var(--font-head); font-weight: 700; font-size: 17px; letter-spacing: 0.01em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
nav { display: flex; gap: 4px; flex: 1; }
nav a {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--muted); transition: color .15s ease, background .15s ease;
}
nav a:hover, nav a.active { color: var(--text); background: var(--surface-2); }
#wallet-slot { flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 999px; font-weight: 700; font-size: 14px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  cursor: pointer; transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); border-color: var(--blue); box-shadow: 0 8px 24px rgba(111,141,201,0.15); }
.btn-primary { background: var(--grad); color: #0a1220; border-color: transparent; box-shadow: 0 10px 30px rgba(150,170,215,0.18); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- chips / pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border-strong); color: var(--silver); background: rgba(150,170,215,0.07);
  letter-spacing: 0.01em;
}
.chip.live { color: var(--silver-bright); }
.chip.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 8px var(--blue); }

.ca-pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; max-width: 100%; }
.ca-pill {
  display: flex; align-items: center; flex-wrap: wrap; row-gap: 8px; gap: 8px;
  padding: 8px 8px 8px 14px; max-width: 100%; box-sizing: border-box;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  font-family: monospace; font-size: 13px;
}
.ca-pill-label {
  flex: 0 0 auto;
  font-family: var(--font-body); font-weight: 700;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ca-text { color: var(--muted); flex: 1 1 90px; min-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-copy {
  flex: 0 0 auto;
  border: none; background: var(--surface-2); color: var(--text); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: background .15s ease;
}
.btn-copy:hover { background: var(--blue-deep); }

/* ---------- hero ---------- */
.hero {
  position: relative; padding: 76px 0 60px; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.eyebrow { margin-bottom: 16px; }
.hero h1 { font-size: clamp(36px, 5.4vw, 66px); line-height: 1.03; }
.hero h1 .accent {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lede { font-size: 17px; max-width: 580px; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-glow {
  position: absolute; inset: -24% -10% auto auto; width: 640px; height: 640px;
  background: radial-gradient(circle, rgba(111,141,201,0.24), transparent 65%);
  filter: blur(20px); pointer-events: none;
}
.hero-glow::after {
  content: ""; position: absolute; inset: 30% auto auto 40%; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(230,236,247,0.14), transparent 70%);
  filter: blur(10px);
}

/* ---------- carousel ---------- */
.carousel-section { padding: 8px 0 40px; }
.carousel-viewport { overflow-x: auto; scrollbar-width: none; }
.carousel-viewport::-webkit-scrollbar { display: none; }
.carousel-track { display: flex; gap: 16px; padding-bottom: 4px; }

/* ---------- cards ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%), var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); box-shadow: var(--shadow); }

.launch-card { width: 240px; flex-shrink: 0; }
.launch-card .thumb {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius-sm); margin-bottom: 12px;
  background: var(--grad); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; font-size: 28px; color: #0a1220;
}
.launch-card h4 { font-size: 15px; margin-bottom: 4px; }
.launch-card .sym { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.launch-card .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-2); }
.launch-card .row b { color: var(--text); font-weight: 700; }

.skeleton-card .sk { background: var(--surface-2); border-radius: 6px; }
.sk-thumb { aspect-ratio: 1; border-radius: var(--radius-sm); margin-bottom: 12px; }
.sk-line { height: 10px; margin-bottom: 8px; }
.w60 { width: 60%; } .w40 { width: 40%; } .w80 { width: 80%; } .w50 { width: 50%; }
@keyframes pulse { 0%,100% { opacity: .5; } 50% { opacity: .9; } }
.skeleton-card .sk { animation: pulse 1.4s ease-in-out infinite; }

/* ---------- stats ---------- */
.stats-section { padding: 40px 0; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 24px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.stat-label { font-size: 12px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.stat-value { font-family: var(--font-head); font-size: 22px; font-weight: 700; }
.stat-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.chart-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.chart-card-head h3 { margin: 0; font-size: 16px; }
.chart-link { font-size: 13px; color: var(--silver); font-weight: 600; }
.chart-embed { height: 360px; border-radius: var(--radius-sm); background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted-2); }

/* ---------- section generic ---------- */
section.block { padding: 68px 0; }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head .eyebrow { display: inline-block; margin-bottom: 12px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.two-col img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }

.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 28px 0; }
.plan-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; transition: border-color .15s ease, transform .15s ease; }
.plan-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.plan-num {
  width: 34px; height: 34px; border-radius: 10px; background: var(--grad); color: #0a1220;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px;
  font-family: var(--font-head);
}
.plan-card h3 { font-size: 16px; }
.plan-card p { font-size: 14px; margin: 0; }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 28px 0; }
.step-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step-card .step-tag { font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted-2); margin-bottom: 10px; }
.step-card h3 { font-size: 16px; }
.step-card p { font-size: 14px; margin: 0; }
.step-card:not(:last-child)::after {
  content: "→"; position: absolute; top: 26px; right: -22px; color: var(--muted-2); font-size: 15px; z-index: 1;
}

.callout {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius);
  padding: 16px 20px; margin: 24px 0; font-size: 14px; color: var(--muted);
}
.callout strong {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.official-banner {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 18px; font-size: 13px; color: var(--muted); margin-bottom: 24px;
}
.official-banner strong { color: var(--silver-bright); }

/* ---------- explore grid ---------- */
.explore-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 22px; }
.explore-toolbar input, .explore-toolbar select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 10px 14px; border-radius: 999px; font-family: var(--font-body); font-size: 13px;
}
.explore-toolbar input { flex: 1; min-width: 200px; }
.explore-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.explore-grid .launch-card { width: auto; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }

/* ---------- forms ---------- */
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; max-width: 560px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text);
  padding: 11px 14px; border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 14px;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--blue); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mode-toggle { display: flex; gap: 8px; margin-bottom: 22px; }
.mode-toggle button {
  flex: 1; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer;
}
.mode-toggle button.active { border-color: var(--blue); color: var(--silver-bright); background: rgba(111,141,201,0.10); }
.form-note { font-size: 12px; color: var(--muted-2); margin-top: -6px; margin-bottom: 18px; }
.form-success { text-align: center; padding: 30px 10px; }
.form-success .icon { font-size: 40px; margin-bottom: 10px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { height: 22px; filter: drop-shadow(0 2px 10px rgba(150,170,215,0.2)); }
.footer-brand span {
  font-family: var(--font-head); font-weight: 700; font-size: 15px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.footer-links { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-note { font-size: 12px; color: var(--muted-2); margin-top: 20px; }

/* ---------- docs ---------- */
.docs-layout {
  display: grid; grid-template-columns: 232px 1fr; gap: 40px;
  padding-top: 48px; padding-bottom: 90px; align-items: start;
}
.docs-side {
  position: sticky; top: 84px;
  display: flex; flex-direction: column;
  max-height: calc(100vh - 110px); overflow-y: auto;
  padding: 2px 20px 20px 0; border-right: 1px solid var(--border);
}
.docs-side::-webkit-scrollbar { width: 5px; }
.docs-side::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.docs-side-title {
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  color: var(--silver-bright); margin: 0 0 18px 14px; letter-spacing: -0.01em;
}
.docs-side-group { margin-bottom: 22px; }
.docs-side-group:last-child { margin-bottom: 0; }
.docs-side-label {
  font-family: var(--font-head); font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--muted-2); margin: 0 0 6px 14px;
}
.docs-side-links { display: flex; flex-direction: column; gap: 1px; }
.docs-side a {
  position: relative; padding: 7px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; line-height: 1.3;
  color: var(--muted); transition: color .15s ease, background .15s ease;
}
.docs-side a::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 2px; height: 0; border-radius: 2px; background: var(--blue); transition: height .15s ease;
}
.docs-side a:hover { color: var(--text); background: var(--surface-2); }
.docs-side a.active { color: var(--silver-bright); background: var(--surface-2); }
.docs-side a.active::before { height: 16px; }
.docs-side-toggle { display: none; }
.docs-content { min-width: 0; max-width: 720px; }
.docs-section { padding-top: 8px; margin-bottom: 64px; scroll-margin-top: 90px; }
.docs-section:last-child { margin-bottom: 0; }
.docs-kicker { font-family: var(--font-head); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 10px; }
.docs-section h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 16px; }
.docs-section h2 { font-size: 24px; margin-bottom: 14px; }
.docs-section p { font-size: 15px; color: var(--muted); max-width: 640px; }
.docs-section p strong { color: var(--text); }
.docs-section blockquote {
  margin: 20px 0; padding: 14px 20px; border-left: 2px solid var(--blue);
  background: var(--surface); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--silver); font-size: 15px;
}
.docs-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 20px 0; }
.docs-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.docs-card h3 { font-size: 15px; margin-bottom: 6px; }
.docs-card p { font-size: 13px; margin: 0; }
.docs-list { margin: 0 0 12px; padding-left: 20px; color: var(--muted); font-size: 15px; }
.docs-list li { margin-bottom: 6px; }
.docs-hr { border: none; border-top: 1px solid var(--border); margin: 40px 0; }
.docs-phase { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 14px; }
.docs-phase h3 { font-size: 15px; margin-bottom: 10px; font-family: var(--font-head); }
.docs-phase h3 span { color: var(--muted-2); font-weight: 600; margin-right: 8px; }
.docs-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .docs-side {
    position: sticky; top: 58px; z-index: 20; max-height: none;
    display: block; overflow: visible;
    border-right: none; padding: 0; margin-bottom: 24px;
  }
  .docs-side-title { display: none; }

  .docs-side-toggle {
    display: flex; align-items: center; justify-content: space-between; width: 100%;
    padding: 13px 16px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); font-family: var(--font-body); font-size: 14px; font-weight: 700;
    cursor: pointer;
  }
  .docs-side-arrow { color: var(--muted); flex-shrink: 0; transition: transform .18s ease; }
  .docs-side-toggle[aria-expanded="true"] .docs-side-arrow { transform: rotate(180deg); }

  .docs-side-menu {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: var(--bg-alt); border: 1px solid var(--border-strong); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 14px 8px;
    max-height: 0; overflow: hidden; opacity: 0;
    transition: max-height .2s ease, opacity .15s ease, padding .2s ease;
  }
  .docs-side-menu.open {
    max-height: calc(100vh - 140px); overflow-y: auto; opacity: 1;
  }
  .docs-side-group { margin-bottom: 14px; padding: 0 6px; }
  .docs-side-label { margin-left: 8px; }
  .docs-side a { display: block; padding: 10px 12px; }
  .docs-side a::before { left: 2px; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .plan-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .docs-cards { grid-template-columns: 1fr; }
  .step-card::after { display: none; }
  nav { display: none; }
  nav.open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); flex-direction: column; gap: 2px; padding: 10px 16px 16px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  nav.open a { padding: 12px 14px; }
  .nav-toggle { display: flex !important; margin-left: auto; }
}
@media (max-width: 520px) {
  .steps-grid { grid-template-columns: 1fr; }
}
.nav-toggle {
  display: none; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); align-items: center; justify-content: center; cursor: pointer;
  flex-shrink: 0; font-size: 18px; line-height: 1;
}
.headbar { position: relative; }
