/* MWI 18+ age gate + "pulled into the screen" transition. Isolated: every rule is .mwi-ag* scoped. */
html.mwi-ag-pending,
html.mwi-ag-lock {
  overflow: hidden;
  scrollbar-gutter: stable;
}
/* Pre-paint cover so the page never flashes before the deferred script builds the dialog. */
html.mwi-ag-pending::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(12, 12, 21, 0.3), rgba(8, 8, 14, 0.9) 85%),
    url("/assets/agegate-bg.webp") 50% 50% / cover no-repeat,
    #0c0c15;
}
.mwi-ag {
  --ag-accent: #f479ae;
  --ag-ground: #0c0c15;
  position: fixed;
  inset: 0;
  width: 100vw; /* also covers the reserved scrollbar gutter */
  z-index: 2147483001;
  display: grid;
  place-items: center;
  overflow: hidden;
  overscroll-behavior: contain;
  touch-action: none;
  color: #f4f3f7;
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  contain: strict;
}
.mwi-ag *,
.mwi-ag *::before,
.mwi-ag *::after {
  box-sizing: border-box;
}
.mwi-ag__stage,
.mwi-ag__drift,
.mwi-ag__art,
.mwi-ag__video,
.mwi-ag__ghost,
.mwi-ag__glow,
.mwi-ag__gl,
.mwi-ag__shade,
.mwi-ag__core,
.mwi-ag__veil,
.mwi-ag__fx,
.mwi-ag__tunnel {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.mwi-ag__stage {
  background: var(--ag-ground);
}
/* Backdrop: a pre-blurred collage of the studio's games (or blurred trailer loops), drifting slowly;
   desktop adds a little pointer parallax on the wrapper. Only transforms animate (compositor only). */
.mwi-ag__drift {
  transform: translate3d(calc(var(--ag-px, 0) * -16px), calc(var(--ag-py, 0) * -11px), 0);
  transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.mwi-ag__art,
.mwi-ag__video,
.mwi-ag__ghost {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
  transform-origin: 50% 50%;
  user-select: none;
}
.mwi-ag__art,
.mwi-ag__video {
  transform: scale(1.1);
  animation: mwi-ag-drift 26s ease-in-out infinite alternate;
}
.mwi-ag__glow {
  inset: -25%;
  background:
    radial-gradient(
      closest-side at 30% 34%,
      color-mix(in srgb, var(--ag-accent) 42%, transparent),
      transparent
    ),
    radial-gradient(closest-side at 72% 68%, rgba(124, 77, 255, 0.42), transparent);
  animation: mwi-ag-glow 17s ease-in-out infinite alternate;
}
.mwi-ag__ghost {
  opacity: 0;
}
.mwi-ag__shade {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(12, 12, 21, 0.05), rgba(12, 12, 21, 0.38) 55%, rgba(6, 6, 11, 0.92)),
    linear-gradient(180deg, rgba(12, 12, 21, 0.35), rgba(12, 12, 21, 0) 30%, rgba(12, 12, 21, 0) 70%, rgba(12, 12, 21, 0.5));
}
.mwi-ag__core {
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  width: 60vmax;
  height: 60vmax;
  margin: -30vmax 0 0 -30vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--ag-accent) 55%, transparent) 0,
    color-mix(in srgb, var(--ag-accent) 18%, transparent) 30%,
    transparent 62%
  );
  opacity: 0.35;
  transform: scale(0.5);
  animation: mwi-ag-pulse 4.5s ease-in-out infinite alternate;
}
.mwi-ag__veil {
  background: var(--ag-ground);
  opacity: 0;
}
.mwi-ag__tunnel {
  perspective: 620px;
  perspective-origin: 50% 45%;
  opacity: 0;
}
.mwi-ag__rings {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.mwi-ag__ring {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 9%;
  bottom: 13%;
  border: 2px solid var(--ag-accent);
  border-radius: 28px;
  box-shadow:
    0 0 26px color-mix(in srgb, var(--ag-accent) 70%, transparent),
    inset 0 0 26px color-mix(in srgb, var(--ag-accent) 45%, transparent);
  backface-visibility: hidden;
}
.mwi-ag__panel {
  position: relative;
  width: min(480px, calc(100vw - 32px));
  padding: 40px 40px 30px;
  text-align: center;
  background: linear-gradient(180deg, rgba(24, 16, 32, 0.86), rgba(12, 12, 21, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 0 60px -20px color-mix(in srgb, var(--ag-accent) 60%, transparent);
  animation: mwi-ag-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.mwi-ag__brand {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 26px;
}
.mwi-ag__word {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}
.mwi-ag__word span {
  color: var(--ag-accent);
}
.mwi-ag__sub {
  font-size: 9px;
  letter-spacing: 0.24em;
  color: #b6b3c1;
}
.mwi-ag__badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 1.5px solid var(--ag-accent);
  color: var(--ag-accent);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: 0 0 24px -6px var(--ag-accent);
}
.mwi-ag__title {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
}
.mwi-ag__text {
  margin: 0 auto 26px;
  max-width: 370px;
  font-size: 15px;
  line-height: 1.6;
  color: #c9c4d2;
}
.mwi-ag__actions {
  display: grid;
  gap: 10px;
}
.mwi-ag__btn {
  appearance: none;
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 22px;
  border-radius: 999px;
  font:
    600 16px/1.2 Inter,
    Arial,
    sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}
.mwi-ag__btn--enter {
  border: 0;
  background: var(--ag-accent);
  color: #160c14;
  font-weight: 800;
  box-shadow: 0 10px calc(30px + 26px * var(--ag-mag, 0)) calc(-10px + 6px * var(--ag-mag, 0)) var(--ag-accent);
  /* Magnetic pull (desktop): age-gate.js sets --ag-mx/--ag-my/--ag-mag from the pointer distance. */
  transform: translate3d(var(--ag-mx, 0px), var(--ag-my, 0px), 0) scale(calc(1 + 0.025 * var(--ag-mag, 0)));
}
.mwi-ag__btn--enter:hover {
  box-shadow: 0 14px 44px -6px var(--ag-accent);
}
.mwi-ag__btn--enter:active {
  transform: translate3d(var(--ag-mx, 0px), var(--ag-my, 0px), 0) scale(0.97);
  transition-duration: 0.08s;
}
.mwi-ag__btn--leave {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: transparent;
  color: #e6e1ea;
}
.mwi-ag__btn--leave:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.mwi-ag__btn:focus-visible,
.mwi-ag__btn--enter:focus {
  outline: 3px solid #fff;
  outline-offset: 3px;
}
/* The dialog focuses Enter on open; browsers may withhold :focus-visible for that programmatic focus
   (e.g. after a mouse click on a link), so the primary button shows its ring on any focus. */
.mwi-ag__btn--enter:focus {
  box-shadow:
    0 0 0 6px rgba(244, 121, 174, 0.35),
    0 10px 30px -10px var(--ag-accent);
}
.mwi-ag__fine {
  margin: 20px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: #8f8a9a;
}
.mwi-ag__fine a {
  color: #c9c4d2;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.mwi-ag__fine a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.mwi-ag--leaving {
  pointer-events: none;
}
.mwi-ag--leaving .mwi-ag__panel {
  animation: none;
}
@keyframes mwi-ag-drift {
  from {
    transform: scale(1.1) translate3d(-1.8%, -1.2%, 0);
  }
  to {
    transform: scale(1.18) translate3d(1.8%, 1.4%, 0);
  }
}
@keyframes mwi-ag-glow {
  from {
    transform: translate3d(-4%, -3%, 0) rotate(-6deg);
  }
  to {
    transform: translate3d(4%, 3%, 0) rotate(6deg);
  }
}
@keyframes mwi-ag-pulse {
  from {
    opacity: 0.25;
    transform: scale(0.45);
  }
  to {
    opacity: 0.45;
    transform: scale(0.55);
  }
}
@keyframes mwi-ag-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
}
@media (max-width: 520px) {
  .mwi-ag__panel {
    padding: 32px 22px 24px;
    border-radius: 20px;
  }
  .mwi-ag__title {
    font-size: 24px;
  }
  .mwi-ag__text {
    font-size: 14px;
  }
  .mwi-ag__ring {
    left: 5%;
    right: 5%;
    top: 7%;
    bottom: 10%;
  }
}
@media (prefers-reduced-motion: reduce) {
  .mwi-ag__art,
  .mwi-ag__video,
  .mwi-ag__glow,
  .mwi-ag__core,
  .mwi-ag__panel {
    animation: none;
  }
}
/* Portrait screens use a portrait collage (more tiles stacked, same blur). */
@media (max-aspect-ratio: 4/5) {
  html.mwi-ag-pending::after {
    background:
      radial-gradient(ellipse at 50% 50%, rgba(12, 12, 21, 0.3), rgba(8, 8, 14, 0.9) 85%),
      url("/assets/agegate-bg-portrait.webp") 50% 50% / cover no-repeat,
      #0c0c15;
  }
  /* The panel covers most of a phone screen: keep the visible rim of the backdrop lighter and more colourful. */
  .mwi-ag__shade {
    background:
      radial-gradient(ellipse at 50% 50%, rgba(12, 12, 21, 0.05), rgba(12, 12, 21, 0.25) 60%, rgba(6, 6, 11, 0.75)),
      linear-gradient(180deg, rgba(12, 12, 21, 0.2), rgba(12, 12, 21, 0) 25%, rgba(12, 12, 21, 0) 75%, rgba(12, 12, 21, 0.35));
  }
  .mwi-ag__glow {
    inset: -10% -40%;
  }
}
