/* Moving lights (owner, 17/11/2026): a light that runs around the edge of a box, with a soft glow outside it.
   On the question box, the Google example's search bar, an FAQ while it is open, and the "How we build it" card
   whose turn it is (e.js lights them one after another). Small orange jellyfish (jelly.js) drift in the dark parts. */

@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.lightline, .faq-q[open], .how-card.is-lit { position: relative; }
.lightline::before, .lightline::after,
.faq-q[open]::before, .faq-q[open]::after,
.how-card.is-lit::before, .how-card.is-lit::after {
  content: ""; position: absolute; z-index: 3; pointer-events: none; border-radius: inherit;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: lightline-spin var(--light-time, 3.4s) linear infinite, lightline-in 500ms ease-out both;
}
/* the light itself: a bright head with an orange tail, running round the 2px edge */
.lightline::before, .faq-q[open]::before, .how-card.is-lit::before {
  inset: -2px; padding: 2px;
  background: conic-gradient(from var(--spin), transparent 0 58%, rgb(255 107 26 / 0.25) 70%, #ff6b1a 82%, #fff1e4 87%, #ff8a45 90%, transparent 97%);
}
/* its glow: the same light, blurred, only outside the box so it never covers what is inside */
.lightline::after, .faq-q[open]::after, .how-card.is-lit::after {
  inset: -16px; padding: 14px; filter: blur(9px);
  background: conic-gradient(from var(--spin), transparent 0 60%, rgb(255 107 26 / 0.55) 80%, rgb(255 160 90 / 0.5) 87%, transparent 97%);
}
.how-card.is-lit { border-color: rgb(255 107 26 / 0.45); --light-time: 2.6s; }
.how-card.is-lit .how-n { text-shadow: 0 0 18px rgb(255 107 26 / 0.7); }
.faq-q[open] { --light-time: 4s; }
@keyframes lightline-spin { to { --spin: 360deg; } }
/* out of sight (e.html marks them): the light stands still, so the browser has nothing to redraw */
.anim-off, .anim-off::before, .anim-off::after, .anim-off .fw { animation-play-state: paused !important; }
@keyframes lightline-in { from { opacity: 0; } to { opacity: 1; } }

/* every button: a light runs round its edge, with a soft orange glow (owner, 17/11/2026: "all the buttons with that effect
   around, in motion"). It is drawn in a 2px border (background layers), so a button's own icon (::before) stays as it is. */
.btn, .btn:hover, .pill, .pill:hover, .nav .cta, .nav .cta:hover, .nav-cta, .nav-cta:hover, .btn-acc, .btn-acc:hover {
  --btn-bg: var(--fill); border: 3px solid transparent;
  background: linear-gradient(var(--btn-bg), var(--btn-bg)) padding-box, conic-gradient(from var(--spin), rgb(70 20 0 / 0.6) 0 50%, rgb(255 190 140 / 0.9) 68%, #ffffff 78%, #ffe2cc 86%, rgb(70 20 0 / 0.6) 97%) border-box;
  box-shadow: 0 0 20px -6px rgb(255 107 26 / 0.6); background-color: var(--btn-bg); animation: lightline-spin 3.2s linear infinite;
}
.btn:hover, .pill:hover, .nav .cta:hover, .nav-cta:hover, .btn-acc:hover { --btn-bg: var(--fill-2); box-shadow: 0 0 26px -4px rgb(255 107 26 / 0.75); }
.pill-dark, .pill-dark:hover { --btn-bg: #111; }
.play-cut.btn, .play-cut.btn:hover { --btn-bg: rgb(8 6 5 / 0.92); }
.chips2 .btn, .chips2 .btn:hover { animation-duration: 4s; }

@media (max-width: 700px) {
  .disco { transition: opacity 300ms, visibility 300ms, border-color 200ms, box-shadow 300ms, transform 100ms ease-out; }
  .hero-in .disco { opacity: 0; visibility: hidden; }
}

/* disco (disco.js, owner 18/11/2026): a mirror-ball button beside the music button; two minutes of drifting colour, sweeping beams and
   mirror-ball spots over the page, then back to orange. Everything drifts or sweeps; nothing blinks. */
.disco { position: fixed; z-index: 55; right: 20px; bottom: 84px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.18); background: rgb(14 14 17 / 0.86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); cursor: pointer;
  transition: border-color 200ms, box-shadow 300ms, transform 100ms ease-out; -webkit-tap-highlight-color: transparent; }
.disco:hover { border-color: #ff8a45; }
.disco:active { transform: scale(0.94); }
.disco:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.disco-ball { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 10px rgb(255 255 255 / 0.22); }
.disco-ring { position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); transform: rotate(-90deg); pointer-events: none; }
.disco-ring circle { fill: none; stroke: var(--fill); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: calc(163.4 * (1 - var(--left, 0))); opacity: 0; transition: opacity 300ms; }
.disco.is-on .disco-ring circle { opacity: 1; }
.disco.is-on { border-color: transparent; box-shadow: 0 0 22px rgb(255 255 255 / 0.25); }
@media (max-width: 700px) { .disco { right: 14px; bottom: 80px; width: 48px; height: 48px; } }
@media (max-width: 700px) { .disco-mirror { left: 84%; height: 70px; } .disco-mirror span { width: 40px; height: 40px; margin-left: -20px; } }

/* the lights themselves: one layer over the page that only adds light (screen), so the text underneath stays as it is */
.disco-sky { position: fixed; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; mix-blend-mode: screen; animation: disco-in 900ms ease both; }
.disco-sky.is-out { animation: disco-out 1.1s ease both; }
@keyframes disco-in { from { opacity: 0; } }
@keyframes disco-out { from { opacity: 1; } to { opacity: 0; } }
.disco-sky > div, .disco-sky i { position: absolute; display: block; }
.disco-pools i { width: 70vmax; height: 70vmax; border-radius: 50%; opacity: 0.32; will-change: transform; }
.disco-pools i:nth-child(1) { left: -20vmax; top: -10vmax; background: radial-gradient(circle, rgb(255 40 160 / 0.75), transparent 62%); animation: disco-drift-a 9s ease-in-out infinite alternate; }
.disco-pools i:nth-child(2) { right: -25vmax; top: 10vh; background: radial-gradient(circle, rgb(0 220 255 / 0.7), transparent 62%); animation: disco-drift-b 11s ease-in-out infinite alternate; }
.disco-pools i:nth-child(3) { left: 20vw; bottom: -35vmax; background: radial-gradient(circle, rgb(150 90 255 / 0.75), transparent 62%); animation: disco-drift-c 13s ease-in-out infinite alternate; }
@keyframes disco-drift-a { to { transform: translate(45vw, 35vh); } }
@keyframes disco-drift-b { to { transform: translate(-50vw, 30vh); } }
@keyframes disco-drift-c { to { transform: translate(30vw, -55vh); } }
.disco-beams i { left: 50%; top: 0; width: 220vmax; height: 220vmax; margin-left: -110vmax; transform-origin: 50% 0; will-change: transform; }
.disco-beams i:nth-child(1) { background: conic-gradient(from 176deg at 50% 0, transparent 0deg, rgb(255 90 210 / 0.22) 3deg, transparent 7deg); animation: disco-sweep 5.5s ease-in-out infinite alternate; }
.disco-beams i:nth-child(2) { background: conic-gradient(from 176deg at 50% 0, transparent 0deg, rgb(90 230 255 / 0.22) 3deg, transparent 7deg); animation: disco-sweep 7s ease-in-out -3s infinite alternate-reverse; }
.disco-beams i:nth-child(3) { background: conic-gradient(from 176deg at 50% 0, transparent 0deg, rgb(255 230 90 / 0.18) 3deg, transparent 7deg); animation: disco-sweep 8.5s ease-in-out -5s infinite alternate; }
@keyframes disco-sweep { from { transform: rotate(-38deg); } to { transform: rotate(38deg); } }
/* the mirror ball's spots: a field of small lights turning slowly across the walls, a little brighter and dimmer in turn */
.disco-spots { left: 50%; top: 50%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; will-change: transform;
  background: radial-gradient(circle, rgb(255 255 255 / 0.55) 0 1.6px, transparent 2.6px) 0 0 / 86px 64px,
    radial-gradient(circle, rgb(255 190 240 / 0.4) 0 1.3px, transparent 2.3px) 43px 32px / 86px 64px;
  animation: disco-turn 26s linear infinite, disco-glint 1.6s ease-in-out infinite alternate; }
@keyframes disco-turn { to { transform: rotate(360deg); } }
@keyframes disco-glint { from { opacity: 0.16; } to { opacity: 0.36; } }   /* faint (owner, 18/11/2026) */
.disco-lasers { inset: 0; width: 100%; height: 100%; }
/* the ball hangs from the top, under the header */
.disco-mirror { left: 50%; top: 0; width: 2px; height: 104px; margin-left: -1px; background: rgb(255 255 255 / 0.4); transform-origin: 50% 0;
  animation: disco-drop 1s cubic-bezier(0.2, 0.9, 0.3, 1.25) both, disco-sway 4s ease-in-out 1s infinite alternate; }
.disco-mirror span { position: absolute; left: 50%; top: 100%; width: 56px; height: 56px; margin-left: -28px; border-radius: 50%;
  box-shadow: 0 0 22px 4px rgb(255 255 255 / 0.28), 0 0 60px 10px rgb(200 210 255 / 0.12); }
.disco-mirror canvas { width: 100%; height: 100%; border-radius: 50%; display: block; }
@keyframes disco-drop { from { transform: translateY(-180px); } }
@keyframes disco-sway { from { rotate: -2deg; } to { rotate: 2deg; } }
/* the jellyfish turn through the colours too */
.is-disco .jelly-sky { animation: disco-hue 6s linear infinite; }
@keyframes disco-hue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(360deg); } }

