* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --primary: #2563eb;
    --primary-light: #dbeafe;
    --accent: #10b981;
    --accent-light: #d1fae5;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 48px rgba(37,99,235,0.1);
}
html { scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}
section { scroll-margin-top: 72px; }
a, button, input, select, textarea { outline: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(37,99,235,0.45);
    outline-offset: 2px;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* NAV */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: var(--shadow); }
.nav-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo {
    font-size: 1.4rem; font-weight: 800; color: var(--primary);
    display: flex; align-items: center; gap: 8px; text-decoration: none;
    white-space: nowrap; overflow: hidden;
}
.logo i { font-size: 1.6rem; flex-shrink: 0; }
.logo .logo-text { overflow: hidden; text-overflow: ellipsis; }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
    text-decoration: none; color: var(--gray); font-size: 0.9rem;
    font-weight: 500; transition: color 0.2s; position: relative;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--primary);
    transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta {
    background: var(--primary); color: var(--white);
    padding: 10px 24px; border-radius: 8px; text-decoration: none;
    font-weight: 600; font-size: 0.9rem; transition: all 0.2s;
}
.nav-cta:hover { background: #1d4ed8; transform: translateY(-1px); }
/* CTA-ссылка внутри мобильного меню: видна только на телефоне */
.nav-cta-mobile { display: none; }
.burger { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--dark); }

/* HERO */
.hero {
    padding: 140px 0 100px;
    background: linear-gradient(135deg, var(--light) 0%, var(--primary-light) 50%, var(--accent-light) 100%);
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -20%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
}
.hero::after {
    content: ''; position: absolute; bottom: -30%; left: -10%;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, transparent 70%);
}

/* живой фон: слои за контентом, не блокируют клики */
.hero-bg {
    position: absolute; inset: 0; z-index: 1;
    pointer-events: none; overflow: hidden;
}
.hero-bg .blob {
    position: absolute; border-radius: 50%;
    will-change: transform;
}
.hero-bg .b1 {
    width: 520px; height: 520px; top: -12%; left: -8%;
    background: radial-gradient(circle, rgba(37,99,235,0.35) 0%, transparent 65%);
    animation: drift1 26s ease-in-out infinite alternate;
}
.hero-bg .b2 {
    width: 460px; height: 460px; bottom: -18%; right: -6%;
    background: radial-gradient(circle, rgba(16,185,129,0.3) 0%, transparent 65%);
    animation: drift2 32s ease-in-out infinite alternate;
}
.hero-bg .b3 {
    width: 380px; height: 380px; top: 22%; right: 22%;
    background: radial-gradient(circle, rgba(124,58,237,0.16) 0%, transparent 65%);
    animation: drift3 22s ease-in-out infinite alternate;
}

/* сетка «код-редактора»: данные текут */
.hero-bg .hero-grid {
    position: absolute; inset: 0;
    background-image:
        repeating-linear-gradient(0deg, rgba(37,99,235,0.07) 0 1px, transparent 1px 56px),
        repeating-linear-gradient(90deg, rgba(37,99,235,0.07) 0 1px, transparent 1px 56px);
    animation: gridMove 16s linear infinite;
}
.hero-bg .hero-grid::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(37,99,235,0.03) 50%, transparent 60%);
    background-size: 300% 300%;
    animation: gridSheen 11s ease-in-out infinite;
}

/* частицы: знания/данные в потоке */
.hero-bg .particle {
    position: absolute; width: 5px; height: 5px; border-radius: 50%;
    background: var(--primary); opacity: 0;
    top: var(--y); left: var(--x);
    animation: floatUp 18s linear infinite;
    animation-delay: var(--d, 0s);
}
.hero-bg .particle:nth-child(3n) { background: var(--accent); }
.hero-bg .particle:nth-child(3n+1) { background: var(--primary); }
.hero-bg .particle:nth-child(3n+2) { background: #7c3aed; }

/* скан-линия: автоматизация/сканер */
.hero-bg .scanline {
    position: absolute; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(37,99,235,0.28), transparent);
    animation: scan 8s ease-in-out infinite;
}

