/* Shared landing transitions: only scenery softens; copy and coins stay sharp.
   Load after chapter styles so their background masks cannot override these. */
:root { --bg: #060c18; }
main { background-color: var(--bg); }
.arena-hero, .arena-product, .arena-story, .arena-inside, .money-flow, .economy-ledger, .stemx-future, .round-lounge, .migration-gallery, .tokenomics-glass, .closing-section {
  background-color: var(--bg);
  --edge-blur: 30px;
  --scene-fade: linear-gradient(to bottom,
    transparent 0%,
    #00000014 calc(var(--blend-in) * .12),
    #00000047 calc(var(--blend-in) * .28),
    #00000094 calc(var(--blend-in) * .46),
    #000000cc calc(var(--blend-in) * .64),
    #000000f5 calc(var(--blend-in) * .82),
    #000 var(--blend-in),
    #000 calc(100% - var(--blend-out)),
    #000000f5 calc(100% - var(--blend-out) * .82),
    #000000cc calc(100% - var(--blend-out) * .64),
    #00000094 calc(100% - var(--blend-out) * .46),
    #00000047 calc(100% - var(--blend-out) * .28),
    #00000014 calc(100% - var(--blend-out) * .12),
    transparent 100%);
}
.arena-hero { --blend-in: 0px; --blend-out: clamp(300px, calc(28 * var(--vw, 1vw)), 500px); }
.economy-ledger { --blend-in: clamp(180px, calc(15 * var(--vw, 1vw)), 280px); --blend-out: clamp(300px, calc(28 * var(--vw, 1vw)), 460px); }
.stemx-future { --blend-in: clamp(260px, calc(24 * var(--vw, 1vw)), 430px); --blend-out: clamp(340px, calc(32 * var(--vw, 1vw)), 540px); }
.round-lounge { --blend-in: clamp(240px, calc(22 * var(--vw, 1vw)), 360px); --blend-out: clamp(260px, calc(26 * var(--vw, 1vw)), 440px); border-block-color: transparent; }
.migration-gallery { --blend-in: clamp(240px, calc(22 * var(--vw, 1vw)), 360px); --blend-out: clamp(230px, calc(24 * var(--vw, 1vw)), 380px); }
.arena-product { --blend-in: 180px; --blend-out: 220px; isolation: isolate; }
.arena-story { --blend-in: 160px; --blend-out: 180px; isolation: isolate; }
.tokenomics-glass { --blend-in: clamp(150px, calc(16 * var(--vw, 1vw)), 280px); --blend-out: 42%; }
.closing-section { --blend-in: 180px; --blend-out: 220px; }
.scene-blend, .arena-hero .hero-art::before, .round-lounge::before, .arena-product::before, .arena-story::before {
  -webkit-mask-image: var(--scene-fade);
  mask-image: var(--scene-fade);
}
.scene-blend { display: block; overflow: hidden; }
/* Backdrop blur samples the scenery inside its masked layer only.
   Coins, copy and controls are separate higher layers. */
.scene-blend::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  -webkit-backdrop-filter: blur(var(--edge-blur));
  backdrop-filter: blur(var(--edge-blur));
  -webkit-mask-image: linear-gradient(to bottom,
    #000, #000000c4 calc(var(--blend-in) * .28),
    #0000004d calc(var(--blend-in) * .64), transparent var(--blend-in),
    transparent calc(100% - var(--blend-out)),
    #0000004d calc(100% - var(--blend-out) * .64),
    #000000c4 calc(100% - var(--blend-out) * .28), #000);
  mask-image: linear-gradient(to bottom,
    #000, #000000c4 calc(var(--blend-in) * .28),
    #0000004d calc(var(--blend-in) * .64), transparent var(--blend-in),
    transparent calc(100% - var(--blend-out)),
    #0000004d calc(100% - var(--blend-out) * .64),
    #000000c4 calc(100% - var(--blend-out) * .28), #000);
}
.arena-scenery { position: absolute; inset: 0; z-index: 0; }
.arena-hero .hero-art::before { z-index: 1; }
.arena-foreground { z-index: 2; }
.migration-gallery__scene::after { background: none; }
/* The mask must end with the image, not with a taller text/calculator section. */
.migration-gallery__scene .scene-blend { bottom: auto; height: calc(66.667 * var(--vw, 1vw)); }
.arena-product::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 55% 460px at 72% 52%, #3b47c22e, transparent 70%);
}
.site-footer { border-top: 0; }
@media (max-width: 950px) {
  .lounge-backdrop.scene-blend { bottom: auto; height: 800px; }
  .round-lounge::before { bottom: auto; height: 800px; }
}
@media (max-width: 900px) {
  .arena-hero { --blend-in: 66px; --blend-out: 140px; }
  .stemx-future { --blend-in: 140px; --blend-out: 180px; }
  .tokenomics-glass { --blend-in: 22%; --blend-out: 36%; }
}
@media (max-width: 700px) {
  .arena-hero, .economy-ledger, .stemx-future, .round-lounge, .migration-gallery, .tokenomics-glass, .closing-section { --edge-blur: 16px; }
  .arena-hero { --blend-in: 66px; --blend-out: 140px; }
  .arena-product { --blend-in: 100px; --blend-out: 160px; }
  .economy-ledger { --blend-in: 120px; --blend-out: 190px; }
  .round-lounge { --blend-in: 190px; --blend-out: 200px; }
  .economy-ledger__background::after { background: linear-gradient(transparent, var(--bg) 45%); }
}
@media (max-width: 900px) {
  .migration-gallery { --blend-in: 0px; --blend-out: 0px; }
  /* With edges 0 px long the blur layer over this scene shows nothing, but the phone still blurred the scene behind it
     on every frame: the layer is not made. */
  .migration-gallery__scene .scene-blend::before { content: none; }
  .migration-gallery__scene .scene-blend { height: 66.667vw; }
  .migration-gallery__scene::after { background: linear-gradient(var(--bg), transparent 18%, transparent 75%, var(--bg)); }
}
@media (max-width: 550px) {
  .stemx-future { --blend-in: 100px; --blend-out: 140px; }
}

/* Matching light fields follow the page order. Their colours and slope agree at
   each join; foreground content is never blurred or covered by an overlay. */
.arena-product { background-image: none; }
@media (min-width: 901px) {
  .arena-hero { background-image: radial-gradient(ellipse 85% 360px at 63% 100%, #204a8633, transparent); }
  .arena-product { background-image: radial-gradient(ellipse 85% 360px at 63% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 32% 100%, #204a8633, transparent); }
  .arena-story { background-image: radial-gradient(ellipse 85% 360px at 32% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 65% 100%, #204a8633, transparent); }
  .arena-inside { background-image: radial-gradient(ellipse 85% 360px at 65% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 32% 100%, #204a8633, transparent); }
  .money-flow { background-image: radial-gradient(ellipse 85% 360px at 32% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 32% 100%, #204a8633, transparent); }
  .economy-ledger { background-image: radial-gradient(ellipse 85% 360px at 32% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 32% 100%, #204a8633, transparent); }
  .stemx-future { background-image: radial-gradient(ellipse 85% 360px at 60% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 75% 100%, #204a8633, transparent); }
  .round-lounge { background-image: radial-gradient(ellipse 85% 360px at 32% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 70% 100%, #204a8633, transparent); }
  #tokenomics.tokenomics-glass { background-image: radial-gradient(ellipse 85% 360px at 70% 0%, #204a8633, transparent), radial-gradient(ellipse 85% 360px at 60% 100%, #204a8633, transparent); }
  .migration-gallery { background-image: radial-gradient(ellipse 85% 360px at 75% 0%, #204a8633, transparent); }
}
