/* ================================================================
   01 - Базовые стили и компоненты (перенесено из landing-09-03-01.css)
================================================================ */
/* ================================================================
   2. СБРОС СТИЛЕЙ
================================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    transition: background var(--transition), color var(--transition);
}

/* Изображения всегда поверх зернистости */
img {
    position: relative;
    z-index: 10;
}

/* Зернистость (grain) — шум поверх всего сайта */
body::before {
    content: '';
    position: fixed; /* fixed лучше чем absolute для полного покрытия */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    opacity: 0.7;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 400px 400px;
}

[data-theme="dark"] body::before {
    opacity: 0.2;
    mix-blend-mode: screen;
}

[data-theme="accessible"] body::before {
    display: none;
}

/* SVG иконки используют currentColor для адаптации к теме */
.icon {
    display: inline-block;
    vertical-align: middle;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* Все фигуры внутри SVG sprite (paths, rects, circles) тоже используют currentColor.
   Некоторые SVG символы могут содержать жёстко заданные цвета; это заставляет их следовать CSS color. */
.icon *,
.icon {
    fill: currentColor !important;
    stroke: currentColor !important;
    color: inherit;
}

/* Явные цвета иконок для каждой темы:
   - light (по умолчанию): иконки используют основной цвет текста (тёмные)
   - dark тема: иконки становятся белыми для контраста
   Специфичные контейнеры иконок (например .card__icon) переопределяют эти правила
   позже в CSS компонентов, чтобы оставаться белыми на цветных фонах. */
body:not([data-theme="dark"]) .icon {
    color: var(--text-primary);
}

[data-theme="dark"] .icon {
    color: #ffffff;
}

/* Изображения визуально отделены от фона, чтобы оставаться видимыми независимо от яркости.
   Добавляем тонкие borders/shadows настроенные для светлой/тёмной темы и применяем
   object-fit/position чтобы избежать обрезки контента. */
.gallery__slide img,
.gallery__item img,
.about__image img,
.about__feature-image img

/* Более сильное отделение в тёмной теме */
[data-theme="dark"] .gallery__slide img,
[data-theme="dark"] .gallery__item img,
[data-theme="dark"] .about__image img,
[data-theme="dark"] .about__feature-image img

/* Placeholder визуалы: иконка/текст контрастирует с темой */
.placeholder,
.placeholder-mini {
    color: var(--text-muted);
}

[data-theme="dark"] .placeholder,
[data-theme="dark"] .placeholder-mini {
    color: rgba(255,255,255,0.68);
}

/* Маленькие SVG placeholders внутри fallback изображений фич */
.placeholder-mini svg.icon,
.placeholder svg.icon {
    width: 48px;
    height: 48px;
    fill: currentColor !important;
    stroke: currentColor !important;
}

/* Если изображение очень светлое на светлом фоне, добавляем тонкую внутреннюю тень для читаемости */
.gallery__slide::after,
.gallery__item::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px transparent;
}

[data-theme="light"] .gallery__slide::after,
[data-theme="light"] .gallery__item::after {
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.02);
}

[data-theme="dark"] .gallery__slide::after,
[data-theme="dark"] .gallery__item::after {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.02);
}


/* ================================================================
   3. БАЗОВЫЕ ЭЛЕМЕНТЫ
================================================================ */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

address {
    font-style: normal;
}


/* ================================================================
   4. УТИЛИТЫ
================================================================ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
    position: relative;
}

/* Заголовок секции */
.section__header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section__header--left {
    text-align: left;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.section__tag {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.section__title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section__desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Placeholder для изображений */
.placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    text-align: center;
    padding: 2rem;
    border: 2px dashed var(--border-color);
}

.placeholder span {
    font-size: 3rem;
}

.placeholder p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ================================================================
   Остальные компоненты (кнопки, nav, hero, gallery и т.д.)
   находятся в оригинальном файле и будут добавлены по необходимости.
================================================================ */
