/* RedScalp-inspired Obsidian / Cyan SaaS Aesthetic for NordicPulse */
:root {
  --bg-page: #07080a;
  --bg-grad-top: #11151a;
  --bg-card: rgba(21, 23, 27, 0.86);
  --bg-card-solid: #15171b;
  --bg-inset: #0b0d10;
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text-main: #ffffff;
  --text-body: #b0b7c3;
  --text-muted: #76808f;
  --cyan: #38bdf8;
  --cyan-deep: #0e6d96;
  --blue: #1674d1;
  --green: #39ff70;
  --green-soft: rgba(57, 255, 112, 0.14);
  --amber: #ffc247;
  --amber-soft: rgba(255, 194, 71, 0.14);
  --red: #ff6b6b;
  --red-soft: rgba(255, 107, 107, 0.14);
  --font-sans: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% 0%, var(--bg-grad-top) 0%, var(--bg-page) 60%);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-body); }
.muted-xs { color: var(--text-muted); font-size: 12px; }
.ico { width: 15px; height: 15px; flex-shrink: 0; }

/* Ambient background glows */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.45;
}
.glow-cyan {
  width: 520px;
  height: 520px;
  top: -180px;
  right: -100px;
  background: radial-gradient(circle, rgba(32, 163, 219, 0.28), transparent 70%);
}
.glow-green {
  width: 440px;
  height: 440px;
  bottom: 10%;
  left: -160px;
  background: radial-gradient(circle, rgba(57, 255, 112, 0.12), transparent 70%);
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 8, 10, 0.78);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text-main); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.lang-btn.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
}

.btn-header-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text-main);
  border-radius: 9px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn-header-login:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.5);
}

/* Hero Section */
.hero-section {
  padding: 68px 0 56px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 44px;
  align-items: center;
}

.chapter-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.24);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.dot-cyan {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  margin: 0 0 28px;
  font-size: 16.5px;
  color: var(--text-body);
  max-width: 540px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1674d1, #0e6d96);
  border: 1px solid rgba(102, 207, 255, 0.45);
  color: #fff;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(22, 116, 209, 0.28);
  transition: transform 0.15s, filter 0.15s;
}
.btn-primary-glow:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-primary-glow.full { width: 100%; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-main);
  text-decoration: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}
.btn-ghost:hover { border-color: var(--border-hover); background: rgba(255, 255, 255, 0.08); }

.btn-ghost-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 8px;
  padding: 8px 13px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.btn-ghost-sm:hover { border-color: var(--border-hover); }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.hm-item { display: flex; flex-direction: column; gap: 3px; }
.hm-val { font-size: 13px; color: var(--cyan); font-weight: 700; }
.hm-lbl { font-size: 13px; color: var(--text-body); }

/* Stage Preview Window */
.stage-window {
  background: linear-gradient(180deg, rgba(27, 31, 36, 0.92), rgba(13, 15, 18, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.08);
}

.stage-topbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stage-dots { display: flex; gap: 6px; }
.stage-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.stage-tabs { display: flex; gap: 4px; }
.stage-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
}
.stage-tab.is-active {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  color: var(--text-main);
}

.stage-badge {
  font-size: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
}

.stage-subbar {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stage-filters { display: flex; gap: 6px; }
.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  cursor: pointer;
}
.chip.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
}

.stage-body {
  padding: 12px 14px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.demo-row {
  background: rgba(11, 13, 16, 0.82);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.demo-row-sym { font-weight: 700; display: flex; align-items: center; gap: 7px; }
.demo-pill {
  font-family: var(--font-mono);
  font-size: 9.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-body);
}
.demo-pill.green { background: var(--green-soft); color: var(--green); }
.demo-pill.cyan { background: rgba(56, 189, 248, 0.14); color: var(--cyan); }
.demo-pill.amber { background: var(--amber-soft); color: var(--amber); }

.stage-footer {
  padding: 9px 14px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.link-cyan {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.link-cyan:hover { text-decoration: underline; }

/* Exchange Strip */
.exchanges-section {
  padding: 26px 0 46px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.01);
}

.section-head-inline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.eyebrow {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 6px;
}

.section-title-sm { margin: 0; font-size: 20px; font-weight: 650; }
.section-title { margin: 0 0 12px; font-size: clamp(24px, 3vw, 34px); line-height: 1.18; font-weight: 700; letter-spacing: -0.02em; }
.section-desc { margin: 0; color: var(--text-body); max-width: 640px; font-size: 15.5px; }

.segmented-pills {
  display: inline-flex;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}

.seg-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 7px;
  cursor: pointer;
}
.seg-pill.is-active {
  background: rgba(255, 255, 255, 0.11);
  color: var(--text-main);
}

.exchange-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.ex-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: border-color 0.15s, opacity 0.15s;
}
.ex-card.is-dim { opacity: 0.35; }
.ex-card-left { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 13.5px; }
.ex-mark {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cyan);
}
.ex-types { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); }

/* Sections & Trio */
.section-block { padding: 64px 0; }
.section-header { margin-bottom: 32px; }

.widgets-trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.widget-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.16s, border-color 0.16s;
}
.widget-card:hover { transform: translateY(-2px); border-color: var(--border-hover); }
.widget-card.accent-green.is-active { border-color: rgba(57, 255, 112, 0.45); }
.widget-card.accent-cyan.is-active { border-color: rgba(102, 207, 255, 0.45); }
.widget-card.accent-amber.is-active { border-color: rgba(255, 194, 71, 0.45); }

