/* The hub has no style of its own to impose: a dark sky where every world keeps its own look.
   Each world is a planet, and the window into it shows that world's own design. A new site = a new planet. */
#stars { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.stage { position: relative; height: min(78vw, 54rem); margin-top: .6rem; }
.orbits { position: absolute; inset: 0; width: 100%; height: 100%; }
.core { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; width: min(44vw, 32.5rem); }
.core h1 { font: 500 clamp(1.625rem, 3.3vw, 2.9rem)/1.12 var(--mono); letter-spacing: -.02em; margin: 0; }
html:lang(zh-Hant) .core h1, html:lang(ja) .core h1 { line-height: 1.3; }
.core p { color: var(--dim); font-size: 1rem; margin: 1rem auto 0; max-width: 42ch; }
.core .count { display: inline-block; margin-top: 1.1rem; font-size: .75rem; letter-spacing: .22em; text-transform: uppercase; border: 1px solid var(--line); padding: .45rem .8rem; border-radius: 999px; color: var(--txt); }

.planet { position: absolute; display: block; text-decoration: none; color: var(--txt); }
/* Planets are lit globes (art pre-wrapped onto a sphere by art_source/planets/post-planets.py): one key light from the
   upper left, the night side falling off to the lower right, darker limbs, and a rim of starlight on the side facing
   --lx/--ly (straight up by default; on phones belt.js points it at the white star in the middle of the orbit). */
.planet .ball { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #04050b; isolation: isolate;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08), calc(var(--lx, 0) * .7rem) calc(var(--ly, -1) * .7rem) 2.2rem -.2rem var(--glow, rgba(170,190,255,.2));
  transition: transform .5s cubic-bezier(.2,.7,.2,1), box-shadow .5s; }
.planet .ball .w-art { width: 100%; height: 100%; display: block; object-fit: cover; clip-path: circle(50%); } /* Safari stops clipping to the round parent while a picture fades, so each picture clips itself */
.planet .ball .turn { position: absolute; inset: 0; opacity: 0; transition: opacity 1.8s ease; }
.planet .ball .turn.on { opacity: 1; }
.planet .ball::before { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 50%; mix-blend-mode: overlay; pointer-events: none;
  background: radial-gradient(circle at 34% 29%, #fff 0%, #b4b4b4 26%, #6a6a6a 58%, #262626 86%, #0c0c0c 100%); }
.planet .ball::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 31% 25%, rgba(255,255,255,.5), rgba(255,255,255,.12) 7%, rgba(255,255,255,0) 15%),
    radial-gradient(circle at 36% 30%, rgba(3,4,12,0) 30%, rgba(3,4,12,.5) 60%, rgba(3,4,12,.93) 92%);
  box-shadow: inset calc(var(--lx, 0) * -.6rem) calc(var(--ly, -1) * -.6rem) .75rem -.2rem rgba(214,226,255,.6), inset 0 0 1.3rem .15rem rgba(0,0,0,.55); }
.planet .tag { position: absolute; width: max-content; max-width: 15rem; font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.planet .tag b { display: block; font-weight: 500; letter-spacing: .01em; text-transform: none; font-size: 1rem; color: var(--txt); margin-top: .2rem; }
/* the English name under a translated one, like the scientific name under a common name in a field guide */
.planet .tag .orig, .belt-info .orig { display: block; font-size: .75rem; letter-spacing: .04em; text-transform: none; color: var(--dim); margin: .05rem 0 .3rem; }
.planet .tag .enter { display: inline-block; margin-top: .5rem; color: var(--txt); border-bottom: 1px solid rgba(233,236,247,.5); padding-bottom: 2px; }
.planet .tag .enter small { font-size: 1em; color: var(--dim); text-transform: none; }
a.planet:hover .ball, a.planet:focus-visible .ball { transform: scale(1.04); box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 0 4.4rem .6rem var(--glow); }
.planet.uncharted .ball { filter: grayscale(.85) blur(2.2px) brightness(.55); }
.planet.uncharted .tag b { color: var(--dim); }
.blink { animation: bl 1s steps(1) infinite; } .blink.b { animation-delay: .5s; } @keyframes bl { 50% { opacity: 0; } }

.p1 { width: min(25vw, 18.75rem); inset-inline-start: 6%; top: 9%; --glow: rgba(242,234,216,.28); }
.p1 .tag { inset-inline-start: 18%; top: 100%; margin-top: 1rem; }
.p2 { width: min(12vw, 8.75rem); inset-inline-end: 10%; top: 6%; }
.p2 .tag { inset-inline-end: 108%; top: 30%; text-align: end; }
.p3 { width: min(21vw, 16rem); inset-inline-end: 6%; bottom: 8%; --glow: rgba(232,170,120,.26); }
.p3 .tag { inset-inline-start: 8%; bottom: 100%; margin-bottom: 1rem; }
.p4 { width: min(11vw, 8.1rem); inset-inline-start: 16%; bottom: 4%; }
.p4 .tag { inset-inline-start: 110%; top: 36%; }
.p5 { width: min(7.5vw, 6rem); inset-inline-start: 36%; top: 4%; }
.p5 .tag { inset-inline-start: 112%; top: 28%; }

.notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; border-top: 1px solid var(--line); padding-top: 1.4rem; margin-top: .6rem; font-size: 1rem; color: var(--dim); }
.notes h2 { font: 500 .75rem/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--txt); margin: 0 0 .7rem; }
.notes p { margin: 0; }

