/* PARALLAX — Site Stylesheet */

:root {
  --bg: #1a1a1a;
  --bg-lighter: #222222;
  --bg-card: #262626;
  --text: #d4d4d4;
  --text-dim: #888888;
  --text-bright: #f0f0f0;
  --accent: #00d4aa;
  --accent-dim: rgba(0, 212, 170, 0.15);
  --danger: #ff4444;
  --agent-purple: #b388ff;
  --social-blue: #64b5f6;
  --murmur-gray: #777;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-heading: 'Avenir Next', 'Helvetica Neue', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', Consolas, monospace;
  --max-width: 900px;
  --max-width-wide: 1100px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--text-bright);
  font-weight: 600;
  line-height: 1.3;
}

/* ── Navigation ── */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(26, 26, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 24px;
}

.nav-inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 14px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  opacity: 1;
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 24px;
  cursor: pointer;
}

/* ── Hero ── */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(0, 212, 170, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 80%, rgba(179, 136, 255, 0.03) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: clamp(48px, 8vw, 80px);
  letter-spacing: 12px;
  color: var(--text-bright);
  margin-bottom: 8px;
  font-weight: 700;
}

.hero-byline {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: 3px;
  margin-bottom: 48px;
}

/* Ticker */

.ticker-container {
  background: var(--bg-lighter);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 4px;
  padding: 20px 28px;
  margin: 0 auto 48px;
  max-width: 520px;
  font-family: var(--font-mono);
  font-size: 13px;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.ticker-header {
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
  margin-bottom: 12px;
  font-size: 11px;
  letter-spacing: 1px;
}

.ticker-contract {
  color: var(--text-bright);
  font-size: 12px;
  margin-bottom: 16px;
  line-height: 1.5;
}

.ticker-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.ticker-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  transition: all 0.3s;
}

.ticker-price .arrow {
  font-size: 20px;
  margin-left: 4px;
}

.ticker-stats {
  text-align: right;
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.8;
}

.ticker-feed {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 12px;
  padding-top: 10px;
  font-size: 11px;
  color: var(--text-dim);
  height: 60px;
  overflow: hidden;
  position: relative;
}

.ticker-feed-line {
  opacity: 0;
  animation: feedFadeIn 0.4s forwards;
  margin-bottom: 3px;
}

.ticker-feed-line .agent-id {
  color: var(--agent-purple);
}

.ticker-feed-line .price-val {
  color: var(--accent);
}

@keyframes feedFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(20px, 3vw, 26px);
  color: var(--text);
  font-style: italic;
  margin-bottom: 40px;
  line-height: 1.5;
}

.hero-cta-group {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */

.btn {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 3px;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #00e8bb;
  opacity: 1;
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent-dim);
  opacity: 1;
}

/* ── Sections ── */

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
}

.section-wide {
  max-width: var(--max-width-wide);
}

.section-title {
  font-size: 14px;
  font-family: var(--font-mono);
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-heading {
  font-size: clamp(28px, 4vw, 36px);
  margin-bottom: 24px;
}

.section-divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 80px;
  opacity: 0.4;
}

/* ── About ── */

.about-text {
  font-size: 19px;
  line-height: 1.8;
  max-width: 680px;
}

.about-text p {
  margin-bottom: 24px;
}

/* ── Characters ── */

.characters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.character-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 28px;
  transition: border-color 0.3s;
}

.character-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
}

.character-name {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.character-role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.character-hook {
  font-size: 16px;
  color: var(--text);
  line-height: 1.6;
}

/* ── Quotes ── */

.quotes-section {
  background: var(--bg-lighter);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.quote-block {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.quote-block:last-child {
  border-bottom: none;
}

.quote-text {
  font-size: clamp(20px, 3vw, 24px);
  font-style: italic;
  line-height: 1.6;
  color: var(--text-bright);
  position: relative;
  padding-left: 24px;
  border-left: 2px solid var(--accent);
}

/* ── Market Simulator ── */

.simulator-section {
  border-top: 1px solid rgba(255,255,255,0.04);
}

.simulator-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.sim-panel {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.sim-panel-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 16px;
}

.order-book-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  position: relative;
}

.order-book-row.bid::before {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(0, 212, 170, 0.08);
  width: var(--fill, 0%);
  transition: width 0.5s;
}

.order-book-row.ask::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: rgba(255, 68, 68, 0.08);
  width: var(--fill, 0%);
  transition: width 0.5s;
}

.order-book-row span {
  position: relative;
  z-index: 1;
}

.bid-price { color: var(--accent); }
.ask-price { color: var(--danger); }
.order-size { color: var(--text-dim); }

.agent-feed {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.agent-feed-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  display: flex;
  justify-content: space-between;
  animation: agentSlideIn 0.3s ease-out;
}

@keyframes agentSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.agent-feed-item .agent-name {
  color: var(--agent-purple);
}

.agent-feed-item .trade-side {
  font-weight: 700;
}

.agent-feed-item .trade-side.buy { color: var(--accent); }
.agent-feed-item .trade-side.sell { color: var(--danger); }

.sim-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: var(--text-dim);
}

.sim-stats .stat-value {
  color: var(--accent);
  font-weight: 700;
}

/* ── Verify Section ── */

.verify-box {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 32px;
  margin-top: 24px;
}

.verify-box code {
  display: block;
  background: var(--bg);
  padding: 16px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  overflow-x: auto;
  word-break: break-all;
  margin: 16px 0;
  line-height: 1.6;
}

.verify-box p {
  margin-bottom: 12px;
  line-height: 1.7;
}

/* ── Get the Book ── */

.get-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.get-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 28px;
  text-align: center;
  transition: border-color 0.3s;
}

