/* ============================================
   HearthTales - Очаг Сказаний
   Основные стили сайта
   ============================================ */

/* ============================================
   CSS ПЕРЕМЕННЫЕ - легко менять стили
   ============================================ */
:root {
    /* Цвета */
    --color-bg: #0d0d0f;
    --color-bg-deep: #070709;
    --color-text: #e8e4df;
    --color-text-muted: #8a8680;
    --color-accent: #c9a55c;
    --color-border: rgba(255, 255, 255, 0.3);
    --color-border-hover: rgba(255, 255, 255, 0.6);
    
    /* Шрифты - ЗАМЕНИТЬ ЗДЕСЬ для смены шрифта заголовка */
    --font-display: 'Marck Script', cursive;
    --font-body: 'Cormorant Garamond', Georgia, serif;
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* ============================================
   ЗВЁЗДНЫЙ ФОН С МЕРЦАНИЕМ
   ============================================ */
.stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    animation-delay: var(--delay);
}

@keyframes twinkle {
    0%, 100% { opacity: var(--base-opacity); transform: scale(1); }
    50% { opacity: var(--peak-opacity); transform: scale(1.2); }
}

/* ============================================
   ОСНОВНОЙ КОНТЕНТ
   ============================================ */
.main-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   ЗАГОЛОВОК (по центру, чуть выше середины)
   ============================================ */
.title-container {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 0 2rem;
    margin-top: 15vh;
    z-index: 2;
}

.main-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 400;
    color: var(--color-text);
    text-shadow: 
        0 2px 20px rgba(0, 0, 0, 0.8),
        0 0 40px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
    letter-spacing: 0.02em;
}

/* ============================================
   НАВИГАЦИОННЫЕ КНОПКИ
   ============================================ */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 4rem 2rem;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.nav-btn::before {
    content: '✦';
    font-size: 0.8em;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    border-color: var(--color-border-hover);
    background: rgba(255, 255, 255, 0.03);
    transform: translateY(-2px);
}

.nav-btn:hover::before {
    opacity: 1;
    transform: rotate(72deg);
}

/* ============================================
   ФУТЕР
   ============================================ */
.footer {
    margin-top: auto;
    padding: 3rem 2rem;
    text-align: center;
}

.motto {
    font-family: var(--font-body);
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    letter-spacing: 0.05em;
}

.motto::before,
.motto::after {
    content: '~';
    margin: 0 0.5rem;
    opacity: 0.5;
}

.contacts {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.contact-link {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-link:hover {
    color: var(--color-text);
}

.contact-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ============================================
   АДАПТИВ (МОБИЛЬНАЯ ВЕРСИЯ)
   ============================================ */
@media (max-width: 768px) {
    .title-container {
        padding: 0 1rem;
        margin-top: 12vh;
    }

    .nav-buttons {
        flex-direction: column;
        align-items: center;
        padding: 3rem 1rem;
        gap: 1rem;
    }

    .nav-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .contacts {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ============================================
   АНИМАЦИИ ПОЯВЛЕНИЯ
   ============================================ */
.fade-in {
    animation: fadeIn 1s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.4s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.6s; opacity: 0; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