.wc-top { display: flex; justify-content: space-between; align-items: center; }
.wc-num { font-size: 12px; color: var(--text-muted); }

.wc-pill {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 5px;
}
.wc-pill.green { background: var(--green-soft); color: var(--green); }
.wc-pill.cyan { background: rgba(56, 189, 248, 0.14); color: var(--cyan); }
.wc-pill.amber { background: var(--amber-soft); color: var(--amber); }

.widget-card h3 { margin: 0; font-size: 18px; }
.widget-card p { margin: 0; font-size: 13.5px; color: var(--text-body); flex: 1; }

.wc-visual {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}

.mini-book { display: flex; flex-direction: column; gap: 6px; font-size: 11px; }
.mb-row { display: flex; justify-content: space-between; }
.mb-row.ask { color: var(--red); }
.mb-row.bid { color: var(--green); }
.mb-bar { height: 5px; background: rgba(255, 255, 255, 0.05); border-radius: 3px; overflow: hidden; }
.mb-fill { height: 100%; border-radius: 3px; }
.mb-fill.ask { background: var(--red); }
.mb-fill.bid { background: var(--green); }

.mini-bars {
  height: 54px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.mini-bars span {
  flex: 1;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px 4px 0 0;
}
.mini-bars span.hot { background: var(--cyan); }

.mini-timeline { display: flex; flex-direction: column; gap: 8px; font-size: 11.5px; }
.mt-row { display: flex; align-items: center; gap: 8px; }
.mt-row span:last-child { margin-left: auto; }
.amber-dot, .green-dot { width: 7px; height: 7px; border-radius: 50%; }
.amber-dot { background: var(--amber); }
.green-dot { background: var(--green); }

/* Workspace Builder */
.builder-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 36px;
  align-items: center;
}

.preset-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.preset-btn {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 13px 15px;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.preset-btn:hover { border-color: var(--border-hover); }
.preset-btn.is-active {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(22, 116, 209, 0.1);
}
.preset-btn strong { display: block; font-size: 14px; margin-bottom: 2px; }
.preset-btn span.muted { font-size: 12.5px; }
.preset-num {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  color: var(--cyan);
  flex-shrink: 0;
}

.builder-canvas-card {
  background: var(--bg-card-solid);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.builder-screen {
  padding: 14px;
  min-height: 290px;
  display: grid;
  gap: 10px;
}

.bs-panel {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px;
}
.bs-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Detail Cards */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px;
}
.detail-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 5px;
  margin-bottom: 12px;
}
.detail-badge.cyan { background: rgba(56, 189, 248, 0.14); color: var(--cyan); }
.detail-badge.green { background: var(--green-soft); color: var(--green); }
.detail-card h3 { margin: 0 0 10px; font-size: 21px; }

.detail-list {
  margin: 16px 0 0;
  padding-left: 18px;
  color: var(--text-body);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13.5px;
}

/* Access Section */
.access-section { padding: 36px 0 80px; }

.access-card {
  background: linear-gradient(135deg, rgba(22, 116, 209, 0.12), rgba(21, 23, 27, 0.96) 55%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1.15fr 0.9fr;
  gap: 36px;
  align-items: center;
}

.lock-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-soft);
  border: 1px solid rgba(255, 194, 71, 0.35);
  padding: 3px 8px;
  border-radius: 5px;
  margin-bottom: 12px;
}

.access-steps-mini {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.as-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.as-item span.mono { color: var(--cyan); font-weight: 700; }

.access-form-wrap {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.form-title { font-weight: 650; font-size: 15px; margin-bottom: 4px; }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-body); }
.field input {
  background: #12151b;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--text-main);
  font-size: 13.5px;
  outline: none;
}
.field input:focus { border-color: var(--cyan); }

.auth-error {
  background: var(--red-soft);
  border: 1px solid rgba(255, 107, 107, 0.45);
  color: #ffb3a7;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12px;
}

.form-foot { text-align: center; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 22px 0;
  background: rgba(7, 8, 10, 0.8);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.footer-links { display: flex; align-items: center; gap: 18px; }
.footer-links a { color: var(--text-muted); text-decoration: none; }
.footer-links a:hover { color: var(--text-main); }
.link-plain { background: transparent; border: none; color: var(--text-muted); font: inherit; cursor: pointer; padding: 0; }
.link-plain:hover { color: var(--cyan); }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 7, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  width: 100%;
  max-width: 430px;
  background: var(--bg-card-solid);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.75);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 4px 0; font-size: 18px; }
.modal-head p { margin: 0; font-size: 12.5px; }
.modal-close { background: transparent; border: none; color: var(--text-muted); font-size: 24px; line-height: 1; cursor: pointer; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

.api-modal-body { display: flex; flex-direction: column; gap: 10px; }
.api-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.api-pre {
  margin: 0;
  padding: 12px;
  background: #08090c;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11.5px;
  color: #cbd5e1;
  overflow-x: auto;
}

@media (max-width: 960px) {
  .hero-grid, .builder-grid, .details-grid, .access-card, .widgets-trio { grid-template-columns: 1fr; }
  .header-nav { display: none; }
}