@keyframes drift1 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(60px, 40px, 0) scale(1.12); }
    100% { transform: translate3d(120px, -30px, 0) scale(0.95); }
}
@keyframes drift2 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    50% { transform: translate3d(-70px, -50px, 0) scale(1.15); }
    100% { transform: translate3d(-30px, 40px, 0) scale(0.9); }
}
@keyframes drift3 {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-60px, 70px, 0) scale(1.2); }
}
@keyframes gridMove {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 56px, 56px 0; }
}
@keyframes gridSheen {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
}
@keyframes floatUp {
    0% { opacity: 0; transform: translate3d(0, 40px, 0); }
    15% { opacity: 0.7; }
    50% { opacity: 0.4; transform: translate3d(14px, -60px, 0); }
    85% { opacity: 0.6; }
    100% { opacity: 0; transform: translate3d(0, -140px, 0); }
}
@keyframes scan {
    0% { top: 8%; opacity: 0; }
    12% { opacity: 0.8; }
    88% { opacity: 0.6; }
    100% { top: 92%; opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg .blob, .hero-bg .hero-grid, .hero-bg .hero-grid::after,
    .hero-bg .particle, .hero-bg .scanline { animation: none !important; }
    .hero-bg .particle { opacity: 0.35; }
    .stat-item::before, .stat-item::after { animation: none !important; }
}
.hero-content { position: relative; z-index: 2; max-width: 720px; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--white); padding: 6px 16px; border-radius: 100px;
    font-size: 0.85rem; color: var(--primary); font-weight: 600;
    margin-bottom: 24px; box-shadow: var(--shadow);
}
.hero-badge i { color: var(--accent); }
.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800;
    line-height: 1.15; margin-bottom: 20px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.15rem; color: var(--gray); margin-bottom: 36px;
    max-width: 560px;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
    background: var(--primary); color: var(--white);
    padding: 14px 32px; border-radius: 10px; text-decoration: none;
    font-weight: 600; font-size: 1rem; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
}
.btn-primary:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline {
    background: var(--white); color: var(--primary);
    padding: 14px 32px; border-radius: 10px; text-decoration: none;
    font-weight: 600; font-size: 1rem; transition: all 0.2s;
    border: 2px solid var(--primary); display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { background: var(--primary-light); transform: translateY(-2px); }

.hero-stats {
    display: flex; gap: 20px; flex-wrap: wrap; margin-top: 48px;
}
.stat-item {
    position: relative; overflow: hidden;
    padding: 20px 32px; min-width: 180px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0.28));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 8px 32px rgba(37,99,235,0.10), inset 0 1px 0 rgba(255,255,255,0.85);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
/* градиентная рамка-перелив (синий → зелёный) */
.stat-item::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    padding: 1px; pointer-events: none;
    background: linear-gradient(135deg, rgba(37,99,235,0.5), rgba(16,185,129,0.4), rgba(37,99,235,0.5));
    background-size: 220% 220%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    animation: borderFlow 9s ease-in-out infinite;
}
/* сдержанный блик-перелив по стеклу */
.stat-item::after {
    content: ''; position: absolute; top: -20%; bottom: -20%; left: -70%;
    width: 45%; pointer-events: none;
    background: linear-gradient(105deg, transparent, rgba(255,255,255,0.5), transparent);
    transform: skewX(-20deg);
    animation: sheen 8s ease-in-out infinite;
}
.stat-item:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(37,99,235,0.16), inset 0 1px 0 rgba(255,255,255,0.85); }
.stat-item h3 { font-size: 1.6rem; font-weight: 800; color: var(--primary); }
.stat-item p { font-size: 0.85rem; color: var(--gray); margin-top: 2px; }
@keyframes borderFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@keyframes sheen {
    0%, 55% { left: -70%; }
    80%, 100% { left: 135%; }
}

