/* ──────────────────────────────────────────────────────────────
   OPENBIT · design tokens + base styles
   v2 — refined for community redesign
   ────────────────────────────────────────────────────────────── */

:root {
  /* ── ink (text) ── */
  --ink:       #eaf2f6;
  --ink-100:   #c8d2da;
  --ink-200:   #a8b2bb;
  --ink-300:   #7e8893;
  --ink-400:   #5d6671;
  --ink-500:   #3f4751;

  /* ── surfaces ── */
  --bg-0:      #06080d;       /* page base */
  --bg-1:      #0a0e16;       /* card base */
  --bg-2:      #0f1421;       /* elevated */
  --bg-3:      #141a29;       /* hover */

  /* ── accent ── */
  --cyan:      #22d0df;
  --cyan-dim:  #14a3b0;
  --cyan-glow: rgba(34, 208, 223, 0.55);

  /* ── status ── */
  --green:     #5ce7a0;
  --amber:     #f3c969;
  --red:       #ff7a7a;

  /* ── lines ── */
  --line:      rgba(190, 198, 210, 0.10);
  --line-soft: rgba(190, 198, 210, 0.06);
  --line-hard: rgba(190, 198, 210, 0.18);

  /* ── type ── */
  --font-sans:  'Inter', 'Noto Sans SC', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --font-serif: 'Instrument Serif', 'Noto Serif SC', Georgia, serif;
}

/* ──────────────────────────────────────────────
   base / reset
   ────────────────────────────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg-0);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── fabric background ──
   layered: noise + soft cyan glow top-right + subtle grid lines */
body.fabric {
  background-color: var(--bg-0);
  background-image:
    /* upper-right cyan glow */
    radial-gradient(ellipse 60% 50% at 88% 8%, rgba(34, 208, 223, 0.10), transparent 70%),
    /* lower-left deep blue glow */
    radial-gradient(ellipse 50% 40% at 12% 92%, rgba(36, 70, 130, 0.14), transparent 75%),
    /* fine grid */
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px);
  background-size: auto, auto, 48px 48px, 48px 48px;
  background-attachment: fixed;
  position: relative;
}
body.fabric::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.7  0 0 0 0 0.8  0 0 0 0 0.85  0 0 0 0.035 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

/* container */
.wrap {
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 3vw, 2rem);
}

a { color: inherit; }
a.link-soft {
  color: var(--ink-300);
  text-decoration: none;
  transition: color 0.18s ease;
}
a.link-soft:hover { color: var(--cyan); }

/* ──────────────────────────────────────────────
   nav
   ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 8, 13, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid var(--line-soft);
}
.ob-glow-logo {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  line-height: 1;
  font-family: 'Space Grotesk', var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink);
  background:
    linear-gradient(#0D0E1C, #0D0E1C) padding-box,
    linear-gradient(135deg, #22d0df, #6addee 50%, #22d0df) border-box;
  border: 1.5px solid transparent;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(34, 208, 223, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}
.ob-glow-logo:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 28px rgba(34, 208, 223, 0.38);
}
.ob-glow-logo::after {
  content: ".";
  color: var(--cyan);
  text-shadow: 0 0 14px var(--cyan-glow);
  margin-left: 2px;
}
.ob-glow-logo > span {
  background: linear-gradient(180deg, #ffffff 0%, #c4d4dc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-link {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--ink-300);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.18s ease;
  padding: 6px 2px;
  position: relative;
}
.nav-link::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--ink-500);
  transform: translateY(-50%);
  transition: background 0.18s ease, box-shadow 0.18s ease;
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::before {
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}
/* mobile: keep nav links visible but compact (logo + 3 links + 加入 → 都能放下) */
@media (max-width: 640px) {
  .nav-link {
    font-size: 10.5px;
    letter-spacing: 0.04em;
    padding: 6px 0;
  }
  .nav-link::before { display: none; } /* 隐藏 hover 圆点节省空间 */
  .top-nav { gap: 0.75rem !important; }
  .ob-glow-logo {
    padding: 6px 12px !important;
    font-size: 14px !important;
  }
}
/* very narrow: < 380px 还是藏掉避免挤爆 */
@media (max-width: 380px) {
  .nav-link-hide-sm { display: none; }
}

/* ──────────────────────────────────────────────
   buttons & chips
   ────────────────────────────────────────────── */
.btn-green {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(180deg, rgba(34, 208, 223, 0.95) 0%, rgba(20, 163, 176, 0.95) 100%);
  color: #051315;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  border: 1px solid rgba(34, 208, 223, 0.6);
  box-shadow:
    0 0 0 1px rgba(34, 208, 223, 0.18),
    0 6px 22px -8px rgba(34, 208, 223, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  white-space: nowrap;
}
.btn-green:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(34, 208, 223, 0.4),
    0 10px 26px -8px rgba(34, 208, 223, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-green:active { transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--ink-100);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--line-hard);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}
.btn-ghost:hover {
  border-color: rgba(34, 208, 223, 0.55);
  color: var(--cyan);
  background: rgba(34, 208, 223, 0.05);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-200);
  border: 1px solid var(--line-soft);
  white-space: nowrap;
}
.chip-live {
  background: rgba(92, 231, 160, 0.08);
  color: var(--green);
  border-color: rgba(92, 231, 160, 0.22);
}
.chip-soon {
  background: rgba(243, 201, 105, 0.08);
  color: var(--amber);
  border-color: rgba(243, 201, 105, 0.22);
}
.chip-cyan {
  background: rgba(34, 208, 223, 0.08);
  color: var(--cyan);
  border-color: rgba(34, 208, 223, 0.25);
}

.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: ob-pulse 1.8s ease-in-out infinite;
}
@keyframes ob-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(0.85); }
}

/* ──────────────────────────────────────────────
   typography accents
   ────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-300);
}
.mono { font-family: var(--font-mono); }

.signature-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
}

/* ──────────────────────────────────────────────
   inputs
   ────────────────────────────────────────────── */
.input {
  width: 100%;
  background: rgba(8, 12, 20, 0.85);
  border: 1px solid var(--line-hard);
  border-radius: 6px;
  padding: 0.7rem 0.85rem;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  outline: none;
}
.input::placeholder { color: var(--ink-400); }
.input:focus {
  border-color: rgba(34, 208, 223, 0.55);
  box-shadow: 0 0 0 3px rgba(34, 208, 223, 0.12);
}

/* ──────────────────────────────────────────────
   modals
   ────────────────────────────────────────────── */
.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(2, 4, 8, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-card {
  position: relative;
  width: 100%;
  max-width: 28rem;
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line-hard);
  border-radius: 14px;
  padding: 1.75rem;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(34, 208, 223, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* ──────────────────────────────────────────────
   rules
   ────────────────────────────────────────────── */
.rule-t {
  border-top: 1px solid var(--line-soft);
  position: relative;
}
.rule-t::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 50%;
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(34, 208, 223, 0.4) 50%,
    transparent 100%);
  transform: translateX(-50%);
}
