/* AstraQuant Minimal Screenshot-First Portal */
:root {
  --bg: #ffffff;
  --surface: #fafafa;
  --surface-2: #f4f4f5;
  --card: #ffffff;
  --grid-line: #e4e4e7;
  --line: rgba(9, 9, 11, 0.08);
  --line-2: #d4d4d8;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #71717a;
  --black: #09090b;
  --brand: #ff5e2b;
  --brand-hover: #e04819;
  --up: #10b981;
  --warn: #f59e0b;
  --header-glass: rgba(255, 255, 255, 0.78);
  --header-border: rgba(9, 9, 11, 0.06);
  --stage-glow: rgba(255, 94, 43, 0.14);
  --stage-border: rgba(9, 9, 11, 0.14);
  --stage-shadow: 0 28px 64px -20px rgba(9, 9, 11, 0.28), 0 4px 16px -4px rgba(9, 9, 11, 0.08);
  --card-shadow: 0 1px 2px rgba(9, 9, 11, 0.04);
  --card-shadow-hover: 0 10px 28px -12px rgba(9, 9, 11, 0.14);
  --sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --max: 980px;
}

html[data-theme="dark"] {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #18181b;
  --card: #111114;
  --grid-line: #27272a;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.18);
  --ink: #e4e4e7;
  --ink-2: #a1a1aa;
  --ink-3: #71717a;
  --black: #fafafa;
  --brand: #ff5e2b;
  --brand-hover: #ff7649;
  --up: #34d399;
  --warn: #fbbf24;
  --header-glass: rgba(9, 9, 11, 0.68);
  --header-border: rgba(255, 255, 255, 0.08);
  --stage-glow: rgba(255, 94, 43, 0.20);
  --stage-border: rgba(255, 255, 255, 0.12);
  --stage-shadow: 0 32px 72px -18px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.04);
  --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --card-shadow-hover: 0 12px 32px -12px rgba(0, 0, 0, 0.62);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Sticky transparent -> frosted topbar */
.aq-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 60px;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
              backdrop-filter 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.aq-topbar[data-scrolled="1"] {
  background: var(--header-glass);
  border-bottom-color: var(--header-border);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: block;
}
.brand-wordmark {
  font-size: 17px;
  color: var(--black);
  line-height: 1;
}
.brand-wordmark span { color: var(--brand); }

.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 36px;
  height: 36px;
  padding: 0 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}
.icon-btn:hover {
  background: var(--surface-2);
  color: var(--black);
}
.lang-pill span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.theme-sun { display: none; }
html[data-theme="dark"] .theme-sun { display: block; }
html[data-theme="dark"] .theme-moon { display: none; }

/* Main canvas */
.portal-main {
  flex: 1 0 auto;
  padding: clamp(38px, 5.5vh, 56px) 0 32px;
}

.hero-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.hero-head h1 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--black);
}

/* Framed terminal screenshot showcase */
.stage-wrap {
  position: relative;
  width: min(100%, 820px, max(480px, calc((100dvh - 308px) * 1.6)));
  margin: clamp(20px, 2.8vh, 28px) auto 0;
}
.stage-wrap::before {
  content: "";
  position: absolute;
  inset: 8% 10% -6%;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 45%, var(--stage-glow), transparent 70%);
  filter: blur(36px);
  pointer-events: none;
}
.stage-frame {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  overflow: hidden;
  background: #09090b;
  border: 1px solid var(--stage-border);
  box-shadow: var(--stage-shadow);
}
.stage-bar {
  height: 28px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  background: #101013;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.stage-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.stage-dots span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #3f3f46;
}
.stage-caption {
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  color: #8a8a93;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stage-live {
  justify-self: end;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--up);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}
.stage-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  background: #09090b;
}

/* Three platform jump cards */
.venue-grid {
  width: min(100%, 820px, max(720px, calc((100dvh - 308px) * 1.6)));
  margin: clamp(16px, 2.2vh, 22px) auto 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.venue-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--grid-line);
  box-shadow: var(--card-shadow);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 160ms ease,
              box-shadow 160ms ease,
              background-color 160ms ease;
}
.venue-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 94, 43, 0.45);
  box-shadow: var(--card-shadow-hover);
}
.venue-card:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.venue-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.venue-mark {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #141414;
  border: 1px solid var(--grid-line);
  overflow: hidden;
}
.venue-mark-okx { background: #111111; border-color: #27272a; }
.venue-mark-gate { background: #2354e6; border-color: #1d4ed8; }
.venue-mark-binance { background: #171308; border-color: #443514; }
.venue-meta {
  min-width: 0;
}
.venue-name {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--black);
}
.venue-host {
  margin-top: 2px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.25;
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.venue-right {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--line-2);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}
.status-dot.is-up {
  background: var(--up);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16);
}
.status-dot.is-down {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}
.venue-arrow {
  color: var(--ink-3);
  transition: transform 160ms cubic-bezier(0.22, 1, 0.36, 1), color 160ms ease;
}
.venue-card:hover .venue-arrow {
  color: var(--brand);
  transform: translate(2px, -2px);
}

/* Mobile compactness */
@media (max-width: 700px) {
  .aq-topbar { height: 56px; }
  .wrap { padding: 0 16px; }
  .portal-main { padding: 26px 0 32px; }
  .hero-head h1 { font-size: 25px; }
  .stage-wrap { width: 100%; margin-top: 18px; }
  .stage-frame { border-radius: 12px; }
  .stage-bar { height: 26px; padding: 0 10px; }
  .venue-grid {
    width: 100%;
    margin-top: 14px;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .venue-card { padding: 13px 14px; }
}