.get-card:hover {
  border-color: rgba(0, 212, 170, 0.3);
}

.get-card-title {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.get-card-sub {
  font-size: 14px;
  color: var(--text-dim);
}

/* ── Get Layout (cover + cards) ── */

.get-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.get-cover {
  flex-shrink: 0;
}

.get-options {
  flex: 1;
  min-width: 0;
}

/* ── Footer ── */

.footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 40px 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.footer-ident {
  color: var(--accent);
  margin-bottom: 8px;
}

/* ── Read Page ── */

.read-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.read-page .chapter-header {
  text-align: center;
  margin-bottom: 48px;
}

.read-page .chapter-number {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.read-page .chapter-name {
  font-family: var(--font-heading);
  font-size: 36px;
  color: var(--text-bright);
  margin-bottom: 12px;
}

.read-page .chapter-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.8;
}

.read-page .chapter-meta .accent {
  color: var(--accent);
}

.read-prose {
  font-size: 18px;
  line-height: 1.85;
}

.read-prose p {
  margin-bottom: 20px;
  text-indent: 0;
}

.read-prose p + p {
  text-indent: 2em;
}

.read-prose .scene-break {
  text-align: center;
  margin: 32px 0;
  color: var(--text-dim);
  text-indent: 0 !important;
}

.interstitial-block {
  background: var(--bg-lighter);
  border-left: 3px solid var(--accent);
  padding: 24px 28px;
  margin: 40px 0;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-dim);
  border-radius: 0 4px 4px 0;
}

.interstitial-block .header-line {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.interstitial-block .flag-line {
  color: var(--danger);
  margin-top: 12px;
}

.interstitial-block .data-line {
  margin-left: 16px;
}

.interstitial-market {
  border-left-color: var(--accent);
}

.read-continue {
  text-align: center;
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.read-continue p {
  font-style: italic;
  color: var(--text-dim);
  margin-bottom: 20px;
}

/* ── Listen Page ── */

.listen-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.audio-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 28px;
  margin-bottom: 20px;
}

.audio-card-title {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.audio-card-desc {
  font-size: 15px;
  color: var(--text-dim);
  margin-bottom: 16px;
}

.audio-player-stub {
  background: var(--bg);
  border-radius: 3px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.play-btn-stub {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: default;
}

.play-btn-stub::after {
  content: '';
  width: 0;
  height: 0;
  border-left: 10px solid var(--accent);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

.waveform-stub {
  flex: 1;
  height: 24px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--accent) 0px,
      var(--accent) 2px,
      transparent 2px,
      transparent 5px
    );
  opacity: 0.2;
  border-radius: 2px;
}

.audio-duration {
  flex-shrink: 0;
}

.listen-note {
  text-align: center;
  margin-top: 40px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(0, 212, 170, 0.2);
  border-radius: 4px;
  font-size: 16px;
}

/* ── Essays Page ── */

.essays-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.essay-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 32px 0;
}

.essay-item:first-child {
  padding-top: 0;
}

.essay-number {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.essay-title {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.essay-title a {
  color: var(--text-bright);
}

.essay-title a:hover {
  color: var(--accent);
}

.essay-desc {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.6;
}

.essay-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-top: 8px;
}

/* ── Tools Page ── */

.tools-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.tools-category {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
  margin-top: 48px;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 212, 170, 0.2);
}

.tools-category:first-of-type {
  margin-top: 0;
}

.tool-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 24px 0;
}

.tool-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
}

.tool-name {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--text-bright);
  font-weight: 600;
}

.tool-name a {
  color: var(--text-bright);
}

.tool-name a:hover {
  color: var(--accent);
}

.tool-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 2px;
  padding: 2px 8px;
  flex-shrink: 0;
}

.tool-desc {
  font-size: 16px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── Transmissions Page ── */

.transmissions-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.transmission-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 20px 0;
}

.transmission-item.transmission-locked {
  opacity: 0.5;
}

.transmission-item.transmission-live {
  opacity: 1;
}

.transmission-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.transmission-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.transmission-type {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 2px;
  border: 1px solid;
}

.type-agent { color: var(--agent-purple); border-color: rgba(179, 136, 255, 0.3); }
.type-market { color: var(--accent); border-color: rgba(0, 212, 170, 0.3); }
.type-classified { color: var(--danger); border-color: rgba(255, 68, 68, 0.3); }
.type-social { color: var(--social-blue); border-color: rgba(100, 181, 246, 0.3); }
.type-murmur { color: var(--murmur-gray); border-color: rgba(119, 119, 119, 0.3); border-style: dashed; }

.transmission-title {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.transmission-title a {
  color: var(--text-bright);
}

.transmission-title a:hover {
  color: var(--accent);
}

.transmission-status {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ── Essay Template ── */

.essay-page {
  max-width: 680px;
  margin: 0 auto;
  padding: 100px 24px 80px;
}

.essay-page .essay-body {
  font-size: 18px;
  line-height: 1.85;
}

.essay-page .essay-body p {
  margin-bottom: 20px;
}

.essay-page .essay-body h2 {
  font-size: 24px;
  margin-top: 48px;
  margin-bottom: 20px;
}

.essay-page .essay-body strong {
  color: var(--text-bright);
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    flex-direction: column;
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-hamburger {
    display: block;
  }

  .simulator-wrapper {
    grid-template-columns: 1fr;
  }

  .get-layout {
    flex-direction: column;
    align-items: center;
  }

  .hero-title {
    letter-spacing: 6px;
  }

  .ticker-container {
    padding: 16px 20px;
  }

  .ticker-price {
    font-size: 26px;
  }

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

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: 60px 16px;
  }

  .hero {
    padding: 60px 16px 40px;
  }
}
