/**
 * ==========================================================================
 * FORTUNA HOLDING - Base Styles
 * ==========================================================================
 * 
 * Базовые стили: сброс, типографика, общие элементы.
 * V2: Единый фон, уменьшенные отступы
 * 
 * @version 2.0.0
 */

/* ========================================
 * CSS RESET - Сброс стилей
 * ======================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background: var(--color-bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
    /* Единый фон для всего сайта */
    background-attachment: fixed;
}

/* ========================================
 * TYPOGRAPHY - Типографика
 * ======================================== */
.error {
    color: red !important;
    border-color: red !important;
    margin-top: 14px !important;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl));
    font-weight: var(--font-black);
}

h2 {
    font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl));
}

h3 {
    font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
}

h4 {
    font-size: var(--text-xl);
}

h5 {
    font-size: var(--text-lg);
}

h6 {
    font-size: var(--text-base);
}

p {
    margin-bottom: var(--space-3);
    color: var(--color-text-secondary);
}

/* Text accent color */
.text-accent {
    color: var(--color-primary);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
 * LINKS - Ссылки
 * ======================================== */

a {
    color: var(--color-text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

/* ========================================
 * LISTS - Списки
 * ======================================== */

ul, ol {
    list-style: none;
}

/* ========================================
 * IMAGES - Изображения
 * ======================================== */

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
 * BUTTONS - Кнопки
 * ======================================== */

button {
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ========================================
 * FORMS - Формы
 * ======================================== */

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    outline: none;
}

/* ========================================
 * CONTAINER - Контейнер
 * ======================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ========================================
 * SECTION - Секция (уменьшенные отступы)
 * ======================================== */

.section {
    position: relative;
    padding: var(--space-12) 0;  /* Уменьшено с space-24 */
}

.section--tight {
    padding: var(--space-8) 0;
}

.section--spacious {
    padding: var(--space-16) 0;
}

.section__header {
    text-align: center;
    margin-bottom: var(--space-10);
}

.section__title {
    margin-bottom: var(--space-3);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
 * GRID - Сетка
 * ======================================== */

.grid {
    display: grid;
    gap: var(--space-5);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ========================================
 * FLEX - Flexbox утилиты
 * ======================================== */

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-col {
    flex-direction: column;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ========================================
 * UTILITY CLASSES - Утилитарные классы
 * ======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.hidden {
    display: none !important;
}

/* Text alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Font weight */
.font-light { font-weight: var(--font-light); }
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

/* ========================================
 * SCROLLBAR - Полоса прокрутки
 * ======================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* ========================================
 * SELECTION - Выделение текста
 * ======================================== */

::selection {
    background: var(--color-primary);
    color: var(--color-bg-primary);
}

/* ========================================
 * GLOW EFFECTS - Свечение
 * ======================================== */

.glow {
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
}

.glow-text {
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.5);
}
