/*
 * Cloobin logo + splash scene. Loaded from index.html, so it is available before JS runs.
 *
 * .cloobin-logo        the layered logo (glyphs, spinning "O" records, still tonearm, glints).
 *                      Used by the boot splash, the first-visit intro and the header (NavLogo).
 * .boot-splash         the full-screen scene around it: neon ignition, club backdrop
 *                      (LED-dot mesh, pointer glow --mx/--my in -1..1, spotlights, vignette).
 *
 * Exit (src/lib/bootSplash.ts): the records brake to the header logo's speed, then the logo
 * flies in slow motion into the header logo's place (.cloobin-logo[data-splash-target]) while
 * the backdrop fades out. Without a header logo the scene just zooms and fades.
 *
 * Layer boxes are percentages of the 780x201 source logo (mobile/assets/logoSplash@3x.png).
 * `data-spin` / `data-spin-rest` = a record's speed in deg/s in the splash / in the header;
 * keep them in sync with the animation durations below.
 */

/* --- the layered logo ------------------------------------------------------------------- */

.cloobin-logo {
  position: relative;
  aspect-ratio: 780 / 201;
}
.cloobin-logo__part { position: absolute; inset: 0; }
.cloobin-logo__part > * { position: absolute; display: block; }

.cloobin-logo__glyph--c { left: 0%; top: 27.8607%; width: 9.2308%; height: 59.7015%; }
.cloobin-logo__glyph--l { left: 9.2308%; top: 12.9353%; width: 9.359%; height: 82.0896%; }
.cloobin-logo__glyph--o1 { left: 16.7949%; top: .4975%; width: 25.2564%; height: 98.5075%; }
.cloobin-logo__glyph--o2 { left: 42.8205%; top: 0%; width: 28.5897%; height: 99.005%; }
.cloobin-logo__glyph--b { left: 68.9744%; top: 15.4229%; width: 8.2051%; height: 77.6119%; }
.cloobin-logo__glyph--martini { left: 78.0769%; top: 0%; width: 17.3077%; height: 95.0249%; }
.cloobin-logo__glyph--n { left: 87.9487%; top: 13.4328%; width: 12.0513%; height: 86.5672%; }
.cloobin-logo__arm { inset: 0; width: 100%; height: 100%; }

/* A record sits inside a deck (the deck can scratch while the record keeps spinning). */
.cloobin-logo__deck { top: 9.9502%; width: 20.5128%; height: 79.602%; }
.cloobin-logo__deck--globe { left: 19.1026%; }
.cloobin-logo__deck--vinyl { left: 45.0641%; }
.cloobin-logo__disc { width: 100%; height: 100%; border-radius: 50%; display: block; }

