/**
 * Global page shell background (matches index.html home).
 * Requires shared-page-bg.js for --scroll-y and body.is-scrolling (bottom blur while scrolling).
 */
html,
body {
  background-color: #0c1024;
}

.page {
  min-height: 100vh;
  position: relative;
  background: linear-gradient(180deg, #0b1027 0%, #0d132d 38%, #0c122a 100%);
  background-attachment: scroll;
  background-size: 100% 400vh;
  background-position: 0 0;
  background-repeat: repeat-y;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(176, 179, 214, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(176, 179, 214, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  background-position: 0 calc(var(--scroll-y, 0) * 0.15px);
  pointer-events: none;
  z-index: 0;
}

.page::after {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(11, 16, 39, 0.18);
  -webkit-backdrop-filter: blur(0px);
  backdrop-filter: blur(0px);
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 56%,
    rgba(0, 0, 0, 0.22) 72%,
    rgba(0, 0, 0, 0.95) 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 56%,
    rgba(0, 0, 0, 0.22) 72%,
    rgba(0, 0, 0, 0.95) 100%
  );
  opacity: 0;
  transition: opacity 0.45s ease, -webkit-backdrop-filter 0.45s ease, backdrop-filter 0.45s ease;
  pointer-events: none;
  z-index: 0;
}

body.is-scrolling .page::after {
  opacity: 1;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.page > *:not(header) {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .page::after {
    transition: none;
  }
  body.is-scrolling .page::after {
    opacity: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}
