/* ─── Story Page ─── */
.story-page-wrapper {
  width: min(820px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 2;
  padding-bottom: 100px;
  margin-top: 12px;
}

.story-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  padding: 72px 24px 80px;
  animation: storyFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.story-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(168,85,247,0.12);
  border: 1px solid rgba(168,85,247,0.28);
  color: #e879f9;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-hero-title {
  margin: 0;
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #ffffff 0%, #c084fc 60%, #e879f9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  filter: drop-shadow(0 4px 20px rgba(168,85,247,0.35));
}

.story-hero-subtitle {
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0;
  max-width: 540px;
  font-style: italic;
  opacity: 0.85;
}

.story-scroll-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  opacity: 0.45;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: bobble 2.5s ease-in-out infinite;
}

@keyframes bobble {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(7px); }
}

/* ─── Chapters ─── */
.story-chapter {
  position: relative;
  padding: 64px 0;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.story-chapter.visible { opacity: 1; transform: translateY(0); }
.story-chapter + .story-chapter { border-top: 1px solid rgba(255,255,255,0.05); }

.chapter-number {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.chapter-num-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg,rgba(99,102,241,0.25),rgba(168,85,247,0.25));
  border: 1px solid rgba(168,85,247,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #c084fc; flex-shrink: 0;
}

.chapter-tag {
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: #6366f1;
}

.story-chapter--problem .chapter-tag { color: #f87171; }
.story-chapter--problem .chapter-num-badge {
  background: linear-gradient(135deg,rgba(239,68,68,0.2),rgba(251,113,133,0.2));
  border-color: rgba(239,68,68,0.35); color: #f87171;
}
.story-chapter--story .chapter-tag { color: #fb923c; }
.story-chapter--story .chapter-num-badge {
  background: linear-gradient(135deg,rgba(251,146,60,0.2),rgba(253,186,116,0.2));
  border-color: rgba(251,146,60,0.35); color: #fb923c;
}
.story-chapter--solution .chapter-tag { color: #34d399; }
.story-chapter--solution .chapter-num-badge {
  background: linear-gradient(135deg,rgba(16,185,129,0.2),rgba(52,211,153,0.2));
  border-color: rgba(16,185,129,0.35); color: #34d399;
}
.story-chapter--vision .chapter-tag { color: #818cf8; }
.story-chapter--vision .chapter-num-badge {
  background: linear-gradient(135deg,rgba(99,102,241,0.25),rgba(168,85,247,0.25));
  border-color: rgba(99,102,241,0.4); color: #818cf8;
}

.chapter-title {
  margin: 0 0 20px;
  font-size: clamp(1.8rem, 3.2vw, 2.4rem);
  color: #fff; letter-spacing: -0.03em;
  font-family: 'Outfit', sans-serif; line-height: 1.15;
}

.chapter-lead {
  font-size: 1.1rem; color: var(--muted);
  line-height: 1.75; margin: 0 0 28px; max-width: 680px;
}

/* ─── Problem Grid ─── */
.problem-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 8px;
}
.problem-item {
  background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.18);
  border-radius: 16px; padding: 20px 22px;
  display: flex; gap: 12px; align-items: flex-start;
  transition: all 0.3s ease;
}
.problem-item:hover {
  background: rgba(239,68,68,0.09); border-color: rgba(239,68,68,0.3);
  transform: translateY(-3px);
}
.problem-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.problem-item p { margin: 0; color: #fca5a5; font-size: 0.93rem; line-height: 1.6; font-weight: 500; }

/* ─── Story Quote ─── */
.story-quote-block {
  background: rgba(251,146,60,0.06);
  border: 1px solid rgba(251,146,60,0.2);
  border-left: 4px solid #fb923c;
  border-radius: 0 16px 16px 0;
  padding: 26px 30px; margin: 24px 0;
}
.story-quote-block blockquote {
  margin: 0; font-size: 1.15rem; color: #fed7aa;
  font-style: italic; line-height: 1.65;
}
.story-quote-block cite {
  display: block; margin-top: 10px; font-size: 0.85rem;
  color: var(--muted); font-style: normal; font-weight: 600;
}
.story-insight {
  background: rgba(251,146,60,0.07); border: 1px solid rgba(251,146,60,0.22);
  border-radius: 14px; padding: 18px 22px; margin-top: 22px;
  display: flex; align-items: flex-start; gap: 12px;
}
.insight-icon { font-size: 1.4rem; flex-shrink: 0; }
.story-insight p { margin: 0; color: #fdba74; font-size: 0.98rem; line-height: 1.65; font-weight: 600; }

/* ─── Solution Grid ─── */
.solution-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 8px;
}
.solution-item {
  background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.2);
  border-radius: 16px; padding: 20px 22px;
  display: flex; gap: 12px; align-items: flex-start;
  transition: all 0.3s ease;
}
.solution-item:hover {
  background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.35);
  transform: translateY(-3px);
}
.solution-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.solution-item-text h4 { margin: 0 0 5px; font-size: 0.93rem; color: #6ee7b7; font-family: 'Outfit', sans-serif; }
.solution-item-text p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }

/* ─── Ecosystem Visual ─── */
.ecosystem-visual {
  display: flex; align-items: center; justify-content: center;
  gap: 0; margin: 32px 0; flex-wrap: wrap;
}
.eco-node {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center; padding: 24px 18px;
  border-radius: 22px; border: 1px solid rgba(255,255,255,0.08);
  background: rgba(17,24,39,0.4); backdrop-filter: blur(16px);
  min-width: 130px; transition: all 0.3s ease; position: relative;
}
.eco-node:hover {
  transform: translateY(-6px);
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4),0 0 20px rgba(168,85,247,0.1);
}
.eco-node--active {
  border-color: rgba(99,102,241,0.5);
  background: rgba(99,102,241,0.1);
  box-shadow: 0 0 30px rgba(99,102,241,0.15);
}
.eco-node--active::before {
  content: 'Šiandien';
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg,#6366f1,#a855f7);
  color: #fff; font-size: 0.7rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap;
}
.eco-emoji { font-size: 2.6rem; }
.eco-name { font-size: 0.93rem; font-weight: 700; color: #fff; font-family: 'Outfit', sans-serif; }
.eco-label { font-size: 0.76rem; color: var(--muted); opacity: 0.7; }
.eco-arrow { font-size: 1.3rem; color: var(--muted); opacity: 0.35; padding: 0 6px; flex-shrink: 0; }
.vision-tagline { text-align: center; color: var(--muted); font-size: 0.98rem; margin-top: 22px; font-style: italic; opacity: 0.75; }

/* ─── Story CTA ─── */
.story-cta {
  margin-top: 20px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: linear-gradient(135deg,rgba(99,102,241,0.1),rgba(168,85,247,0.07));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 32px; padding: 64px 40px;
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.story-cta.visible { opacity: 1; transform: translateY(0); }
.story-cta h2 {
  font-size: clamp(1.8rem,3.5vw,2.4rem); color: #fff; margin: 0 0 12px;
  font-family: 'Outfit', sans-serif; letter-spacing: -0.03em;
}
.story-cta p { color: var(--muted); font-size: 1rem; margin: 0 0 30px; max-width: 420px; line-height: 1.6; }
.story-cta-buttons { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }

.story-btn-primary {
  padding: 14px 28px; border-radius: 14px;
  background: linear-gradient(135deg,#6366f1,#a855f7);
  color: #fff; font-weight: 700; font-size: 1rem;
  text-decoration: none; border: none; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25,1,0.5,1);
  box-shadow: 0 10px 24px rgba(99,102,241,0.35);
  font-family: 'Outfit', sans-serif; display: inline-block;
}
.story-btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 16px 32px rgba(99,102,241,0.45);
  filter: brightness(1.1); color: #fff; text-decoration: none;
}
.story-btn-secondary {
  padding: 14px 28px; border-radius: 14px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  color: #fff; font-weight: 700; font-size: 1rem;
  text-decoration: none; cursor: pointer;
  transition: all 0.3s ease; font-family: 'Outfit', sans-serif; display: inline-block;
}
.story-btn-secondary:hover {
  background: rgba(255,255,255,0.1); transform: translateY(-2px);
  color: #fff; text-decoration: none;
}

/* ─── Animations ─── */
@keyframes storyFadeUp {
  from { opacity:0; transform:translateY(40px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ─── Responsive ─── */
@media (max-width: 680px) {
  .problem-grid, .solution-grid { grid-template-columns: 1fr; }
  .ecosystem-visual { flex-direction: column; }
  .eco-arrow { transform: rotate(90deg); padding: 4px 0; }
  .story-cta { padding: 44px 22px; }
  .story-hero { padding: 48px 16px 60px; }
  .story-chapter { padding: 44px 0; }
  .story-cta-buttons { flex-direction: column; align-items: stretch; }
  .story-btn-primary, .story-btn-secondary { text-align: center; }
}