/* Mirror-ball glints: fixed in place (they are reflections), twinkling over the spinning globe. */
.cloobin-logo__glint {
  width: 4.2%;
  aspect-ratio: 1;
  margin: -2.1% 0 0 -2.1%;
  background:
    radial-gradient(circle, #fff 0 8%, transparent 9%),
    linear-gradient(90deg, transparent 46%, #fff 50%, transparent 54%),
    linear-gradient(0deg, transparent 46%, #fff 50%, transparent 54%);
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 70%);
  mask: radial-gradient(circle, #000 20%, transparent 70%);
  opacity: 0;
  transition: opacity .6s ease;
}
.cloobin-logo__glint:nth-of-type(1) { left: 25.4%; top: 30%; }
.cloobin-logo__glint:nth-of-type(2) { left: 33.5%; top: 42%; }
.cloobin-logo__glint:nth-of-type(3) { left: 26.8%; top: 66%; }
.cloobin-logo__glint:nth-of-type(4) { left: 32.2%; top: 74%; }

/* --- header logo: always slightly alive -------------------------------------------------- */

.cloobin-logo--nav .cloobin-logo__disc--globe { animation: cloobin-spin 14s linear infinite; }
.cloobin-logo--nav .cloobin-logo__disc--vinyl { animation: cloobin-spin 8s linear infinite; }
.cloobin-logo--nav .cloobin-logo__glint { animation: cloobin-twinkle 7s ease-in-out infinite; }
.cloobin-logo--nav .cloobin-logo__glint:nth-of-type(2) { animation-delay: 2.3s; }
.cloobin-logo--nav .cloobin-logo__glint:nth-of-type(3) { animation-delay: 4.1s; }
.cloobin-logo--nav .cloobin-logo__glint:nth-of-type(4) { animation-delay: 5.6s; }
.cloobin-logo--nav .cloobin-logo__part--buzz { animation: cloobin-buzz 9s 4s linear infinite; }
.cloobin-logo--nav .cloobin-logo__part { transition: filter .3s ease; }
/* Hover: the logo lights up and the vinyl gets a quick DJ scratch. */
a:hover > .cloobin-logo--nav .cloobin-logo__part,
.cloobin-logo--nav:hover .cloobin-logo__part {
  filter: drop-shadow(0 0 3px rgba(255, 206, 120, .55)) drop-shadow(0 0 8px rgba(214, 75, 137, .45));
}
a:hover > .cloobin-logo--nav .cloobin-logo__deck--vinyl,
.cloobin-logo--nav:hover .cloobin-logo__deck--vinyl { animation: cloobin-scratch .7s ease-in-out; }
/* While the splash logo is landing on it, the header logo waits underneath. */
.cloobin-logo-landing .cloobin-logo[data-splash-target] { visibility: hidden; }

/* Greeting on later page loads (instead of the full splash; added once by bootSplash.ts):
 * a neon wave runs through the letters left to right, one laser line scans across, the glints
 * flash and the vinyl gets a scratch. ~1.6s, transforms/opacity plus a small filter. */
.cloobin-logo--greet .cloobin-logo__part {
  animation: cloobin-greet-glow 1s var(--greet-at, 0s) ease-out both;
}
.cloobin-logo--greet .cloobin-logo__part:nth-child(2) { --greet-at: .07s; }
.cloobin-logo--greet .cloobin-logo__part:nth-child(3) { --greet-at: .15s; }
.cloobin-logo--greet .cloobin-logo__part:nth-child(4) { --greet-at: .26s; }
.cloobin-logo--greet .cloobin-logo__part:nth-child(5) { --greet-at: .36s; }
.cloobin-logo--greet .cloobin-logo__part:nth-child(6) { --greet-at: .42s; }
.cloobin-logo--greet .cloobin-logo__part:nth-child(7) { --greet-at: .48s; }
.cloobin-logo--greet .cloobin-logo__glint { animation: cloobin-twinkle .9s .25s ease-in-out both; }
.cloobin-logo--greet .cloobin-logo__glint:nth-of-type(2) { animation-delay: .35s; }
.cloobin-logo--greet .cloobin-logo__glint:nth-of-type(3) { animation-delay: .45s; }
.cloobin-logo--greet .cloobin-logo__glint:nth-of-type(4) { animation-delay: .55s; }
.cloobin-logo--greet .cloobin-logo__deck--vinyl { animation: cloobin-scratch .7s .55s ease-in-out; }
.cloobin-logo--greet::after {
  content: '';
  position: absolute;
  inset: -18% 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(200, 255, 225, .95) 50%, transparent calc(50% + 1px)),
    linear-gradient(90deg, transparent calc(50% - 10px), rgba(120, 255, 190, .35) 50%, transparent calc(50% + 10px));
  -webkit-mask: linear-gradient(180deg, transparent, #000 25% 75%, transparent);
  mask: linear-gradient(180deg, transparent, #000 25% 75%, transparent);
  mix-blend-mode: screen;
  opacity: 0;
  will-change: transform, opacity;
  animation: cloobin-greet-scan .9s .05s cubic-bezier(.45, 0, .25, 1) both;
}

/* --- the splash scene -------------------------------------------------------------------- */

.boot-splash {
  --mx: 0;
  --my: 0;

  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.boot-splash__bg,
.boot-splash::before,
.boot-splash::after { position: absolute; pointer-events: none; transition: opacity .9s ease; }

/* Backdrop + bottom vignette (static: painted once). */
.boot-splash__bg {
  inset: 0;
  background:
    linear-gradient(180deg, rgba(17, 10, 26, .1) 0%, rgba(17, 10, 26, .6) 100%),
    radial-gradient(ellipse at 50% 45%, #2e0c36 0%, #140820 55%, #0b0410 100%);
}

/* Performance rule for everything below: whatever moves in the loop is its own GPU layer that
 * is painted once and then only transformed (or faded). Nothing full-screen is repainted per
 * frame, which is what made the show stutter on high-resolution / 120Hz displays. */

/* LED-dot mesh, drifting slightly with the pointer. */
.boot-splash::before {
  content: '';
  inset: -16px;
  background-image: radial-gradient(circle at center, rgba(221, 61, 121, .5) .8px, transparent 1.1px);
  background-size: 7px 7px;
  opacity: .28;
  mix-blend-mode: screen;
  will-change: transform;
  transform: translate(calc(var(--mx) * 8px), calc(var(--my) * 8px));
}

/* Pink pointer glow: a fixed gradient on an oversized layer that slides with the pointer. */
.boot-splash::after {
  content: '';
  inset: -20%;
  background: radial-gradient(circle at 50% 50%, rgba(214, 75, 137, .3) 0%, rgba(214, 75, 137, 0) 33%);
  will-change: transform;
  transform: translate(calc(var(--mx) * 18vw), calc(var(--my) * 14vh));
}

/* --- festival light show ---------------------------------------------------------------- *
 * A trance-stage rig (original design) running to one shared 138 BPM clock:
 *  - 8 moving-head beams from the ceiling, all aimed by the same animated variables, so they
 *    move as one choreographed show: power-on chase, unison sweeps, crisscross, converge on
 *    the logo, fan bursts;
 *  - a fan of thin lasers from below, bursting open on the drop (bar 1, when the logo is lit);
 *  - haze: beams and lasers only show where the smoke is (a mask), plus drifting smoke layers.
 * Per beam (inline): --i position in the rig (-3.5..3.5), --dir +1/-1 for crisscross,
 * --n order 0..7 (power-on and chase), --rgb colour, --a intensity, --spread cone angle.
 * The intro runs one bar from first paint; then the 4-bar show loops.
 */
@property --fan { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --sweep { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --cross { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --laser-open { syntax: '<angle>'; inherits: true; initial-value: 0deg; }
@property --laser-turn { syntax: '<angle>'; inherits: true; initial-value: 0deg; }

.boot-splash {
  --beat: .4348s;   /* 138 BPM */
  --bar: 1.7391s;   /* 4 beats */
  --show: 6.9565s;  /* 4 bars  */
}

/* Drifting smoke: each layer is the viewport plus one texture tile, sliding by exactly one
 * tile per loop, so it always covers the screen and loops seamlessly. */
.boot-splash__haze {
  --tile: 760px;

  position: absolute;
  top: calc(-1 * var(--tile));
  left: calc(-1 * var(--tile));
  width: calc(100% + var(--tile));
  height: calc(100% + var(--tile));
  background: url('haze.png') 0 0 / var(--tile) var(--tile) repeat;
  opacity: .1;
  mix-blend-mode: screen;
  pointer-events: none;
  will-change: transform;
  animation: boot-haze-drift 48s linear infinite;
  transition: opacity .9s ease;
}
.boot-splash__haze--far { --tile: 1000px; opacity: .07; animation-duration: 80s; animation-direction: reverse; }

.boot-splash__rig {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 1.2s ease;
  animation:
    boot-rig-intro var(--bar) linear forwards,
    boot-rig-show var(--show) var(--bar) infinite;
}

.boot-splash__beam {
  --spread: 14deg;
  --color: rgba(var(--rgb), var(--a, .2));
  --core: rgba(var(--rgb), calc(var(--a, .2) * 2.6));

  position: absolute;
  top: -2vh;
  left: calc(var(--x) - 25vmax);
  width: 50vmax;
  height: 125vmax;
  transform-origin: 50% 0;
  transform: rotate(calc(var(--i) * -1 * var(--fan) + var(--sweep) + var(--dir) * var(--cross)));
  background: conic-gradient(from calc(180deg - var(--spread) / 2) at 50% 0,
    transparent 0deg, var(--color) calc(var(--spread) * .3), var(--core) calc(var(--spread) * .5),
    var(--color) calc(var(--spread) * .7), transparent var(--spread));
  /* brighter near the lamp, fading with distance, and only visible where the smoke is */
  -webkit-mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .6) 40%, transparent 90%), url('haze.png') 0 0 / 520px 520px;
  -webkit-mask-composite: source-in;
  mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .6) 40%, transparent 90%), url('haze.png') 0 0 / 520px 520px;
  mask-composite: intersect;
  opacity: 0;
  will-change: transform, opacity;
  animation:
    boot-splash-on calc(var(--beat) / 2) calc(var(--n) * var(--beat) / 2) ease-out forwards,
    boot-beam-chase var(--bar) calc(var(--bar) + var(--n) * var(--beat) / 2) ease-out infinite;
}
/* The fixture: a small lamp where the beam starts. */
.boot-splash__beam::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 16%, rgba(var(--rgb), .95) 30%, rgba(var(--rgb), 0) 70%);
}

/* Laser fan from below the logo: thin bright lines with a faint glow. Each line is its own
 * small layer, drawn once and rotated around the fan's origin (50% 108%); --k is its place in
 * the fan (-7..7), so the fan opens and turns without repainting anything. */
.boot-splash__lasers {
  --laser: 120, 255, 190;

  position: absolute;
  inset: 0;
  opacity: 0;
  animation: boot-splash-on .12s var(--bar) linear forwards;
}
.boot-splash__laser {
  position: absolute;
  left: calc(50% - 4px);
  bottom: -8%;
  width: 8px;
  height: 150vmax;
  transform-origin: 50% 100%;
  transform: rotate(calc(var(--laser-turn) + var(--k) * var(--laser-open) / 14));
  background:
    linear-gradient(90deg, transparent 40%, rgba(var(--laser), .95) 45% 55%, transparent 60%),
    linear-gradient(90deg, transparent 0%, rgba(var(--laser), .14) 50%, transparent 100%);
  -webkit-mask: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .7) 35%, transparent 75%);
  mask: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, .7) 35%, transparent 75%);
  will-change: transform;
}