/* SECTIONS */
section { padding: 100px 0; }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header .tag {
    display: inline-block; background: var(--primary-light);
    color: var(--primary); padding: 4px 14px; border-radius: 100px;
    font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; margin-bottom: 16px;
}
.section-header h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem); font-weight: 800;
    margin-bottom: 16px;
}
.section-header p { color: var(--gray); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

/* PRODUCTS */
.products { background: var(--light); }
.products-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
}
.product-card {
    background: var(--white); border-radius: 16px; padding: 36px;
    border: 1px solid var(--border); transition: all 0.3s;
    position: relative; overflow: hidden;
}
.product-card:hover {
    transform: translateY(-4px); box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.product-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px; background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0; transition: opacity 0.3s;
}
.product-card:hover::before { opacity: 1; }
.product-icon {
    width: 56px; height: 56px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 20px;
}
.product-icon.blue { background: var(--primary-light); color: var(--primary); }
.product-icon.green { background: var(--accent-light); color: var(--accent); }
.product-icon.purple { background: #ede9fe; color: #7c3aed; }
.product-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.product-card p { color: var(--gray); font-size: 0.95rem; margin-bottom: 20px; }
.product-features { list-style: none; }
.product-features li {
    padding: 6px 0; font-size: 0.9rem; color: var(--dark);
    display: flex; align-items: center; gap: 8px;
}
.product-features li i { color: var(--accent); font-size: 1rem; }
.product-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--primary); font-weight: 600; font-size: 0.9rem;
    text-decoration: none; margin-top: 20px; transition: gap 0.2s;
}
.product-link:hover { gap: 10px; }

/* PROJECTS */
.projects-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.project-card {
    background: var(--white); border: 1px solid var(--border);
    border-radius: 12px; padding: 28px; transition: all 0.3s;
    text-decoration: none; color: inherit; display: block;
}
.project-card:hover {
    border-color: var(--primary); box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}
.project-card .project-type {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; color: var(--accent); margin-bottom: 12px;
}
.project-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.project-card p { color: var(--gray); font-size: 0.9rem; margin-bottom: 16px; }
.project-card .tech-stack { display: flex; gap: 8px; flex-wrap: wrap; }
.project-card .tech-tag {
    background: var(--light); padding: 4px 10px; border-radius: 6px;
    font-size: 0.75rem; color: var(--gray); font-weight: 500;
}

/* FORM */
.form-section { background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-light) 100%); }
.form-wrapper {
    max-width: 680px; margin: 0 auto;
    background: var(--white); border-radius: 20px;
    padding: 48px; box-shadow: var(--shadow-lg);
}
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.form-group { display: flex; flex-direction: column; min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
    font-size: 0.85rem; font-weight: 600; color: var(--dark);
    margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea {
    width: 100%; max-width: 100%;
    padding: 12px 16px; border: 1.5px solid var(--border);
    border-radius: 10px; font-size: 0.95rem; transition: border-color 0.2s;
    font-family: inherit; outline: none; background: var(--light);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary); background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-group a { color: var(--primary); }
.form-group input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
.form-submit {
    margin-top: 24px; width: 100%;
    background: var(--primary); color: var(--white);
    padding: 16px; border: none; border-radius: 10px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: all 0.2s;
}
.form-submit:hover { background: #1d4ed8; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.form-success {
    display: none; text-align: center; padding: 40px;
}
.form-success i { font-size: 3rem; color: var(--accent); margin-bottom: 16px; }
.form-success h3 { font-size: 1.4rem; margin-bottom: 8px; }
.form-success p { color: var(--gray); }
.form-error {
    display: none; text-align: center; padding: 16px;
    background: #fef2f2; color: #b91c1c; border-radius: 10px;
    margin-bottom: 16px; font-size: 0.9rem;
}

/* TEAM */
.team { background: var(--light); }
.team-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 32px;
}
.team-card {
    background: var(--white); border-radius: 16px; padding: 32px;
    text-align: center; border: 1px solid var(--border); transition: all 0.3s;
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.team-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px; font-size: 1.2rem; color: var(--white); font-weight: 700;
}
.team-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.team-card .role { color: var(--primary); font-size: 0.85rem; font-weight: 600; margin-bottom: 12px; }
.team-card .contacts { display: flex; flex-direction: column; gap: 6px; }
.team-card .contacts a {
    color: var(--gray); text-decoration: none; font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    transition: color 0.2s;
}
.team-card .contacts a:hover { color: var(--primary); }

/* TEXT BLOCK */
.text-section .section-header p { max-width: 720px; }
.text-content { max-width: 800px; margin: 0 auto; color: var(--gray); font-size: 1.05rem; overflow-wrap: anywhere; }
.text-content h1, .text-content h2, .text-content h3 { color: var(--dark); margin: 20px 0 10px; }
.text-content p { margin-bottom: 16px; }
.text-content ul, .text-content ol { margin: 0 0 16px 24px; }
.text-content a { color: var(--primary); }
.text-content img { max-width: 100%; border-radius: 12px; }

