/* LIHO — анимации и микро-взаимодействия */
/* Цвета как в primer.html */
:root {
    --accent: #4085A1;
    --accent-hover: #367a8f;
    --accent-purple: #764ba2;
    --accent-glow: rgba(64, 133, 161, 0.15);
}

/* Hero: появление при загрузке */
.hero-reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: heroReveal 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}
.hero-reveal-delay-1 { animation-delay: 0.1s; }
.hero-reveal-delay-2 { animation-delay: 0.2s; }
.hero-reveal-delay-3 { animation-delay: 0.3s; }
.hero-reveal-delay-4 { animation-delay: 0.4s; }
@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pillar card backgrounds — анимированные фоны */
.pillar-bg {
    position: relative;
}

/* ═══ VISUAL: бежево-кремовый оттенок ═══ */
.pillar-bg-visual {
    background: linear-gradient(135deg, #F5F0E1 0%, #ebe4d0 35%, #e2d9c0 70%, #F5F0E1 100%);
    background-size: 400% 400%;
    animation: pillarGradient 15s ease infinite;
}
.pillar-shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: visualShapeMorph 12s ease-in-out infinite;
}
.pillar-shape-1 {
    width: 80px;
    height: 80px;
    background: rgba(212, 200, 170, 0.55);
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}
.pillar-shape-2 {
    width: 60px;
    height: 60px;
    background: rgba(200, 190, 160, 0.5);
    top: 50%;
    right: 15%;
    animation-delay: -3s;
    border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
}
.pillar-shape-3 {
    width: 50px;
    height: 50px;
    background: rgba(230, 220, 195, 0.65);
    bottom: 25%;
    left: 25%;
    animation-delay: -6s;
    border-radius: 50% 50% 30% 70% / 30% 70% 50% 50%;
}
.pillar-shape-4 {
    width: 40px;
    height: 40px;
    background: rgba(218, 208, 180, 0.5);
    top: 30%;
    right: 30%;
    animation-delay: -2s;
}
.pillar-shape-5 {
    width: 70px;
    height: 70px;
    background: rgba(205, 195, 170, 0.45);
    bottom: 15%;
    right: 10%;
    animation-delay: -8s;
    border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%;
}
@keyframes visualShapeMorph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: translate(0, 0) rotate(0deg); }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; transform: translate(8px, -12px) rotate(90deg); }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; transform: translate(-5px, 8px) rotate(180deg); }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; transform: translate(12px, 5px) rotate(270deg); }
}