/* Lite show, for weaker hardware (.boot-splash--lite, set by the inline check in index.html or
 * by the frame-rate monitor in bootSplash.ts). Same choreography, minus the expensive parts:
 * no smoke masks or drifting haze, no blend modes, half the heads, lasers drawn once and only
 * swayed by a compositor transform, lighter glow on the logo. */
.boot-splash--lite::before { mix-blend-mode: normal; opacity: .16; }
.boot-splash--lite .boot-splash__haze { display: none; }
.boot-splash--lite .boot-splash__rig { mix-blend-mode: normal; }
.boot-splash--lite .boot-splash__beam {
  -webkit-mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 85%);
  mask: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .5) 40%, transparent 85%);
}
.boot-splash--lite .boot-splash__beam:nth-of-type(even) { display: none; }
.boot-splash--lite .boot-splash__lasers {
  /* fixed fan (own values win over the rig's animated ones); only the whole fan sways */
  --laser-open: 84deg;
  --laser-turn: 0deg;

  transform-origin: 50% 108%;
  will-change: transform;
  animation:
    boot-splash-on .12s var(--bar) linear forwards,
    boot-laser-sway var(--bar) var(--bar) ease-in-out infinite alternate;
}
.boot-splash--lite .boot-splash__laser:nth-child(even) { display: none; }
.boot-splash--lite .cloobin-logo__part > img { filter: drop-shadow(0 0 6px rgba(214, 75, 137, .45)); }
.boot-splash--lite .cloobin-logo__part > .cloobin-logo__glyph--o1,
.boot-splash--lite .cloobin-logo__part > .cloobin-logo__glyph--o2,
.boot-splash--lite .cloobin-logo__arm { filter: none; }

