* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: auto; }

body {
  background: #1a1d2e;
  color: #e8e8ef;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

/* ============================================================
   NAVIGATION BAR (fixed top)
   ============================================================ */
.stx-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 36px;
  font-size: 13px;
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
  position: fixed;
  top: 0; left: 0; right: 0;
  background: rgba(26,29,46,0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
}
.stx-nav-links { display: flex; gap: 28px; }
.stx-nav-links button {
  background: none;
  border: none;
  color: #8c8ea3;
  cursor: pointer;
  padding: 4px 0;
  font-size: 18px;
  font-family: inherit;
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
}
.stx-nav-links button:hover { color: #e8e8ef; }
.stx-nav-links button.active { color: #fff; border-bottom-color: #fff; }
.stx-ticker { display: flex; align-items: center; flex: 1; min-width: 0; margin: 0 24px; height: 40px; }
.stx-ticker-label {
  flex-shrink: 0; padding: 0 14px; height: 100%;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; letter-spacing: 1px; color: #5DCAA5;
  background: rgba(93,202,165,0.10);
  border-radius: 6px 0 0 6px;
}
.stx-ticker-date { color: rgba(93,202,165,0.55); font-size: 10px; letter-spacing: 0.5px; margin-left: 2px; }
.stx-ticker-mask { overflow: hidden; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; }
.stx-ticker-track { display: inline-flex; white-space: nowrap; will-change: transform; }
.stx-dot { width: 6px; height: 6px; border-radius: 50%; background: #5DCAA5; flex-shrink: 0; }
.stx-tick { display: inline-flex; align-items: center; gap: 7px; padding: 0 18px; font-size: 13px; }
.stx-tick.ro { background: rgba(93,202,165,0.08); }
.stx-tick-zone { color: #c8c9d8; font-weight: 500; }
.stx-tick.ro .stx-tick-zone { color: #fff; }
.stx-tick-price { color: #8c8ea3; font-variant-numeric: tabular-nums; }
.stx-tick-chg { font-size: 11px; font-variant-numeric: tabular-nums; }
.stx-lang { font-size: 18px; color: #8c8ea3; cursor: pointer; }

/* ============================================================
   GRID CANVAS (fixed background, fade on scroll)
   ============================================================ */
.stx-grid-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  will-change: opacity;
}

/* ============================================================
   SCENES (stacked vertically, each 100vh)
   ============================================================ */
.stx-scene {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  z-index: 2;
}
.stx-scene > * { pointer-events: auto; }

/* ============================================================
   LANDING SCENE
   ============================================================ */
.stx-landing-content {
  text-align: center;
  position: relative;
  z-index: 3;
}
.stx-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
  font-weight: 400;
  color: #fff;
  margin: 16px 0 12px;
  letter-spacing: -1px;
  text-shadow: 0 2px 24px rgba(26,29,46,0.7);
  min-height: 1.2em;
}

.stx-title-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: #fff;
  vertical-align: text-bottom;
  margin-left: 4px;
  opacity: 0;
  animation: cursor-blink 0.7s step-end infinite;
}
.stx-title-cursor.done {
  animation: cursor-blink-fade 4s linear 1s forwards;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}
@keyframes cursor-blink-fade {
  0%, 49%   { opacity: 1; }
  50%, 99%  { opacity: 0; }
  100%      { opacity: 0; visibility: hidden; }
}
.stx-subtitle {
  font-size: 15px;
  color: #a8aabb;
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 1.4s ease 4.0s forwards;
  text-shadow: 0 2px 16px rgba(26,29,46,0.7);
}
.stx-start {
  background: #fff;
  color: #1a1d2e;
  border: none;
  border-radius: 999px;
  padding: 12px 44px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s;
  opacity: 0;
  animation: fadeUp 1.4s ease 4.4s forwards;
}
.stx-start:hover { transform: translateY(-1px); }

.stx-scroll-hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #6b6d82;
  font-size: 11px;
  opacity: 0;
  animation: fadeUp 1s ease 5.0s forwards, bounce 2s ease-in-out 6.0s infinite;
  pointer-events: none;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   CHAPTER INDEX SCENE
   ============================================================ */
.stx-chapter-section {
  padding-top: 100px;
}

.stx-chapter-tabs {
  display: flex;
  gap: 30px;
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  z-index: 3;
}
.stx-chapter-tabs button {
  background: none;
  border: none;
  color: #6b6d82;
  cursor: pointer;
  padding: 4px 0;
  font-family: inherit;
  font-size: 15px;
  transition: color 0.2s;
}
.stx-chapter-tabs button.current { color: #fff; font-weight: 500; }
.stx-chapter-tabs button:hover { color: #c8c9d8; }

.stx-chapter-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  width: 100%;
  max-width: 880px;
  align-items: center;
  position: relative;
  z-index: 3;
}
.stx-ch-num {
  font-size: 25px;
  color: #8c8ea3;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}
.stx-ch-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 400;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 18px;
}
.stx-ch-desc {
  font-size: 14px;
  color: #a8aabb;
  line-height: 1.6;
  margin-bottom: 24px;
}
.stx-ch-go {
  background: #fff;
  color: #1a1d2e;
  border: none;
  border-radius: 999px;
  padding: 9px 24px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
}

.stx-sub-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.stx-sub-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.15s;
  text-decoration: none;
  color: inherit;
}
.stx-sub-card:hover { transform: translateX(-3px); }
.stx-sub-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #1a1d2e;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stx-sub-name {
  font-size: 14px;
  color: #1a1d2e;
  font-weight: 500;
}

/* ============================================================
   CHAPTER NAVIGATION ARROWS
   ============================================================ */
.stx-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  border: none;
  color: #1a1d2e;
  z-index: 4;
}
.stx-arrow:hover { background: #fff; }
.stx-arrow:active { transform: translateY(-50%) scale(0.92); }
.stx-arrow.left { left: 24px; }
.stx-arrow.right { right: 24px; }
.stx-arrow:disabled { opacity: 0.25; cursor: default; }

/* ============================================================
   LEGEND (fixed bottom)
   ============================================================ */
.stx-legend {
  position: fixed;
  bottom: 28px;
  left: 36px;
  display: flex;
  gap: 18px;
  font-size: 11px;
  color: #8c8ea3;
  opacity: 0;
  animation: fadeUp 1s ease 5s forwards;
  z-index: 5;
  pointer-events: none;
}
.stx-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stx-legend-shape {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ============================================================
   ABOUT SCENE (3rd scene on index.html)
   ============================================================ */
.stx-about-content {
  max-width: 920px;
  width: 100%;
  text-align: left;
  position: relative;
  z-index: 3;
  padding-top: 40px;
}
.stx-about-eyebrow {
  font-size: 13px;
  color: #8c8ea3;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 600;
}
.stx-about-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 40px;
  letter-spacing: -0.3px;
}
.stx-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px 36px;
}
.stx-about-block {
  padding: 4px 0;
}
.stx-about-h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  color: #fff;
  margin-bottom: 10px;
  font-weight: 400;
}
.stx-about-block p {
  font-size: 14px;
  line-height: 1.65;
  color: #a8aabb;
}
.stx-about-block strong { color: #e8e8ef; font-weight: 600; }
.stx-about-block em { color: #c8cad8; font-style: italic; }
.stx-about-block a {
  color: #85B7EB;
  text-decoration: none;
  border-bottom: 1px solid rgba(133, 183, 235, 0.3);
  padding-bottom: 1px;
  transition: border-color 0.2s;
}
.stx-about-block a:hover { border-bottom-color: #85B7EB; }
.stx-about-block a i {
  font-size: 12px;
  margin-left: 2px;
  vertical-align: -1px;
}



/* --- Author photo (About) --- */
.stx-author {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
}
.stx-author p { margin: 0; }
.stx-author-fig {
  flex: 0 0 auto;
  margin: 0;
  width: 150px;
}
.stx-author-photo {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.14);
}
.stx-author-fig figcaption {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #6b6d82;
  font-style: italic;
}
.stx-author-links {
  display: block;
  margin-top: 10px;
}
.stx-author-links a { margin-right: 14px; }

/* --- Lightbox --- */
.stx-author-photo { cursor: zoom-in; }
.stx-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(10,12,22,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  cursor: zoom-out;
}
.stx-lightbox[hidden] { display: none; }
.stx-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 4px;
}
.stx-lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 34px;
  line-height: 1;
  color: #a8aabb;
  background: none;
  border: none;
  cursor: pointer;
}
.stx-lightbox-close:hover { color: #fff; }



/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 720px) {
  .stx-chapter-body { grid-template-columns: 1fr; gap: 30px; }
  .stx-title { font-size: 44px; }
  .stx-ch-name { font-size: 28px; }
  .stx-nav { padding: 14px 18px; }
  .stx-arrow.left { left: 8px; }
  .stx-arrow.right { right: 8px; }
  .stx-legend { display: none; }
  .stx-about-grid { grid-template-columns: 1fr; gap: 20px; }
  .stx-about-title { font-size: 28px; }
  .stx-author { flex-direction: column; }
}
