/* ═══════════════════════════════════════════
   MINESIX.IO — Animation & Globe Styles
═══════════════════════════════════════════ */

/* ── Hero entrance — pure CSS, no GSAP dependency ──
   Ensures title always renders even if GSAP fails. ── */
.hero-badge  { animation: heroUp 0.8s cubic-bezier(.16,1,.3,1) 0.05s both; }
.hero-title  { animation: heroUp 0.9s cubic-bezier(.16,1,.3,1) 0.15s both; }
.hero-sub    { animation: heroUp 0.9s cubic-bezier(.16,1,.3,1) 0.32s both; }
.hero-cta-row { animation: heroUp 0.9s cubic-bezier(.16,1,.3,1) 0.48s both; }
.hero-stats  { animation: heroUp 0.9s cubic-bezier(.16,1,.3,1) 0.6s  both; }
.flow-diagram { animation: heroUp 1s   cubic-bezier(.16,1,.3,1) 0.7s  both; }

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

/* ── Word split (kept for compat) ── */
.word-wrap { display: inline-block; overflow: hidden; vertical-align: bottom; }
.word      { display: inline-block; }

/* ══════════════════════════════════════════
   SCROLL STORY — HORIZONTAL PANEL TRACK
══════════════════════════════════════════ */
.story-section {
  height: 380vh;
  position: relative;
}

/* ── Sticky container ── */
/* ── Scene nav sidebar ── */
.scene-nav {
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  z-index: 20;
}

.sn-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  text-align: left;
}

.sn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.sn-item.active .sn-dot {
  background: var(--accent-purple);
  border-color: var(--accent-purple);
  box-shadow: 0 0 10px var(--accent-purple);
  transform: scale(1.4);
}

.sn-info { display: none; }

.sn-line {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
  align-self: center;
}

/* ── Scene layout ── */
.story-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--bg-base);
}

/* ── Scenes: absolutely stacked, full viewport ── */
.story-scene {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  justify-items: center;
  gap: 48px;
  padding: 40px 60px 40px 80px;
  visibility: hidden;
  pointer-events: none;
  overflow: hidden;
}

.story-scene.sc-active {
  visibility: visible;
  pointer-events: auto;
}

/* Scene left */
.sc-left { position: relative; width: 100%; max-width: 480px; justify-self: end; }

.sc-eyebrow {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 4px;
}

.sc-num-big {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: rgba(168,85,247,0.15);
  line-height: 1;
  letter-spacing: -2px;
}

.scene-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 8px 0 14px;
}

.scene-desc {
  font-size: 0.97rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 22px;
  max-width: 380px;
}

.scene-bullets {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.scene-bullets li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.sb-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  flex-shrink: 0;
}

/* Scene right */
.sc-right {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  max-width: 520px;
  justify-self: start;
  overflow: visible;
}

/* ── Scene 2 vote counter ── */
.sc2-vote-counter {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(168,85,247,0.06);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 10px;
  margin-top: 4px;
}

.sc2-vc-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.sc2-vc-count { font-family: var(--font-display); font-size: 1.2rem; font-weight: 800; color: var(--text-primary); }

/* ══ SCENE 1 VISUAL ══ */
.sc1-visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 500px;
}

/* Signal flow nodes */
.flow-visual {
  display: flex;
  align-items: center;
  background: rgba(13,15,30,0.7);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 24px;
}

.fv-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.fv-icon-box {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent-cyan);
}

.fv-mx-box { background: rgba(168,85,247,0.1); border-color: rgba(168,85,247,0.3); position: relative; }
.fv-ai-box { background: rgba(168,85,247,0.08); border-color: rgba(168,85,247,0.2); color: var(--accent-purple); }

.fv-mx-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 16px;
  border: 2px solid rgba(168,85,247,0.4);
  animation: mxPulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes mxPulse {
  0%,100% { opacity: 0; transform: scale(1); }
  50%      { opacity: 1; transform: scale(1.08); }
}

.fv-node span {
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.fv-connector {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 4px;
  position: relative;
}

.fv-svg { width: 100%; height: 20px; }

.fv-packet {
  position: absolute;
  top: 2px;
  left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan), 0 0 20px rgba(0,212,255,0.4);
  opacity: 0;
}

.fv-p2 { background: var(--accent-purple); box-shadow: 0 0 10px var(--accent-purple), 0 0 20px rgba(168,85,247,0.4); }