/* "Skip intro" (first visit only, added by bootSplash.ts). */
.boot-splash__skip {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 2;
  padding: 10px 18px;
  border: 1px solid rgba(252, 249, 251, .35);
  border-radius: 999px;
  background: rgba(20, 8, 32, .55);
  color: rgba(252, 249, 251, .9);
  font: 13px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  animation: boot-splash-on .6s 1.5s ease forwards;
  transition: background .2s ease, border-color .2s ease;
}
.boot-splash__skip:hover { background: rgba(20, 8, 32, .8); border-color: rgba(252, 249, 251, .7); }
.boot-splash__skip:focus-visible { outline: 2px solid #e7c77f; outline-offset: 3px; }
.boot-splash.is-braking .boot-splash__skip { display: none; }

/* Phones: half the heads; the lasers stay. */
@media (max-width: 600px) {
  .boot-splash__beam:nth-of-type(even) { display: none; }
}

.boot-splash .cloobin-logo {
  z-index: 1;
  will-change: transform;
  width: min(460px, 86vw);
  transform: translate(calc(var(--mx) * -6px), calc(var(--my) * -4px));
  transition: transform 1.6s cubic-bezier(.2, .7, .2, 1), filter .5s ease;
}

/* Each part is one neon tube: it strikes on with a few stutters, in a scattered order.
 * The glow sits on the still images only, never on a part as a whole: a filter over a
 * spinning record would have to be redrawn on every frame. */
.boot-splash .cloobin-logo__part {
  opacity: 0;
  animation: boot-splash-ignite .9s var(--ignite, 0s) linear forwards;
}
.boot-splash .cloobin-logo__part > img {
  filter: drop-shadow(0 0 5px rgba(255, 206, 120, .55)) drop-shadow(0 0 16px rgba(214, 75, 137, .5));
  transition: filter 1.2s ease;
}
/* The records' own glow: a static ring behind each one (the record spins on its own layer). */
.boot-splash .cloobin-logo__deck { border-radius: 50%; box-shadow: 0 0 14px rgba(214, 75, 137, .45); transition: box-shadow 1.2s ease; }
.boot-splash .cloobin-logo__disc { will-change: transform; }
.boot-splash .cloobin-logo__part--buzz { animation: boot-splash-ignite .9s var(--ignite, 0s) linear forwards, cloobin-buzz 5s 3s linear infinite; }
.boot-splash .cloobin-logo__disc--globe { animation: cloobin-spin 3s linear infinite; }
.boot-splash .cloobin-logo__disc--vinyl { animation: cloobin-spin 1.8s linear infinite; }
.boot-splash .cloobin-logo__glint { animation: cloobin-twinkle 1.6s 1.4s ease-in-out infinite; }
.boot-splash .cloobin-logo__glint:nth-of-type(2) { animation-delay: 1.9s; }
.boot-splash .cloobin-logo__glint:nth-of-type(3) { animation-delay: 2.4s; }
.boot-splash .cloobin-logo__glint:nth-of-type(4) { animation-delay: 2.7s; }

/* Slow-motion brake: the records spin down and the logo leans in. */
.boot-splash.is-braking .cloobin-logo { transform: scale(1.06); }
/* (While braking, bootSplash.ts also slows every light animation down: slow motion.) */
.boot-splash.is-flying .boot-splash__rig { opacity: 0; }
.boot-splash.is-flying .boot-splash__rig,
.boot-splash.is-flying .boot-splash__rig > * { animation-play-state: paused; }
.boot-splash.is-braking .cloobin-logo__glint { animation: none; opacity: 0; }
.boot-splash.is-braking::after { opacity: .4; }

/* Landing: the club fades away and the logo cools down to the header's look. */
.boot-splash.is-flying { pointer-events: none; }
.boot-splash.is-flying .boot-splash__bg,
.boot-splash.is-flying .boot-splash__haze,
.boot-splash.is-flying::before,
.boot-splash.is-flying::after { opacity: 0; }
.boot-splash.is-flying .cloobin-logo__part > img { filter: drop-shadow(0 0 0 rgba(255, 206, 120, 0)) drop-shadow(0 0 0 rgba(214, 75, 137, 0)); }
.boot-splash.is-flying .cloobin-logo__deck { box-shadow: 0 0 0 rgba(214, 75, 137, 0); }

/* Fallback exit (no header logo to land on): zoom, blur and fade. */
.boot-splash { transition: opacity .5s ease; }
.boot-splash.is-leaving { opacity: 0; pointer-events: none; }
.boot-splash.is-leaving .cloobin-logo { filter: blur(6px); transform: scale(1.16); }

/* --- keyframes ---------------------------------------------------------------------------- */

@keyframes boot-splash-ignite {
  0% { opacity: 0; }
  8% { opacity: .85; }
  12% { opacity: .05; }
  22% { opacity: .7; }
  26% { opacity: .15; }
  42% { opacity: 1; }
  46% { opacity: .35; }
  54%, 100% { opacity: 1; }
}
@keyframes cloobin-buzz {
  0%, 88%, 92%, 95%, 100% { opacity: 1; }
  90%, 93.5% { opacity: .35; }
}
@keyframes cloobin-spin { to { transform: rotate(360deg); } }
@keyframes cloobin-twinkle {
  0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); }
  50% { opacity: 1; transform: scale(1) rotate(45deg); }
}
@keyframes cloobin-scratch {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-28deg); }
  55% { transform: rotate(14deg); }
  80% { transform: rotate(-6deg); }
}
@keyframes boot-splash-on { to { opacity: 1; } }
@keyframes cloobin-greet-glow {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 0 rgba(214, 75, 137, 0)); }
  30% { filter: brightness(1.45) drop-shadow(0 0 6px rgba(255, 206, 120, .7)); }
}
@keyframes cloobin-greet-scan {
  0% { transform: translateX(-50%); opacity: 0; }
  15%, 80% { opacity: 1; }
  100% { transform: translateX(50%); opacity: 0; }
}
/* One bar from first paint: heads power on in a chase, pointing down, fanning slightly. */
@keyframes boot-rig-intro {
  from { --fan: 0deg; --sweep: 0deg; --cross: 0deg; --laser-open: 0deg; --laser-turn: 0deg; }
  to { --fan: 3deg; --sweep: -16deg; --cross: 0deg; --laser-open: 0deg; --laser-turn: 0deg; }
}
/* The show, 4 bars = 16 beats (6.25% per beat):
 * bar 1 unison sweeps on every 2 beats + laser burst, bar 2 crisscross,
 * bar 3 converge on the logo then explode open, bar 4 wide fan sweeping back. */