/* the full-body dancer (dancer.js), owner 18/11/2026: the screen freezes, he tears it open with his hands and climbs out;
   when the disco ends the screen freezes again, he tears the floor and jumps into the hole (no ladder, no scissors). The
   tearing is filmed in his own clips. Layers: the freeze veil 51 (over the disco lights), he and his torn paper 53. */
.dancer { position: fixed; z-index: 53; left: 50%; top: 0; height: min(50vh, 460px); aspect-ratio: 9 / 16; transform: translateX(-50%); pointer-events: none; visibility: hidden; }
.dancer.is-on { visibility: visible; }
.dancer-body { position: absolute; inset: 0; will-change: transform; }
.dancer-cv { display: block; width: 100%; height: 100%; }
/* the screen freezes: the colour drains, everything stops where it is; only the tear and he still move */
.freeze-veil { position: fixed; inset: 0; z-index: 51; pointer-events: none; opacity: 0; background: rgb(6 8 12 / 0.16);
  -webkit-backdrop-filter: grayscale(0.85) brightness(0.78) contrast(1.08); backdrop-filter: grayscale(0.85) brightness(0.78) contrast(1.08); transition: opacity 140ms ease; }
.is-frozen .freeze-veil { opacity: 1; }
.freeze-veil.is-flash { animation: freeze-flash 260ms ease-out; }
@keyframes freeze-flash { 0% { background: rgb(255 255 255 / 0.22); } 100% { background: rgb(6 8 12 / 0.16); } }
/* (the bust leaving the circle is not frozen: it finishes going out of sight) */
.is-frozen :not(.dancer, .dancer *, .freeze-veil, .hero-me), .is-frozen :not(.dancer, .dancer *, .freeze-veil, .hero-me)::before, .is-frozen :not(.dancer, .dancer *, .freeze-veil, .hero-me)::after { animation-play-state: paused !important; }
/* the spotlight: a soft cone from above and a pool of light at his feet */
.dancer-light { position: absolute; left: 50%; bottom: -8%; width: 240%; height: 146%; transform: translateX(-50%); opacity: 0; mix-blend-mode: screen;
  clip-path: polygon(43% 0, 57% 0, 100% 100%, 0 100%); background: linear-gradient(to bottom, rgb(255 236 210 / 0.02), rgb(255 236 210 / 0.15)); transition: opacity 600ms ease;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%); mask-image: linear-gradient(to bottom, #000 82%, transparent 100%); }   /* the beam fades out on the floor: he stands mid-screen */
.dancer.is-cutting .dancer-light { display: none; }   /* nothing of the beam may show while he is inside the cut */
.dancer-light::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: 0; height: 9%; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 230 200 / 0.35), transparent); }
.dancer.is-up .dancer-light { opacity: 1; }
/* the little burst of sparkles as he leaps out of the cut */
.dancer-burst { position: absolute; left: 50%; bottom: 8%; }
.dancer-burst i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #ffe7c8; box-shadow: 0 0 8px #ff8a45; opacity: 0; }
.dancer.is-burst .dancer-burst i { animation: dancer-spark 900ms ease-out forwards; }
@keyframes dancer-spark { 0% { opacity: 1; transform: translate(0, 0) scale(1); } 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.3); } }
@media (max-width: 700px) { .dancer { height: min(44vh, 360px); } }

/* the jellyfish canvases sit behind the section's content */
.has-jelly { isolation: isolate; }
.jelly-sky { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .lightline::before, .lightline::after, .faq-q[open]::before, .faq-q[open]::after, .how-card.is-lit::before, .how-card.is-lit::after { animation: lightline-in 300ms ease-out both; }
  .btn, .pill, .nav .cta, .nav-cta, .btn-acc { animation: none; }
}
