/* ============================================================
   Shrewsbury Music — animations.css
   All keyframes & animated element styles
   ============================================================ */

/* Count-aware photo fades, over a permanently visible first-photo backdrop. */
@keyframes osm-hero-two {
    0%, 43.33%, 100% { opacity: 0; }
    50%, 93.33% { opacity: 1; }
}
@keyframes osm-hero-three-second {
    0%, 28.89%, 71.11%, 100% { opacity: 0; }
    33.33%, 66.67% { opacity: 1; }
}
@keyframes osm-hero-three-third {
    0%, 62.22%, 100% { opacity: 0; }
    66.67%, 95.56% { opacity: 1; }
}

/* Marquee scroll */
@keyframes osm-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Fail-open reveal: JS adds the class only when an eligible item enters view. */
@keyframes osm-reveal-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}

/* ============================================================
   Animated element styles (apply via class names)
   ============================================================ */

.osm-rise { animation: none; }
.osm-reveal-in {
    animation: osm-reveal-in var(--osm-motion-enter, 500ms) var(--osm-motion-ease, ease-out) backwards;
    /* Legacy PHP renders inline delays; a bounded JS stagger replaces those. */
    animation-delay: var(--osm-reveal-delay, 0ms) !important;
}

.osm-ticker:hover .osm-ticker__track,
.osm-ticker:focus-within .osm-ticker__track { animation-play-state: paused; }

/* Pulse dot (positions a ring around a solid dot) */
.osm-pulse-dot {
    position: relative;
    width: 8px;
    height: 8px;
    display: inline-block;
}
.osm-pulse-dot::before,
.osm-pulse-dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
}
.osm-pulse-dot::before {
    background: var(--osm-cream);
}
.osm-pulse-dot::after {
    background: var(--osm-cream);
}
.osm-pulse-dot--coral::before,
.osm-pulse-dot--coral::after { background: var(--osm-coral); }
.osm-pulse-dot--yellow::before,
.osm-pulse-dot--yellow::after { background: var(--osm-yellow); }
.osm-pulse-dot--cream::before,
.osm-pulse-dot--cream::after { background: var(--osm-cream); }

/* Equalizer */
.osm-eq {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 12px;
}
.osm-eq__bar {
    background: var(--osm-yellow);
    border-radius: 2px 2px 0 0;
    width: 3px;
    align-self: flex-end;
}
.osm-eq__bar--1 { height: 40%; }
.osm-eq__bar--2 { height: 75%; }
.osm-eq__bar--3 { height: 100%; }
.osm-eq__bar--4 { height: 60%; }
.osm-eq__bar--5 { height: 85%; }
.osm-eq__bar--6 { height: 50%; }
.osm-eq__bar--7 { height: 70%; }

/* A small shared motion vocabulary; no layout properties or blanket transitions. */
:is(.osm-venue-card, .osm-gig-card, .osm-artist-card, .osm-artist-tile,
    .osm-partner-card, .osm-tonight-card, .osm-day-row__card, .osm-week-day,
    .osm-month-cell, .osm-ad-feature, .osm-ad-sidebar, .osm-ad-banner, .osm-package) {
    transition: transform var(--osm-motion-ui, 220ms) var(--osm-motion-ease, ease-out),
        box-shadow var(--osm-motion-ui, 220ms) ease,
        border-color var(--osm-motion-ui, 220ms) ease;
}
:is(.osm-venue-card__img, .osm-artist-card__img, .osm-artist-tile__img,
    .osm-day-featured__img, .osm-tonight-card__img, .osm-ad-feature__img, .osm-gallery__item img) {
    transition: transform var(--osm-motion-enter, 500ms) var(--osm-motion-ease, ease-out);
}
:is(.osm-nav__list a, .osm-section__link, .osm-footer__menu a) {
    transition: color var(--osm-motion-fast, 140ms) ease, opacity var(--osm-motion-fast, 140ms) ease;
}
:is(.osm-venue-card, .osm-gig-card, .osm-artist-card, .osm-artist-tile,
    .osm-partner-card, .osm-tonight-card, .osm-day-row__card, .osm-week-day,
    .osm-month-cell, .osm-ad-feature, .osm-ad-sidebar, .osm-ad-banner):focus-within {
    box-shadow: var(--osm-shadow-hover);
}
:is(.osm-btn, .osm-venue-card, .osm-gig-card, .osm-artist-card, .osm-artist-tile,
    .osm-nav__list a, .osm-social, .osm-artist-social, .osm-cal-arrow,
    .osm-cal-today, .osm-section__link, .osm-genre-pill, .osm-bands-pill):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

/* Never leave a lifted/zoomed hover state stuck on a touch screen. */
@media (hover: hover) and (pointer: fine) {
    :is(.osm-btn, .osm-social, .osm-artist-social, .osm-cal-arrow,
        .osm-cal-today, .osm-genre-pill, .osm-search-form-big__submit):hover {
        transform: translateY(-1px);
    }
    :is(.osm-venue-card, .osm-gig-card, .osm-artist-card, .osm-artist-tile,
        .osm-partner-card, .osm-tonight-card, .osm-day-row__card, .osm-week-day,
        .osm-month-cell, .osm-ad-feature, .osm-ad-sidebar, .osm-ad-banner,
        .osm-ad-logo, .osm-package):hover { transform: translateY(-3px); }
    .osm-venue-card:hover .osm-venue-card__img,
    .osm-artist-card:hover .osm-artist-card__img,
    .osm-artist-tile:hover .osm-artist-tile__img,
    .osm-day-featured__card:hover .osm-day-featured__img,
    .osm-tonight-card:hover .osm-tonight-card__img,
    .osm-ad-feature:hover .osm-ad-feature__img,
    .osm-gallery__item:hover img { transform: scale(1.025); }
    .osm-ad-partner-card:hover,
    .osm-ad-feature:hover .osm-ad-feature__cta,
    .osm-ad-banner:hover .osm-ad-banner__arrow,
    .osm-month-cell:hover .osm-month-cell__more,
    .osm-tonight-card__cta:hover { transform: translateX(2px); }
    .osm-advertise-figure:hover { transform: translateY(-2px); }
    .osm-advertise-figure:nth-child(odd):hover { transform: translateY(-14px); }
    .osm-btn:active { transform: none; }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
    .osm-hero__slide:first-child { opacity: 1; }
    .osm-hero__slide:not(:first-child) { display: none; }
    :is(.osm-reveal-in, .osm-hero__nowcard, .osm-stamp, .osm-nav,
        .osm-btn, .osm-social, .osm-artist-social, .osm-cal-arrow, .osm-cal-today,
        .osm-genre-pill, .osm-search-form-big__submit, .osm-venue-card,
        .osm-gig-card, .osm-artist-card, .osm-artist-tile, .osm-partner-card,
        .osm-tonight-card, .osm-day-row__card, .osm-week-day, .osm-month-cell,
        .osm-ad-feature, .osm-ad-sidebar, .osm-ad-banner, .osm-ad-logo,
        .osm-package, .osm-ad-partner-card, .osm-advertise-figure,
        .osm-venue-card__img, .osm-artist-card__img, .osm-artist-tile__img,
        .osm-day-featured__img, .osm-tonight-card__img, .osm-ad-feature__img,
        .osm-gallery__item img, .osm-ad-feature__cta, .osm-ad-banner__arrow,
        .osm-month-cell__more, .osm-tonight-card__cta) {
        transform: none !important;
    }
}