/* up to 1400px (tablets, foldables, 720p and 1366 laptops) the orbit is too tight for the headline, so the worlds line up in a row under it */
@media (min-width: 821px) and (max-width: 1400px) {
  .stage { height: auto; display: grid; grid-template-columns: repeat(6, 1fr); align-items: center; gap: 1.5rem 2rem; padding: 2.2rem 0 1.4rem; }
  .orbits { display: none; }
  .core { position: relative; left: auto; top: auto; transform: none; width: auto; max-width: 40rem; grid-column: 1 / -1; margin: 0 auto 1rem; }
  .planet { position: relative; inset: auto !important; width: auto; }
  .planet { grid-column: span 2; }
  .p1, .p3 { grid-column: span 3; width: min(62%, 17rem); justify-self: center; }
  .p2, .p4, .p5 { width: min(70%, 9.5rem); justify-self: center; }
  .planet .tag { position: static; display: block; width: auto; max-width: none; text-align: start !important; margin: .9rem 0 0 !important; }
}
@media (max-width: 820px) {
  .stage { height: auto; display: flex; flex-direction: column; gap: 2.1rem; padding: 1.25rem 0 .6rem; }
  .orbits { display: none; }
  .core { position: relative; left: auto; top: auto; transform: none; width: auto; order: -1; margin-bottom: .5rem; }
  .planet { position: relative; inset: auto !important; align-self: center; }
  .p1, .p3 { width: min(62vw, 22.5rem); } .p2, .p4, .p5 { width: min(34vw, 12.5rem); }
  .planet .tag { position: static; display: block; width: auto; max-width: none; text-align: center !important; margin: .75rem 0 0 !important; }
  .notes { grid-template-columns: 1fr; }
}
/* Phones and portrait tablets (with JS): the worlds ride an endless orbit the thumb spins, one world in front at a
   time, so the page never grows longer as worlds are added. belt.js places every planet; here they are only stacked
   in one grid cell. Without JS the column layout above stays. */
.belt-ring, .belt-info, .belt-pager { display: none; }
@media (max-width: 820px) {
  .js .wrap { overflow-x: clip; } /* side planets run to the screen edge, never past it */
  .js .stage { display: grid; grid-template-columns: 100%; grid-template-areas: "core" "belt" "info" "pager"; gap: 0; padding: .5rem 0 .4rem;
    --s: min(42vw, 13rem); --pt: calc(var(--s) * .6); --pb: 2.2rem; }
  .js .stage .core { grid-area: core; margin-bottom: 0; }
  .js .stage .core .count { margin-top: .8rem; }
  .js .stage .planet { grid-area: belt; align-self: start; justify-self: center; width: var(--s); margin-top: var(--pt); touch-action: pan-y;
    will-change: transform, opacity; -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
  .js .stage .planet img { -webkit-user-drag: none; pointer-events: none; }
  .js .stage .planet .tag { display: none; }
  .js .stage a.planet:hover .ball { transform: none; }
  .js .belt-ring { grid-area: belt; display: block; position: relative; height: calc(var(--pt) + var(--s) + var(--pb)); touch-action: pan-y; cursor: grab; }
  .js .belt-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
  .js .belt-star { position: absolute; width: 0; height: 0; z-index: 100; }
  .js .belt-star::before { content: ""; position: absolute; left: -5.5rem; top: -5.5rem; width: 11rem; height: 11rem; border-radius: 50%;
    background: radial-gradient(circle, #fffdf6 0 2.2%, rgba(255,246,226,.6) 5%, rgba(214,222,255,.2) 20%, rgba(170,180,255,.06) 42%, transparent 66%); }
  .js .belt-info { grid-area: info; display: block; position: relative; z-index: 300; text-align: center; min-height: 7.4rem; margin-top: -1rem; padding: 0 1rem;
    font-size: .75rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); transition: opacity .2s ease; }
  .js .belt-info.swap { opacity: 0; }
  .js .belt-info a { color: inherit; text-decoration: none; display: inline-block; }
  .js .belt-info b { display: block; font-weight: 500; letter-spacing: .01em; text-transform: none; font-size: 1.1rem; color: var(--txt); margin: .3rem 0 .15rem; }
  .js .belt-info .enter { display: inline-block; margin-top: .7rem; min-height: 2.75rem; line-height: 2.75rem; padding: 0 1.2rem; border: 1px solid rgba(233,236,247,.4); border-radius: 999px; color: var(--txt); }
  .js .belt-info .enter small { font-size: 1em; color: var(--dim); text-transform: none; }
  .js .belt-pager { grid-area: pager; display: flex; align-items: center; justify-content: center; gap: .7rem; font-size: .75rem; letter-spacing: .14em; color: var(--dim); }
  .js .belt-nav { width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%; background: none; color: var(--txt); font: 400 1.3rem/1 var(--mono); cursor: pointer; }
  .js .belt-nav:hover { background: rgba(233,236,247,.08); }
  .js .belt-dots { display: flex; gap: .35rem; }
  .js .belt-dots i { width: .4rem; height: .4rem; border-radius: 50%; background: rgba(233,236,247,.18); transition: background .25s, transform .25s; }
  .js .belt-dots i.lit { background: rgba(233,236,247,.45); }
  .js .belt-dots i.on { background: var(--txt); transform: scale(1.35); }
}
@media (prefers-reduced-motion: reduce) { .blink { animation: none; } .planet .ball, .planet .ball .turn, .belt-info { transition: none; } }