/* FOOTER */
footer {
    background: var(--dark); color: rgba(255,255,255,0.7);
    padding: 48px 0 24px;
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr;
    gap: 48px; margin-bottom: 40px;
}
.footer-brand .logo { color: var(--white); margin-bottom: 12px; }
.footer-brand p { font-size: 0.9rem; max-width: 320px; }
.footer-col h5 { color: var(--white); font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; }
.footer-col a {
    display: block; color: rgba(255,255,255,0.6); text-decoration: none;
    font-size: 0.85rem; padding: 4px 0; transition: color 0.2s;
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px; text-align: center; font-size: 0.8rem;
}
.footer-bottom a { word-break: break-word; }

/* ANIMATIONS */
.fade-in { opacity: 0; transform: translateY(30px); transition: all 0.6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .burger { display: block; }
    .nav-cta { display: none; }
    .nav-links.open {
        display: flex; flex-direction: column;
        position: absolute; top: 64px; left: 0; right: 0;
        background: var(--white); padding: 24px; gap: 8px;
        border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
        animation: menuDrop 0.25s ease;
    }
    .nav-links.open a { padding: 12px 0; font-size: 1rem; }
    .nav-links.open .nav-cta-mobile {
        display: flex !important;
        justify-content: center; margin-top: 8px; padding: 12px 24px;
        background: var(--primary); color: var(--white);
        border-radius: 8px; text-decoration: none;
        font-weight: 600; font-size: 0.95rem;
    }
    .hero { padding: 120px 0 60px; }
    /* тяжёлые анимации фона не нужны на мобильных: батарея и FPS */
    .hero-bg .particle, .hero-bg .scanline { display: none; }
    .hero-bg .hero-grid, .hero-bg .hero-grid::after { animation: none; }
    .hero-bg .blob { animation: none; }
    .hero-stats { flex-direction: column; gap: 14px; }
    .stat-item { padding: 16px 24px; min-width: 0; width: 100%; }
    .hero-buttons .btn-primary, .hero-buttons .btn-outline {
        width: 100%; justify-content: center;
    }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .form-wrapper { padding: 28px; }
    /* 16px — чтобы iOS не зумил страницу при фокусе на поле */
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .products-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    section { padding: 64px 0; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 104px 0 48px; }
    .hero h1 { font-size: 2rem; }
    .hero p { font-size: 1rem; }
    .form-wrapper { padding: 20px; }
    .form-submit { padding: 14px; }
}
@keyframes menuDrop {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Отзыв согласия (модальное окно) и кнопка в подвале ---- */
.footer-link-button {
    background: none; border: 0; padding: 0; margin: 0 0 0 4px; font: inherit; color: inherit;
    text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
    transition: color 0.15s ease;
}
.footer-link-button:hover { color: var(--primary); }
.footer-link-button:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

body.wd-lock { overflow: hidden; }
.wd-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; }
.wd-modal[hidden], .wd-modal [hidden] { display: none !important; }
.wd-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); animation: wdFade 0.2s ease; }
.wd-dialog {
    position: relative; width: min(460px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
    background: var(--white); border-radius: 20px;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28), 0 0 0 1px rgba(15, 23, 42, 0.04);
    animation: wdRise 0.22s ease;
}
.wd-dialog:focus { outline: none; }

/* шапка */
.wd-head {
    display: flex; align-items: center; gap: 14px; padding: 20px 20px 18px 22px;
    border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white); z-index: 1; border-radius: 20px 20px 0 0;
}
.wd-badge {
    flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-light), #eef4ff); color: var(--primary); font-size: 1.3rem;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}
