/*
 * GoodInvestGroup Algo Lab OS — Shared Base Stylesheet
 * Provides: design tokens, focus styles, nav bar, and utility classes.
 * All page-specific styles live in their own <style> block; this file
 * supplies only what is safe to share globally.
 */


/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
  --bg:         #07111d;
  --panel:      rgba(11, 22, 37, 0.82);
  --panel-soft: rgba(17, 29, 46, 0.94);
  --text:       #eef3fb;
  --muted:      #8ea1bb;
  --accent:     #2bc46d;
  --accent-lt:  #82f0b2;
  --danger:     #ef6b6b;
  --warm:       #d7ab3d;
  --border:     rgba(146, 165, 192, 0.18);
  --glow:       rgba(43, 196, 109, 0.35);
}

/* ─── Canonical Background ───────────────────────────────────────────────── */
/* Pages that use System A inherit this; override in your own <style> block
   only if you need something different. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: "Outfit", "Segoe UI", sans-serif;
  color: var(--text);
  margin: 0;
}

/* ─── Global box-sizing & overflow containment ───────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Prevent any element from pushing the viewport wider than the screen.
   Tables and wide components scroll locally via their own overflow wrappers. */
img, video, canvas, svg {
  max-width: 100%;
}

/* Tables: always scroll locally, never expand the page */
.table-wrap, [class*="table-wrap"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: calc(100vw - 48px);
}

/* ─── Accessibility: Focus Ring ──────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Suppress the default outline on mouse clicks (keyboard-only ring) */
:focus:not(:focus-visible) {
  outline: none;
}

/* ─── Navigation Bar ─────────────────────────────────────────────────────── */
.gig-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 16px;
  margin-bottom: 18px;
  background: rgba(7, 16, 28, 0.84);
  border: 1px solid rgba(146, 165, 192, 0.14);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  flex-wrap: wrap;
  row-gap: 6px;
}

.gig-nav-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.gig-nav-brand {
  font-family: "Cinzel", serif;
  font-size: 0.82rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
  margin-right: 6px;
}

.gig-nav-brand:hover {
  color: var(--accent-lt);
}

.gig-nav-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: rgba(146, 165, 192, 0.18);
  flex-shrink: 0;
  margin: 0 4px;
  align-self: center;
}

