:root {
    --bg-main: #020617;
    --bg-card: radial-gradient(circle at top left, #111827, #020617);
    --border-subtle: rgba(148, 163, 184, 0.25);
    --border-strong: rgba(148, 163, 184, 0.45);
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --text-soft: #6b7280;
    --accent-red: #ef4444;
    --accent-red-soft: rgba(239, 68, 68, 0.12);
    --accent-indigo: #6366f1;
    --shadow-strong: 0 26px 70px rgba(15,23,42,0.8);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: radial-gradient(circle at top, #020617 0, #020617 60%, #020617 100%);
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
    scroll-behavior: smooth;
    font-size: 16px;
    line-height: 1.6;
}

a { color: inherit; }

.page { min-height: 100vh; }

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========== header ========== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: linear-gradient(to bottom, rgba(15,23,42,.96), rgba(15,23,42,.6));
    border-bottom: 1px solid var(--border-subtle);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 16px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: contain;
    background: #020617;
}

.nav-brand {
    display: flex;
    flex-direction: column;
}

.nav-brand span:first-child {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: 0.04em;
}

.nav-brand span:last-child {
    font-size: 12px;
    color: var(--text-soft);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: var(--text-muted);
    padding: 6px 0;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-indigo));
    transition: width .18s ease-out;
}

.nav-links a:hover::after { width: 100%; }

@media (max-width: 780px) {
    .nav {
        flex-wrap: wrap;
        align-items: flex-start;
    }
}

@media (max-width: 580px) {
    .nav {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========== hero ========== */

.hero {
    padding: 40px 0 26px;
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
    gap: 32px;
    align-items: center;
}

.hero-title {
    font-size: clamp(64px, 6vw, 84px);
    margin: 0 0 10px;
    font-family: 'Overlorder', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
    letter-spacing: .05em;
    position: relative;
}

.hero-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 80px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-red), var(--accent-indigo));
    box-shadow: 0 0 20px rgba(239,68,68,.6);
}

.hero-subtitle {
    margin-top: 22px;
    font-size: 16px;
    color: var(--text-muted);
    max-width: 580px;
}

.hero-badges {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-badge-pill {
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(15,23,42,.9);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-badge-pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--accent-red-soft);
}

.hero-cta-row {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    border: 1px solid rgba(248,250,252,.9);
    background: linear-gradient(135deg, var(--accent-red), var(--accent-indigo));
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(59,130,246,.5);
    transition: transform .15s ease-out, box-shadow .15s ease-out, opacity .15s ease-out;
    cursor: pointer;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(37,99,235,.75);
}

.btn-primary:disabled {
    opacity: .6;
    cursor: default;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
    transition: border-color .15s ease-out, background .15s ease-out, color .15s ease-out;
}

.btn-ghost:hover {
    border-color: var(--border-strong);
    background: rgba(15,23,42,.9);
    color: var(--text-main);
}

.hero-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 22px;
    border: 1px solid var(--border-subtle);
    padding: 20px 20px 18px;
    font-size: 14px;
    box-shadow: var(--shadow-strong);
    overflow: hidden;
    animation: heroCardIn .65s ease-out both;
}

.hero-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0 0, rgba(239,68,68,.12), transparent 55%),
        radial-gradient(circle at 100% 0, rgba(59,130,246,.12), transparent 55%);
    opacity: .8;
    pointer-events: none;
}

.hero-card > * { position: relative; }

.hero-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.hero-card p {
    margin: 0 0 12px;
    color: var(--text-muted);
}

.hero-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 10px;
}

.metric {
    display: flex;
    flex-direction: column;
    font-size: 13px;
}

.metric strong {
    font-size: 18px;
}

@keyframes heroCardIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ========== общие секции ========== */

section { padding: 36px 0 18px; }

.section-header { margin-bottom: 20px; }

.section-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px;
}

.section-title span { color: var(--accent-red); }

.section-lead {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 720px;
}

/* ========== услуги / прайс карточками ========== */

.services-card {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    padding: 18px 18px 20px;
    font-size: 14px;
    box-shadow: 0 22px 60px rgba(15,23,42,.9);
}

.service-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.service-chip {
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(55,65,81,.9);
    background: rgba(15,23,42,.96);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: background .15s ease-out, border-color .15s ease-out, color .15s ease-out, transform .1s ease-out;
}

