/* fx.css: what the client asked for on top of the taste-skill kit:
   a loader with a monochrome glitch, a softer scroll, a name that answers the pointer, a ring on the cursor.
   Everything here rests under prefers-reduced-motion, and the page reads whole without fx.js
   (the head lines set html.ld-on and html.fx-js; html.fx-safe shows everything if fx.js never arrives). */

/* ---------------------------------------------------------------- 0. the loader */
/* Shown only while html.ld-on is set. The word glitches in bursts: two copies of it (::before, ::after) show
   through a thin band each and stand a little to one side, on the loader's own ground, so the band reads as
   a slice of the word pushed sideways. Thin bands of type move, never the whole screen: nothing flashes.
   fx.js counts the figure up and opens the loader; left alone it hides itself after six seconds. */
.loader { display: none; }
html.ld-on .loader {
  position: fixed; inset: 0; z-index: 2147483600; display: grid; place-items: center; overflow: hidden;
  background: var(--p-bg); color: var(--p-ink);
  animation: ld-failsafe 1ms linear 6s forwards;
}
@keyframes ld-failsafe { to { visibility: hidden; } }
/* fine scan lines, and one faint band of light running down */
html.ld-on .loader::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgb(255 255 255 / .035) 0 1px, rgb(255 255 255 / 0) 1px 4px); }
html.ld-on .loader::after { content: ""; position: absolute; left: 0; right: 0; top: -20vh; height: 20vh; pointer-events: none;
  background: linear-gradient(to bottom, rgb(255 255 255 / 0), rgb(255 255 255 / .05), rgb(255 255 255 / 0));
  animation: ld-sweep 2.6s linear infinite; }
