/* Entrance design. Locale pages hold only words and links; everything visual lives here, in scene.svg and in scene.js. */
:root {
  --ink: #e9e4d8; --muted: #aaa79f; --night: #10121a; --signal: #e8bd72;
  --sans: ui-rounded, "Hiragino Maru Gothic ProN", "Avenir Next", system-ui, sans-serif;
  --mono: ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--night); }
body { color: var(--ink); font-family: var(--sans); }

.top {
  position: fixed; inset: 0 0 auto; z-index: 3; display: flex; justify-content: space-between; align-items: center; gap: .6rem 1rem; flex-wrap: wrap;
  padding: 1.1rem 1.4rem; pointer-events: none;
}
.top > * { pointer-events: auto; }
.wordmark { display: flex; align-items: center; gap: .55rem; margin: 0; font: 400 .68rem/1.25 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.wordmark span { color: var(--signal); font-size: 2rem; line-height: 1; }
.langs { display: flex; gap: .35rem; }
.langs a { color: var(--muted); font-size: .82rem; text-decoration: none; padding: .2rem .35rem; }
.langs a[aria-current] { color: var(--night); background: var(--ink); }

/* Without the scene (no JavaScript, or still loading) the links are a plain list. */
.doors { min-height: 100%; display: grid; place-content: center; gap: 1.6rem; padding: 6rem 1.5rem; }
.doors a { position: relative; color: inherit; text-decoration: none; }
body:not(.scene-on) .doors [data-random] { display: none; }
.label { display: grid; gap: .25rem; justify-items: center; text-align: center; white-space: nowrap; }
.title { font-weight: 650; font-size: 1.2rem; letter-spacing: -.01em; background: linear-gradient(var(--signal), var(--signal)) no-repeat 50% 100% / 0 1px; padding-bottom: 2px; transition: background-size .6s ease; }
.sub { font: .7rem var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.doors a:hover .title, .doors a:focus-visible .title { background-size: 100% 1px; }
.doors a:focus-visible { outline: none; }
.doors a:focus-visible::before { content: ""; position: absolute; inset: -6px; border: 1px dashed var(--ink); border-radius: 8px; }

/* With the scene, each link becomes a box over its object and its label hangs below. */
body.scene-on { overflow: hidden; }
.scene-on .doors { display: block; padding: 0; position: fixed; inset: 0; z-index: 2; pointer-events: none; }
.scene-on .doors a { position: absolute; pointer-events: auto; transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }
.scene-on .label { position: absolute; left: 0; top: 0; text-shadow: 0 0 6px var(--night), 0 0 14px var(--night); }
.scene-on .doors a:not([data-random]) .label::before { content: ""; position: absolute; inset: -.6rem -1.1rem; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, #10121ab0, transparent); }

#paint, #scene, #scene > svg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
/* Vignette and paper grain sit above the scene as a static layer, so animations never repaint them. */
#scene::after {
  content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(closest-corner circle at 50% 50%, transparent 60%, #07080d70),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .85 0 0 0 0 .75 0 0 0 .14 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23g)'/%3E%3C/svg%3E");
}
.hit { fill: none; }
.layer { transition: transform 1.1s cubic-bezier(.2, .8, .2, 1); }

.disc { transform-box: fill-box; transform-origin: center; animation: wobble 2.4s ease-in-out infinite; }
@keyframes wobble { 50% { transform: scaleX(.97) skewX(2deg) } }
.glint { animation: glint 2.4s linear infinite; }
@keyframes glint { from { transform: translateX(-30px) } to { transform: translateX(30px) } }
.petals { transform-box: fill-box; transform-origin: 30% 80%; animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: rotate(-3deg) scale(1.03) } }
.note { opacity: 0; animation: rise 7s ease-in infinite; }
.note:nth-child(2) { animation-delay: -1.7s } .note:nth-child(3) { animation-delay: -3.4s } .note:nth-child(4) { animation-delay: -5.1s }
@keyframes rise { 0% { opacity: 0; transform: translate(0, 0) } 15% { opacity: .9 } 60% { transform: translate(-40px, -140px) rotate(8deg) } 100% { opacity: 0; transform: translate(-100px, -230px) rotate(-20deg) } }
.hot-artist .note { animation-duration: 4s; }
.mote { animation: drift 9s ease-in-out infinite; }
.mote:nth-child(2n) { animation-duration: 13s; animation-delay: -4s } .mote:nth-child(3n) { animation-duration: 11s; animation-delay: -7s }
@keyframes drift { 50% { transform: translate(12px, -18px); opacity: .3 } }
.ajar { transform-box: fill-box; transform-origin: left center; transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.hot-apps .ajar { transform: skewY(-3deg) scaleX(.8); }
.spill { opacity: .5; transition: opacity 1.4s; } .hot-apps .spill { opacity: .85; }
.die { transform-box: fill-box; transform-origin: center; }
.rolling .die { animation: roll 1s cubic-bezier(.5, 0, .3, 1); }
@keyframes roll { 40% { transform: translateY(-60px) rotate(200deg) } 100% { transform: rotate(360deg) } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .note { opacity: .6; } }

/* the musicians: slow, small movements, as if seen through warm air */
.sway { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 4.2s ease-in-out infinite alternate; }
@keyframes sway { from { transform: rotate(-1.4deg) } to { transform: rotate(1.6deg) translateX(1px) } }
.bow { animation: bow 2.6s ease-in-out infinite alternate; }
@keyframes bow { from { transform: translate(-7px, 1.5px) } to { transform: translate(7px, -1.5px) } }
.strum { transform-box: fill-box; transform-origin: 90% 0; animation: strum 1.8s ease-in-out infinite alternate; }
@keyframes strum { from { transform: rotate(-3deg) } to { transform: rotate(4deg) } }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flame 1.3s ease-in-out infinite alternate; }
@keyframes flame { to { transform: scale(.85, 1.15) skewX(4deg) } }
.hot-artist .bow { animation-duration: 1.3s; } .hot-artist .strum { animation-duration: 1s; }
