@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@100..900&display=swap');

/* ─── TOKENS ─────────────────────────────────── */
:root {
  --bg:       #0a0e14;
  --surface:  #121a27;
  --border:   rgba(255,255,255,0.09);

  --text:     #e6edf3;
  --muted:    #8b949e;

  --accent:   #00d9ff;
  --accent2:  #00ff94;
  --accentDim:rgba(0,217,255,0.14);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;

  --shadow: 0 10px 40px rgba(0,0,0,0.55);

  --xs:  .5rem;
  --sm:  1rem;
  --md:  1.5rem;
  --lg:  2rem;
  --xl:  3rem;

  --navH: 72px;
  --fast: 140ms cubic-bezier(0.4,0,0.2,1);
  --base: 220ms cubic-bezier(0.4,0,0.2,1);

  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

/* ─── RESET ──────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 10%,  rgba(0,217,255,0.07)  0%, transparent 40%),
    radial-gradient(circle at 80% 90%,  rgba(0,255,148,0.05)  0%, transparent 40%),
    radial-gradient(circle at 50% 50%,  rgba(176,132,255,0.04) 0%, transparent 60%),
    var(--bg);
  overflow-x: hidden;
}

/* grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: .55;
  z-index: 0;
}

main  { position: relative; z-index: 1; padding-top: var(--navH); flex: 1; }
footer { margin-top: auto; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent2); }

/* ─── NAV ────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--navH);
  z-index: 1000;
  background: rgba(10,14,20,0.82);
  backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--border);
}
.nav-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--md);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--md);
}
.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent);
  white-space: nowrap;
}
.brand-badge {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: .85rem;
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 25px rgba(0,0,0,0.45);
  flex-shrink: 0;
}
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: .15rem;
}
.nav-links a {
  display: inline-flex;
  flex-direction: column;
  padding: .5rem .85rem;
  border-radius: 10px;
  color: var(--muted);
  transition: background var(--fast), color var(--fast), transform var(--fast);
  font-size: .9rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
}
.nav-links a .nav-sub {
  font-size: .68rem;
  font-family: var(--font-mono);
  opacity: .6;
  letter-spacing: .03em;
  margin-top: .15rem;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--accentDim);
  transform: translateY(-1px);
}
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--accentDim);
}
.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.5rem;
  padding: .4rem .55rem;
  cursor: pointer;
  line-height: 1;
}

/* ─── SHARED LAYOUT ──────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--md);
}
.page-hero {
  padding: var(--xl) 0 var(--lg);
}
.page-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .65rem;
  font-weight: 500;
}
.page-hero h1 {
  font-size: clamp(2.0rem, 4vw, 3.0rem);
  line-height: 1.06;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: .75rem;
}
.page-hero p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 60rem;
}

/* ─── CARD ───────────────────────────────────── */
.card {
  background: rgba(18,26,39,0.75);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--md);
  box-shadow: 0 16px 40px rgba(0,0,0,0.32);
  position: relative;
  overflow: hidden;
  transition: transform var(--fast), border-color var(--fast), background var(--fast);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(0,217,255,0.4);
  background: rgba(18,26,39,0.92);
}

/* ─── BUTTONS ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .85rem 1.1rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform var(--fast), background var(--fast), border-color var(--fast), box-shadow var(--fast);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
}
.btn-primary {
  color: #061018;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: var(--shadow);
}
.btn-primary:hover, .btn-primary:focus { transform: translateY(-2px); color: #061018; }
.btn-secondary {
  color: var(--text);
  background: rgba(18,26,39,0.75);
  border-color: var(--border);
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(0,217,255,0.5);
  background: rgba(18,26,39,0.92);
  color: var(--text);
}

/* ─── PILL / TAG / CHIP ──────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .78rem;
  padding: .3rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: rgba(10,14,20,0.55);
  white-space: nowrap;
  font-family: var(--font-mono);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .28rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,14,20,0.55);
  color: var(--muted);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .03em;
  white-space: nowrap;
  font-family: var(--font-mono);
}
.sig {
  width: 8px; height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}
.sig.ok   { background: var(--accent2); box-shadow: 0 0 10px rgba(0,255,148,0.5); }
.sig.warn { background: #ffcc00;        box-shadow: 0 0 10px rgba(255,204,0,0.4); }
.sig.down { background: #ff5f56;        box-shadow: 0 0 10px rgba(255,95,86,0.4); }

/* ─── SECTION DIVIDER ────────────────────────── */
.section {
  padding: var(--xl) 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.section-head {
  margin-bottom: var(--lg);
}
.section-head h2 {
  font-family: var(--font-mono);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 700;
  margin-bottom: .4rem;
}
.section-head p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 60rem;
}

/* ─── GRID ───────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: var(--md);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: var(--md);
}

/* ─── COMING SOON ────────────────────────────── */
.coming-soon {
  opacity: .55;
  pointer-events: none;
}
.coming-soon::after {
  content: "COMING SOON";
  position: absolute;
  top: 12px; right: 12px;
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  font-weight: 700;
  padding: .28rem .55rem;
  border-radius: 8px;
  background: rgba(255,140,66,0.95);
  color: #081018;
}

/* ─── FOOTER ─────────────────────────────────── */
footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(10,14,20,0.9);
  padding: var(--lg) 0;
  position: relative;
  z-index: 2;
}
.foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sm);
  color: var(--muted);
  font-size: .88rem;
  font-family: var(--font-mono);
}
.foot strong { color: var(--accent); }
.foot-links { display: flex; gap: var(--md); flex-wrap: wrap; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }
.foot-sig {
  opacity: .5;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .75rem;
}

/* ─── RESPONSIVE ─────────────────────────────── */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--navH); left: 0; right: 0;
    background: rgba(10,14,20,0.97);
    border-bottom: 1px solid var(--border);
    padding: var(--md);
    flex-direction: column;
    gap: .25rem;
  }
  .nav-links.open { display: flex; }
  .nav-links a { text-align: left; }
  .nav-toggle { display: block; }
}
