/* ==========================================================================
   InvestEdge — capitaledgehubs-org
   Tokens: canvas #090D16 / surface #121C2D / header-footer #030712
   CTA #D97706 / highlights #34D399 + #F59E0B / text #F8FAFC + #CBD5E1
   Type: Spectral (display) + Inter (body) + JetBrains Mono (data)
   Signature: edge-cut cards with gradient trace corner + ticker-rule dividers
   ========================================================================== */

:root {
  --canvas: #090D16;
  --surface: #121C2D;
  --header: #030712;
  --cta: #D97706;
  --emerald: #34D399;
  --gold: #F59E0B;
  --text-primary: #F8FAFC;
  --text-secondary: #CBD5E1;
  --line: rgba(248, 250, 252, 0.09);
  --line-strong: rgba(248, 250, 252, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background-color: var(--canvas);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.font-display {
  font-family: 'Spectral', serif;
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}

::selection {
  background: var(--gold);
  color: #090D16;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--header);
}

::-webkit-scrollbar-thumb {
  background: #24344d;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #34486a;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Ticker rule: price-axis inspired divider */
.ticker-rule {
  position: relative;
  height: 1px;
  background: var(--line);
  width: 100%;
}

.ticker-rule::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(to right, var(--line-strong) 0, var(--line-strong) 1px, transparent 1px, transparent 64px);
}

/* Edge-cut card: clipped corner + gradient trace, echoes "InvestEdge" */
.edge-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
}

.edge-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 31px;
  height: 31px;
  background: linear-gradient(135deg, transparent 49%, var(--gold) 50%, var(--emerald) 100%);
  clip-path: polygon(100% 0, 100% 100%, 0 0);
  opacity: 0.9;
}

.edge-card-lg {
  clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 0 100%);
}

.edge-card-lg::after {
  width: 47px;
  height: 47px;
}

.trace-grid {
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(to right, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
}

.btn-cta {
  background: var(--cta);
  color: #0a0704;
  font-weight: 600;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.btn-cta:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-outline {
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-outline:hover {
  border-color: var(--emerald);
  background: rgba(52, 211, 153, 0.06);
}

.logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: linear-gradient(145deg, #16233a, #0b1220);
  border: 1px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), transparent 60%);
}

.logo-mark i {
  color: var(--gold);
  font-size: 17px;
  position: relative;
  z-index: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#mobile-nav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

#mobile-nav.open {
  max-height: 480px;
}

.nav-link {
  position: relative;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: var(--emerald);
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.metric-chip {
  border: 1px solid var(--line);
  background: rgba(18, 28, 45, 0.6);
}

input[type="range"] {
  -webkit-appearance: none;
  height: 4px;
  border-radius: 4px;
  background: var(--line-strong);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #0a0704;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #0a0704;
  cursor: pointer;
}

.field-input {
  background: var(--canvas);
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
  transition: border-color 0.2s ease;
}

.field-input:focus {
  border-color: var(--emerald);
}

.field-input.field-error {
  border-color: #f87171;
}

.field-error-msg {
  color: #f87171;
  font-size: 0.78rem;
  display: none;
}

.field-error-msg.show {
  display: block;
}

.alloc-bar {
  height: 12px;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  background: var(--canvas);
  border: 1px solid var(--line);
}

.candle {
  width: 6px;
  border-radius: 1px;
}

.data-row:nth-child(even) {
  background: rgba(248, 250, 252, 0.02);
}

.hero-gradient {
  background:
    radial-gradient(ellipse 60% 90% at 85% 0%, rgba(217, 119, 6, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 70% at 10% 100%, rgba(52, 211, 153, 0.10), transparent 60%);
}

/* Hide Scrollbar */
html,
body {
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-top: 22px;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}