/*
 * The coverage section's band (assets/js/orbit.js): a band of night the width of the screen between
 * two torn edges. The searched fragment in the middle, the sources turning round it. The canvas is
 * the lights, the belts, the wave and the lines; .orbit__bodies holds the coins, the tile and the
 * words, placed by the script.
 */
@font-face { font-family: "IBM Plex Sans"; src: url("../fonts/ibm-plex-sans.woff2") format("woff2"); font-weight: 100 700; font-style: normal; font-display: swap; }

.orbit { position: relative; isolation: isolate; overflow: hidden; height: clamp(520px, 50vw, 820px); margin: 0; background: radial-gradient(70% 90% at 50% 50%, #1A120A, #0D0905 70%); }
/* the night itself, once it has been painted (assets/img/orbit/sky.webp, and an upright one for phones). A wash
   over it holds its dust back, so the lights, the coins and the count are what's read */
.orbit[data-has~="sky"] { background: linear-gradient(rgba(13, 9, 5, .3), rgba(13, 9, 5, .3)), radial-gradient(60% 70% at 50% 50%, rgba(13, 9, 5, .5), rgba(13, 9, 5, 0) 75%), #0D0905 url("../img/orbit/sky.webp") 50% 50% / cover no-repeat; }
@media (max-width: 720px) { .orbit[data-has~="sky-tall"] { background: linear-gradient(rgba(13, 9, 5, .3), rgba(13, 9, 5, .3)), radial-gradient(70% 50% at 50% 50%, rgba(13, 9, 5, .5), rgba(13, 9, 5, 0) 75%), #0D0905 url("../img/orbit/sky-tall.webp") 50% 50% / cover no-repeat; } }
.orbit canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
/* the star behind the fragment's tile: its light only (it was painted on black; the black is transparency in the file) */
.ob-star { position: absolute; left: 50%; top: 29px; z-index: -1; opacity: .72; width: clamp(300px, 34vw, 520px); aspect-ratio: 1; max-width: none; transform: translate(-50%, -50%) scale(var(--flare, 1)); pointer-events: none; }
.orbit__bodies:has(.ob-star) .ob-core b { box-shadow: 0 0 0 3px rgba(255, 253, 248, .9); }      /* the star is the tile's glow now */
.orbit__bodies {
  --f-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  position: absolute; inset: 0; font-family: var(--f-sans); color: #F3EFE4; pointer-events: none; user-select: none;
  opacity: 0; transition: opacity .7s ease;
}
.orbit.is-ready .orbit__bodies { opacity: 1; }
.orbit__bodies p { margin: 0; }

/* A named source is a planet: its own colour and mark wrapped onto a sphere with its terrain worked through them
   (orbit-globe.js draws it). Here: the day and the night across it, lit from the star's side (--lit, set as it
   moves), the light off its near edge, the thin air round it, and its seams glowing over the dark. Dim until it's
   asked; in full colour, with its name, if it answers */
.ob-n { position: absolute; left: 0; top: 0; display: grid; justify-items: center; will-change: transform; }
.ob-coin { position: relative; isolation: isolate; display: block; width: calc(var(--coin, 44px) * 1.56); height: calc(var(--coin, 44px) * 1.56); border-radius: 50%;
  box-shadow: 0 0 calc(var(--coin, 44px) * .12) 0 color-mix(in srgb, var(--air, #C9C2B4) 16%, transparent); filter: grayscale(.92) brightness(.5); transition: filter .5s ease, box-shadow .5s ease; }
.ob-globe, .ob-lava { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border-radius: 50%; }
.ob-lava { z-index: 3; mix-blend-mode: screen; opacity: .4; transition: opacity .5s ease; }
.ob-coin::after { content: ""; position: absolute; inset: -.5px; z-index: 2; border-radius: 50%; transform: rotate(var(--lit, 0rad));
  background:
    radial-gradient(circle at 80% 42%, rgba(255, 252, 240, .22), rgba(255, 252, 240, 0) 24%),
    radial-gradient(circle at 96% 50%, color-mix(in srgb, var(--air, #C9C2B4) 45%, transparent) 0, transparent 22%),
    radial-gradient(circle at 74% 50%, rgba(0, 0, 0, 0) 38%, rgba(6, 4, 2, .5) 68%, rgba(6, 4, 2, .93) 100%);
  background-blend-mode: screen, screen, normal; }
.ob-n.is-asked .ob-coin { filter: grayscale(.4) brightness(.85); transition-duration: .15s; }
.ob-n.is-hit .ob-coin { filter: none; box-shadow: 0 0 calc(var(--coin, 44px) * .22) 0 color-mix(in srgb, var(--air, #C9C2B4) 30%, transparent), 0 0 calc(var(--coin, 44px) * .6) calc(var(--coin, 44px) * .06) rgba(255, 208, 43, .12); transition-duration: .3s; }
.ob-n.is-hit .ob-lava { opacity: .6; }
.ob-n--ice .ob-lava { opacity: .3; } .ob-n--ice.is-hit .ob-lava { opacity: .5; }
/* the middle: the fragment, as the app's tile, and what it is, typed */
.ob-core { position: absolute; left: 0; top: 0; z-index: 5; display: grid; justify-items: center; gap: 10px; }
.ob-core b { display: grid; place-items: center; width: 58px; height: 58px; border: 2px solid #17130F; border-radius: 12px; background: var(--tint, #D6E0FD); box-shadow: 0 0 0 3px rgba(255, 253, 248, .9), 0 0 44px 10px rgba(255, 208, 43, .5); font: 700 22px/1 var(--f-sans); color: #17130F; transition: background .4s ease; }
.ob-q { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 10px; border-radius: 6px; background: rgba(13, 9, 5, .82); font: 600 15px/1.3 var(--f-sans); letter-spacing: -.005em; white-space: nowrap; }
.ob-q i { width: 1.5px; height: 16px; margin-left: 2px; background: #FFD02B; animation: ob-blink 1s steps(1) infinite; }
@keyframes ob-blink { 50% { opacity: 0; } }
.orbit__bodies.is-told .ob-q i, .orbit__bodies.is-still .ob-q i { display: none; }

/* the count, and what a light is */
.ob-read { position: absolute; left: 50%; bottom: 58px; z-index: 4; transform: translateX(-50%); padding: 5px 14px; border-radius: 8px; background: rgba(13, 9, 5, .8); font: 500 15px/1.4 var(--f-sans); color: #D9D0BC; white-space: nowrap; }
.ob-read b { font-weight: 700; font-variant-numeric: tabular-nums; color: #FFD84D; }
.ob-read i { display: inline-block; width: 4px; height: 4px; margin: 0 8px 3px; background: #6A645A; }
.ob-cap { position: absolute; left: clamp(16px, 4vw, 40px); bottom: 62px; z-index: 4; display: flex; align-items: center; gap: 8px; font: 600 11px/1.4 var(--f-sans); letter-spacing: .1em; text-transform: uppercase; color: #A2977F; }
.ob-cap::before { content: ""; width: 5px; height: 5px; background: #FFD84D; box-shadow: 0 0 8px 2px rgba(255, 208, 43, .6); }

@media (max-width: 720px) {
  .orbit { height: 138vw; }
  .ob-star { top: 22px; width: 78vw; }
  .orbit__bodies:has(.ob-star) .ob-core b { box-shadow: 0 0 0 2px rgba(255, 253, 248, .9); }
  .ob-core { gap: 7px; }
  .ob-core b { width: 44px; height: 44px; border-radius: 9px; font-size: 17px; box-shadow: 0 0 0 2px rgba(255, 253, 248, .9), 0 0 30px 6px rgba(255, 208, 43, .5); }
  .ob-q { font-size: 12px; min-height: 22px; padding: 2px 7px; }
  .ob-q i { height: 13px; }
  .ob-read { bottom: 44px; font-size: 13px; padding: 4px 11px; }
  .ob-cap { display: none; }
}
@media (prefers-reduced-motion: reduce) { .ob-q i { animation: none; } .ob-coin { transition: none; } }