.gig-nav a:not(.gig-nav-brand) {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.gig-nav a:not(.gig-nav-brand):hover {
  color: var(--text);
  background: rgba(146, 165, 192, 0.08);
}

.gig-nav a.nav-active {
  color: var(--text);
  background: rgba(146, 165, 192, 0.06);
}

.gig-nav a.nav-cta {
  color: var(--accent-lt);
  background: rgba(43, 196, 109, 0.13);
  border: 1px solid rgba(43, 196, 109, 0.32);
  font-weight: 600;
}

.gig-nav a.nav-cta:hover {
  background: rgba(43, 196, 109, 0.22);
  color: #b6fbd5;
}

.gig-nav a.nav-dogood {
  color: var(--warm, #d7ab3d);
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid rgba(215, 171, 61, 0.28);
  background: rgba(215, 171, 61, 0.07);
}

.gig-nav a.nav-dogood:hover {
  background: rgba(215, 171, 61, 0.16);
  color: #f0c84a;
}

/* Push sign-out and CTA links to the right */
.gig-nav-spacer {
  flex: 1 1 0;
}

/* Button that looks like a nav link (for form-based sign-out) */
.gig-nav-btn {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.gig-nav-btn:hover {
  color: var(--text);
  background: rgba(146, 165, 192, 0.08);
}

/* ─── Shared Button ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(43, 196, 109, 0.38);
  background: rgba(43, 196, 109, 0.15);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
  background: rgba(43, 196, 109, 0.24);
  border-color: rgba(43, 196, 109, 0.55);
}

.btn.ghost {
  background: transparent;
  border-color: var(--border);
}

.btn.ghost:hover {
  background: rgba(146, 165, 192, 0.07);
}

.btn.danger {
  border-color: rgba(239, 107, 107, 0.38);
  background: rgba(239, 107, 107, 0.1);
  color: #ffd8d8;
}

/* ─── Utility Spacing ────────────────────────────────────────────────────── */
.mt-1 { margin-top:  8px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.m-0  { margin: 0; }

/* ─── Utility Typography ─────────────────────────────────────────────────── */
.text-sm   { font-size: 0.88rem; }
.text-base { font-size: 1rem;    }
.text-muted { color: var(--muted); }
.h2-card   { font-size: 1.1rem;  margin: 0 0 8px; font-family: "Outfit", "Segoe UI", sans-serif; font-weight: 700; }

/* ─── Shared Colour Semantics ────────────────────────────────────────────── */
.pos  { color: var(--accent); }
.neg  { color: var(--danger); }

/* ─── Site Footer ────────────────────────────────────────────────────────── */
.gig-footer {
  margin-top: 56px;
  background: rgba(4, 9, 17, 0.97);
  border-top: 1px solid rgba(146, 165, 192, 0.11);
  padding: 52px 24px 0;
  font-family: "Outfit", "Segoe UI", sans-serif;
}

.gig-footer-main {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

/* First column: brand + newsletter */
.gig-footer-col:first-child {
  grid-column: auto;
}

.gig-footer-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
  margin-bottom: 14px;
  display: block;
  border-radius: 8px;
}

.gig-footer-tagline {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
  margin: 0 0 18px;
  max-width: 260px;
}

/* Inline newsletter form inside brand column */
.gig-footer-newsletter {
  display: flex;
  gap: 0;
  max-width: 280px;
}

.gig-footer-newsletter input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 8px 0 0 8px;
  border: 1px solid rgba(146, 165, 192, 0.22);
  border-right: none;
  background: rgba(11, 22, 37, 0.85);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.gig-footer-newsletter input:focus {
  border-color: rgba(43, 196, 109, 0.5);
}

.gig-footer-newsletter input::placeholder {
  color: #5a7490;
}

.gig-footer-newsletter button {
  padding: 9px 14px;
  border-radius: 0 8px 8px 0;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  font-family: inherit;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.gig-footer-newsletter button:hover {
  background: #33d97a;
}

/* Link columns */
.gig-footer-col h4 {
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 14px;
}

.gig-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.gig-footer-col ul li a {
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.15s;
}

.gig-footer-col ul li a:hover {
  color: var(--accent-lt);
}

/* Social icons */
.gig-footer-social {
  display: flex;
  gap: 9px;
  margin-top: 4px;
}

.gig-footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(146, 165, 192, 0.09);
  border: 1px solid rgba(146, 165, 192, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.gig-footer-social a:hover {
  background: rgba(146, 165, 192, 0.18);
  color: var(--text);
}

.gig-footer-social a svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* Bottom bar */
.gig-footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 0 22px;
  border-top: 1px solid rgba(146, 165, 192, 0.1);
}

.gig-footer-disclaimer {
  color: rgba(142, 161, 187, 0.55);
  font-size: 11.5px;
  line-height: 1.6;
  margin: 0;
}

/* ─── Responsive Footer ──────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .gig-footer {
    padding-left: 0;
    padding-right: 0;
  }
}

@media (max-width: 900px) {
  .gig-footer-main {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 32px;
  }
  .gig-footer-col:first-child {
    grid-column: 1 / -1;
  }
  .gig-footer-newsletter {
    max-width: 360px;
  }
}

@media (max-width: 560px) {
  .gig-footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .gig-footer-newsletter {
    flex-direction: column;
    max-width: 100%;
    gap: 10px;
  }
  .gig-footer-newsletter input {
    border-radius: 8px;
    border-right: 1px solid rgba(146, 165, 192, 0.22);
    padding: 11px 14px;
  }
  .gig-footer-newsletter button {
    border-radius: 8px;
    text-align: center;
    padding: 12px 14px;
  }
}

@media (max-width: 400px) {
  .gig-footer-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ─── Responsive Nav ─────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .gig-nav {
    padding: 8px 12px;
    border-radius: 14px;
    gap: 2px;
  }
  .gig-nav a:not(.gig-nav-brand) {
    padding: 4px 8px;
    font-size: 12px;
  }
  .gig-nav-brand {
    font-size: 0.74rem;
  }
}

/* ─── Mobile: sticky nav + kill backdrop-filter (GPU expensive) ─────────── */
@media (max-width: 760px) {
  .gig-nav {
    position: sticky;
    top: 0;
    z-index: 500;
    margin-bottom: 12px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(7, 16, 28, 0.98);
  }
}

/* ─── Scroll-to-top mouse ─────────────────────────────────────────────────── */
#scrollTopBtn {
  display: block;
  margin: 28px auto 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease;
}
#scrollTopBtn:hover { transform: translateY(-4px); }
#scrollTopBtn:active { transform: translateY(-2px); }

.stt-mouse {
  display: block;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(43, 196, 109, 0.65);
  border-radius: 14px;
  position: relative;
  background: rgba(7, 17, 29, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(43, 196, 109, 0.18), 0 2px 8px rgba(0,0,0,0.4);
}
.stt-wheel {
  display: block;
  width: 4px;
  height: 9px;
  background: #2bc46d;
  border-radius: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  animation: sttWheelUp 1.1s ease-in-out infinite;
}
@keyframes sttWheelUp {
  0%   { top: 20px; opacity: 0; }
  25%  { opacity: 1; }
  90%  { top: 7px;  opacity: 0.9; }
  100% { top: 7px;  opacity: 0; }
}
