/* ==========================================================
   БАЗОВЫЕ ЭФФЕКТЫ И УТИЛИТЫ
   ========================================================== */
.glass {
    background: rgba(255, 253, 247, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.text-gradient {
    background: linear-gradient(to right, #8A6E6C, #432F2E);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glow-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(138, 110, 108, 0.05) 0%, transparent 70%);
    z-index: -1;
}

.hidden-svg-filter {
    visibility: hidden;
    position: absolute;
    width: 0;
    height: 0;
}

/* ==========================================================
   АНИМАЦИИ (Fade, Скролл, Плавающие элементы)
   ========================================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-300 { transition-delay: 300ms; }
.delay-500 { transition-delay: 500ms; }

/* Анимация покачивания карточек */
@keyframes swayCard {
    0%, 100% { transform: rotate(0deg) translateY(0px); }
    33% { transform: rotate(1.5deg) translateY(-8px); }
    66% { transform: rotate(-1.5deg) translateY(4px); }
}

.sway-inner {
    animation: swayCard 5s ease-in-out infinite;
    animation-play-state: paused;
    will-change: transform;
}

.sway-inner.is-swaying {
    animation-play-state: running;
}

/* Плавающие плашки статистики */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

.animate-float-1 { animation: float 5s ease-in-out infinite; }
.animate-float-2 { animation: float 6s ease-in-out infinite; animation-delay: 1s; }
.animate-float-3 { animation: float 7s ease-in-out infinite; animation-delay: 2s; }

/* ==========================================================
   КНОПКА HEADER (Gooey Effect)
   ========================================================== */
.filter-goo {
    filter: url('#goo');
    width: 100%;
    height: 100%;
}

.bubble {
    position: absolute;
    background: #E1F3FF;
    border-radius: 50%;
    transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: float-bubble 4s ease-in-out infinite;
    z-index: 1;
}

.bubble-1 { width: 70%; height: 80%; top: 10%; right: 5%; border-radius: 60px; }
.bubble-2 { width: 55px; height: 55px; top: -15px; right: 15%; animation-delay: 1s; }
.bubble-3 { width: 65px; height: 65px; bottom: -10px; right: 25%; animation-delay: 2s; }
.bubble-4 { width: 50px; height: 50px; top: 20%; left: 10%; }

.group:hover .bubble-1 { transform: scale(1.05) translateX(10px); }
.group:hover .bubble-2 { transform: translate(25px, -25px) scale(1.3); }
.group:hover .bubble-3 { transform: translate(15px, 25px) scale(1.4); }
.group:hover .bubble-4 { transform: translate(-30px, -10px) scale(1.2); }

@keyframes float-bubble {
    0%, 100% { margin-top: 0px; }
    50% { margin-top: -5px; }
}

/* ==========================================================
   КОМПОНЕНТЫ И СЕКЦИИ
   ========================================================== */
/* SVG Каракуля */
#scribble-wrapper {
    filter: url(#scribble-filter);
    display: flex;
    justify-content: center;
    align-items: center;
}

.scribble-svg { width: 100%; height: 100%; }

.scribble-path {
    fill: none;
    stroke: #90A610;
    stroke-width: 4; 
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.9;
}

/* Скролл секции */
.hero-scroll-section { position: relative; width: 100%; height: 400vh; }
.meltdown-scroll-wrapper { height: 300vh; }

/* Кастомные скругления плашек Meltdown */
.shape-yellow-radius { border-radius: 24px 200px 24px 24px; }
.shape-green-radius  { border-radius: 24px 24px 200px 24px; }
.shape-pink-radius   { border-radius: 24px; }

/* Стартовые состояния для JS анимации Meltdown */
.meltdown-anim-shape {
    transform: translateY(50vh);
    opacity: 0;
    will-change: transform, opacity;
}
.meltdown-anim-text {
    transform: translateY(30px);
    opacity: 0;
    will-change: transform, opacity;
}

/* FAQ Аккордеон */
.faq-content {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-inner { overflow: hidden; }
.faq-item.is-open .faq-content { grid-template-rows: 1fr; }

/* ==========================================================
   АДАПТИВНОЕ ПОЗИЦИОНИРОВАНИЕ (Плавающие элементы)
   ========================================================== */
.pill-wrapper {
    position: absolute;
    z-index: 0;
}

/* Мобильная версия */
.pill-1 { top: -20px; right: 5%; transform: rotate(-12deg); }
.pill-2 { top: 40px; right: -5%; transform: rotate(-6deg); }
.pill-3 { top: 110px; right: 10%; transform: rotate(-3deg); }
.pill-4 { top: 180px; right: 0%; transform: rotate(-12deg); }

/* Планшеты (от 768px) */
@media (min-width: 768px) {
    .pill-1 { top: -200px; right: 0%; }
    .pill-2 { top: -100px; right: 0%; }
    .pill-3 { top: 0px; right: 10%; }
    .pill-4 { top: 80px; right: 25%; }
}

/* Десктопы (от 1024px) */
@media (min-width: 1024px) {
    .pill-1 { right: 20%; }
    .pill-2 { right: -4%; }
    .pill-3 { right: 18%; }
    .pill-4 { right: 30%; }
}

/* Адаптив Meltdown */
@media (max-width: 767px) {
    .meltdown-title-pos { top: 10%; left: 5%; }
    .meltdown-shapes-pos { 
        top: 25%; 
        transform: translateX(-50%) scale(0.85); 
    }
    .meltdown-monster-pos { display: none; }
}

@media (min-width: 768px) {
    .meltdown-title-pos { top: 22%; }
    .meltdown-shapes-pos { top: 15%; }
    .meltdown-monster-pos { right: 6%; top: 15%; display: block; }
}