/* Premium academy shell plus adaptive immersion. */
:root {
  --rail-green: #005f43;
  --rail-green-deep: #003f30;
  --rail-green-light: #00845a;
}

body {
  background:
    radial-gradient(circle at 16% 8%, rgba(90, 255, 184, .2), transparent 24%),
    radial-gradient(circle at 88% 42%, rgba(0, 199, 122, .18), transparent 28%),
    linear-gradient(155deg, var(--rail-green-light) 0%, var(--rail-green) 42%, var(--rail-green-deep) 100%);
}

.page {
  width: min(1280px, calc(100% - 48px));
  min-height: 100vh;
  padding-inline: 50px;
  border-inline: 1px solid rgba(221, 245, 232, .42);
  background: rgba(249, 252, 250, .96);
  box-shadow:
    0 0 0 1px rgba(0, 45, 31, .06),
    0 0 80px rgba(0, 32, 23, .22);
}

.money-os,
.capital-section,
.waitlist-panel {
  width: calc(100% + 100px);
  margin-left: -50px;
  padding-inline: 50px;
}

.legal-page {
  width: min(860px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding-inline: 50px;
  border-inline: 1px solid rgba(221, 245, 232, .42);
  background: #ffffff;
  box-shadow: 0 0 80px rgba(0, 32, 23, .22);
}

html.webgl-eligible body {
  background:
    radial-gradient(circle at 14% 8%, rgba(106, 255, 193, .22), transparent 23%),
    radial-gradient(circle at 88% 45%, rgba(0, 199, 122, .2), transparent 29%),
    linear-gradient(155deg, var(--rail-green-light) 0%, var(--rail-green) 42%, var(--rail-green-deep) 100%);
}

html.webgl-eligible .page {
  position: relative;
  z-index: 2;
  background: rgba(252, 253, 252, .965);
}

html.webgl-eligible #siteFlowWebgl {
  position: fixed !important;
  z-index: 0 !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100svh !important;
  display: block !important;
  opacity: 0 !important;
  pointer-events: none !important;
  contain: strict;
  transform: translateZ(0);
  transition: opacity 700ms ease;
}

html.site-flow-ready #siteFlowWebgl {
  opacity: .42 !important;
}

html.webgl-eligible .scene-vignette {
  position: fixed;
  z-index: 1;
  inset: 0;
  display: block !important;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(244, 247, 245, .18), transparent 24%, transparent 76%, rgba(244, 247, 245, .34)),
    radial-gradient(circle at 50% 42%, transparent 38%, rgba(244, 247, 245, .24) 100%);
}

html.webgl-eligible #trilogyWebgl {
  position: absolute !important;
  z-index: 1 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateZ(0);
  transition: opacity 620ms ease;
}

html.webgl-ready #trilogyWebgl {
  opacity: var(--webgl-stage-opacity, .76) !important;
}

html.webgl-ready .hero-orbit {
  border-color: rgba(0, 122, 77, .2);
  background:
    radial-gradient(circle at 72% 18%, rgba(0, 199, 122, .2), transparent 34%),
    linear-gradient(180deg, rgba(233, 247, 240, .92) 0 50%, #07100c 50% 100%);
  box-shadow:
    0 22px 58px rgba(7, 53, 34, .16),
    inset 0 1px 0 rgba(255, 255, 255, .8);
}

html.webgl-eligible .money-layer {
  position: absolute !important;
  z-index: 0 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateZ(0);
  transition: opacity 650ms ease;
}

html.money-layers-ready .money-layer-compound {
  opacity: .58 !important;
}

html.money-layers-ready .money-layer-recurring {
  opacity: .5 !important;
}

html.webgl-eligible .proof-band,
html.webgl-eligible .affiliate-engine {
  isolation: isolate;
}

html.webgl-eligible .proof-band > :not(.money-layer),
html.webgl-eligible .affiliate-engine > :not(.money-layer) {
  position: relative;
  z-index: 1;
}

html.webgl-eligible .capital-field {
  position: absolute !important;
  z-index: 0 !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateZ(0);
  transition: opacity 650ms ease;
}

html.capital-fields-ready .capital-field {
  opacity: .64 !important;
}

html.webgl-eligible .money-os,
html.webgl-eligible .capital-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #07100c;
}