.service-chip:hover {
    border-color: var(--border-strong);
    color: var(--text-main);
    transform: translateY(-1px);
}

.service-chip.active {
    background: radial-gradient(circle at top left, #ef4444, #6366f1);
    border-color: rgba(248,250,252,.95);
    color: #fff;
    box-shadow: 0 0 20px rgba(59,130,246,.6);
}

.services-summary {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px dashed rgba(55,65,81,.9);
}

.services-summary-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pricing-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(55,65,81,.9);
    background: rgba(15,23,42,.9);
    font-size: 12px;
    margin-right: 6px;
}

.services-summary-list {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.pricing-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 980px) {
    .pricing-cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .pricing-cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.pricing-card {
    position: relative;
    border-radius: 18px;
    padding: 13px 13px 12px;
    background: linear-gradient(135deg, rgba(15,23,42,0.98), rgba(15,23,42,0.96));
    border: 1px solid rgba(55,65,81,.9);
    overflow: hidden;
    transition: border-color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out;
}

.pricing-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0 0, rgba(239,68,68,.28), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(79,70,229,.28), transparent 65%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease-out;
}

.pricing-card > * { position: relative; }

.pricing-card.highlight {
    border-color: rgba(248,250,252,.9);
}

.pricing-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: 0 18px 40px rgba(15,23,42,.9);
}

.pricing-card:hover::before { opacity: 1; }

.pricing-card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.pricing-card-platform {
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 6px;
}

.pricing-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    margin-bottom: 6px;
}

.pricing-chip {
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(55,65,81,.9);
    background: rgba(15,23,42,.98);
    color: var(--text-muted);
}

.pricing-card-note {
    font-size: 12px;
    color: var(--text-soft);
}

.pricing-card-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.7);
    color: #bbf7d0;
}

/* ========== портфолио 3 колонки ========== */

.portfolio-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 980px) {
    .portfolio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .portfolio-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.portfolio-item {
    position: relative;
    background: var(--bg-card);
    border-radius: 18px;
    border: 1px solid var(--border-subtle);
    padding: 13px 15px 12px;
    font-size: 14px;
    overflow: hidden;
    transition: border-color .15s ease-out, box-shadow .15s ease-out, transform .15s ease-out;
}

.portfolio-item::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0 0, rgba(239,68,68,.16), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(59,130,246,.16), transparent 60%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease-out;
}

.portfolio-item > * { position: relative; }

.portfolio-item:hover {
    border-color: var(--border-strong);
    box-shadow: 0 18px 40px rgba(15,23,42,.85);
    transform: translateY(-2px);
}

.portfolio-item:hover::before { opacity: 1; }

.portfolio-header {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: baseline;
    margin-bottom: 6px;
}

.portfolio-title {
    font-size: 15px;
    font-weight: 600;
}

.portfolio-url {
    font-size: 12px;
    color: var(--text-soft);
}

.portfolio-desc {
    margin: 0 0 8px;
    color: var(--text-muted);
    font-size: 13px;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--text-soft);
    margin-bottom: 8px;
}

.portfolio-tag-pill {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(55,65,81,.9);
    background: rgba(15,23,42,.98);
}

.portfolio-actions {
    display: flex;
    justify-content: flex-end;
}

.portfolio-actions a {
    font-size: 12px;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,.8);
    background: rgba(15,23,42,.96);
}

.portfolio-actions a:hover {
    border-color: rgba(248,250,252,.95);
}

/* ========== о нас ========== */

.about-text {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 780px;
    white-space: pre-line;
}

/* ========== технологии ========== */

.stack-grid {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack-pill {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid var(--border-subtle);
    background: radial-gradient(circle at top, #020617, #020617 70%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stack-pill svg {
    width: 28px;
    height: 28px;
}

/* ========== контакты ========== */

.contacts-layout {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px;
}

.contacts-form {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    padding: 18px 18px 16px;
    font-size: 14px;
    overflow: hidden;
}

.contacts-form::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(239,68,68,.6), rgba(79,70,229,.6));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: .6;
    pointer-events: none;
}

.contacts-form > * { position: relative; }

.form-field { margin-bottom: 12px; }

.form-field label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: var(--text-soft);
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid rgba(31,41,55,.9);
    background: rgba(15,23,42,.96);
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
}

.form-field textarea {
    resize: vertical;
    min-height: 110px;
}

