/* React Bits effects, vanilla port for the Saqlyn portfolio (saqlyn.com).
   Same five effects as the QR app (qr.saqlyn.com): GradientText, SpotlightCard,
   SplitText, FadeContent, Aurora — rebuilt in plain JS/CSS because this site
   is static HTML, not React. Brand palette: sky #38bdf8, violet #a78bfa,
   green #22c55e. */

/* --- GradientText: hero title accent, colours drift across the text --- */
.gradient-text {
  display: inline-block;
  background-image: linear-gradient(90deg, #38bdf8, #a78bfa, #22c55e, #38bdf8);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: rb-gradient 8s ease-in-out infinite alternate;
}
@keyframes rb-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .gradient-text { animation: none; }
}

/* --- SpotlightCard: mouse glow on cards.
   Only the glow machinery here — padding, background and radius stay the
   card's own, so dish photos / card layouts are untouched. --- */
.spotlight-card { position: relative; isolation: isolate; overflow: hidden; }
.spotlight-card__light,
.spotlight-card__grain,
.spotlight-card__border,
.spotlight-card__edge {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.spotlight-card__light,
.spotlight-card__grain { z-index: -1; opacity: 0; }
.spotlight-card__grain { background-size: 160px 160px; mix-blend-mode: overlay; }
.spotlight-card__border,
.spotlight-card__edge {
  z-index: 1;
  padding: 1px;
  -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);
}
.spotlight-card__border { background: rgba(255, 255, 255, 0.08); }
html[data-theme="light"] .spotlight-card__border { background: rgba(24, 24, 27, 0.1); }
.spotlight-card__edge { opacity: 0; }

/* --- SplitText: section headings rise in letter by letter --- */
.rb-word { display: inline-block; white-space: nowrap; }
.rb-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rb-delay, 0s);
  will-change: opacity, transform;
}
.rb-split-in .rb-char { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .rb-char { opacity: 1; transform: none; transition: none; }
}

/* --- FadeContent: sections fade in with a soft blur.
   Hidden state applies only once react-bits.js has loaded (html.rb-js),
   so a failed script never leaves sections invisible. --- */
html.rb-js [data-fade] {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(16px);
  transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease;
}
html.rb-js [data-fade].rb-in { opacity: 1; filter: blur(0); transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.rb-js [data-fade] { opacity: 1; filter: none; transform: none; transition: none; }
}

/* --- Aurora: hero background --- */
.aurora-container { position: absolute; overflow: hidden; }
.aurora-canvas { display: block; width: 100%; height: 100%; }
.hero-aurora { inset: 0; z-index: 0; opacity: 0.55; pointer-events: none; }
.hero-grid { position: relative; z-index: 1; }