.fv-conn-label {
  font-size: 0.58rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Terminal */
.sv-terminal {
  background: rgba(10,11,22,0.95);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 12px;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  box-shadow: 0 0 40px rgba(168,85,247,0.07), 0 20px 50px rgba(0,0,0,0.5);
}

.svt-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  background: rgba(255,255,255,0.025);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.svt-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.12); }
.svt-dot.svt-g { background: #30d158; box-shadow: 0 0 6px #30d158; }
.svt-title-bar { margin-left: 6px; color: var(--text-muted); font-size: 0.7rem; }

.svt-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.svt-line { line-height: 1.8; white-space: nowrap; overflow: hidden; }
.svt-indent { padding-left: 16px; }
.svt-dim    { color: var(--text-muted); }
.svt-spacer { height: 5px; }
.svt-method { color: #ff7b7b; font-weight: 700; }
.svt-path   { color: var(--text-secondary); }
.svt-ok     { color: #30d158; float: right; }
.svt-brace  { color: rgba(255,255,255,0.3); }
.svt-key    { color: var(--accent-cyan); }
.svt-colon  { color: rgba(255,255,255,0.3); }
.svt-str    { color: #ffd06e; }
.svt-num    { color: #a8d8a8; }
.svt-comma  { color: rgba(255,255,255,0.3); }
.svt-status { color: var(--text-muted); margin-top: 3px; }
.svt-cyan   { color: var(--accent-cyan); }
.svt-cursor { color: var(--accent-purple); animation: blink 1s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ══ SCENE 2 VISUAL ══ */
.sc2-visual {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-right: 4px;
}
.sc2-visual::-webkit-scrollbar { display: none; }

.sv-agents {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sva-card {
  background: rgba(13,15,30,0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.sva-card:hover {
  border-color: rgba(168,85,247,0.3);
  box-shadow: 0 0 20px rgba(168,85,247,0.06);
}

.sva-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sva-icon-wrap {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.quant-icon  { background: rgba(168,85,247,0.15); border: 1px solid rgba(168,85,247,0.25); }
.fund-icon   { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); }
.social-icon { background: rgba(236,72,153,0.12); border: 1px solid rgba(236,72,153,0.25); }
.sent-icon   { background: rgba(0,212,255,0.1);   border: 1px solid rgba(0,212,255,0.2); }
.risk-icon   { background: rgba(48,209,88,0.1);   border: 1px solid rgba(48,209,88,0.2); }

/* Compact card for 5-agent layout */
.sva-card-sm { padding: 10px 14px; }
.sva-card-sm .sva-icon-wrap { width: 28px; height: 28px; font-size: 0.9rem; border-radius: 7px; }
.sva-card-sm .sva-name { font-size: 0.82rem; }
.sva-card-sm .sva-sub  { font-size: 0.67rem; }
.sva-card-sm .sva-header { margin-bottom: 7px; }
.sva-card-sm .sva-conf { font-size: 0.68rem; }

.sva-meta { flex: 1; }
.sva-name { font-weight: 600; font-size: 0.87rem; }
.sva-sub  { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

.sva-badge {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 100px;
}

.sva-badge.approve {
  background: rgba(48,209,88,0.1);
  color: #30d158;
  border: 1px solid rgba(48,209,88,0.25);
}

.sva-bar-track {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 5px;
}

.sva-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 3px;
  transition: width 1.2s cubic-bezier(0.16,1,0.3,1);
}

.sva-conf {
  font-size: 0.68rem;
  color: var(--text-muted);
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.sva-num { color: var(--text-secondary); font-weight: 600; }

.sva-verdict {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px 20px;
  background: rgba(168,85,247,0.06);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 12px;
  margin-top: 2px;
}

.sva-tally {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--text-primary);
}

.sva-tally span { color: var(--text-muted); font-weight: 400; }

.sva-result {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.sva-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* ══ SCENE 3 VISUAL ══ */
.sc3-visual {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: visible;
}

/* Top row: two floats side by side */
.sc3-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.p3-chart-card {
  background: rgba(10,11,22,0.95);
  border: 1px solid rgba(0,212,255,0.15);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,212,255,0.06), 0 20px 60px rgba(0,0,0,0.5);
}

.p3cc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.p3cc-pair {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.p3cc-tf {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.p3cc-pnl-badge {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: #30d158;
  background: rgba(48,209,88,0.1);
  border: 1px solid rgba(48,209,88,0.2);
  padding: 4px 12px;
  border-radius: 8px;
}

.p3cc-period { font-size: 0.7rem; font-weight: 400; color: rgba(48,209,88,0.7); }

.p3-chart-wrap {
  padding: 8px 12px 0;
}
.p3-chart-wrap svg { height: 100px; }

#xau-chart { width: 100%; display: block; }

.p3-position {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.04);
  margin-top: 8px;
}

.p3p-cell {
  background: rgba(10,11,22,0.95);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.p3p-label { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.04em; }
.p3p-val   { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 600; color: var(--text-primary); }
.p3p-cyan  { color: var(--accent-cyan); }

/* P&L bubble — now in flow (top row) */
.p3-pnl-float {
  background: rgba(13,15,30,0.95);
  border: 1px solid rgba(48,209,88,0.35);
  border-radius: 12px;
  padding: 14px 16px;
  text-align: center;
  box-shadow: 0 0 24px rgba(48,209,88,0.12);
  animation: floatBubble 3s ease-in-out infinite;
}

.p3f-label { font-size: 0.65rem; color: var(--text-muted); letter-spacing: 0.04em; }
.p3f-val   { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; color: #30d158; margin: 2px 0; }
.p3f-sub   { font-size: 0.62rem; color: var(--text-muted); white-space: nowrap; }

/* Loss-blocked card — now in flow (top row) */
.p3-loss-float {
  background: rgba(13,15,30,0.96);
  border: 1px solid rgba(255,107,107,0.28);
  border-radius: 11px;
  padding: 11px 14px;
  min-width: 148px;
  box-shadow: 0 0 24px rgba(255,107,107,0.1);
  animation: floatBubble 3.5s ease-in-out 0.5s infinite;
}

.p3lf-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.p3lf-icon { font-size: 0.85rem; }

.p3lf-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ff6b6b;
  flex: 1;
}

.p3lf-badge {
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 100px;
  background: rgba(255,107,107,0.12);
  color: #ff6b6b;
  border: 1px solid rgba(255,107,107,0.2);
}

.p3lf-pair {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.p3lf-dir {
  font-size: 0.68rem;
  color: #ff6b6b;
  font-weight: 600;
  margin-left: 4px;
  background: rgba(255,107,107,0.1);
  padding: 1px 6px;
  border-radius: 4px;
}

.p3lf-saved {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.p3lf-amt {
  color: #ff6b6b;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* Telegram card — now below chart */
.p3-tg-float {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13,15,30,0.95);
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: 10px;
  padding: 10px 14px;
  box-shadow: 0 0 20px rgba(0,212,255,0.08);
  animation: floatBubble 3.5s ease-in-out 0.5s infinite;
}

.p3tg-icon { font-size: 1.2rem; }
.p3tg-title { font-size: 0.75rem; font-weight: 700; color: var(--text-primary); }
.p3tg-body  { font-size: 0.65rem; color: var(--text-muted); margin-top: 1px; font-family: var(--font-mono); }

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-5px); }
}

/* P3 badge */
.p3-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: rgba(48,209,88,0.07);
  border: 1px solid rgba(48,209,88,0.2);
  border-radius: 10px;
  margin-top: 4px;
}

.p3b-num   { font-family: var(--font-display); font-size: 1.4rem; font-weight: 900; color: #30d158; }
.p3b-label { font-size: 0.72rem; color: var(--text-muted); }

/* ── Chart line animation (driven by JS) ── */
#chart-line {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
}

.chart-animated #chart-line {
  transition: stroke-dashoffset 2s cubic-bezier(0.16,1,0.3,1);
  stroke-dashoffset: 0;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .story-scene { padding: 60px 40px 60px 80px; gap: 40px; }
}

@media (max-width: 900px) {
  .story-section { height: auto; }
  .story-sticky  { position: relative; height: auto; overflow: visible; }
  .story-scene   { position: relative; inset: auto; grid-template-columns: 1fr; padding: 60px 24px; gap: 36px; visibility: visible; pointer-events: auto; }
  .scene-nav     { display: none; }
  .sc1-visual, .sc2-visual, .sc3-visual { max-width: 100%; }
  .p3-pnl-float, .p3-tg-float, .p3-loss-float { position: static; margin-top: 10px; animation: none; }
  .sc3-visual { display: flex; flex-direction: column; gap: 10px; }
}

/* ── GSAP handles initial hidden states via inline styles ──
   DO NOT pre-hide via CSS — GSAP autoAlpha manages visibility.
   This prevents blank sections when ScrollTrigger is slow or fails. ── */

/* ── Gradient border cards on hover ── */
.feature-card {
  position: relative;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, rgba(168,85,247,0), rgba(0,212,255,0));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  transition: background 0.4s ease;
  pointer-events: none;
}

.feature-card:hover::before {
  background: linear-gradient(135deg, rgba(168,85,247,0.4), rgba(0,212,255,0.3));
}

/* ── Pricing card glow border ── */
.plan-featured::after {
  content: '';
  position: absolute;
  top: -1px; left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-purple), var(--accent-cyan), transparent);
  border-radius: 2px;
}

/* ── Animated gradient text shimmer ── */
.gradient-text-animated {
  background: linear-gradient(
    135deg,
    var(--accent-purple) 0%,
    var(--accent-cyan) 25%,
    var(--accent-purple) 50%,
    var(--accent-cyan) 75%,
    var(--accent-purple) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

@keyframes shimmer {
  from { background-position: 200% center; }
  to   { background-position: -200% center; }
}

/* ── Floating badge animation ── */
.hero-badge {
  animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}

/* ── Step connectors pulse ── */
.step-connector .connector-pulse {
  animation: flowPulse 1.5s linear infinite;
}

/* ── Glow on section entry ── */
@keyframes sectionGlow {
  from { box-shadow: var(--shadow-card); }
  to   { box-shadow: var(--shadow-glow-purple), var(--shadow-card); }
}

/* ── CTA shimmer button ── */
.btn-primary {
  background-size: 200% 100%;
  animation: btnShimmer 3s ease infinite;
}

@keyframes btnShimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── Mobile globe ── */
@media (max-width: 900px) {
  .globe-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .globe-canvas-wrap {
    max-width: 320px;
    order: -1;
  }
  .globe-stats {
    gap: 20px;
    padding: 16px;
  }
}