.form-actions {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-status {
    font-size: 13px;
    color: var(--text-soft);
}

.form-status.ok { color: #4ade80; }
.form-status.err { color: #f97373; }

.contacts-info {
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    padding: 18px 18px 16px;
    font-size: 14px;
    color: var(--text-muted);
}

.contacts-info h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.contacts-info p { margin: 0 0 8px; }

.contacts-info ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.contacts-info li { margin-bottom: 4px; }

.contacts-info a { text-decoration: none; }
.contacts-info a:hover { text-decoration: underline; }

@media (max-width: 860px) {
    .contacts-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ========== footer ========== */

.site-footer {
    margin-top: 40px;
    border-top: 1px solid rgba(148,163,184,.28);
    padding: 14px 0 18px;
    background: radial-gradient(circle at top, #020617, #020617 55%, #020617 100%);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 2fr) minmax(0, 2fr);
    gap: 18px;
    align-items: center;
    font-size: 13px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-left img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    object-fit: contain;
    background: #020617;
}

.footer-center {
    text-align: center;
}

.footer-center-title {
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 11px;
    letter-spacing: .17em;
    text-transform: uppercase;
}

.footer-center ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-center a {
    text-decoration: none;
    color: var(--text-muted);
}

.footer-center a:hover { text-decoration: underline; }

.footer-right {
    text-align: right;
    color: var(--text-muted);
}

.footer-right a { text-decoration: none; }
.footer-right a:hover { text-decoration: underline; }

@media (max-width: 800px) {
    .footer-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }
    .footer-center { text-align: left; }
    .footer-right { text-align: left; }
    .footer-center ul { justify-content: flex-start; }
}

/* ========== ДОБАВКИ: языки и полный стек ========== */

/* переключатель языка в шапке */
.nav-lang {
    display: flex;
    gap: 6px;
    font-size: 12px;
}

.nav-lang-item {
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    text-decoration: none;
}

.nav-lang-item--active {
    background: radial-gradient(circle at top left, #ef4444, #6366f1);
    border-color: rgba(248,250,252,.95);
    color: #fff;
}

/* секция стеков + список и текстовые таблетки */
.stack-section {
    margin-top: 26px;
}

.stack__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stack__list li {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stack-pill--text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: rgba(15,23,42,.96);
    color: var(--text-muted);
    font-size: 11px;
}

/* ========== PRODUCTS PAGE — GRID & CARDS ========== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.product-card {
    position: relative;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    padding: 20px 20px 18px;
    font-size: 14px;
    box-shadow: 0 22px 60px rgba(15,23,42,.9);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color .18s ease-out, box-shadow .18s ease-out, transform .18s ease-out;
}

.product-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at 0 0, rgba(239,68,68,.24), transparent 60%),
        radial-gradient(circle at 100% 100%, rgba(59,130,246,.24), transparent 65%);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease-out;
}

.product-card > * {
    position: relative;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 26px 70px rgba(15,23,42,.95);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-card__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-main);
}

.product-card__badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: radial-gradient(circle at top left, rgba(239,68,68,.9), rgba(99,102,241,.9));
    border: 1px solid rgba(248,250,252,.9);
    color: #f9fafb;
    white-space: nowrap;
}

.product-card__tagline {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}

.product-card__excerpt {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.product-card__actions {
    margin-top: auto;
    padding-top: 18px;
}

.product-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #bfdbfe;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(59,130,246,.7);
    background: rgba(15,23,42,.9);
    box-shadow: 0 0 0 rgba(59,130,246,0);
    transition: border-color .18s ease-out, background .18s ease-out, color .18s ease-out, box-shadow .18s ease-out, transform .12s ease-out;
}

.product-card__link::after {
    content: "↗";
    font-size: 11px;
    opacity: .8;
}

.product-card__link:hover {
    border-color: rgba(248,250,252,.95);
    background: radial-gradient(circle at top left, rgba(37,99,235,0.4), rgba(15,23,42,1));
    color: #e5f0ff;
    box-shadow: 0 0 18px rgba(37,99,235,0.6);
    transform: translateY(-1px);
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
    .product-card {
        padding: 18px 16px 16px;
    }
    .product-card__title {
        font-size: 17px;
    }
    .product-card__tagline,
    .product-card__excerpt {
        font-size: 13px;
    }
}
