/* ============================================
   Jack Chain — Investor Vision Page
   Ultra-minimal, whitepaper-inspired dark theme
   ============================================ */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #09090b;
  --surface: #18181b;
  --border: #27272a;
  --gold: #D4AF37;
  --blue: #3b82f6;
  --text: #fafafa;
  --dim: #a1a1aa;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --heading: 'Space Grotesk', sans-serif;
  --body: 'Inter', sans-serif;
  --section-pad: clamp(80px, 10vw, 140px);
  --container: 1120px;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.7;
  overflow-x: hidden;
}

::selection {
  background: var(--gold);
  color: var(--bg);
}

/* ---- Container ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.375rem); }
h4 { font-size: 1rem; }

p { color: var(--dim); max-width: 680px; }

.mono {
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
}

.label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
}

.gold { color: var(--gold); }
.blue { color: var(--blue); }

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.nav-brand-icon {
  width: 28px;
  height: 28px;
  background: var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--bg);
}

.nav-brand span {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--dim);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.2s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

/* ---- Section Base ---- */
section {
  padding: var(--section-pad) 0;
}

.section-header {
  margin-bottom: 64px;
}

.section-header .label {
  margin-bottom: 16px;
  display: block;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.divider {
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin-top: 24px;
}

/* ---- Hero ---- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  position: relative;
}

.hero-content {
  width: 100%;
}

.hero .label {
  margin-bottom: 24px;
  display: inline-block;
  color: var(--gold);
  letter-spacing: 0.15em;
}

.hero h1 {
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--dim);
  font-weight: 400;
  margin-bottom: 56px;
  max-width: 540px;
  line-height: 1.6;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  max-width: 900px;
}

.hero-metric {
  background: var(--surface);
  padding: 28px 24px;
}

.hero-metric .label {
  margin-bottom: 8px;
  display: block;
  font-size: 0.6875rem;
}

.hero-metric .value {
  font-family: var(--heading);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.hero-metric .value .unit {
  font-size: 0.75rem;
  color: var(--dim);
  font-weight: 400;
  margin-left: 4px;
}

.hero-metric .sub {
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 4px;
  font-family: var(--mono);
}

.hero-founded {
  margin-top: 48px;
  font-size: 0.8125rem;
  color: var(--dim);
}

.hero-founded strong {
  color: var(--text);
  font-weight: 500;
}

/* ---- Problem & Solution ---- */
.ps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 48px;
}

.ps-item {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.ps-item .problem-label,
.ps-item .solution-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  display: block;
}

.ps-item .problem-label { color: var(--red); }
.ps-item .solution-label { color: var(--green); }

.ps-item h4 {
  margin-bottom: 8px;
  font-size: 1.0625rem;
}

.ps-item p {
  font-size: 0.9375rem;
  line-height: 1.7;
}

.ps-pair {
  display: contents;
}

/* ---- Architecture ---- */
.arch-flow {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 48px;
}

.arch-layer {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
}

.arch-layer:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 80px;
  width: 1px;
  height: 22px;
  background: var(--border);
  z-index: 1;
}

.arch-layer-name {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--gold);
}

.arch-layer-desc {
  font-size: 0.875rem;
  color: var(--dim);
  line-height: 1.6;
}

.arch-layer-desc code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text);
  background: rgba(212, 175, 55, 0.08);
  padding: 2px 6px;
  border-radius: 3px;
}

/* ---- Tokenomics ---- */
.token-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 48px;
}

.token-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--dim);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.data-table tr:nth-child(even) td {
  background: rgba(24, 24, 27, 0.5);
}

.data-table td:first-child {
  color: var(--dim);
}

.data-table .mono-val {
  font-family: var(--mono);
  font-size: 0.8125rem;
}

/* Bar chart */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bar-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.875rem;
}

.bar-label span:first-child {
  color: var(--text);
  font-weight: 500;
}

.bar-label span:last-child {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--gold);
}

.bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--gold);
  width: 0;
  transition: width 1.2s ease;
}

.bar-fill.blue { background: var(--blue); }
.bar-fill.gold { background: var(--gold); }
.bar-fill.green { background: var(--green); }
.bar-fill.dim { background: var(--dim); }

/* ---- Emission Schedule ---- */
.emission-section .data-table {
  max-width: 720px;
}

.emission-note {
  margin-top: 24px;
  font-size: 0.8125rem;
  color: var(--dim);
  font-style: italic;
  max-width: 600px;
}

/* ---- Security ---- */
.security-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 48px;
}

.security-card {
  background: var(--surface);
  padding: 32px 28px;
}

.security-card .label {
  margin-bottom: 12px;
  display: block;
  color: var(--gold);
}

.security-card h4 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.security-card p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--dim);
}

.security-card code {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--text);
  display: block;
  margin-top: 8px;
  line-height: 1.8;
}

/* ---- Ecosystem ---- */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.eco-card {
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 0.2s;
}

.eco-card:hover {
  border-color: var(--gold);
}

.eco-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.eco-card-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

.eco-card h4 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.eco-card p {
  font-size: 0.8125rem;
  color: var(--dim);
  line-height: 1.6;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}

.badge-done {
  color: var(--green);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.badge-planned {
  color: var(--yellow);
  background: rgba(234, 179, 8, 0.1);
  border: 1px solid rgba(234, 179, 8, 0.2);
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ---- Jackina Games ---- */
.jackina-section {
  border-top: 1px solid var(--border);
}

.jackina-data-grid {
  max-width: 720px;
}

/* ---- Team ---- */
.team-section {
  border-top: 1px solid var(--border);
}

.team-card {
  max-width: 560px;
  margin-top: 48px;
  padding: 40px 36px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.team-card h3 {
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 0.875rem;
  color: var(--gold);
  margin-bottom: 16px;
}

.team-card p {
  font-size: 0.9375rem;
  line-height: 1.8;
}

/* ---- Links ---- */
.links-section {
  border-top: 1px solid var(--border);
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 48px;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: border-color 0.2s, background 0.2s;
}

.link-card:hover {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.04);
}

.link-card svg {
  width: 20px;
  height: 20px;
  color: var(--dim);
  flex-shrink: 0;
}

/* ---- Footer ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer p {
  font-size: 0.8125rem;
  color: var(--dim);
}

.footer-right {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
}

/* ---- Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .token-grid {
    grid-template-columns: 1fr;
  }
  .security-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-pad: 64px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(9, 9, 11, 0.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
  }

  .ps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .arch-layer {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .arch-layer:not(:last-child)::after {
    left: 24px;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }

  .eco-grid {
    grid-template-columns: 1fr;
  }

  .links-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  :root {
    --section-pad: 48px;
  }

  .container {
    padding: 0 16px;
  }

  .team-card {
    padding: 28px 20px;
  }
}
