/* furiani.net home: the play layer. Load after home.css, on the front page only.
   Every rule that changes the page hangs off a class or element that play.js
   adds (.furiani-play on the html element, or an element it creates), so
   without JavaScript, or under prefers-reduced-motion, the page is as built.
   .furiani-still is the paused state. .furiani-connected means all four are awake.
   Motion here is transform and opacity only, and every transition ends. */

/* Canvases: decorative, sized to their band by play.js ---------------------- */
.furiani-play-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; pointer-events: none; will-change: transform; }

/* Hero: particles sit behind the four, the copy above everything */
.furiani-play .furiani-cardinal { z-index: 1; }
.furiani-play-canvas--hero { z-index: 0; }
.furiani-play .furiani-cardinal__pose { pointer-events: auto; cursor: pointer; -webkit-tap-highlight-color: transparent; }

/* A soft halo in the mark's register, lit while it is awake */
.furiani-play-halo {
  position: absolute; inset: -16%; z-index: 1;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--halo), rgba(238, 235, 221, 0));
  opacity: 0; transform: scale(.6);
  transition: opacity .9s ease, transform 1.1s cubic-bezier(.2, .7, .2, 1);
}
.furiani-cardinal--west { --halo: rgba(203, 41, 87, .2); }
.furiani-cardinal--north { --halo: rgba(123, 95, 224, .2); }
.furiani-cardinal--east { --halo: rgba(63, 178, 212, .26); }
.furiani-cardinal--south { --halo: rgba(143, 209, 63, .28); }
.furiani-cardinal.is-awake .furiani-play-halo { opacity: 1; transform: none; }

/* The meter: four register slots at the foot of the hero, the keyboard path in */
.furiani-play-meter {
  position: absolute; z-index: 4;
  left: var(--furiani-gutter); bottom: clamp(18px, 2.4vw, 44px);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
  max-width: calc(100% - 2 * var(--furiani-gutter));
}
.furiani-play-meter__slots { display: flex; gap: 2px; margin-left: -6px; }
.furiani-play-slot {
  position: relative; flex: none;
  width: 36px; height: 36px; margin: 0; padding: 0;
  border: 0; border-radius: 6px;
  background: none; color: var(--slot);
  cursor: pointer;
}
.furiani-play-slot::before,
.furiani-play-slot::after {
  content: ""; position: absolute; left: 6px; right: 6px; top: 12px; bottom: 12px;
  border-radius: 3px; transform: skewX(-24deg);
}
.furiani-play-slot::before { box-shadow: inset 0 0 0 2px currentColor; }
.furiani-play-slot::after {
  background: currentColor;
  transform: skewX(-24deg) scaleX(0); transform-origin: 0 50%;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.furiani-play-slot.is-filled::after { transform: skewX(-24deg) scaleX(1); }
.furiani-play-slot--experience { --slot: var(--furiani-rose); }
.furiani-play-slot--software { --slot: var(--furiani-bolt); }
.furiani-play-slot--data { --slot: var(--furiani-tide); }
.furiani-play-slot--organization { --slot: var(--furiani-moss); }
.furiani-play-meter__label {
  font-family: var(--furiani-font-head); font-weight: 700;
  font-size: .8125rem; line-height: 1.25; letter-spacing: .2em; text-transform: uppercase;
  color: var(--furiani-soft);
}
.furiani-play-meter.is-complete .furiani-play-meter__label { color: var(--furiani-ink); }
.furiani-play-meter__go {
  display: inline-flex; align-items: center; gap: .45em;
  padding: 7px 15px;
  border: 2px solid currentColor; border-radius: 999px;
  font-family: var(--furiani-font-head); font-weight: 700;
  font-size: .9375rem; line-height: 1.1;
  color: var(--furiani-oxblood);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.furiani-play-meter__go:hover { background: var(--furiani-oxblood); border-color: var(--furiani-oxblood); color: var(--furiani-paper); }
.furiani-play-meter__go[hidden] { display: none; }

/* The reward's glint, once along the header stripe */
.furiani-play-glint {
  position: absolute; left: 0; top: 0; z-index: 1;
  width: 22%; height: 5px;
  pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .95) 50%, rgba(255, 255, 255, 0));
}

/* Connect the Layers: a hovered step lights its layer, the rest step back ------ */
.furiani-play .furiani-strand { transition: opacity .35s ease; }
.furiani-steps[data-play-focus="experience"] .furiani-strand:not(.furiani-strand--experience),
.furiani-steps[data-play-focus="software"] .furiani-strand:not(.furiani-strand--software),
.furiani-steps[data-play-focus="data"] .furiani-strand:not(.furiani-strand--data),
.furiani-steps[data-play-focus="organization"] .furiani-strand:not(.furiani-strand--organization) { opacity: .22; }
/* All four awake: the strands carry a soft glow, painted once (no per-frame cost) */
.furiani-connected .furiani-steps__strands { filter: drop-shadow(0 0 2px rgba(238, 235, 221, .45)) drop-shadow(0 0 7px rgba(238, 235, 221, .22)); }
.furiani-play .furiani-step__node { isolation: isolate; transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.furiani-play .furiani-step__node::before {
  content: ""; position: absolute; inset: -30px; z-index: -1;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(27, 23, 23, 0) 56%, var(--glow) 70%, rgba(27, 23, 23, 0));
  opacity: 0; transition: opacity .4s ease;
}
.furiani-step--1 { --glow: rgba(232, 105, 141, .5); }
.furiani-step--2 { --glow: rgba(63, 178, 212, .45); }
.furiani-step--3 { --glow: rgba(238, 235, 221, .3); }
.furiani-step--4 { --glow: rgba(175, 158, 223, .5); }
.furiani-step--5 { --glow: rgba(143, 209, 63, .42); }
.furiani-play .furiani-step:hover .furiani-step__node::before { opacity: 1; }
.furiani-connected .furiani-step__node::before { opacity: .6; }
.furiani-play .furiani-step:hover .furiani-step__node { transform: translate(-50%, -50%) scale(1.06); }

