/* ============================================================
   Nova Markets — landing header + mobile pass
   Loaded only by index.html after the page's own inline styles.
   ============================================================ */

/* ---------------- Masthead ---------------- */
body > header {
  height: 76px;
  padding: 0 24px;
  gap: 18px;
  background: rgba(0, 0, 0, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  flex-wrap: nowrap;
}

body > header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 72px;
  height: 1px;
  background: #fff;
}

body > header .nv-brand { margin-right: auto; }

body > header nav {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 0;
  counter-reset: nav;
}

body > header nav a {
  counter-increment: nav;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9b9b9b;
  transition: background 140ms ease, color 140ms ease;
}

body > header nav a:last-child { border-right: 1px solid rgba(255, 255, 255, 0.07); }

body > header nav a::before {
  content: "0" counter(nav);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 7px;
  letter-spacing: 0;
  color: #3f3f3f;
  transition: color 140ms ease;
}

body > header nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.045); }
body > header nav a:hover::before { color: #9b9b9b; }

body > header .actions {
  display: flex;
  align-items: stretch;
  align-self: stretch;
  gap: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

body > header .actions .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  padding: 0 16px;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  background: transparent;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #9b9b9b;
  transition: background 140ms ease, color 140ms ease;
}

body > header .actions .btn-ghost:hover { color: #fff; background: rgba(255, 255, 255, 0.045); }

body > header .actions .btn-primary {
  border: 0;
  border-right: 0;
  background: #fff;
  color: #000;
}

body > header .actions .btn-primary::after { content: " ↗"; }
body > header .actions .btn-primary:hover { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px #fff; }

/* ---------------- Mobile ---------------- */
@media (max-width: 1080px) {
  body > header nav a { padding: 0 11px; font-size: 8.5px; letter-spacing: 0.12em; }
  body > header .actions .btn { padding: 0 13px; }
}

@media (max-width: 900px) {
  body > header nav { display: none; }
}

@media (max-width: 720px) {
  body > header {
    height: 64px;
    padding: 0 14px;
    gap: 10px;
    flex-wrap: nowrap;
  }

  body > header .nv-brand-name { font-size: 12px; letter-spacing: 0.2em; }
  body > header .nv-brand-sub { display: none; }
  body > header .nv-brand-mark { width: 32px; height: 32px; }
  body > header .nv-brand-mark svg { width: 17px; height: 17px; }

  body > header .actions .btn {
    padding: 0 12px;
    font-size: 7px;
    letter-spacing: 0.14em;
  }

  body > header .actions .btn-ghost { display: none; }

  .ticker { gap: 32px; }

  .hero { padding: 34px 20px 0 !important; }
  .hero h1 { letter-spacing: -0.06em; }
  .hero-sub { font-size: 0.92rem; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }

  .metrics { margin: 0 20px !important; }
  .metric { padding: 20px 18px !important; }

  main > section:not(.hero):not(.metrics) { padding-left: 20px !important; padding-right: 20px !important; }
  .markets-grid { grid-template-columns: 1fr; }
  .market-card { grid-column: span 12 !important; padding: 24px !important; }
  .market-card-wide { grid-column: span 12 !important; }

  .section-title { letter-spacing: -0.05em; }
}

@media (max-width: 400px) {
  body > header { padding: 0 12px; }
  body > header .actions .btn { padding: 0 10px; font-size: 6.5px; }
}

/* ---------------- Mobile masthead + drawer ---------------- */
body > header .nv-landing-context,
body > header .nv-landing-menu { display: none; }

.nv-landing-drawer { display: none; }

@media (max-width: 900px) {
  body > header nav,
  body > header .actions { display: none !important; }

  body > header .nv-landing-context {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-left: auto;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 7px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8c8c8c;
    white-space: nowrap;
  }
  body > header .nv-landing-context b {
    font-weight: 400;
    color: #fff;
  }

  body > header .nv-landing-menu {
    display: inline-flex;
    flex: 0 0 44px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
  }
  body > header .nv-landing-menu span {
    display: block;
    width: 16px;
    height: 1px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
  }
  body > header .nv-landing-menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  body > header .nv-landing-menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  body > header .nv-landing-menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

  .nv-landing-drawer {
    position: fixed;
    top: 76px;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9;
    padding: 24px 24px calc(30px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .nv-landing-drawer.is-open { display: flex; flex-direction: column; }

  .nv-landing-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 7px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #8c8c8c;
  }

  .nv-landing-drawer nav {
    display: flex !important;
    order: 0 !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 0;
    overflow: visible;
  }
  .nv-landing-drawer nav a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    height: auto;
    padding: 20px 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    font-size: 1.55rem;
    font-weight: 300;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #fff;
    counter-increment: none;
  }
  .nv-landing-drawer nav a::before { content: none; }
  .nv-landing-drawer nav a span {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 8px;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: #5c5c5c;
  }

  .nv-landing-drawer-actions {
    display: grid;
    order: 1;
    gap: 8px;
    margin-top: auto;
    padding-top: 28px;
  }
  .nv-landing-drawer-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 8px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #fff;
  }
  .nv-landing-drawer-actions a.is-primary {
    border-color: #fff;
    background: #fff;
    color: #000;
  }

  body.nv-menu-open { overflow: hidden; }
}

@media (max-width: 720px) {
  .nv-landing-drawer { top: 64px; }
}

@media (max-width: 380px) {
  body > header .nv-landing-context { padding-left: 10px; font-size: 6.5px; }
}
