/* The Funkbox look on every page (owner, 2026-11-29 and 2026-11-30): a colour-ring band behind the header, a rainbow
   wordmark, gradient primary buttons and pink-edged cards. Loaded after app.css by every page. Gradients are allowed
   in this file and in the homepage's own stylesheet only (tests/test_site_style.py); app.css and the pages keep none.
   The band turns slowly; no filter is animated (a filter on a layer this large repaints every frame). The money pages
   (checkout and the PayPal return pages) carry a still band. All motion stops for reduced motion. */
:root {
  --fb-pink: #ff3e9a;
  --fb-violet: #5b2eff;
  --fb-cyan: #00d4ff;
  --fb-lime: #c6ff3d;
  --fb-sun: #ffd60a;
  --fb-night: #1f1147;
  --fb-cta: #b8125f;
}
body { overflow-x: clip; }

/* The band: the header over a slowly turning colour pattern, full width. */
.top-band {
  position: relative;
  isolation: isolate;
  margin: -16px calc(50% - 50vw) 16px;
  padding: 0 calc(50vw - 50%) 4px;
  color: #ffffff;
}
.top-band-art { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--fb-night); contain: paint; }
.top-band-art::before {
  content: "";
  position: absolute;
  inset: -60%;
  background: repeating-radial-gradient(circle at 50% 50%, var(--fb-pink) 0 14px, var(--fb-cyan) 14px 26px, var(--fb-violet) 26px 40px, var(--fb-lime) 40px 46px);
  animation: fb-turn 60s linear infinite;
}
.top-band-art::after { content: ""; position: absolute; inset: 0; background: rgba(31, 17, 71, 0.74); }
.top-band .site-nav a, .top-band .create-menu > summary { display: inline-flex; align-items: center; min-height: 44px; color: #ffffff; text-decoration: underline; }
.top-band .create-list a { color: var(--ink); }

/* The wordmark: rainbow colours running through the letters, as in the Funkbox loops. */
.brand {
  font-size: 1.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background-image: linear-gradient(90deg, var(--fb-pink), var(--fb-sun), var(--fb-lime), var(--fb-cyan), var(--fb-violet), var(--fb-pink));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fb-run 6s linear infinite;
}
.brand { display: inline-flex; align-items: center; gap: 0.35em; }

/* The ring mark beside the wordmark (BACKLOG 17): the band's rings, turning slowly. The rings have gaps so the turn
   shows. Colours come from here: the site's policy allows no inline style. */
.brand-mark { flex: none; width: 1.15em; height: 1.15em; animation: fb-turn 12s linear infinite; }
.brand-mark circle { fill: none; stroke-width: 3; }
.brand-mark .ring-pink { stroke: var(--fb-pink); stroke-dasharray: 66 22; }
.brand-mark .ring-cyan { stroke: var(--fb-cyan); stroke-dasharray: 44 19; stroke-dashoffset: 24; }
.brand-mark .ring-violet { stroke: var(--fb-violet); stroke-dasharray: 26 12; stroke-dashoffset: 8; }
.brand-mark .ring-lime { fill: var(--fb-lime); stroke: none; }

/* Primary buttons and cards. */
.btn-primary:not(:disabled), .path.primary:not(:disabled) {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, var(--fb-violet), var(--fb-cta));
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn-primary:not(:disabled):hover, .path.primary:not(:disabled):hover { transform: translateY(-2px) scale(1.03); filter: saturate(1.3); }
.card { border: 2px solid var(--fb-pink); border-radius: 16px; }

@keyframes fb-run { to { background-position: 300% 0; } }
@keyframes fb-turn { to { transform: rotate(360deg); } }

/* The money pages: the band and the wordmark stand still, so the eye stays on the payment. */
.top-band.still .top-band-art::before, .top-band.still .brand { animation: none; }
.top-band.still .brand-mark { animation: none; }

/* Windows high contrast and other forced colours drop the gradient, so the clipped wordmark would vanish. */
@media (forced-colors: active) {
  .brand { background-image: none; color: CanvasText; -webkit-text-fill-color: CanvasText; animation: none; }
  .brand-mark circle { stroke: CanvasText; }
  .brand-mark .ring-lime { fill: CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  .brand, .top-band-art::before { animation: none; }
  .brand-mark { animation: none; }
  .btn-primary, .path.primary { transition: none; }
  .btn-primary:not(:disabled):hover, .path.primary:not(:disabled):hover { transform: none; }
}
