/* Trustcore — shared styles
   ultralight: no framework, system-ish fonts + 2 Google Fonts */

:root {
  --bg: #0e1218;
  --bg-1: #161b24;
  --bg-2: #1c222d;
  --line: rgba(255,255,255,0.06);
  --line-strong: rgba(255,255,255,0.14);
  --fg: #eef2f8;
  --fg-dim: #9aa5b5;
  --fg-mute: #5d6675;
  --accent: #3dff85;
  --accent-soft: rgba(61,255,133,0.12);
  --accent-line: rgba(61,255,133,0.28);
  --danger: #e8616f;
  --warn: #e0a44c;
  --ok: #4bd39a;

  --display: "Space Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --body: "Space Grotesk", system-ui, sans-serif;

  --maxw: 1280px;
  --pad: clamp(20px, 4vw, 56px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* very subtle grid -- only at very top */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, #000 0%, #000 18%, transparent 45%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 18%, transparent 45%);
  z-index: 0;
}

/* small status sigil top-right */
body::after {
  content: "";
  position: fixed;
  top: 22px;
  right: 22px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 6px rgba(75,211,154,0.5);
  z-index: 50;
  animation: pulse 3.2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.9; }
}

/* ---- nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  background: rgba(5,5,7,0.65);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px var(--pad);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 17px;
}
.brand-mark {
  width: 22px;
  height: 22px;
  display: inline-block;
  position: relative;
}
.brand-mark svg { display: block; width: 100%; height: 100%; }
.nav-links {
  display: flex;
  gap: 4px;
  margin-left: 24px;
}
.nav-links a {
  font-size: 13px;
  color: var(--fg-dim);
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--mono);
  font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--fg); }
.nav-links a.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-cta {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.nav-ticker {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
}
.nav-ticker b { color: var(--ok); font-weight: 500; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line-strong);
  color: var(--fg);
  background: transparent;
  cursor: pointer;
  transition: border-color .2s, background .2s, color .2s, transform .15s;
}
.btn:hover { border-color: var(--accent-line); color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #001218;
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { background: #fff; border-color: #fff; color: #001218; }
.btn-arrow::after {
  content: "→";
  font-family: var(--display);
  font-weight: 400;
  transition: transform .2s;
}
.btn:hover .btn-arrow::after,
.btn-arrow:hover::after { transform: translateX(3px); }

/* ---- layout helpers ---- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); position: relative; z-index: 1; }
.section { padding: clamp(56px, 7vw, 96px) 0; position: relative; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 7vw, 96px); line-height: 0.98; }
h2 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.05; }
h3 { font-size: clamp(20px, 2vw, 24px); line-height: 1.2; }

p { text-wrap: pretty; }
.lede {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--fg-dim);
  line-height: 1.55;
  max-width: 62ch;
}

/* code-y label */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-dim);
  background: var(--bg-1);
  border: 1px solid var(--line);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---- hero ---- */
.hero {
  position: relative;
  padding: clamp(60px, 10vw, 120px) 0 clamp(80px, 12vw, 140px);
  overflow: hidden;
}
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
/* canvas attribute width/height would otherwise win over inset:0 */
canvas.hero-canvas,
canvas.quantum-canvas,
canvas.invest-canvas,
#future-canvas { width: 100% !important; height: 100% !important; display: block; }
.hero-content { position: relative; z-index: 2; }
.hero h1 b {
  font-weight: 500;
  color: var(--accent);
  font-style: italic;
}
.hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 48px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--fg-mute);
}
.hero-meta strong { color: var(--fg); font-weight: 500; }
.hero-meta span { display: flex; flex-direction: column; gap: 4px; }

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* corner brackets on hero */
.frame-corners::before, .frame-corners::after,
.frame-corners > .c1, .frame-corners > .c2 {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid var(--accent-line);
  content: "";
}
.frame-corners::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.frame-corners::after  { top: 12px; right: 12px; border-left: 0; border-bottom: 0; }
.frame-corners > .c1   { bottom: 12px; left: 12px; border-right: 0; border-top: 0; }
.frame-corners > .c2   { bottom: 12px; right: 12px; border-left: 0; border-top: 0; }

/* ---- cards ---- */
.card {
  position: relative;
  padding: 28px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0));
  border-radius: 4px;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--accent-line); }
.card .num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}

/* grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 32px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  margin-bottom: 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer a { color: var(--fg-dim); font-size: 14px; }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
  gap: 12px;
}

/* mono wireframe placeholder block */
.placeholder {
  position: relative;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.03) 0 1px,
      transparent 1px 12px),
    var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  min-height: 200px;
}

/* tweaks toggle (built-in panel calls into postMessage) */

/* shared scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--line-strong); }

/* tiny inline 3D rotator (CSS) — for non-hero accents */
.spin3d { transform-style: preserve-3d; animation: spin3d 16s linear infinite; }
@keyframes spin3d {
  from { transform: rotateX(0) rotateY(0); }
  to   { transform: rotateX(360deg) rotateY(720deg); }
}
.perspective { perspective: 900px; }

/* page header bar */
.page-head {
  padding: clamp(64px, 9vw, 110px) 0 clamp(40px, 6vw, 60px);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: clamp(40px, 6vw, 72px); }
.page-head .lede { margin-top: 20px; }

/* =====================================================
   MODERN SCROLL SYSTEM
   ===================================================== */

/* scroll progress bar -- fixed at top */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, transparent, var(--accent));
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 0 6px rgba(61,255,133,0.4);
  will-change: width;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.985);
  transition:
    opacity 1.1s cubic-bezier(.16,1,.3,1),
    transform 1.1s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(32px) scale(0.985);
  transition:
    opacity 1s cubic-bezier(.16,1,.3,1),
    transform 1s cubic-bezier(.16,1,.3,1);
}
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 110ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 220ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 330ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 440ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 550ms; }

/* zoom-in image reveal (minimax-style) */
.reveal-zoom {
  opacity: 0;
  transform: scale(1.06);
  transition: opacity 1.4s cubic-bezier(.16,1,.3,1), transform 1.6s cubic-bezier(.16,1,.3,1);
  will-change: opacity, transform;
}
.reveal-zoom.in { opacity: 1; transform: scale(1); }

/* sticky section indicator -- floats in the corner */
.section-marker {
  position: fixed;
  left: 22px;
  bottom: 22px;
  z-index: 30;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--fg-mute);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  opacity: 0;
  transition: opacity .4s;
}
.section-marker.is-visible { opacity: 1; }
.section-marker .sm-num {
  color: var(--accent);
  font-size: 22px;
  letter-spacing: -0.02em;
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
}
.section-marker .sm-bar {
  display: block;
  width: 40px; height: 1px;
  background: var(--line-strong);
  position: relative;
  overflow: hidden;
}
.section-marker .sm-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left;
  transform: scaleX(var(--p, 0));
  transition: transform .25s;
}
@media (max-width: 700px) { .section-marker { display: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
