/* =========================================================
   D'sPinnacle Dome: "fun layer" shared by the website and portal
   - scroll-drawn wiggly rainbow, spinning doodles, 3D icons (fun3d.js)
   - tap stars
   Everything sits BEHIND the page content (z-index -1) so text stays readable.
   ========================================================= */
:root {
  --grad-deep: linear-gradient(135deg, #2B0660 0%, #4A0E8F 40%, #8A25B5 75%, #AA3ACE 100%);
  --grad-fun: linear-gradient(120deg, #8A25B5 0%, #DB2777 55%, #F7B267 100%);
  --grad-sea: linear-gradient(135deg, #34C1BF 0%, #339DC7 45%, #8A25B5 100%);
  --grad-btn: linear-gradient(135deg, #5E0FA0 0%, #8A25B5 45%, #C03DD8 100%);
  --rainbow: linear-gradient(90deg, #FF5A5F, #FF9F43, #FFD93D, #4CD964, #34C1BF, #339DC7, #8A25B5);
}
body { isolation: isolate; }

.fun-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.fun-rainbow { position: absolute; inset: -6% -10%; width: 120%; height: 112%; opacity: .34; }
.fun-rainbow path { fill: none; stroke-linecap: round; }
.fun-3d { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.fun-3d.is-ready { opacity: 1; }

/* doodles */
.fun-doodle { position: absolute; width: var(--s, 32px); height: var(--s, 32px); color: var(--c, #8A25B5); opacity: var(--o, .5);
  animation: fun-spin var(--d, 18s) linear infinite; animation-direction: var(--dir, normal); }
.fun-doodle svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fun-doodle--float { animation: fun-spin var(--d, 18s) linear infinite, fun-bob 6s ease-in-out infinite; }
@keyframes fun-spin { to { rotate: 360deg; } }
@keyframes fun-bob { 50% { translate: 0 -10px; } }

/* tap stars */
.fun-burst { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 9999; pointer-events: none; }
.fun-star { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; color: var(--c);
  animation: fun-pop .75s cubic-bezier(.2, .8, .3, 1) forwards; }
.fun-star svg { width: 100%; height: 100%; display: block; fill: currentColor; }
@keyframes fun-pop {
  0% { transform: translate(0, 0) scale(.2) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(var(--sc, 1)) rotate(var(--rot)); opacity: 0; }
}
.fun-ring { position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #AA3ACE;
  animation: fun-ring .5s ease-out forwards; }
@keyframes fun-ring { from { transform: scale(.3); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }

/* Dark backgrounds (portal sign-in) let the layer glow a bit more */
.fun-strong .fun-rainbow { opacity: .55; }
.fun-strong .fun-doodle { --o: .55; }

@media (max-width: 767px) {
  .fun-rainbow { opacity: .26; }
  .fun-doodle { --o: .32; }
}
@media (prefers-reduced-motion: reduce) {
  .fun-doodle, .fun-doodle--float { animation: none; }
}
@media print { .fun-layer, .fun-burst { display: none !important; } }

/* =========================================================
   Colour pass: deep gradients from the logo (purple → violet → teal)
   ========================================================= */
/* Soft, calm page backgrounds with colour glows */
body { background:
  radial-gradient(900px 600px at 0% 0%, rgba(170, 58, 206, .10), transparent 60%),
  radial-gradient(800px 600px at 100% 30%, rgba(52, 193, 191, .10), transparent 60%),
  radial-gradient(900px 700px at 30% 100%, rgba(247, 178, 103, .10), transparent 60%),
  #FCFAFF; background-attachment: fixed; }
.page-register, .page-payment, .page-legal { background:
  radial-gradient(800px 600px at 0% 10%, rgba(170, 58, 206, .14), transparent 60%),
  radial-gradient(700px 600px at 100% 40%, rgba(52, 193, 191, .14), transparent 60%),
  radial-gradient(800px 600px at 40% 100%, rgba(219, 39, 119, .08), transparent 60%),
  #F8F4FF; background-attachment: fixed; }
/* Let the rainbow and doodles shine through light sections */
.section--tint { background: rgba(246, 241, 255, .78); }
.hero { background: transparent; }
.hero__grid::before { background: linear-gradient(180deg, rgba(250, 244, 253, .78) 0%, rgba(242, 239, 252, .72) 100%); }

/* Buttons */
.btn--primary { background: var(--grad-btn); background-size: 180% 100%; background-position: 0% 50%; box-shadow: 0 8px 22px rgba(138, 37, 181, .32); }
.btn--primary:hover { background: var(--grad-btn); background-size: 180% 100%; background-position: 100% 50%; box-shadow: 0 12px 28px rgba(138, 37, 181, .4); }
.btn--primary { transition: background-position .5s var(--ease-out), box-shadow .25s, transform .15s var(--ease-out); }
.btn--gold { background: linear-gradient(135deg, #34C1BF, #5ED6C9 50%, #FFD93D 140%); }
.btn--gold:hover { background: linear-gradient(135deg, #22A3A1, #34C1BF 60%, #FFD93D 140%); }

/* Deep gradient bars */
.topbar { background: linear-gradient(90deg, #2B0660, #5B1494 50%, #2B0660); }
.section--dark { background: var(--grad-deep); }
.section--dark::after { content: ""; position: absolute; width: 480px; height: 480px; left: -180px; bottom: -220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(52, 193, 191, .35), transparent 70%); pointer-events: none; }
.section--dark > * { position: relative; z-index: 1; }
.footer { background: linear-gradient(180deg, #2B0660 0%, #1C0340 100%); position: relative; }
.footer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--rainbow); }

/* Headlines: a playful gradient on the accent words */
.hero__title-accent, .legal__title, .page-register .register .section-title {
  background: linear-gradient(110deg, #8A25B5 0%, #DB2777 45%, #FF9F43 75%, #34C1BF 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { background: linear-gradient(90deg, #8A25B5, #DB2777); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow .icon { color: #8A25B5; }
.eyebrow--gold { background: linear-gradient(90deg, #34C1BF, #FFD93D); -webkit-background-clip: text; background-clip: text; }
.eyebrow--gold .icon { color: #34C1BF; }
.eyebrow--music, .eyebrow--swim, .eyebrow--code, .eyebrow--graphics { background: none; -webkit-background-clip: border-box; background-clip: border-box; }
.eyebrow--music { color: var(--music-ink); } .eyebrow--swim { color: var(--swim-ink); } .eyebrow--code { color: var(--code-ink); } .eyebrow--graphics { color: var(--graphics-ink); }

/* Cards & panels: rainbow edges and a gentle glow on hover */
.stats-card { overflow: hidden; }
.stats-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--rainbow); }
.card { transition: transform .25s var(--ease-out), box-shadow .25s; }
.card:hover { transform: translateY(-6px); box-shadow: 0 22px 46px rgba(138, 37, 181, .18), 0 0 0 2px rgba(170, 58, 206, .18); }
.card--cta { background: var(--grad-deep) !important; }
.form-card { position: relative; overflow: hidden; }
.form-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--rainbow); }
.bank-card { position: relative; overflow: hidden; }
.bank-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--grad-sea); }
.fee--featured { background: linear-gradient(160deg, #fff 0%, #F6ECFF 100%); }
.wa-float { box-shadow: 0 10px 26px rgba(22, 163, 74, .35); }
