/* Presentation details: additive and scoped; game boards keep their transforms. */
.ck-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(83, 81, 246, .12) 1px, transparent 1px);
    background-size: 26px 26px;
    mask-image: linear-gradient(90deg, transparent 25%, #000);
    pointer-events: none;
}

.ck-hero__visual::before,
.ck-hero__visual::after {
    content: "";
    position: absolute;
    width: 86%;
    aspect-ratio: 1;
    max-height: 510px;
    border: 1px solid rgba(83, 81, 246, .13);
    border-radius: 50%;
    transform: rotate(-18deg) scaleY(.73);
    pointer-events: none;
}

.ck-hero__visual::after {
    width: 70%;
    border-color: rgba(255, 177, 38, .3);
    transform: rotate(25deg) scaleY(.8);
}

.ck-hero__visual > * {
    z-index: 1;
}

.ck-hero__visual .ck-mascots {
    position: relative;
}

.ck-hero h1 em {
    background: linear-gradient(110deg, #5351f6, #9b4dd7);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.ck-hero .ck-actions .ck-btn,
.ck-game-featured .ck-btn {
    position: relative;
    isolation: isolate;
}

.ck-hero .ck-actions .ck-btn::before,
.ck-game-featured .ck-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid currentColor;
    border-radius: inherit;
    box-shadow: 0 0 0 5px rgba(83, 81, 246, .12);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}

.ck-hero .ck-actions .ck-btn:hover::before,
.ck-game-featured .ck-btn:hover::before {
    opacity: .25;
}

.ck-game-featured__visual {
    position: relative;
    background:
        radial-gradient(ellipse at center, rgba(139, 129, 255, .25), transparent 70%),
        rgba(255, 255, 255, .08);
}

.ck-game-featured__visual img {
    animation: ck-polish-float 5s ease-in-out 2;
}

.ck-game-list .ck-game-link {
    border: 1px solid rgba(255, 255, 255, .5);
    box-shadow: 0 8px 24px rgba(12, 5, 53, .12);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ck-game-link__cta > span {
    transition: transform .22s ease;
}

.ck-game-link:hover .ck-game-link__cta > span,
.ck-game-link:focus-visible .ck-game-link__cta > span {
    transform: translateX(4px);
}

.ck-game-list .ck-game-link:hover {
    border-color: var(--cloud-yellow);
    box-shadow: 0 18px 32px rgba(12, 5, 53, .22);
}

/* A small return route, not an extra hero around the game. */
.ck-game-trail {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 56px;
    padding: 8px clamp(16px, 3vw, 40px);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, .85);
}

.ck-game-trail a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    color: var(--guardian-blue);
    font-weight: 850;
    font-size: 14px;
}

.ck-game-trail a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.ck-game-trail__brand {
    color: var(--cyber-night);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .08em;
    white-space: nowrap;
}

.ck-game-trail__brand span {
    margin-left: 5px;
    padding: 5px 8px;
    border-radius: 7px;
    color: var(--cyber-night);
    background: var(--cloud-yellow);
}

.ck-game-page .ckcs-screen[data-screen="start"].active,
.ck-game-page .ck-wheel-game [data-screen="welcome"]:not(.ck-hidden),
.ck-game-page .cksts-start {
    animation: ck-polish-welcome .45s ease both;
}

:where(.ck-header, .ck-hero, .ck-game-showcase, .ck-game-trail) :is(a, button):focus-visible {
    outline: 3px solid var(--guardian-blue);
    outline-offset: 5px;
}

.ck-game-showcase a:focus-visible {
    outline-color: var(--cloud-yellow);
}

/* Outside the game root: no containing block changes to fixed dialogs. */
.ck-celebration {
    position: fixed;
    inset: 0;
    z-index: 100000;
    overflow: hidden;
    pointer-events: none;
}

.ck-celebration span {
    position: absolute;
    left: 50%;
    top: 42%;
    width: 8px;
    height: 12px;
    border-radius: 3px;
    background: var(--piece-color);
}

#activities, #what, #about, #logo, #contact {
    scroll-margin-top: 110px;
}

@keyframes ck-polish-float {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

@keyframes ck-polish-welcome {
    from { opacity: .35; }
    to { opacity: 1; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .ck-hero__visual {
        translate: var(--ck-pointer-x, 0px) var(--ck-pointer-y, 0px);
        transition: translate .35s ease-out;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .ck-mascots, .ck-float-card, .ck-game-featured__visual img,
    .ck-game-page .ckcs-screen[data-screen="start"].active,
    .ck-game-page .ck-wheel-game [data-screen="welcome"]:not(.ck-hidden),
    .ck-game-page .cksts-start {
        animation: none;
    }
    .ck-hero__visual, .ck-game-link, .ck-game-link__cta > span,
    .ck-logo-card, .ck-audience-tile, .ck-hero .ck-btn, .ck-game-featured .ck-btn {
        transition: none !important;
    }
    .ck-celebration { display: none; }
}

@media (forced-colors: active) {
    .ck-hero h1 em { background: none; color: CanvasText; }
}