/* Where all four meet: a four-color ring, each quarter beside its own mark */
.furiani-play .furiani-step--3 .furiani-step__node::after,
.furiani-play .furiani-milestone__node--all::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%; pointer-events: none;
  background: conic-gradient(var(--furiani-bolt) 0 25%, var(--furiani-lichen) 0 50%, var(--furiani-cyan) 0 75%, var(--furiani-rose) 0);
  -webkit-mask: radial-gradient(farthest-side, rgba(0, 0, 0, 0) calc(100% - 4px), #000 calc(100% - 3.5px));
  mask: radial-gradient(farthest-side, rgba(0, 0, 0, 0) calc(100% - 4px), #000 calc(100% - 3.5px));
  opacity: 0; transform: rotate(-90deg) scale(.92);
  transition: opacity .9s ease, transform 1.4s cubic-bezier(.2, .7, .2, 1);
}
.furiani-play .furiani-step__node.is-lit::after,
.furiani-play .furiani-milestone__node--all.is-lit::after { opacity: 1; transform: none; }

/* Selected Work: the stage lifts and tilts toward the pointer under a soft sheen */
.furiani-play .furiani-stage { transition: transform .5s cubic-bezier(.2, .65, .2, 1); }
.furiani-play .furiani-tile:hover .furiani-stage { will-change: transform; }
.furiani-play .furiani-tile:focus-within .furiani-stage { transform: translate3d(0, -6px, 0); }
.furiani-play-sheen {
  position: absolute; left: 0; top: 0; z-index: 4;
  width: 70%; aspect-ratio: 1; translate: -50% -50%;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0));
  opacity: 0; transition: opacity .45s ease;
}
.furiani-play .furiani-tile:hover .furiani-play-sheen { opacity: 1; }

/* Pause motion: two fixed places that never sit over content, the foot of the
   hero (level with the meter) and the footer beside Back to top -------------- */
.furiani-play-pause {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; margin: 0; padding: 0 18px 0 15px;
  border: 0; border-radius: 999px;
  background: var(--furiani-ink); color: var(--furiani-paper);
  box-shadow: 0 0 0 2px rgba(238, 235, 221, .92), 0 16px 34px -14px rgba(27, 23, 23, .6);
  font-family: var(--furiani-font-head); font-weight: 700;
  font-size: .9375rem; line-height: 1; letter-spacing: .02em;
  white-space: nowrap; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.furiani-play-pause:hover { background: var(--furiani-crimson); }
.furiani-play-pause--hero {
  position: absolute; z-index: 4;
  right: var(--furiani-gutter); bottom: clamp(18px, 2.4vw, 44px);
}
/* On the ink footer: an outlined pill that owns its ink, ground and hover ground */
.furiani-play-pause--foot {
  margin-left: auto; min-height: 40px;
  background: transparent; color: var(--furiani-paper);
  box-shadow: inset 0 0 0 1.5px rgba(238, 235, 221, .55);
}
.furiani-play-pause--foot:hover { background: rgba(238, 235, 221, .1); color: var(--furiani-rose-light); }
.furiani-play-pause:focus-visible { outline: 3px solid var(--furiani-rose); outline-offset: 3px; }
.furiani-play-pause__icon { position: relative; flex: none; width: 12px; height: 14px; }
.furiani-play-pause__icon::before,
.furiani-play-pause__icon::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 4px;
  border-radius: 1px; background: currentColor;
}
.furiani-play-pause__icon::before { left: 1px; }
.furiani-play-pause__icon::after { right: 1px; }
.furiani-still .furiani-play-pause__icon::before {
  left: 2px; width: 0; height: 0;
  border-radius: 0; background: none;
  border-style: solid; border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent currentColor;
}
.furiani-still .furiani-play-pause__icon::after { display: none; }

/* Paused: nothing on the page moves, and anything waiting to arrive is simply there */
.furiani-still *,
.furiani-still *::before,
.furiani-still *::after { animation: none !important; transition: none !important; }
html.furiani-still { scroll-behavior: auto !important; }
.furiani-still [data-furiani-reveal] { opacity: 1 !important; transform: none !important; }

@media (max-width: 900px) {
  .furiani-play .furiani-step:hover .furiani-step__node { transform: scale(1.06); }
}
@media (max-width: 640px) {
  .furiani-play-meter { flex-direction: column; align-items: flex-start; gap: 4px; }
  .furiani-play-meter__label { max-width: 15em; letter-spacing: .14em; }
  /* On a phone the hero control is the icon alone, beside the meter */
  .furiani-play-pause--hero { width: 48px; min-height: 48px; padding: 0; justify-content: center; }
  .furiani-play-pause--hero .furiani-play-pause__text {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
}
@media print {
  .furiani-play-pause, .furiani-play-meter, .furiani-play-canvas { display: none; }
}