/* ═══ AUDIO: эквалайзер — цвета из фона Наши Кейсы ═══ */
.pillar-bg-audio {
    background: linear-gradient(180deg, #e8f4f8 0%, #ADD8E6 30%, #9bc9dc 60%, #e0f0f5 100%);
    background-size: 100% 400%;
    animation: pillarGradient 12s ease infinite;
}
.audio-bars {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 60px;
}
.audio-bar {
    width: 8px;
    height: 20px;
    background: linear-gradient(to top, rgba(173, 216, 230, 0.75), rgba(155, 201, 220, 0.55));
    border-radius: 0;
    transform-origin: bottom;
    animation: audioBarPulse 1.2s ease-in-out infinite;
}
.audio-bar:nth-child(1) { animation-delay: 0s; }
.audio-bar:nth-child(2) { animation-delay: 0.15s; }
.audio-bar:nth-child(3) { animation-delay: 0.3s; }
.audio-bar:nth-child(4) { animation-delay: 0.45s; }
.audio-bar:nth-child(5) { animation-delay: 0.6s; }
.audio-bar:nth-child(6) { animation-delay: 0.75s; }
.audio-bar:nth-child(7) { animation-delay: 0.9s; }
.audio-bar:nth-child(8) { animation-delay: 0.3s; }
.audio-bar:nth-child(9) { animation-delay: 0.15s; }
.audio-bars-enhanced .audio-bar { height: 28px; }
.pillar-card:hover .audio-bar { animation-duration: 0.8s; }
@keyframes audioBarPulse {
    0%, 100% { transform: scaleY(0.4); }
    25% { transform: scaleY(1.2); }
    50% { transform: scaleY(0.6); }
    75% { transform: scaleY(1.4); }
}

/* ═══ BRANDING / GAS: тёплый бежевый ═══ */
.pillar-bg-gas {
    background: linear-gradient(135deg, #F5F0E1 0%, #e8dfc8 50%, #ddd4b8 100%);
    background-size: 400% 400%;
    animation: pillarGradient 15s ease infinite;
}

/* ═══ TECH: мятный оттенок ═══ */
.pillar-bg-tech {
    background: linear-gradient(135deg, #e8f5e8 0%, #C1E1C1 40%, #a8d4a8 80%, #e5f2e5 100%);
    background-size: 400% 400%;
    animation: pillarGradient 18s ease infinite;
}
.tech-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(193, 225, 193, 0.35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(193, 225, 193, 0.35) 1px, transparent 1px);
    background-size: 24px 24px;
    animation: techGridPulse 4s ease-in-out infinite;
}
.tech-grid-animated { animation-duration: 3s; }
.pillar-card:hover .tech-dot { animation-duration: 4s; }
.pillar-card:hover .pillar-shape { animation-duration: 8s; }
.pillar-icon-float {
    animation: iconFloat 4s ease-in-out infinite;
}
.pillar-card:hover .pillar-icon-float {
    animation: iconFloat 2.5s ease-in-out infinite;
}
/* Steps-banner icon: лёгкая анимация иконок */
.steps-banner-icon .pillar-icon-float { animation: iconFloat 4s ease-in-out infinite; }
@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.tech-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(168, 212, 168, 0.7);
    border-radius: 0;
    animation: techDotFloat 6s ease-in-out infinite;
}
.tech-dot-1 { top: 20%; left: 20%; animation-delay: 0s; }
.tech-dot-2 { top: 40%; right: 25%; animation-delay: -1.2s; }
.tech-dot-3 { bottom: 35%; left: 35%; animation-delay: -2.4s; }
.tech-dot-4 { top: 60%; right: 15%; animation-delay: -3.6s; }
.tech-dot-5 { bottom: 20%; right: 35%; animation-delay: -4.8s; }
@keyframes techGridPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
@keyframes techDotFloat {
    0%, 100% { transform: translate(0, 0); opacity: 0.6; }
    33% { transform: translate(10px, -15px); opacity: 1; }
    66% { transform: translate(-8px, 10px); opacity: 0.8; }
}

@keyframes pillarGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Pillar cards: hover lift + детализация */
.pillar-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(64, 133, 161, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #4085A1;
}
.pillar-step-num {
    font-size: 11px;
    font-weight: 700;
    color: #4085A1;
    opacity: 0.9;
}
.pillar-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1), border-color 0.3s ease, box-shadow 0.4s ease;
}
.pillar-card:hover {
    transform: translateY(-4px);
}
.pillar-card.active {
    border-color: rgba(64, 133, 161, 0.5) !important;
}
.pillar-filter-btn.active {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

/* Case cards: staggered reveal (JS добавляет .revealed) */
.reveal-item {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}
.reveal-item.revealed {
    opacity: 1;
    transform: translateY(0);
}
.reveal-item.project-card:hover,
.reveal-item.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -16px rgba(0,0,0,0.12);
}
.case-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Play icon: появление при hover */
.card-play-icon {
    opacity: 0.9;
    transform: scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.project-card:hover .card-play-icon {
    opacity: 1;
    transform: scale(1.05);
}

/* Кнопка «Обсудить проект» — тёмный приглушённый градиент */
.btn-nav-cta {
    background: linear-gradient(135deg, #6b8e7a 0%, #5a7a8a 100%);
    color: #fff !important;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-nav-cta:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Кнопки: тёмный приглушённый градиент */
.btn-primary {
    background: linear-gradient(135deg, #6b8e7a 0%, #5a7a8a 100%) !important;
    color: #fff !important;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #5a7a68 0%, #4a6a7a 100%) !important;
    transform: translateY(-1px);
}
.btn-secondary {
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn-secondary:hover {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
    transform: translateY(-1px);
}

/* Nav links: accent underline */
.nav-link-hover {
    position: relative;
    transition: color 0.2s ease;
}
.nav-link-hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-purple) 100%);
    transition: width 0.3s ease;
}
.nav-link-hover:hover::after {
    width: 100%;
}

/* Scroll reveal: секции */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}
.scroll-reveal-fade {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.scroll-reveal-fade.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Нам доверяют (как в primer.html) */
.trust-section {
    background: #F8F9FA;
    border-bottom: 1px solid rgba(0, 0, 0, 0.00);
}
.trust-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.trust-title {
    color: #666;
    font-weight: 500;
    font-size: 1.1rem;
}
.trust-logos {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}
.trust-logos img {
    height: 40px;
    width: auto;
    max-width: 120px;
    opacity: 1;
    transition: all 0.3s ease;
    filter: grayscale(100%);
    object-fit: contain;
}
.trust-logos img:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Бегущая строка — цвета из фона Наши Кейсы */
.marquee {
    background: linear-gradient(135deg, #F5F0E1 0%, #ADD8E6 50%, #C1E1C1 100%);
    color: #333;
    padding: 15px 0;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    font-weight: 500;
    font-size: 1.1rem;
}
.marquee-dark {
    background: linear-gradient(90deg, rgba(13,13,13,0.95) 0%, rgba(26,26,26,0.95) 50%, rgba(13,13,13,0.95) 100%);
    color: rgba(255,255,255,0.8);
    border-top: 1px solid rgba(255,255,255,0.08);
}
.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
    padding-left: 100%;
    white-space: nowrap;
}
.marquee-content:hover {
    animation-play-state: paused;
}
.marquee-text {
    display: inline-block;
    margin-right: 100px;
    position: relative;
    white-space: nowrap;
}
.marquee-text::before {
    content: '✨';
    margin-right: 10px;
    animation: sparkle 2s ease-in-out infinite;
}
.marquee-text::after {
    content: '✨';
    margin-left: 10px;
    animation: sparkle 2s ease-in-out infinite 1s;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 768px) {
    .trust-wrap { flex-direction: column; text-align: center; }
    .trust-logos { justify-content: center; gap: 1rem; }
    .trust-logos img { height: 35px; max-width: 100px; }
    .marquee { font-size: 0.9rem; padding: 10px 0; }
    .marquee-content { animation-duration: 20s; }
    .marquee-text { margin-right: 60px; }
}

/* Footer icons */
.footer-icon {
    transition: color 0.2s ease, transform 0.2s ease;
}
.footer-icon:hover {
    color: var(--accent) !important;
    transform: scale(1.1);
}
