/* Плавный скролл */
html {
    scroll-behavior: smooth;
}

/* Скрытие Alpine.js до загрузки */
[x-cloak] {
    display: none !important;
}

/* Фотографии с безопасными заглушками, пока реальные файлы не добавлены */
.portrait-frame,
.fact-photo-frame {
    overflow: hidden;
    background: linear-gradient(145deg, #E8D5C4, #F5EDE4);
    border: 6px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 50px rgba(92, 64, 51, 0.16);
}

.portrait-frame {
    width: min(72vw, 20rem);
    aspect-ratio: 1;
    border-radius: 9999px;
}

.fact-photo-frame {
    width: min(78vw, 22.5rem);
    aspect-ratio: 4 / 5;
    border-radius: 2rem;
}

.fact-copy-card {
    width: 100%;
}

.portrait-frame img,
.fact-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-fallback {
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* Кастомный скроллбар в пустынных тонах */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5EDE4;
}

::-webkit-scrollbar-thumb {
    background: #C17A5E;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8B5E3C;
}

/* Анимация появления секций при прокрутке */
.js section.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js section.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover-эффект для карточек */
.bg-white\/80.backdrop-blur-sm.rounded-3xl {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-white\/80.backdrop-blur-sm.rounded-3xl:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(139, 106, 78, 0.08);
}

/* Стили для полей ввода */
input:focus, textarea:focus {
    border-color: #C17A5E;
    box-shadow: 0 0 0 3px rgba(193, 122, 94, 0.1);
}

/* Текст в placeholder */
::placeholder {
    color: #C4B5A5;
}

/* Пульсация кактуса медленная */
@keyframes slowPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.animate-pulse {
    animation: slowPulse 4s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
