/* ==========================================================================
   Misgiron Hotel — Animations (scroll-reveal + micro-interactions)
   Легковесная замена AOS на чистом CSS + IntersectionObserver (main.js).
   ========================================================================== */

/* Базовые скрытые состояния */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity .9s var(--ease), transform .9s var(--ease);
    will-change: opacity, transform;
}
[data-reveal="fade"]  { transform: none; }
[data-reveal="left"]  { transform: translateX(-60px); }
[data-reveal="right"] { transform: translateX(60px); }
[data-reveal="zoom"]  { transform: scale(.92); }
[data-reveal="slow"]  { transition-duration: 1.4s; }

[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Задержки (data-delay="100..800") */
[data-delay="100"] { transition-delay: .1s; }
[data-delay="200"] { transition-delay: .2s; }
[data-delay="300"] { transition-delay: .3s; }
[data-delay="400"] { transition-delay: .4s; }
[data-delay="500"] { transition-delay: .5s; }
[data-delay="600"] { transition-delay: .6s; }
[data-delay="700"] { transition-delay: .7s; }
[data-delay="800"] { transition-delay: .8s; }

/* Hero вход */
.hero-content > * {
    opacity: 0;
    transform: translateY(30px);
    animation: heroIn 1s var(--ease) forwards;
}
.hero-content > *:nth-child(1) { animation-delay: .3s; }
.hero-content > *:nth-child(2) { animation-delay: .5s; }
.hero-content > *:nth-child(3) { animation-delay: .7s; }
.hero-content > *:nth-child(4) { animation-delay: .9s; }
.hero-content > *:nth-child(5) { animation-delay: 1.1s; }
@keyframes heroIn {
    to { opacity: 1; transform: none; }
}

/* Мягкое свечение у золотых элементов */
@keyframes softGlow {
    0%, 100% { box-shadow: 0 0 0 rgba(200,169,107,0.0); }
    50%      { box-shadow: 0 0 24px rgba(200,169,107,0.35); }
}
.glow { animation: softGlow 3s ease-in-out infinite; }

/* Плавающая восточная звезда */
@keyframes floatY {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}
.float-y { animation: floatY 5s ease-in-out infinite; }

/* Линия-подчёркивание при наведении (общая) */
.underline-hover {
    position: relative;
    display: inline-block;
}
.underline-hover::after {
    content: "";
    position: absolute;
    left: 0; bottom: -4px;
    width: 100%; height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease);
}
.underline-hover:hover::after { transform: scaleX(1); }

/* Shimmer-эффект на тексте (heading) */
.shimmer {
    background: linear-gradient(90deg, var(--cream) 0%, var(--gold-light) 50%, var(--cream) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmer 4s linear infinite;
}
@keyframes shimmer {
    to { background-position: 200% center; }
}

/* Плавный fade-in для картинок */
img.lazyloaded {
    animation: imgFade .6s ease;
}
@keyframes imgFade {
    from { opacity: 0; transform: scale(1.02); }
    to   { opacity: 1; transform: none; }
}

/* Prefers reduced motion — уважаем пользователя */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    [data-reveal] { opacity: 1 !important; transform: none !important; }
}
