/* Scroll-led service stories. Deliberately scoped away from the global header/footer. */
.scroll-story {
  --story-accent: #2f6fed;
  --story-accent-2: #3dbb91;
  position: relative;
  overflow: clip;
  padding: clamp(72px, 9vw, 132px) 0;
  background: #101922 !important;
  color: #f4f7fb;
  border-block: 1px solid rgba(255, 255, 255, 0.09);
}

.scroll-story[data-story="education"] { --story-accent: #477ff0; --story-accent-2: #49bd94; }
.scroll-story[data-story="data"] { --story-accent: #2478d7; --story-accent-2: #33b887; }
.scroll-story[data-story="project"] { --story-accent: #536fe8; --story-accent-2: #35b9a5; }

.story-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.78fr);
  gap: clamp(52px, 7vw, 108px);
  align-items: start;
}

.story-visual {
  position: sticky;
  top: 104px;
  min-height: min(680px, calc(100vh - 132px));
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(26px, 4vw, 48px);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px),
    radial-gradient(circle at 72% 22%, color-mix(in srgb, var(--story-accent) 28%, transparent), transparent 36%),
    #16212c;
  background-size: 52px 52px, 52px 52px, auto, auto;
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.28);
}

.story-topline,
.story-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: rgba(238, 244, 249, 0.62);
  font-size: .76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.story-topline span:first-child {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
}

.story-topline span:first-child::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--story-accent-2);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--story-accent-2) 14%, transparent);
}

.story-canvas {
  position: relative;
  min-height: 390px;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.story-ring,
.story-ring::before,
.story-ring::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  content: "";
  transition: transform .7s cubic-bezier(.2,.75,.25,1), border-color .4s ease;
}

.story-ring {
  width: 270px;
  height: 270px;
}

.story-ring::before { inset: 38px; }
.story-ring::after { inset: 78px; }

.story-core {
  position: relative;
  z-index: 3;
  width: 142px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--story-accent-2) 52%, white 8%);
  border-radius: 50%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--story-accent) 62%, #16212c), color-mix(in srgb, var(--story-accent-2) 48%, #16212c));
  box-shadow: 0 20px 60px color-mix(in srgb, var(--story-accent) 28%, transparent);
  text-align: center;
  transition: transform .55s cubic-bezier(.2,.75,.25,1), box-shadow .45s ease;
}

.story-core span {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.story-core b {
  display: block;
  margin-top: .22rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
}

.story-satellite {
  position: absolute;
  z-index: 4;
  min-width: 104px;
  padding: .7rem .82rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  background: rgba(13, 23, 32, .88);
  color: rgba(245,248,251,.74);
  font-size: .76rem;
  font-weight: 850;
  text-align: center;
  box-shadow: 0 14px 34px rgba(0,0,0,.2);
  opacity: .42;
  transform: scale(.92);
  transition: opacity .45s ease, transform .55s cubic-bezier(.2,.75,.25,1), border-color .4s ease, background .4s ease;
}

.story-satellite:nth-child(2) { top: 7%; left: 5%; }
.story-satellite:nth-child(3) { top: 12%; right: 3%; }
.story-satellite:nth-child(4) { bottom: 8%; right: 7%; }
.story-satellite:nth-child(5) { bottom: 5%; left: 7%; }

.scroll-story[data-active="0"] .story-satellite:nth-child(2),
.scroll-story[data-active="1"] .story-satellite:nth-child(3),
.scroll-story[data-active="2"] .story-satellite:nth-child(4),
.scroll-story[data-active="3"] .story-satellite:nth-child(5) {
  opacity: 1;
  transform: scale(1) translateY(-4px);
  border-color: color-mix(in srgb, var(--story-accent-2) 65%, transparent);
  background: color-mix(in srgb, var(--story-accent) 18%, #12202a);
}

.scroll-story[data-active="1"] .story-ring { transform: rotate(28deg) scale(1.04); }
.scroll-story[data-active="2"] .story-ring { transform: rotate(64deg) scale(.96); }
.scroll-story[data-active="3"] .story-ring { transform: rotate(104deg) scale(1.08); }
.scroll-story[data-active="2"] .story-core,
.scroll-story[data-active="3"] .story-core { transform: scale(1.07); box-shadow: 0 26px 72px color-mix(in srgb, var(--story-accent-2) 31%, transparent); }

.story-progress {
  height: 3px;
  margin-top: 1rem;
  overflow: hidden;
  background: rgba(255,255,255,.1);
}

.story-progress i {
  display: block;
  width: 25%;
  height: 100%;
  background: linear-gradient(90deg, var(--story-accent), var(--story-accent-2));
  transform-origin: left;
  transition: width .45s ease;
}

.scroll-story[data-active="1"] .story-progress i { width: 50%; }
.scroll-story[data-active="2"] .story-progress i { width: 75%; }
.scroll-story[data-active="3"] .story-progress i { width: 100%; }

.story-copy { padding-bottom: 16vh; }

.story-intro {
  margin-bottom: 12vh;
}

.story-intro .kicker { color: var(--story-accent-2) !important; }
.story-intro h2 {
  max-width: 620px;
  margin: .8rem 0 1.1rem;
  color: #f5f7fa !important;
  font-size: clamp(2rem, 3.6vw, 3.65rem) !important;
  line-height: 1.13 !important;
}

.story-intro p {
  max-width: 590px;
  margin: 0;
  color: rgba(233, 239, 245, .66) !important;
  font-size: 1.03rem;
  line-height: 1.85;
}

.story-step {
  min-height: 56vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 0 2rem 1.4rem;
  border-left: 2px solid rgba(255,255,255,.1);
  opacity: .38;
  transition: opacity .45s ease, border-color .45s ease, transform .55s cubic-bezier(.2,.75,.25,1);
}

.story-step.is-active {
  opacity: 1;
  border-left-color: var(--story-accent-2);
  transform: translateX(8px);
}

.story-step small {
  color: var(--story-accent-2);
  font-size: .74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.story-step h3 {
  margin: .75rem 0 .8rem;
  color: #fff !important;
  font-size: clamp(1.55rem, 2.5vw, 2.45rem);
  line-height: 1.2;
}

.story-step p {
  max-width: 520px;
  margin: 0;
  color: rgba(233, 239, 245, .68) !important;
  font-size: 1rem;
  line-height: 1.82;
}

.story-step ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
}

.story-step li {
  padding: .45rem .65rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  color: rgba(245,248,251,.72);
  font-size: .78rem;
  font-weight: 800;
}

@media (max-width: 900px) {
  .scroll-story { padding-block: 72px; }
  .story-shell { grid-template-columns: 1fr; gap: 54px; }
  .story-visual { position: relative; top: auto; min-height: 540px; }
  .story-copy { padding-bottom: 0; }
  .story-intro { margin-bottom: 30px; }
  .story-step { min-height: auto; margin-top: 12px; padding-block: 2.4rem; opacity: .68; }
}

@media (max-width: 560px) {
  .story-shell { width: min(100% - 28px, 1180px); }
  .story-visual { min-height: 470px; padding: 22px 18px; }
  .story-canvas { min-height: 330px; transform: scale(.9); }
  .story-satellite { min-width: 90px; font-size: .7rem; }
  .story-step { padding-left: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .story-ring,
  .story-ring::before,
  .story-ring::after,
  .story-core,
  .story-satellite,
  .story-progress i,
  .story-step { transition: none !important; }
}