html.webgl-eligible .money-os > :not(.capital-field),
html.webgl-eligible .capital-section > :not(.capital-field) {
  position: relative;
  z-index: 1;
}

html.capital-fields-ready .money-os,
html.capital-fields-ready .capital-section {
  background: #07100c;
}

html.capital-fields-ready .money-os::after,
html.capital-fields-ready .capital-section::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, rgba(7, 16, 12, .34), rgba(7, 16, 12, .08) 58%, rgba(7, 16, 12, .2));
}

html.site-flow-ready .proof-strip article,
html.site-flow-ready .value-grid article,
html.site-flow-ready .trust-proof-grid article,
html.site-flow-ready .ecosystem-grid article,
html.site-flow-ready .access-grid article,
html.site-flow-ready .preview-grid article,
html.site-flow-ready .conversion-list article,
html.site-flow-ready .affiliate-rule-grid article {
  background: rgba(255, 255, 255, .92);
  box-shadow:
    0 12px 32px rgba(7, 35, 23, .06),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

html.webgl-eligible .hero-orbit::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, .16), transparent 26%, transparent 72%, rgba(0, 199, 122, .08)),
    radial-gradient(circle at 52% 50%, transparent 35%, rgba(4, 30, 19, .09) 100%);
}

@media (max-width: 760px) {
  body,
  html.webgl-eligible body {
    background: var(--bg);
    overscroll-behavior-y: none;
  }

  .page {
    width: 100%;
    padding-inline: 16px;
    border-inline: 0;
    background: linear-gradient(180deg, #fbfcfb 0%, #f4f7f5 100%);
    box-shadow: none;
  }

  html.webgl-eligible .page {
    background: linear-gradient(180deg, rgba(253, 254, 253, .99) 0%, rgba(244, 247, 245, .99) 100%);
  }

  .money-os,
  .capital-section,
  .waitlist-panel {
    width: calc(100% + 32px);
    margin-left: -16px;
    padding-inline: 16px;
  }

  .legal-page {
    width: calc(100% - 16px);
    padding-inline: 12px;
    box-shadow: 0 0 34px rgba(0, 35, 25, .2);
  }

  .hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 16px;
  }

  .hero-chips span {
    min-height: 29px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border: 1px solid rgba(0, 122, 77, .11);
    border-radius: 999px;
    color: #245f48;
    background: rgba(255, 255, 255, .86);
    font-size: 10px;
    font-weight: 780;
  }

  .sticky-access {
    right: 8px;
    left: 8px;
    border: 1px solid rgba(0, 71, 48, .12);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
  }

  html.webgl-eligible #siteFlowWebgl,
  html.webgl-eligible .scene-vignette,
  html.webgl-eligible .money-layer,
  html.webgl-eligible .capital-field {
    display: none !important;
  }

  html.webgl-ready #trilogyWebgl {
    opacity: var(--webgl-stage-opacity, .82) !important;
  }

  html.site-flow-ready .proof-strip article,
  html.site-flow-ready .value-grid article,
  html.site-flow-ready .trust-proof-grid article,
  html.site-flow-ready .ecosystem-grid article,
  html.site-flow-ready .access-grid article,
  html.site-flow-ready .preview-grid article,
  html.site-flow-ready .conversion-list article,
  html.site-flow-ready .affiliate-rule-grid article {
    background: rgba(255, 255, 255, .94);
  }
}

@media (prefers-reduced-motion: reduce) {
  #siteFlowWebgl,
  #trilogyWebgl,
  .money-layer,
  .capital-field,
  .scene-vignette {
    display: none !important;
  }
}

html body[data-route="affiliate"],
html.webgl-eligible body[data-route="affiliate"],
body[data-route="affiliate"] .page,
html.webgl-eligible body[data-route="affiliate"] .page {
  background: #000000;
}