@keyframes boot-rig-show {
  0% { --fan: 3deg; --sweep: -16deg; --cross: 0deg; --laser-open: 0deg; --laser-turn: 0deg; animation-timing-function: cubic-bezier(.2, .9, .3, 1); }
  3% { --laser-open: 96deg; }
  12.5% { --sweep: 16deg; --laser-turn: 10deg; animation-timing-function: ease-in-out; }
  25% { --fan: 3deg; --sweep: -16deg; --cross: 0deg; --laser-open: 70deg; --laser-turn: -10deg; }
  37.5% { --fan: 2deg; --sweep: 0deg; --cross: 16deg; --laser-open: 110deg; --laser-turn: 0deg; }
  50% { --fan: 2deg; --cross: -16deg; --laser-open: 60deg; }
  62.5% { --fan: -7deg; --sweep: 0deg; --cross: 0deg; --laser-open: 40deg; animation-timing-function: cubic-bezier(.7, 0, .2, 1); }
  75% { --fan: 9deg; --laser-open: 130deg; }
  87.5% { --fan: 6deg; --sweep: 14deg; --laser-open: 90deg; --laser-turn: 12deg; }
  100% { --fan: 3deg; --sweep: -16deg; --cross: 0deg; --laser-open: 0deg; --laser-turn: 0deg; }
}
/* A soft brightness chase across the heads, once per bar (no strobe). */
@keyframes boot-beam-chase {
  0% { opacity: 1; }
  12% { opacity: 1; }
  55% { opacity: .55; }
  100% { opacity: 1; }
}
@keyframes boot-laser-sway { from { transform: rotate(-9deg); } to { transform: rotate(9deg); } }
@keyframes boot-haze-drift { to { transform: translate(var(--tile), var(--tile)); } }

