/* ====== М 207 Софт — главная. Оформление по образцу eesoft.ru ====== */

:root,
[data-theme="light"] {
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-secondary-color: #7b7d95;
    --section-hovered-bg: #f1f2f8;
    --section-divider: #eaeaea;
    --card-bg: #0a0a0a;
    --card-text: #ffffff;
}

[data-theme="dark"] {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-secondary-color: #aaaaaa;
    --section-hovered-bg: #161616;
    --section-divider: #2a2a2a;
    --card-bg: #141414;
    --card-text: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "VelaSans", "Inter", "Segoe UI", system-ui, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

.wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* фирменный градиент */
.gradient-text {
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(135deg, #5aaf2f, #2e9e34, #0c6b1a);
}

/* ====== Шапка ====== */
header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--section-divider);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.logo img {
    height: 44px;
    width: auto;
    border-radius: 8px;
}

/* в тёмной теме у эмблемы светлый фон — даём чистую подложку */
[data-theme="dark"] .logo img {
    background: #ffffff;
    padding: 2px;
}

nav.menu {
    display: flex;
    gap: 32px;
}

nav.menu a {
    font-size: 16px;
    font-weight: 400;
    position: relative;
    padding-bottom: 4px;
}

nav.menu a::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-image: linear-gradient(to right, #5aaf2f, #2e9e34, #0c6b1a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

nav.menu a:hover::before {
    transform: scaleX(1);
}

/* переключатель темы */
.theme-switch {
    width: 56px;
    height: 28px;
    border-radius: 15px;
    background: var(--text-color);
    border: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
}

.theme-switch::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-color);
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-switch::before {
    transform: translateX(28px);
}

/* ====== Баннер ====== */
#banner {
    padding: 96px 0 72px;
}

#banner h1 {
    font-size: clamp(34px, 5vw, 70px);
    font-weight: 700;
    line-height: 1.08;
    margin: 0 0 28px;
    max-width: 1050px;
}

#banner p {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 400;
    line-height: 1.3;
    color: var(--text-secondary-color);
    max-width: 760px;
    margin: 0;
}

/* ====== Секции ====== */
section {
    padding: 72px 0;
    border-top: 1px solid var(--section-divider);
}

.section-label {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px;
}

.section-title {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 48px;
}

/* ====== Продукты ====== */
.product {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
    padding: 40px 0;
    border-top: 1px solid var(--section-divider);
}

.product:first-of-type {
    border-top: none;
}

.product-text h3 {
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 500;
    line-height: 1.15;
    margin: 0 0 16px;
}

.product-text p {
    font-size: 17px;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text-secondary-color);
    margin: 0 0 20px;
}

.badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--section-divider);
    margin-bottom: 16px;
    color: var(--text-color);
}

.badge .dot {
    color: #07bc0c;
}

.more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding-bottom: 4px;
}

.more-link::after {
    content: "→";
    transition: transform 0.3s ease;
}

.more-link:hover::after {
    transform: translateX(6px);
}

.more-link::before {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-image: linear-gradient(to right, #5aaf2f, #2e9e34, #0c6b1a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.more-link:hover::before {
    transform: scaleX(1);
}

.reestr-link {
    display: block;
    font-size: 14px;
    color: var(--text-secondary-color);
    margin-top: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.product-media {
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    background: var(--section-hovered-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-media:hover img {
    transform: scale(1.04);
}

/* реальные скриншоты интерфейса — вписываем целиком, без обрезки */
.product-media.shot {
    background: var(--section-hovered-bg);
    border: 1px solid var(--section-divider);
    padding: 10px;
}

.product-media.shot img {
    object-fit: contain;
    border-radius: 6px;
}

/* плейсхолдер для продукта без картинки */
.media-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5aaf2f, #2e9e34, #0c6b1a);
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    padding: 24px;
    line-height: 1.2;
}

/* ====== Технологический стек ====== */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--section-divider);
    border: 1px solid var(--section-divider);
}

.stack-item {
    background: var(--bg-color);
    padding: 32px 28px;
    transition: background 0.3s ease;
}

.stack-item:hover {
    background: var(--section-hovered-bg);
}

.stack-item h4 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 12px;
}

.stack-item p {
    font-size: 15px;
    font-weight: 300;
    line-height: 1.45;
    color: var(--text-secondary-color);
    margin: 0;
}

/* ====== О нас ====== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
}

.about-grid p {
    font-size: 17px;
    line-height: 1.6;
    color: var(--text-secondary-color);
}

.requisites {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 15px;
    line-height: 1.9;
    color: var(--text-secondary-color);
}

.requisites b {
    color: var(--text-color);
    font-weight: 500;
}

.accredit {
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 100px;
    background: var(--section-hovered-bg);
    margin-bottom: 20px;
}

/* галерея свидетельств */
.svid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin-top: 32px;
}

.svid-gallery a {
    display: block;
    aspect-ratio: 3 / 4;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--section-divider);
}

.svid-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.svid-gallery a:hover img {
    transform: scale(1.06);
}

/* блок «Вид деятельности» */
.activity {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--section-divider);
}

.activity h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px;
}

.activity-note {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    margin: 24px 0 8px;
}

.activity-code {
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-secondary-color);
    margin: 0;
    text-align: justify;
}

/* ====== Контакты ====== */
#contacts .contact-line {
    display: block;
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 16px;
    transition: opacity 0.3s ease;
}

#contacts .mail {
    font-size: clamp(32px, 7vw, 96px);
}

#contacts .phone {
    font-size: clamp(28px, 6vw, 80px);
}

#contacts .contact-line:hover {
    opacity: 0.65;
}

/* ====== Футер ====== */
footer {
    border-top: 1px solid var(--section-divider);
    padding: 48px 0;
    font-size: 14px;
    color: var(--text-secondary-color);
    line-height: 1.6;
}

footer .footer-top {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 24px;
}

footer .logo {
    color: var(--text-color);
}

/* ====== Cookie-баннер ====== */
#cookie {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 760px;
    width: calc(100% - 48px);
    background: var(--card-bg);
    color: var(--card-text);
    border-radius: 14px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    z-index: 100;
}

#cookie p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

#cookie button {
    flex-shrink: 0;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    border: none;
    border-radius: 100px;
    padding: 12px 28px;
    cursor: pointer;
    background-image: linear-gradient(to right, #5aaf2f, #2e9e34, #0c6b1a);
}

#cookie.hidden {
    display: none;
}

/* ====== Адаптив ====== */
@media (max-width: 860px) {
    nav.menu {
        display: none;
    }
    .product {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .product-media {
        order: -1;
    }
    .about-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    #cookie {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}
