/* Enterprise Magazine: scroll experience
   Fixed canvas behind, pinned chapters in front, everything clickable. */

.xp { position: relative; background: #060504; }

/* ---------- the film ---------- */

.xp-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #060504;
}
.xp-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
/* keeps white type legible wherever the lamps blow warm */
.xp-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 45%, rgba(6,5,4,0) 0%, rgba(6,5,4,.35) 60%, rgba(6,5,4,.72) 100%),
    linear-gradient(180deg, rgba(6,5,4,.62) 0%, rgba(6,5,4,0) 26%, rgba(6,5,4,0) 68%, rgba(6,5,4,.78) 100%);
}

/* ---------- scroll track ---------- */

.xp-track { position: relative; z-index: 1; }
.xp-chapter {
  height: 130svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--gut);
  pointer-events: none;      /* the gaps stay scrollable */
}
.xp-inner {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 940px;
  text-align: center;
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .55s var(--ease), transform .75s var(--ease);
}
.xp-inner > * { pointer-events: auto; }   /* but the content is clickable */
.xp-chapter.is-live .xp-inner { opacity: 1; transform: none; }

/* ---------- liquid glass, warm variant ---------- */

.lg, .lg-strong {
  position: relative;
  overflow: hidden;
  background: rgba(245, 241, 233, .035);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 1px rgba(245, 241, 233, .12);
}
.lg-strong {
  -webkit-backdrop-filter: blur(26px);
  backdrop-filter: blur(26px);
  background: rgba(245, 241, 233, .06);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .35), inset 0 1px 1px rgba(245, 241, 233, .2);
}
.lg::before, .lg-strong::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.3px;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(245,241,233,.5) 0%, rgba(169,139,93,.28) 22%,
    rgba(245,241,233,0) 42%, rgba(245,241,233,0) 58%,
    rgba(169,139,93,.28) 78%, rgba(245,241,233,.5) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* ---------- chapter type ---------- */

.xp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: .64rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 22px;
}
.xp-eyebrow::before {
  content: ""; width: 28px; height: 1px;
  background: currentColor; opacity: .8;
}
.xp h2, .xp h1 {
  font-family: var(--display);
  font-weight: 400;
  color: var(--d-paper);
  line-height: .96;
  letter-spacing: -.022em;
  margin: 0;
  text-wrap: balance;
}
.xp h1 { font-size: clamp(3rem, 9vw, 7rem); }
.xp h2 { font-size: clamp(2.1rem, 5.4vw, 4.2rem); }
.xp h1 em, .xp h2 em { font-style: italic; color: var(--brass); }
.xp-lede {
  margin: 22px auto 0;
  max-width: 54ch;
  font-size: clamp(.95rem, 1.35vw, 1.08rem);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(242, 236, 225, .8);
}

/* ---------- pieces ---------- */

.xp-pill {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px; padding: 9px 18px;
  font-size: .68rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(242,236,225,.9);
}
.xp-pill b {
  background: var(--brass); color: #12100d;
  border-radius: 999px; padding: 3px 9px;
  font-weight: 500; font-size: .62rem; letter-spacing: .14em;
}

.xp-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 34px; }
.xp-btn {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 999px; padding: 13px 26px;
  font-size: .68rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--d-paper);
  transition: color .45s var(--ease), background .45s var(--ease);
}
.xp-btn svg { width: 14px; height: 14px; flex: none; }
.xp-btn:hover, .xp-btn:focus-visible { background: var(--brass); color: #12100d; }
.xp-btn.is-plain { padding-inline: 6px; color: rgba(242,236,225,.75); }
.xp-btn.is-plain:hover { background: transparent; color: var(--brass); }

.xp-cards { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 38px; }
.xp-card {
  border-radius: 1.15rem; padding: 22px 24px;
  width: 230px; text-align: left;
}
.xp-card b {
  display: block;
  font-family: var(--display); font-weight: 400;
  font-size: 2.5rem; line-height: 1; letter-spacing: -.02em;
  color: var(--d-paper);
}
.xp-card b i { font-style: italic; color: var(--brass); }
.xp-card span {
  display: block; margin-top: 10px;
  font-size: .63rem; letter-spacing: .2em; text-transform: uppercase;
  color: rgba(242,236,225,.6); line-height: 1.5;
}

.xp-list { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.xp-tag {
  border-radius: 999px; padding: 9px 17px;
  font-size: .66rem; letter-spacing: .14em; text-transform: uppercase;
  color: rgba(242,236,225,.86);
  transition: color .4s var(--ease);
}
a.xp-tag:hover { color: var(--brass); }

/* ---------- progress rail ---------- */

.xp-rail {
  position: fixed;
  right: max(18px, 2.2vw); top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; gap: 12px;
  pointer-events: auto;
}
.xp-rail a {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(242,236,225,.26);
  transition: background .4s var(--ease), transform .4s var(--ease);
}
.xp-rail a[aria-current="true"] { background: var(--brass); transform: scale(1.5); }
.xp-rail a:hover { background: var(--d-paper); }

/* ---------- loader ---------- */

.xp-load {
  position: fixed; inset: 0; z-index: 90;
  background: #060504;
  display: grid; place-items: center;
  transition: opacity .8s var(--ease), visibility .8s;
}
.xp-load.is-done { opacity: 0; visibility: hidden; }
.xp-load-in { text-align: center; }
.xp-load-bar {
  width: 190px; height: 1px; margin: 22px auto 0;
  background: rgba(242,236,225,.16);
  position: relative; overflow: hidden;
}
.xp-load-bar i {
  position: absolute; inset: 0;
  background: var(--brass);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s linear;
}
.xp-load p {
  font-size: .62rem; letter-spacing: .34em; text-transform: uppercase;
  color: rgba(242,236,225,.5); margin: 16px 0 0;
}

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .xp-chapter { height: 150svh; }
  .xp-cards { gap: 10px; }
  .xp-card { width: 100%; max-width: 320px; }
  .xp-rail { right: 10px; gap: 10px; }
  .xp-stage::after {
    background:
      radial-gradient(140% 70% at 50% 45%, rgba(6,5,4,0) 0%, rgba(6,5,4,.45) 55%, rgba(6,5,4,.8) 100%),
      linear-gradient(180deg, rgba(6,5,4,.7) 0%, rgba(6,5,4,.1) 30%, rgba(6,5,4,.1) 64%, rgba(6,5,4,.85) 100%);
  }
}

/* reduced motion: no scrub, just a still and the content shown */
@media (prefers-reduced-motion: reduce) {
  .xp-inner { opacity: 1; transform: none; transition: none; }
  .xp-chapter { height: auto; padding-block: 18vh; }
  .xp-inner { position: static; height: auto; }
}
