@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;700&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  color-scheme: dark;
  --bg: #071016;
  --bg-soft: rgba(10, 23, 31, 0.82);
  --bg-elevated: rgba(14, 31, 41, 0.94);
  --border: rgba(135, 216, 202, 0.18);
  --border-strong: rgba(135, 216, 202, 0.34);
  --text: #f2faf8;
  --muted: #9bc6bf;
  --teal: #6fe3c7;
  --teal-strong: #23c9a6;
  --gold: #ffc76a;
  --danger: #ff8f8f;
  --shadow: 0 30px 90px rgba(2, 10, 13, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 15px/1.6 "Space Grotesk", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(35, 201, 166, 0.22), transparent 32%),
    radial-gradient(circle at 92% 10%, rgba(255, 199, 106, 0.15), transparent 24%),
    linear-gradient(180deg, #061014 0%, #09131a 38%, #050b0f 100%);
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.landing-shell {
  position: relative;
  width: min(1280px, calc(100vw - 32px));
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top)) 0 calc(72px + env(safe-area-inset-bottom));
}

.landing-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 75%);
}

.topbar,
.hero,
.card {
  position: relative;
  backdrop-filter: blur(18px);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 22px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.brand-orbit {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 32%),
    linear-gradient(135deg, rgba(35, 201, 166, 0.95), rgba(255, 199, 106, 0.82));
  box-shadow: 0 0 30px rgba(35, 201, 166, 0.26);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-copy span {
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions,
.hero-actions,
.hero-microcopy {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.ghost-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: none;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.ghost-link:hover,
.primary-link:hover {
  transform: translateY(-1px);
}

.ghost-link {
  border: 1px solid rgba(155, 198, 191, 0.2);
  background: rgba(7, 16, 22, 0.66);
  color: var(--text);
}

.primary-link {
  border: 1px solid rgba(35, 201, 166, 0.55);
  background: linear-gradient(135deg, rgba(35, 201, 166, 0.95), rgba(11, 126, 141, 0.95));
  color: #041115;
  font-weight: 700;
}

.primary-link.large,
.ghost-link.large {
  min-height: 50px;
  padding: 0 22px;
}

.primary-link.full-width {
  width: 100%;
  margin-top: 18px;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 39;
  background: rgba(3, 10, 14, 0.72);
  backdrop-filter: blur(10px);
}

.join-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.join-modal-card {
  width: min(560px, 100%);
  padding: 26px;
  border-radius: 28px;
  backdrop-filter: blur(18px);
  background: rgba(10, 23, 31, 0.95);
  border: 1px solid rgba(135, 216, 202, 0.22);
  box-shadow: var(--shadow);
}

.join-modal-card .field {
  display: grid;
  gap: 8px;
}

.join-modal-card .field-label {
  color: var(--muted);
  font-size: 13px;
}

.join-modal-card input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid rgba(135, 216, 202, 0.18);
  background: rgba(7, 16, 22, 0.72);
  color: var(--text);
  font: inherit;
}

.join-modal-card input:focus {
  outline: none;
  border-color: rgba(35, 201, 166, 0.65);
  box-shadow: 0 0 0 3px rgba(35, 201, 166, 0.12);
}

.legal-corner-link {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(7, 16, 29, 0.85);
  border: 1px solid rgba(169, 193, 255, 0.14);
  color: var(--muted);
  text-decoration: none;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(2, 10, 13, 0.32);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.legal-corner-link:hover {
  transform: translateY(-1px);
  border-color: rgba(102, 163, 255, 0.45);
  color: var(--text);
  background: rgba(63, 134, 255, 0.12);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.92fr);
  gap: 24px;
  margin-top: 22px;
  padding: 28px;
  border-radius: 28px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -30% auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(35, 201, 166, 0.22), transparent 68%);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font: 500 12px/1.3 "IBM Plex Mono", monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 12ch;
  font-size: clamp(36px, 6vw, 68px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.hero-text,
.section-heading p,
.panel-footnote,
.disclosure-copy {
  color: var(--muted);
}

.hero-text {
  max-width: 62ch;
  margin-bottom: 24px;
  font-size: 16px;
}

.hero-microcopy {
  margin-top: 18px;
}

.app-note {
  margin: 16px 0 0;
  color: var(--muted);
  max-width: 54ch;
}

.hero-microcopy span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(155, 198, 191, 0.16);
  background: rgba(6, 14, 19, 0.68);
  color: var(--muted);
  font: 500 12px/1.2 "IBM Plex Mono", monospace;
}

.hero-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
}

.hero-panel h2,
.section-heading h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.metrics-grid,
.results-layout,
.grid-layout,
.highlight-grid {
  display: grid;
  gap: 16px;
}

.metrics-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card,
.outcome-card,
.community-item,
.highlight-card {
  border: 1px solid rgba(155, 198, 191, 0.14);
  background: rgba(7, 16, 22, 0.72);
  border-radius: 20px;
  padding: 16px;
}

.metric-card small,
.community-item small,
.highlight-card p {
  color: var(--muted);
}

.metric-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 500 11px/1.2 "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-value {
  margin: 14px 0 8px;
  font-size: clamp(24px, 3.4vw, 34px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-mode {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 20px rgba(111, 227, 199, 0.42);
}

.metric-mode.simulated {
  background: var(--gold);
  box-shadow: 0 0 20px rgba(255, 199, 106, 0.3);
}

.results-strip,
.grid-layout {
  margin-top: 22px;
}

.results-layout {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  margin-top: 18px;
}

.section-heading.compact h2 {
  font-size: 26px;
}

.card {
  padding: 22px;
  border-radius: 24px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header h3,
.panel-header h2 {
  margin-bottom: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font: 500 11px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-pill.live {
  color: #09231f;
  background: rgba(111, 227, 199, 0.92);
}

.status-pill.simulated {
  color: #281701;
  background: rgba(255, 199, 106, 0.9);
}

.outcome-feed,
.community-feed,
.stack-column {
  display: grid;
  gap: 12px;
}

.outcome-card,
.community-item {
  display: grid;
  gap: 8px;
}

.outcome-header,
.community-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.outcome-name,
.community-name {
  font-size: 18px;
  font-weight: 700;
}

.outcome-pnl,
.trade-pnl {
  font: 700 20px/1 "IBM Plex Mono", monospace;
}

.gain {
  color: var(--teal);
}

.loss {
  color: var(--danger);
}

.panel-footnote {
  margin: 14px 0 0;
  font-size: 13px;
}

.grid-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  align-items: start;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid rgba(155, 198, 191, 0.1);
}

th {
  color: var(--muted);
  font: 500 11px/1.2 "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

td {
  color: var(--text);
  font-size: 14px;
}

.trade-note {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(7, 16, 22, 0.78);
  border: 1px solid rgba(155, 198, 191, 0.16);
  color: var(--muted);
  font: 500 11px/1.2 "IBM Plex Mono", monospace;
}

.highlight-grid {
  margin-top: 10px;
}

.highlight-card h3 {
  margin-bottom: 8px;
}

.disclosure-card {
  background:
    linear-gradient(180deg, rgba(13, 27, 35, 0.96), rgba(6, 13, 18, 0.96)),
    radial-gradient(circle at top right, rgba(255, 199, 106, 0.12), transparent 45%);
}

.connect-card {
  background:
    linear-gradient(180deg, rgba(9, 24, 31, 0.96), rgba(5, 13, 18, 0.96)),
    radial-gradient(circle at top left, rgba(35, 201, 166, 0.14), transparent 46%);
}

.connect-copy {
  margin: 0 0 18px;
  color: var(--muted);
}

.disclosure-copy {
  margin-bottom: 0;
}

.loading,
.empty {
  padding: 14px;
  border-radius: 18px;
  border: 1px dashed rgba(155, 198, 191, 0.24);
  color: var(--muted);
  background: rgba(7, 16, 22, 0.5);
}

.fade-up {
  opacity: 0;
  transform: translateY(16px);
  animation: fade-up 540ms ease forwards;
}

.fade-up:nth-child(2) { animation-delay: 40ms; }
.fade-up:nth-child(3) { animation-delay: 80ms; }
.fade-up:nth-child(4) { animation-delay: 120ms; }
.fade-up:nth-child(5) { animation-delay: 160ms; }
.fade-up:nth-child(6) { animation-delay: 200ms; }

@keyframes fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .results-layout,
  .grid-layout {
    grid-template-columns: 1fr;
  }

  .deck-spacer {
    display: none;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .landing-shell {
    width: min(100vw - 20px, 100%);
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
  }

  .topbar,
  .hero,
  .card {
    padding: 18px;
    border-radius: 20px;
  }

  .legal-corner-link {
    left: 14px;
    bottom: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-actions,
  .hero-actions {
    width: 100%;
  }

  .ghost-link,
  .primary-link {
    flex: 1 1 0;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 38px;
  }

  .section-heading h2,
  .hero-panel h2 {
    font-size: 26px;
  }
}