.wd-title { flex: 1; min-width: 0; }
.wd-kicker { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--primary); line-height: 1.2; }
.wd-head h2 { font-size: 1.2rem; line-height: 1.25; margin-top: 2px; }
.wd-sub { font-size: 0.85rem; color: var(--gray); line-height: 1.3; }
.wd-close {
    flex: none; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--light);
    color: var(--gray); font-size: 1.15rem; cursor: pointer; display: grid; place-items: center;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.wd-close:hover { background: #e2e8f0; color: var(--dark); }
.wd-close:active { transform: scale(0.92); }

.wd-body { padding: 20px 22px 22px; }
.wd-hp { position: absolute; left: -9999px; top: -9999px; }

/* выбор роли: сегментированный переключатель */
.wd-role { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.wd-role legend { font-size: 0.82rem; font-weight: 600; color: var(--dark); margin-bottom: 8px; padding: 0; }
.wd-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--light); border: 1px solid var(--border); border-radius: 14px; }
.wd-seg-opt { position: relative; cursor: pointer; display: block; }
.wd-seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.wd-seg-card {
    display: flex; align-items: center; gap: 10px; height: 100%; min-height: 60px; padding: 10px 12px;
    border-radius: 10px; color: var(--gray); transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}
.wd-seg-card > i { font-size: 1.25rem; flex: none; transition: color 0.18s ease; }
@media (max-width: 479px) {
    .wd-seg-card { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px; }
}
.wd-seg-text { display: flex; flex-direction: column; min-width: 0; }
.wd-seg-text b { font-size: 0.92rem; font-weight: 600; color: var(--dark); line-height: 1.25; }
.wd-seg-text small { font-size: 0.76rem; line-height: 1.3; color: var(--gray); }
.wd-seg-opt:hover .wd-seg-card { color: var(--dark); }
.wd-seg-opt:active .wd-seg-card { transform: scale(0.98); }
.wd-seg-opt input:checked + .wd-seg-card {
    background: var(--white); color: var(--primary);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(37, 99, 235, 0.12);
}
.wd-seg-opt input:checked + .wd-seg-card > i { color: var(--primary); }
.wd-seg-opt input:focus-visible + .wd-seg-card { outline: 2px solid var(--primary); outline-offset: 2px; }