@keyframes ld-sweep { to { transform: translateY(140vh); } }
.loader__in { position: relative; display: grid; justify-items: center; gap: clamp(20px, 3vw, 36px); width: min(100% - 48px, 1280px); }
.loader__word {
  position: relative; margin: 0; white-space: nowrap; text-transform: uppercase;
  font: 700 clamp(54px, 13.5vw, 196px)/.86 var(--font-display); letter-spacing: -0.02em;
  animation: ld-jolt 1.9s steps(1, end) infinite;
}
.loader__word::before, .loader__word::after {
  content: attr(data-text); position: absolute; inset: 0; background: var(--p-bg); clip-path: inset(0 0 100% 0);
}
.loader__word::before { color: #fff; animation: ld-slice-a 1.9s steps(1, end) infinite; }
.loader__word::after { color: #8c8c8c; animation: ld-slice-b 1.9s steps(1, end) infinite; }
/* three short bursts in each 1.9 s, still in between */
@keyframes ld-slice-a {
  0%, 11%, 23%, 51%, 61%, 79%, 87%, 100% { clip-path: inset(0 0 100% 0); transform: none; }
  12% { clip-path: inset(14% 0 66% 0); transform: translateX(-.045em); }
  15% { clip-path: inset(52% 0 30% 0); transform: translateX(.06em); }
  18% { clip-path: inset(72% 0 10% 0); transform: translateX(-.03em); }
  21% { clip-path: inset(30% 0 56% 0); transform: translateX(.025em); }
  52% { clip-path: inset(60% 0 22% 0); transform: translateX(.07em); }
  55% { clip-path: inset(8% 0 78% 0); transform: translateX(-.05em); }
  58% { clip-path: inset(40% 0 44% 0); transform: translateX(.03em); }
  80% { clip-path: inset(22% 0 62% 0); transform: translateX(-.06em); }
  83% { clip-path: inset(66% 0 16% 0); transform: translateX(.04em); }
}
@keyframes ld-slice-b {
  0%, 13%, 24%, 53%, 62%, 80%, 88%, 100% { clip-path: inset(100% 0 0 0); transform: none; }
  14% { clip-path: inset(40% 0 46% 0); transform: translateX(.05em); }
  17% { clip-path: inset(6% 0 82% 0); transform: translateX(-.04em); }
  20% { clip-path: inset(82% 0 4% 0); transform: translateX(.03em); }
  54% { clip-path: inset(26% 0 60% 0); transform: translateX(-.06em); }
  57% { clip-path: inset(74% 0 12% 0); transform: translateX(.05em); }
  81% { clip-path: inset(48% 0 38% 0); transform: translateX(.06em); }
  84% { clip-path: inset(10% 0 76% 0); transform: translateX(-.03em); }
}
@keyframes ld-jolt {
  0%, 11%, 23%, 51%, 61%, 79%, 87%, 100% { transform: none; }
  12% { transform: translate(.012em, 0) skewX(-1.5deg); }
  16% { transform: translate(-.014em, .004em); }
  20% { transform: translate(.006em, -.004em) skewX(1deg); }
  52% { transform: translate(-.016em, 0) skewX(1.5deg); }
  56% { transform: translate(.01em, .004em); }
  80% { transform: translate(.012em, 0) skewX(-1deg); }
  84% { transform: translate(-.008em, 0); }
}
.loader__meta {
  display: flex; align-items: center; gap: 14px; width: min(100%, 520px);
  font: 500 13px/1 var(--font-mono); color: var(--p-muted);
}
.loader__bar { flex: 1; height: 2px; overflow: hidden; background: color-mix(in oklab, var(--p-ink) 16%, transparent); }
.loader__bar > i { display: block; width: 100%; height: 100%; background: var(--p-ink); transform-origin: 0 50%; transform: scaleX(var(--ld, 0)); }
.loader__pct { min-width: 4ch; text-align: right; color: var(--p-ink); font-variant-numeric: tabular-nums; }
/* it opens in slices: what is left of it stands a little to one side for a few frames, then it is gone */
html.ld-on .loader.is-out { animation: ld-out .52s steps(1, end) forwards; }
@keyframes ld-out {
  0% { clip-path: inset(0); transform: none; }
  14% { clip-path: inset(0 0 58% 0); transform: translateX(-1.4%); }
  30% { clip-path: inset(34% 0 26% 0); transform: translateX(1.8%); }
  46% { clip-path: inset(64% 0 6% 0); transform: translateX(-1%); }
  62% { clip-path: inset(18% 0 70% 0); transform: translateX(.8%); }
  78% { clip-path: inset(47% 0 47% 0); transform: none; }
  100% { clip-path: inset(50% 0 50% 0); visibility: hidden; }
}

/* ---------------------------------------------------------------- 1. the soft reveal */
/* a block waits a little lower and clear; a heading ("soft") waits blurred. fx.js marks it .is-in when
   it comes on screen, once, then takes the attribute away so the kit's own rules are all that is left */
html.fx-js:not(.fx-safe) [data-reveal] { opacity: 0; transform: translate3d(0, 28px, 0); }
html.fx-js:not(.fx-safe) [data-reveal="soft"] { transform: translate3d(0, 18px, 0); filter: blur(10px); }
/* !important: the kit's own hover transition on a card (120ms, more specific) must not cut the arrival
   short; the attribute is gone once the block has arrived, so the kit's timing is back for its hovers */
html.fx-js [data-reveal] {
  transition: opacity .9s cubic-bezier(.22, 1, .36, 1), transform 1.1s cubic-bezier(.22, 1, .36, 1), filter .9s cubic-bezier(.22, 1, .36, 1) !important;
  transition-delay: calc(var(--i, 0) * 90ms) !important;
}
html.fx-js:not(.fx-safe) [data-reveal].is-in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
  html.fx-js [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
}
@media print {
  html.fx-js [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }
  .loader { display: none !important; }
}

/* ---------------------------------------------------------------- 2. the name */
/* fx.js sets each letter of [data-nfx] in its own box. A large name follows the pointer: its letters turn
   to the full ink and lift a little (the footer's also gain weight; data-nfx="lift", the hero's word, keeps
   its weight so its width never changes). A small one (data-nfx="wave": the logo) runs one wave when its
   link is hovered or focused. */
[data-nfx] .nfx__w { white-space: nowrap; }
[data-nfx] .nfx__l { display: inline-block; white-space: pre; }
@keyframes nfx-wave { 45% { transform: translateY(-.16em); color: var(--p-muted); } }
:is(a, button):is(:hover, :focus-visible) [data-nfx="wave"] .nfx__l {
  animation: nfx-wave .55s cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 36ms);
}
@media (prefers-reduced-motion: reduce) { [data-nfx="wave"] .nfx__l { animation: none !important; } }
/* the name across the footer: a grey at rest, so the letters near the pointer can light up; they may lift a
   little above their line */
.close__word { overflow-x: clip; overflow-y: visible; }
.close__word [data-nfx] { color: color-mix(in oklab, var(--p-ink) 42%, var(--p-bg)); }

/* ---------------------------------------------------------------- 3. the cursor */
/* asked for by the client: React Bits' TargetCursor (assets/target-cursor.js) in place of the ring that
   trailed the pointer. TargetCursor.css as published: */
.target-cursor {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
}
.target-cursor__corner {
  position: absolute;
  top: 0;
  left: 0;
  box-sizing: border-box;
  border-style: solid;
  border-color: var(--target-cursor-color, #ffffff);
  transform-origin: 0 0;
  will-change: transform;
}
.target-cursor__dot {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  background: var(--target-cursor-color, #ffffff);
  will-change: transform;
}
.target-cursor__label {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--target-cursor-color, #ffffff);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  will-change: transform, opacity;
}

/* ---------------------------------------------------------------- music (asked for by the client) */
/* A pill in the top bar: four bars and the words SOUND OFF / SOUND ON (not the song's name). The bars stand
   still while the song is off and dance while it plays. It sits in the bar, so it never lies over the page's
   text. Once, after the loader has opened, a ring beats round it three times (.is-hint, set by music.js). */
.music-btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; flex: none; height: 40px; padding: 0 16px 0 14px; cursor: pointer;
  border: 1px solid color-mix(in oklab, var(--p-ink) 45%, transparent); border-radius: 999px;
  background: transparent; color: var(--p-ink);
  transition: border-color .25s ease, background-color .25s ease;
}
.music-btn:hover { border-color: var(--p-ink); background: color-mix(in oklab, var(--p-ink) 8%, transparent); }
.music-btn:focus-visible { outline: 2px solid var(--p-ink); outline-offset: 3px; }
.music-btn.is-playing { border-color: var(--p-ink); }
.music-btn__eq { display: flex; align-items: flex-end; gap: 2px; width: 16px; height: 14px; flex: none; }
.music-btn__eq i { flex: 1; height: 3px; background: currentColor; border-radius: 1px; }
/* off: uneven bars, so it reads as sound and not as a row of dots */
.music-btn__eq i:nth-child(1) { height: 6px; } .music-btn__eq i:nth-child(2) { height: 11px; }
.music-btn__eq i:nth-child(3) { height: 4px; } .music-btn__eq i:nth-child(4) { height: 8px; }
.music-btn.is-playing .music-btn__eq i { animation: music-eq .9s ease-in-out infinite alternate; }
.music-btn.is-playing .music-btn__eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.music-btn.is-playing .music-btn__eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
.music-btn.is-playing .music-btn__eq i:nth-child(4) { animation-delay: -.15s; animation-duration: .8s; }
@keyframes music-eq { from { height: 3px; } to { height: 14px; } }
/* the words: as wide as the longer of the two, so the pill keeps its width when they change */
.music-btn__lbl { min-width: calc(9ch + .72em); font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; text-align: left; white-space: nowrap; }
/* the hint: a ring that leaves the pill three times, then nothing more */
.music-btn.is-hint::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  animation: music-hint 1.5s ease-out 3; }
@keyframes music-hint {
  from { box-shadow: 0 0 0 0 color-mix(in oklab, var(--p-ink) 55%, transparent); }
  to { box-shadow: 0 0 0 12px color-mix(in oklab, var(--p-ink) 0%, transparent); }
}
@media (max-width: 1023px) {
  /* on a tablet and a phone it stays in the bar (the kit hides the rest there) */
  .nav:not(.is-open) .nav__actions > .music-btn.music-btn { display: inline-flex; height: 44px; }
  .nav.is-open .nav__actions > .music-btn { display: none; }
}
@media (max-width: 479px) {
  /* a narrow phone: the bars alone, in a small circle (34px seen; the ::before keeps a 44px area to tap) */
  .music-btn__lbl { display: none; }
  .nav:not(.is-open) .nav__actions > .music-btn.music-btn { justify-content: center; width: 34px; height: 34px; padding: 0; }
  .music-btn::before { content: ""; position: absolute; inset: -5px; }
  .music-btn__eq { width: 13px; height: 11px; }
  .music-btn__eq i:nth-child(1) { height: 5px; } .music-btn__eq i:nth-child(2) { height: 9px; }
  .music-btn__eq i:nth-child(3) { height: 3px; } .music-btn__eq i:nth-child(4) { height: 7px; }
  @keyframes music-eq { from { height: 2px; } to { height: 11px; } }
}
@media (prefers-reduced-motion: reduce) {
  .music-btn.is-playing .music-btn__eq i { animation: none; height: 10px; } .music-btn.is-playing .music-btn__eq i:nth-child(odd) { height: 6px; }
  .music-btn.is-hint::after { animation: none; }
}

/* ---------------------------------------------------------------- the logo mark (asked for by the client) */
/* The client's own M (his picture): an M drawn in outline, with a second line folded over its two peaks.
   Redrawn here as lines so it stays sharp at 22px. Replaces the kit's "stack" mark (it read as an F). */
.mark[data-mark="stack"] { --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2.6 20.5V5.6L12 16.6 21.4 5.6v14.9h-3.7v-8.6L12 18.6l-5.7-6.7v8.6z' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3Cpath d='M4.5 5.6 6.6 3.4 12 9.6l5.4-6.2 2.1 2.2' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E"); }

/* ---------------------------------------------------------------- the splash cursor (asked for by the client) */
/* React Bits' SplashCursor (assets/splash-cursor.js): not in use now (the client went back to TargetCursor);
   kept so it can come back by swapping the script tag in index.html. SplashCursor.css as published: */
.splash-cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.splash-cursor[data-contained] {
  position: absolute;
}

.splash-cursor__canvas {
  display: block;
  width: 100%;
  height: 100%;
}
