/*
 * Frontend-only animations for the AboutMyHotel child theme.
 * Enqueued via wp_enqueue_scripts (NOT loaded in the block editor), so the
 * initial opacity:0 states never hide blocks in the Gutenberg backend.
 * The reveal JS (is-visible / hero sequence) lives in assets/js/main.js (frontend only).
 */

/* ============================================================
   Hero sequence animation v1.4
   LTR reveal via clip-path (no alignment change)
   paragraph > heading > image 1.5s > buttons 0.5s
   ============================================================ */

/* Initial hidden state */
.stk-block-hero .wp-block-paragraph,
.stk-block-hero .wp-block-stackable-heading,
.stk-block-hero .wp-block-stackable-image,
.stk-block-hero .wp-block-stackable-button-group {
    opacity: 0;
}

/* Clip-path LTR reveal — text stays centered, just unmasked L→R */
@keyframes amh-ltr-reveal {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0%   0 0); }
}

/* Cursor blink after typewriter ends */
.amh-ltr-cursor::after {
    content: "|";
    display: inline-block;
    margin-left: 1px;
    font-weight: 300;
    animation: amh-blink 0.5s step-end infinite;
}

@keyframes amh-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .stk-block-hero .wp-block-paragraph,
    .stk-block-hero .wp-block-stackable-heading,
    .stk-block-hero .wp-block-stackable-image,
    .stk-block-hero .wp-block-stackable-button-group {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        clip-path: none !important;
    }
}

/* ── Scroll fade-in — apply class amh-fadeinup to any block ── */
.amh-fadeinup {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.amh-fadeinup.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .amh-fadeinup {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