@media (prefers-reduced-motion: reduce) {
  .cloobin-logo--nav .cloobin-logo__disc,
  .cloobin-logo--nav .cloobin-logo__glint,
  .cloobin-logo--nav .cloobin-logo__part--buzz,
  .cloobin-logo--nav:hover .cloobin-logo__deck--vinyl,
  a:hover > .cloobin-logo--nav .cloobin-logo__deck--vinyl,
  .cloobin-logo--greet .cloobin-logo__part,
  .cloobin-logo--greet .cloobin-logo__glint,
  .cloobin-logo--greet .cloobin-logo__deck--vinyl { animation: none; }
  .cloobin-logo--greet::after { display: none; }
  .boot-splash .cloobin-logo__part,
  .boot-splash .cloobin-logo__part--buzz { animation: boot-splash-on .6s var(--ignite, 0s) ease forwards; }
  .boot-splash .cloobin-logo__disc--globe { animation-duration: 12s; }
  .boot-splash .cloobin-logo__disc--vinyl { animation-duration: 7.2s; }
  .boot-splash__rig { animation: none; --fan: 3deg; }
  .boot-splash__beam { animation: boot-splash-on .6s calc(var(--n) * .1s) ease forwards; }
  .boot-splash__lasers, .boot-splash__haze { display: none; }
  .boot-splash .cloobin-logo__glint { animation: none; }
  .boot-splash::before, .boot-splash .cloobin-logo { transform: none; }
}