/* документы представителя */
.wd-rep {
    margin-bottom: 18px; padding: 14px; border-radius: 14px;
    background: #f8fbff; border: 1px dashed #bfd3f7;
    animation: wdRise 0.18s ease;
}
.wd-rep.wd-invalid { border-color: #fca5a5; background: #fff7f7; }
.wd-rep-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.88rem; }
.wd-rep-title i { color: var(--primary); font-size: 1.1rem; }
.wd-hint { font-size: 0.8rem; color: var(--gray); margin: 4px 0 10px; line-height: 1.5; }
.wd-drop {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 12px; text-align: center;
    border: 1.5px dashed #94a3b8; border-radius: 12px; background: var(--white); cursor: pointer;
    font-size: 0.88rem; transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.wd-drop > i { font-size: 1.7rem; color: var(--primary); }
.wd-drop b { color: var(--primary); font-weight: 600; }
.wd-drop small { color: var(--gray); font-size: 0.74rem; }
.wd-drop:hover, .wd-drop.is-over { border-color: var(--primary); background: var(--primary-light); }
.wd-drop:active { transform: scale(0.99); }
.wd-drop:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
.wd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wd-files { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.wd-files li {
    display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px;
    background: var(--white); border: 1px solid var(--border); border-radius: 10px;
    font-size: 0.84rem; animation: wdRise 0.15s ease;
}
.wd-files li > i { color: var(--gray); flex: none; }
.wd-files .wd-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-files .wd-size { color: var(--gray); font-size: 0.76rem; flex: none; }
.wd-files button {
    flex: none; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent;
    color: var(--gray); font-size: 1rem; cursor: pointer; display: grid; place-items: center;
    transition: background 0.15s ease, color 0.15s ease;
}
.wd-files button:hover { background: #fef2f2; color: #dc2626; }
.wd-files button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }

/* поля */
.wd-grid { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 480px) { .wd-grid { grid-template-columns: 1fr 1fr; } }
.wd-field { display: flex; flex-direction: column; margin-bottom: 14px; }
.wd-field label { font-size: 0.84rem; font-weight: 600; margin-bottom: 6px; color: var(--dark); }
.wd-field input[type="text"], .wd-field input[type="email"], .wd-field input[type="tel"], .wd-field textarea, .wd-field select {
    width: 100%; font: inherit; font-size: 0.95rem; color: var(--dark); background: var(--white);
    padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.wd-field select {
    padding-right: 38px; cursor: pointer; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 13px center;
}
.wd-field input::placeholder, .wd-field textarea::placeholder { color: #94a3b8; }
.wd-field input:hover, .wd-field textarea:hover, .wd-field select:hover { border-color: #cbd5e1; }
.wd-field input:focus, .wd-field textarea:focus, .wd-field select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.wd-field textarea { resize: vertical; min-height: 60px; }
.wd-field.wd-invalid input, .wd-field.wd-invalid textarea, .wd-field.wd-invalid select { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.wd-err { font-size: 0.78rem; color: #dc2626; margin-top: 4px; }
.wd-err:empty { display: none; }
.wd-req { color: #dc2626; }
.wd-opt { font-weight: 400; color: var(--gray); font-size: 0.78rem; }

/* согласие: карточка-чекбокс */
.wd-agree {
    display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px;
    font-weight: 500; font-size: 0.88rem; line-height: 1.5; cursor: pointer;
    border: 1.5px solid var(--border); border-radius: 12px; background: var(--white);
    transition: border-color 0.15s ease, background 0.15s ease;
}
.wd-agree:hover { border-color: #cbd5e1; }
.wd-agree:has(input:checked) { border-color: var(--primary); background: #f5f9ff; }
.wd-agree input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--primary); }
.wd-field.wd-invalid .wd-agree { border-color: #dc2626; }

.wd-alert { padding: 12px 14px; border-radius: 12px; background: #fef2f2; color: #b91c1c; font-size: 0.88rem; margin-bottom: 14px; }
.wd-submit {
    width: 100%; height: 50px; margin-top: 6px; border: 0; border-radius: 12px;
    background: var(--primary); color: #fff; font: inherit; font-weight: 600; font-size: 0.96rem;
    display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.22);
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.wd-submit:hover:not(:disabled) { filter: brightness(0.95); box-shadow: 0 8px 22px rgba(37, 99, 235, 0.3); }
.wd-submit:active:not(:disabled) { transform: translateY(1px) scale(0.99); }
.wd-submit:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.wd-submit:focus-visible, .wd-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wd-foot {
    display: flex; gap: 8px; align-items: flex-start; justify-content: center; text-align: left;
    font-size: 0.78rem; color: var(--gray); margin-top: 14px; line-height: 1.5;
}
.wd-foot i { font-size: 0.95rem; color: var(--primary); flex: none; margin-top: 1px; }

/* успех */
.wd-success { text-align: center; padding: 30px 24px 26px; }
.wd-badge-ok { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; background: var(--accent-light); color: var(--accent); font-size: 2rem; animation: wdPop 0.35s ease; }
.wd-success h3 { font-size: 1.15rem; margin: 14px 0 6px; }
.wd-success p { color: var(--gray); font-size: 0.92rem; line-height: 1.55; margin-bottom: 20px; }
.wd-success .wd-submit { margin-top: 0; }

@keyframes wdFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes wdRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes wdPop { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
    .wd-backdrop, .wd-dialog, .wd-rep, .wd-files li, .wd-badge-ok, .ri-spin { animation: none; }
}

/* ---- Уведомление об cookie ---- */
.ck-banner[hidden] { display: none !important; }
.ck-banner {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 900;
    max-width: 640px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px;
    padding: 16px 18px; background: var(--white); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
    animation: ckRise 0.22s ease;
}
.ck-text { display: flex; gap: 12px; align-items: flex-start; flex: 1 1 260px; min-width: 0; }
.ck-icon {
    flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
    background: var(--primary-light); color: var(--primary); font-size: 1.1rem;
}
.ck-text p { font-size: 0.86rem; line-height: 1.5; color: var(--dark); }
.ck-text a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.ck-text a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.ck-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
@media (min-width: 560px) { .ck-actions { width: auto; flex: none; } }
.ck-btn {
    flex: 1 1 auto; height: 42px; padding: 0 16px; border-radius: 10px; font: inherit; font-size: 0.88rem; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, filter 0.15s ease;
}
.ck-btn:active { transform: scale(0.98); }
.ck-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ck-btn-primary { background: var(--primary); color: #fff; }
.ck-btn-primary:hover { filter: brightness(0.95); }
.ck-btn-ghost { background: var(--white); color: var(--dark); border-color: var(--border); }
.ck-btn-ghost:hover { background: var(--light); border-color: #cbd5e1; }
@keyframes ckRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ck-banner { animation: none; } }
