/* Smoother scrolling and gentle reveal-on-scroll */
html { scroll-behavior: smooth; scroll-padding-top: 1em; }

.js-reveal .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
.js-reveal .reveal.in-view { opacity: 1; transform: none; }

.impact-strip h3 { font-size: 2.2em; margin-bottom: 0.1em; }
.impact-strip p  { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js-reveal .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Animated, interactive SB logo ---- */
#intro .image.logo-anim {
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    animation: logo-float 6s ease-in-out 1.4s infinite;
}
#intro .image.logo-anim img {
    position: relative;
    z-index: 2;
    background: #fff;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    transition: transform 0.15s ease-out, box-shadow 0.4s ease;
    /* "backwards" (not "both") so the pointer-driven inline transform still applies afterwards */
    animation: logo-pop 1.1s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.2s backwards, logo-breathe 4s ease-in-out 1.4s infinite;
    -webkit-user-drag: none;
    user-select: none;
}
#intro .image.logo-anim:hover img { box-shadow: 0 18px 60px rgba(108, 99, 255, 0.55); }

/* rotating gradient ring: a real element (added by logo.js) so its speed can be ramped smoothly */
.logo-ring,
#intro .image.logo-anim:not(.has-ring)::before {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 100%;
    z-index: 1;
    pointer-events: none;
    background: conic-gradient(from 0deg, #6c63ff, #00c6ff, #ff6ec7, #ffd166, #6c63ff);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
            mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
}
#intro .image.logo-anim:not(.has-ring)::before { animation: logo-spin 6s linear infinite; }
/* pulsing halo */
#intro .image.logo-anim::after {
    content: "";
    position: absolute;
    inset: -10px;
    border-radius: 100%;
    z-index: 0;
    border: 2px solid rgba(108, 99, 255, 0.5);
    animation: logo-pulse 2.8s ease-out infinite;
}

/* orbiting dots (added by logo.js) */
.logo-orbit { position: absolute; inset: -26px; z-index: 3; pointer-events: none; animation: logo-spin 9s linear infinite reverse; }
.logo-orbit i { position: absolute; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 12px currentColor; background: currentColor; }
.logo-orbit i:nth-child(1) { top: 0;    left: 50%; color: #6c63ff; }
.logo-orbit i:nth-child(2) { bottom: 14%; left: 8%;  color: #ff6ec7; width: 8px; height: 8px; }
.logo-orbit i:nth-child(3) { bottom: 14%; right: 8%; color: #00c6ff; width: 9px; height: 9px; }

/* "play with me" hint pill */
.logo-hint {
    position: absolute;
    left: 50%;
    bottom: -4px;
    transform: translateX(-50%);
    z-index: 4;
    padding: 0.45em 1.1em;
    border-radius: 999px;
    background: #17133a;
    color: #fff;
    font-size: 0.8em;
    letter-spacing: 0.04em;
    white-space: nowrap;
    box-shadow: 0 6px 20px rgba(23, 19, 58, 0.35);
    animation: hint-bounce 1.6s ease-in-out 2s infinite;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.logo-hint.hide { opacity: 0; animation: none; }

/* sparkle particles (added by logo.js) */
.logo-spark { position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; z-index: 5; pointer-events: none; }

@keyframes logo-pop {
    0%   { opacity: 0; transform: scale(0.4) rotate(-120deg); }
    70%  { opacity: 1; transform: scale(1.06) rotate(8deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes logo-float   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes logo-breathe { 0%, 100% { box-shadow: 0 0 0 rgba(108,99,255,0); } 50% { box-shadow: 0 10px 44px rgba(108,99,255,0.35); } }
@keyframes logo-spin    { to { transform: rotate(360deg); } }
@keyframes logo-pulse   { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(1.22); opacity: 0; } }
@keyframes hint-bounce  { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

@media (prefers-reduced-motion: reduce) {
    .logo-ring,
    #intro .image.logo-anim,
    #intro .image.logo-anim img,
    #intro .image.logo-anim::before,
    #intro .image.logo-anim::after,
    .logo-orbit, .logo-hint { animation: none !important; }
}

/* ---- Particle background for the hero (#intro) ---- */
#intro { position: relative; overflow: hidden; }
#intro > .inner { position: relative; z-index: 1; }
#intro .hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}
