/* ============================================
   200660.ru — Main Stylesheet
   Author: 200660.ru
   Version: 1.0
   ============================================ */

/* ---------- FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- RESET & BASE ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-bg: rgba(37, 99, 235, 0.08);
    --accent: #06b6d4;
    --accent-dark: #0891b2;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --gray-lighter: #cbd5e1;
    --light: #f1f5f9;
    --white: #ffffff;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-card: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(6, 182, 212, 0.05));

    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Sizing */
    --container: 1200px;
    --header-h: 72px;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    font-family: var(--font-main);
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul { list-style: none; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-family: var(--font-main);
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn--primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.35);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.45);
}

.btn--outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn--outline:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

.btn--full {
    width: 100%;
}

/* ---------- SECTION ---------- */
.section {
    padding: 100px 0;
}

.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section__tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.section__title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 16px;
}

.section__desc {
    font-size: 17px;
    color: var(--gray);
    line-height: 1.7;
}

/* ============================
   HEADER
   ============================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 1000;
    transition: var(--transition);
}

.header--scrolled {
    background: rgba(15, 23, 42, 0.97);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 20px;
    color: var(--white);
}

.logo__icon {
    font-size: 24px;
    color: var(--primary-light);
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav__link {
    padding: 8px 18px;
    border-radius: var(--radius-full);
    color: var(--gray-light);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.nav__link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 100;
}

.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================
   HERO
   ============================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gradient-hero);
    overflow: hidden;
    padding-top: var(--header-h);
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 80px 24px;
    position: relative;
    z-index: 2;
}

.hero__content {
    max-width: 600px;
}

.hero__title {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 20px;
}

.hero__accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: 18px;
    color: var(--gray-light);
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.hero__stats {
    display: flex;
    gap: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat__num {
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
}

.stat__label {
    font-size: 13px;
    color: var(--gray);
    margin-top: 4px;
}

.hero__visual {
    display: flex;
    justify-content: center;
}

.hero__code-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    font-family: var(--font-mono);
    font-size: 15px;
    line-height: 2;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    min-width: 340px;
}

.code-line { color: var(--gray-light); }
.code-kw { color: #c084fc; }
.code-fn { color: #60a5fa; }
.code-str { color: #34d399; }
.code-comment { color: #6b7280; font-style: italic; }

.hero__bg-shapes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.shape--1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape--2 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    bottom: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.shape--3 {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* ============================
   ABOUT
   ============================ */
.about {
    background: var(--white);
}

.about__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.about__card {
    background: var(--light);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: var(--transition);
    border: 1px solid transparent;
}

.about__card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.1);
}

.about__icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.about__card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.about__card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
}

/* ============================
   PROJECTS
   ============================ */
.projects {
    background: var(--light);
}

.projects__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.project-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-lighter);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.project-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.project-card__icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.project-card__icon--portal { background: rgba(37, 99, 235, 0.1); color: var(--primary); }
.project-card__icon--autoparts { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.project-card__icon--scan { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.project-card__icon--pegas { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }

.project-card__title {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}

.project-card__desc {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 18px;
}

.project-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
}

.project-card__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 20px;
}

.project-card__features span {
    font-size: 13px;
    color: var(--dark-3);
}

.project-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

.project-card__link:hover {
    gap: 10px;
    color: var(--primary-dark);
}

/* ============================
   SERVICES
   ============================ */
.services {
    background: var(--white);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    border-radius: var(--radius);
    background: var(--light);
    border: 1px solid transparent;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.1);
}

.service-card__icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.service-card__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark);
}

.service-card p {
    font-size: 14px;
    color: var(--gray);
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 16px;
}

.service-card__action {
    color: var(--primary);
    font-weight: 600;
    font-size: 13px;
}

/* ============================
   TECH STACK
   ============================ */
.tech {
    background: var(--dark);
}

.tech .section__tag {
    background: rgba(255, 255, 255, 0.08);
    color: var(--gray-light);
}

.tech .section__title {
    color: var(--white);
}

.tech__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.tech__item {
    padding: 12px 24px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--gray-light);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.tech__item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateY(-2px);
}

/* ============================
   CONTACT
   ============================ */
.contact {
    background: var(--light);
}

.contact__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.contact__item-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.contact__item strong {
    display: block;
    font-size: 14px;
    color: var(--dark-3);
    margin-bottom: 4px;
}

.contact__item a,
.contact__item span {
    font-size: 15px;
    color: var(--dark);
}

.contact__item a:hover {
    color: var(--primary);
}

.contact__form {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px;
    border: 1px solid var(--gray-lighter);
}

.contact__form h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}

.form__group {
    margin-bottom: 16px;
}

.form__group input,
.form__group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-lighter);
    border-radius: var(--radius);
    font-family: var(--font-main);
    font-size: 15px;
    transition: var(--transition);
    background: var(--light);
    color: var(--dark);
}

.form__group input:focus,
.form__group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.form__group textarea {
    resize: vertical;
}

.form__note {
    font-size: 12px;
    color: var(--gray);
    text-align: center;
    margin-top: 12px;
}

/* ============================
   FOOTER
   ============================ */
.footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 60px 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer__brand .logo {
    margin-bottom: 16px;
}

.footer__brand p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer__social {
    display: flex;
    gap: 12px;
}

.footer__social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-light);
    transition: var(--transition);
}

.footer__social a:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.footer__links h4 {
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer__links a {
    display: block;
    font-size: 14px;
    padding: 6px 0;
    color: var(--gray);
    transition: var(--transition);
}

.footer__links a:hover {
    color: var(--primary-light);
    padding-left: 4px;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    font-size: 13px;
    color: var(--dark-3);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
    .about__grid { grid-template-columns: repeat(2, 1fr); }
    .services__grid { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; text-align: center; }
    .hero__content { max-width: 100%; }
    .hero__actions { justify-content: center; }
    .hero__stats { justify-content: center; }
    .hero__visual { display: none; }
    .projects__grid { grid-template-columns: 1fr; }
    .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--dark-2);
        flex-direction: column;
        padding: 80px 24px 32px;
        gap: 4px;
        transition: var(--transition);
        border-left: 1px solid rgba(255, 255, 255, 0.06);
    }

    .nav.active {
        right: 0;
    }

    .nav__link {
        width: 100%;
        padding: 12px 16px;
        font-size: 16px;
    }

    .burger { display: flex; }

    .hide-mobile { display: none; }
    .section { padding: 60px 0; }
    .about__grid { grid-template-columns: 1fr; }
    .services__grid { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; gap: 32px; }
    .footer__bottom { flex-direction: column; gap: 6px; text-align: center; }

    .hero__stats { gap: 24px; }
    .stat__num { font-size: 26px; }

    .project-card__features {
        grid-template-columns: 1fr;
    }

    .contact__form { padding: 24px; }
}

@media (max-width: 480px) {
    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__stats { flex-wrap: wrap; gap: 16px; }
    .hero__title { font-size: 28px; }
}
