/* ── Page shell ───────────────────────────────────────────────────────────── */
.story-page {
  background: #f8f8f8;
}
.story {
  background: #f8f8f8;
  min-height: 100vh;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.story__hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(4rem + 4.5rem);
  padding-bottom: 4rem;
  background: linear-gradient(
    180deg,
    #f8f8f8 0%,
    rgba(69, 57, 204, 0.04) 50%,
    #f8f8f8 100%
  );
}
@media (max-width: 844px) {
  .story__hero {
    padding-top: calc(4rem + 3rem);
    padding-bottom: 3rem;
  }
}

.story__hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(
    circle,
    rgba(69, 57, 204, 0.11) 1px,
    transparent 1px
  );
  background-size: 1.75rem 1.75rem;
  mask-image: radial-gradient(
    ellipse 80% 90% at 50% 0%,
    black 0%,
    transparent 72%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 80% 90% at 50% 0%,
    black 0%,
    transparent 72%
  );
}

.story__hero-inner {
  width: 100%;
  max-width: 42.5rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
}

.story__pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4539cc;
  background: rgba(69, 57, 204, 0.07);
  border: 1px solid rgba(69, 57, 204, 0.14);
  border-radius: 9999px;
  padding: 0.3125rem 0.875rem;
}

.story__hero-title {
  font-family: "Inter", sans-serif;
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  color: #0d0d0d;
  letter-spacing: -0.03em;
  line-height: 1;
  margin: 0;
}
@media (max-width: 640px) {
  .story__hero-br {
    display: none;
  }
}

.story__hero-sub {
  font-size: 0.9375rem;
  color: #737373;
  line-height: 1.75;
  margin: 0;
}

.story__scroll {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.5rem;
}
.story__scroll-line {
  width: 0.0625rem;
  height: 2.5rem;
  background: linear-gradient(to bottom, rgba(69, 57, 204, 0.3), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scaleY(1);
  }
  50% {
    opacity: 1;
    transform: scaleY(1.15);
  }
}

/* ── Timeline ─────────────────────────────────────────────────────────────── */
.story__timeline {
  position: relative;
}

.story__timeline-inner {
  width: 100%;
  max-width: 50rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-top: 1rem;
  padding-bottom: 2.5rem;
  position: relative;
}

.story__spine {
  position: absolute;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 0.063rem;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(69, 57, 204, 0.18) 6%,
    rgba(69, 57, 204, 0.18) 94%,
    transparent 100%
  );
}
@media (max-width: 640px) {
  .story__spine {
    left: 1.25rem;
  }
}

.story__chapter {
  position: relative;
  padding-left: 4rem;
  padding-bottom: 2.5rem;
}
.story__chapter:last-child {
  padding-bottom: 1rem;
}
@media (max-width: 640px) {
  .story__chapter {
    padding-left: 2.75rem;
    padding-bottom: 2rem;
  }
}

.story__chapter-node {
  position: absolute;
  left: 1.563rem;
  top: 0.188rem;
  transform: translateX(-50%);
  z-index: 2;
  background: #f8f8f8;
  padding: 0.125rem;
  border-radius: 50%;
}
.story__chapter-node--now::after {
  content: "";
  position: absolute;
  inset: -0.313rem;
  border-radius: 50%;
  border: 1.5px solid rgba(69, 57, 204, 0.22);
  animation: node-pulse 2.5s ease-in-out infinite;
}
@keyframes node-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.5);
    opacity: 0;
  }
}
@media (max-width: 640px) {
  .story__chapter-node {
    left: 0.813rem;
  }
}

.story__chapter-label {
  font-size: 0.656rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4539cc;
  margin-bottom: 0.5rem;
  opacity: 0.75;
}

.story__chapter-card {
  background: #ffffff;
  border: 1px solid #eaeaea;
  border-radius: 0.875rem;
  padding: 1.375rem 1.625rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  box-shadow: 0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.03);
  transition:
    box-shadow 250ms ease,
    border-color 250ms ease;
}
.story__chapter-card:hover {
  box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.06);
  border-color: #d4d4d4;
}
.story__chapter-card--now {
  border-color: rgba(69, 57, 204, 0.18);
  background: rgba(69, 57, 204, 0.018);
}
.story__chapter-card--now:hover {
  border-color: rgba(69, 57, 204, 0.32);
}
@media (max-width: 640px) {
  .story__chapter-card {
    padding: 1.125rem;
  }
}

.story__chapter-body {
  font-size: 0.875rem;
  color: #555555;
  line-height: 1.65;
  margin: 0;
}
.story__chapter-body em {
  font-style: italic;
  color: #333333;
}

/* Callout */
.story__callout {
  margin: 0;
  border: none;
  background: transparent;
  padding: 0.875rem 0 0 1.125rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0d0d0d;
  line-height: 1.5;
  position: relative;
}
.story__callout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.875rem;
  width: 0.1875rem;
  height: 1.25rem;
  background: #4539cc;
  border-radius: 0.125rem;
  opacity: 0.7;
}
.story__callout strong {
  color: #4539cc;
}

/* Pain grid */
.story__pain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
@media (max-width: 640px) {
  .story__pain-grid {
    grid-template-columns: 1fr;
  }
}

.story__pain-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.8125rem;
  color: #555555;
  background: #fafafa;
  border: 1px solid #efefef;
  border-radius: 0.5rem;
  padding: 0.5625rem 0.75rem;
}
.story__pain-icon {
  color: #4539cc;
  flex-shrink: 0;
  opacity: 0.7;
  display: flex;
}

/* Shift visual */
.story__shift-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1.25rem 1.5rem;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  border-radius: 0.75rem;
}
.story__shift-before,
.story__shift-after {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.story__shift-label {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a0a0a0;
}
.story__shift-label--primary {
  color: #4539cc;
}
.story__shift-doc,
.story__shift-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3125rem;
  font-size: 0.6875rem;
  font-family: "JetBrains Mono", monospace;
  color: #737373;
}
.story__shift-arrow {
  color: #4539cc;
  opacity: 0.5;
}

/* Build list */
.story__build-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.story__build-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 0.84375rem;
  font-weight: 500;
  color: #0d0d0d;
  padding: 0.5625rem 0.8125rem;
  background: #fafafa;
  border: 1px solid #efefef;
  border-radius: 0.5rem;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}
.story__build-item:hover {
  background: rgba(69, 57, 204, 0.03);
  border-color: rgba(69, 57, 204, 0.15);
}
.story__build-check {
  flex-shrink: 0;
  display: flex;
}

/* Now badge */
.story__now-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4539cc;
  background: rgba(69, 57, 204, 0.07);
  border: 1px solid rgba(69, 57, 204, 0.16);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  align-self: flex-start;
}

/* ── Closing ──────────────────────────────────────────────────────────────── */
.story__closing {
  background: linear-gradient(
    180deg,
    #f8f8f8 0%,
    rgba(69, 57, 204, 0.05) 50%,
    #f8f8f8 100%
  );
}
.story__closing-inner {
  width: 100%;
  max-width: 42.5rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  padding-top: 6rem;
  padding-bottom: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}
@media (max-width: 640px) {
  .story__closing-inner {
    padding-top: 4.5rem;
    padding-bottom: 6rem;
  }
  .story__closing-br {
    display: none;
  }
}
.story__closing-top {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #4539cc;
  opacity: 0.7;
  margin: 0;
}
.story__closing-title {
  font-family: "Inter", sans-serif;
  font-size: clamp(1.25rem, 2.8vw, 2.375rem);
  font-weight: 700;
  color: #0d0d0d;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0;
}
