/* =============================================
   BASE STYLES — Чародейки
   ============================================= */

/* === Reset === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: var(--fs-body);
    color: var(--color-white);
    background-color: #2a1245;
    background-image:
        /* 1. Шумовая текстура ткани (SVG Data URI) */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E"),
        /* 2. Линейный градиент-затенение (создает общий объем) */
        linear-gradient(to bottom, rgba(20, 5, 40, 0) 0%, rgba(20, 5, 40, 0.4) 100%),
        /* 3. Светлый лиловый блик (верх справа) */
        radial-gradient(ellipse at 80% 20%, rgba(200, 80, 192, 0.3) 0%, transparent 55%),
        /* 4. Светло-розовый блик (низ слева) */
        radial-gradient(ellipse at 15% 75%, rgba(232, 160, 192, 0.25) 0%, transparent 55%),
        /* 5. Пурпурное "засветление" (наискосок) */
        linear-gradient(135deg, rgba(139, 42, 110, 0.2) 0%, transparent 40%, rgba(107, 29, 94, 0.3) 100%),
        /* 6. Глубокие складки-тени (чернильно-сливовый) */
        radial-gradient(ellipse at 50% 50%, rgba(13, 5, 32, 0.5) 0%, transparent 70%);
    background-size: 150px 150px, 100vw 100%, 100vw 100%, 100vw 100%, 100vw 100%, 100vw 100%;
    background-position: center top, center top, left top, right top, center top, center top;
    background-repeat: repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat;
    background-attachment: fixed;
    line-height: 1.7;
    overflow-x: hidden;
}

/* === Typography === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-white);
}

h1 {
    font-size: var(--fs-h1);
}

h2 {
    font-size: var(--fs-h2);
}

h3 {
    font-size: var(--fs-h3);
}

p {
    margin-bottom: var(--space-sm);
    color: var(--color-lavender);
    text-align: justify;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

.card__list li {
    text-align: justify;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
}

a {
    color: var(--color-pink-soft);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-pink-glow);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
}

/* === Container === */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: var(--container-wide);
}

/* === Section === */
.section {
    padding: var(--space-section) 0;
    position: relative;
}

.section__title {
    font-family: var(--font-heading);
    font-size: var(--fs-h2);
    text-align: center;
    margin-bottom: var(--space-xl);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.section__title::before,
.section__title::after {
    content: '—';
    color: var(--color-gold);
    font-size: 1.2em;
}

/* === Decorative dividers === */
.divider {
    width: 100%;
    height: 2px;
    background: var(--gradient-gold-border);
    margin: var(--space-lg) 0;
    opacity: 0.5;
}

.divider--ornamental {
    height: 40px;
    background: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.divider--ornamental::before,
.divider--ornamental::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
}

.divider--ornamental span {
    color: var(--color-gold);
    font-size: 1.5rem;
}

/* === Scroll animations === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Screen reader only === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Selection === */
::selection {
    background: var(--color-pink-glow);
    color: var(--color-white);
}