/* ============================================================
   sayme.css
   ============================================================ */

/* ── Page-level font scale (overrides global base) ───────────── */
@media screen and (max-width: 1023px) {

    html:has(body.sub-page),
    body.sub-page {
        font-size: clamp(1rem, 4.26vw, 10rem);
    }
}

/* ── Hero: logo pulse animation ─────────────────────────────── */
@keyframes logo-scale-loop {

    0%,
    100% {
        transform: scale(0.9);
    }

    50% {
        transform: scale(1);
    }
}

@media screen and (min-width: 1024px) {
    .animate-logo-pulse {
        animation: logo-scale-loop 0.5s ease-in-out infinite;
        transform-origin: center;
        will-change: transform;
    }
}


/* ── Solution Section ────────────────────────────────────────── */

/* Block 1: card swiper */
@media screen and (min-width: 1024px) {
    .sayme-sol-cards-swiper {
        overflow: visible;
    }
}

/* Block 2: Octalysis cards */
.sayme-oct-card img {
    display: block;
    width: 100%;
    height: auto;
}


/* ── Water Wheel / Slot Machine Text Animation ───────────────── */

/*
 * Structure built by JS for each animated character:
 *
 *  <span.sayme-char ...>               ← outer char span (keeps Tailwind classes)
 *    <span.sayme-wheel-clip>           ← the "window" — overflow:hidden, height = 1 char
 *      <span.sayme-wheel-track>        ← the scrolling drum (GSAP moves this)
 *        <span.sayme-wheel-item>…</span>  ← copy 0
 *        <span.sayme-wheel-item>…</span>  ← copy 1
 *        <span.sayme-wheel-item>…</span>  ← copy 2
 *        <span.sayme-wheel-item>…</span>  ← copy 3
 *        <span.sayme-wheel-item>…</span>  ← copy 4 (final resting position)
 *      </span>
 *    </span>
 *  </span>
 */

/* The animated text rows — clip overflow so drum items outside the window are hidden */
.sayme-text-row {
    letter-spacing: -0.04em;
    line-height: 1;
    overflow: hidden;
    /* clips the drum items scrolling outside row bounds */
}

/* Outer char span: must stay inline-block / inline-flex for horizontal layout */
.sayme-char,
.sayme-char-odd,
.sayme-char-even,
.sayme-char-r2,
.sayme-char-r2-odd,
.sayme-char-r2-even {
    display: inline-block;
    vertical-align: top;
}

/* Clip window — shows exactly one character height, hides the rest of the drum */
.sayme-wheel-clip {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    /* height is set inline by JS (= computed fontSize in px) */
}

/* The drum — a vertical stack of character copies that GSAP scrolls */
.sayme-wheel-track {
    display: flex;
    flex-direction: column;
    will-change: transform;
}

/* Each copy of the character inside the drum */
.sayme-wheel-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    /* height is set inline by JS to match the clip window */
}

/* Image chars inside wheel items (logo / coin) */
.sayme-wheel-item img {
    display: block;
    width: 0.85em;
    height: 0.85em;
    object-fit: contain;
}

/* ============================================================
   Sayme Solution 2 Section CSS
   ============================================================ */

/* Slide Transition classes for Du Xuân billboard */
.sayme-slide-fade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

.sayme-slide-fade.active {
    opacity: 1;
    z-index: 10;
}

/* ── Infinite Scroll Animation ───────────────────────────────── */
@keyframes infinite-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.animate-infinite-scroll {
    --speed: 30s;
    animation: infinite-scroll var(--speed) linear infinite;
}

.animate-infinite-scroll-reverse {
    --speed: 30s;
    animation: infinite-scroll var(--speed) linear infinite reverse;
}

@media (min-width: 1024px) {
    .animate-infinite-scroll {
        --speed: 60s;
        animation: infinite-scroll var(--speed) linear infinite;
    }
    .animate-infinite-scroll-reverse {
        --speed: 60s;
        animation: infinite-scroll var(--speed) linear infinite reverse;
    }
}
