.cap-page { background: #02060d; color: #f6faff; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(2, 6, 13, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(75, 180, 255, 0.12);
}
.cap-page .nav { width: min(1280px, calc(100% - 64px)); }
.links a[aria-current="page"] { color: #fff; }

.mprog {
  display: none;
  align-items: center;
  gap: 12px;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 8px;
  color: #79dfff;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.mprog em {
  flex: 1;
  height: 2px;
  border-radius: 2px;
  background: rgba(75, 180, 255, 0.2);
  position: relative;
  overflow: hidden;
}
.mprog i {
  display: block;
  height: 100%;
  width: 100%;
  background: #36b8ff;
  transform: scaleX(0.11);
  transform-origin: left center;
  transition: transform .35s ease;
}

.story { position: relative; }
.story-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 18% 88%, rgba(8, 30, 60, 0.45), transparent 36%),
    linear-gradient(180deg, rgba(2, 6, 13, 0.2), rgba(2, 6, 13, 0.72)),
    url("/assets/website/features-bg.jpg") center / cover;
  opacity: 0.72;
}
.story-bg::before {
  content: "";
  position: absolute;
  left: 18%;
  right: -8%;
  top: -6vh;
  height: 92vh;
  background: url("/assets/website/hero-bg.jpg") 78% 42% / 920px no-repeat;
  -webkit-mask-image: radial-gradient(ellipse at 68% 46%, #000 18%, transparent 68%);
  mask-image: radial-gradient(ellipse at 68% 46%, #000 18%, transparent 68%);
  opacity: 0.55;
}
.chapter::after {
  content: "";
  position: absolute;
  right: 6%;
  top: 18%;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 120, 210, 0.16), transparent 68%);
  pointer-events: none;
}
.chapter {
  position: relative;
  z-index: 1;
  min-height: 82vh;
  width: min(1180px, calc(100% - 420px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(320px, 1.18fr);
  gap: 36px;
  align-items: center;
  scroll-margin-top: 92px;
  padding: 48px 0;
}
.chapter .copy > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
.chapter.in .copy > * { opacity: 1; transform: none; }
.chapter.in .copy > *:nth-child(2) { transition-delay: .08s; }
.chapter.in .copy > *:nth-child(3) { transition-delay: .14s; }
.chapter.in .copy > *:nth-child(4) { transition-delay: .2s; }
.chapter.in .copy > *:nth-child(5) { transition-delay: .26s; }
.page-kicker { margin: 0 0 8px; color: #79dfff; letter-spacing: 5px; font-size: 14px; }
.page-title {
  margin: 0 0 10px;
  font-size: 64px;
  line-height: 1;
  font-weight: 800;
  background: linear-gradient(180deg, #fff, #b6eaff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-sub { margin: 0 0 28px; color: #a8bcd0; font-size: 16px; line-height: 1.7; max-width: 460px; }
.en { margin: 0; color: #79dfff; letter-spacing: 0.22em; font-size: 12px; }
.num { margin: 6px 0 0; font-size: 42px; line-height: 1; font-weight: 700; color: rgba(182, 234, 255, 0.55); }
.chapter h2 { margin: 4px 0 12px; font-size: 40px; line-height: 1.15; font-weight: 750; }
.chapter .desc { margin: 0 0 22px; max-width: 460px; color: #a8bcd0; font-size: 16px; line-height: 1.75; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.visual {
  position: relative;
  opacity: 0;
  transform: translateX(40px);
  transition: opacity .8s ease .12s, transform .8s ease .12s;
}
.chapter.in .visual { opacity: 1; transform: none; }

.rail {
  position: fixed;
  right: 36px;
  top: 50%;
  z-index: 35;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail.is-hidden { display: none; }
.rail::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: rgba(120, 180, 220, 0.28);
}
.rail::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 10px;
  width: 1px;
  height: var(--rail-progress, 6%);
  background: linear-gradient(#b6eaff, rgba(54, 184, 255, 0.15));
  box-shadow: 0 0 8px rgba(54, 184, 255, 0.85);
  transition: height .35s ease;
}
.rail button {
  position: relative;
  display: grid;
  grid-template-columns: 12px 22px auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: rgba(198, 216, 232, 0.78);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: color .3s ease;
}
.rail button:focus-visible { outline: 1px solid #79dfff; outline-offset: 3px; }
.rail i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid rgba(150, 190, 220, 0.7);
  background: #02060d;
  transition: transform .3s ease, background .3s ease, box-shadow .3s ease;
}
.rail b { font-weight: 650; letter-spacing: 0.04em; }
.rail button.is-on { color: #f6faff; }
.rail button.is-on i {
  transform: scale(1.25);
  background: #79dfff;
  border-color: #b6eaff;
  box-shadow: 0 0 10px rgba(54, 184, 255, 0.9);
}
.rail button.is-on b { color: #79dfff; }

@media (max-width: 1100px) {
  .cap-page .links { display: flex; flex-wrap: wrap; }
  .chapter { width: min(1180px, calc(100% - 48px)); grid-template-columns: 1fr; min-height: 0; padding: 36px 0 48px; }
  .rail { display: none; }
  .mprog { display: flex; }
  .visual { transform: none; }
  .page-title { font-size: 48px; }
}
@media (max-width: 767px) {
  .cap-page .nav { width: min(1280px, calc(100% - 32px)); flex-wrap: wrap; padding: 12px 0 6px; }
  .cap-page .brand { white-space: nowrap; }
  .cap-page .links { width: 100%; gap: 8px 14px; }
  .cap-page .links a, .cap-page .nav-cta { margin: 0; }
  .chapter { scroll-margin-top: 180px; }
  .chapter h2 { font-size: 32px; }
  .page-title { font-size: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  .chapter .copy > *, .visual, .mprog i, .rail button, .rail i {
    transition: none !important;
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}
