/**
 * Стили на основе принципов SOK (Sokolova)
 * Версия: 1.0 (Invisible Harmony)
 * 
 * Применяется для гармонизации интерфейса по золотому сечению и Фибоначчи.
 */

:root {
    /* Золотое сечение и Фибоначчи уже определены в index.html */
}

/* Гармоническая сетка (SOK-GOLD) */
.sok-grid-container {
    display: grid;
    grid-template-columns: var(--main-block-width) var(--sidebar-width);
    gap: var(--padding-base);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Типографика по Фибоначчи (SOK-FIBO) */
h1 { font-size: var(--font-huge) !important; line-height: 1.1; }
h2 { font-size: var(--font-large) !important; line-height: 1.2; }
h3 { font-size: var(--font-normal) !important; line-height: 1.3; }
p, div { font-size: var(--font-small) !important; line-height: 1.618; }
small { font-size: var(--font-tiny) !important; }

/* Ритмичные анимации (SOK-PI) */
.sok-animate-fade {
    animation: sokFadeIn calc(var(--golden-ratio-inv) * 1s) ease-in-out;
}

@keyframes sokFadeIn {
    from { opacity: 0; transform: translateY(var(--padding-minor)); }
    to { opacity: 1; transform: translateY(0); }
}

/* Пульсация гомеостаза (скрытая) */
.sok-homeostasis-pulse {
    animation: homeostasisPulse 3.14159s infinite ease-in-out;
}

@keyframes homeostasisPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.01); filter: brightness(1.02); }
}

/* Соты (эффективная компоновка карточек) */
.sok-honeycomb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(233px, 1fr)); /* 233 - число Фибоначчи */
    gap: var(--padding-major);
}

/* Зеркальность (подсветка активных элементов) */
.sok-mirror-active {
    transition: all 0.382s cubic-bezier(0.4, 0, 0.2, 1);
}

.sok-mirror-active:hover {
    box-shadow: 0 13px 34px rgba(46, 107, 255, 0.15); /* 13, 34 - Фибоначчи */
    transform: translateY(-3px); /* 3 - Фибоначчи */
}

/* ==================== СИСТЕМА СПРАВКИ ПО ДОЛГОМУ НАЖАТИЮ ==================== */

.long-press-hint {
    position: absolute;
    z-index: 10000;
    max-width: 400px;
    min-width: 280px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    padding: 20px;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial;
}

.long-press-hint.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.long-press-hint .hint-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.long-press-hint .hint-icon {
    font-size: 24px;
    line-height: 1;
}

.long-press-hint .hint-title {
    font-weight: 900;
    font-size: 16px;
    color: #111827;
    letter-spacing: -0.01em;
}

.long-press-hint .hint-content {
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.long-press-hint .hint-content p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.6;
}

.long-press-hint .hint-content p:last-child {
    margin-bottom: 0;
}

.long-press-hint .hint-footer {
    font-size: 12px;
    color: #6B7280;
    font-weight: 600;
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Индикатор долгого нажатия */
[data-hint-enabled="true"] {
    position: relative;
    cursor: help;
}

[data-hint-enabled="true"]:active::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid rgba(46, 107, 255, 0.3);
    border-radius: 8px;
    animation: hintPulse 0.5s ease;
}

@keyframes hintPulse {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.7;
        transform: scale(1);
    }
}

