/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #14141e;
    --bg-light: #1a1a2e;
    --bg-card: #1e1e30;
    --text: #ffffff;
    --text-muted: #a0a0b0;
    --text-dim: #666680;
    --accent: #ffffff;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.2);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--text-muted);
}

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

ul, ol {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Section Header ===== */
.section-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 600;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.section-header {
    margin-bottom: 64px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-transform: uppercase;
}

.btn--primary {
    background: var(--text);
    color: var(--bg);
    border-color: var(--text);
}

.btn--primary:hover {
    background: transparent;
    color: var(--text);
}

.btn--outline {
    background: transparent;
    color: var(--text);
    border-color: var(--border-hover);
}

.btn--outline:hover {
    border-color: var(--text);
    background: var(--text);
    color: var(--bg);
}

.btn--full {
    width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition);
}

.header--scrolled {
    background: rgba(20, 20, 30, 0.95);
    backdrop-filter: blur(20px);
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 1001;
}

.logo__img {
    height: 28px;
    width: auto;
}

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

.nav__link {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-muted);
    position: relative;
    padding-bottom: 4px;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text);
    transition: width var(--transition);
}

.nav__link:hover {
    color: var(--text);
}

.nav__link:hover::after {
    width: 100%;
}

.header__phone {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.5px;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.burger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: var(--text);
    transition: all var(--transition);
}

.burger.active span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero__title {
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

.hero__subtitle {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__code {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 15px;
    line-height: 2;
    width: 100%;
    max-width: 460px;
}

.code-line {
    opacity: 0;
    animation: typeIn 0.5s ease forwards;
}

.code-line:nth-child(1) { animation-delay: 0.5s; }
.code-line:nth-child(2) { animation-delay: 1s; }
.code-line:nth-child(3) { animation-delay: 1.5s; }
.code-line:nth-child(4) { animation-delay: 2s; }

.code-keyword { color: #c792ea; }
.code-var { color: #82aaff; }
.code-func { color: #c3e88d; }
.code-string { color: #f78c6c; }
.code-line--comment { color: var(--text-dim); font-style: italic; }

@keyframes typeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.hero__scroll span {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--text-dim);
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: var(--text-dim);
    position: relative;
    overflow: hidden;
}

.hero__scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--text);
    animation: scrollLine 1.5s ease infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* ===== Stats ===== */
.stats {
    padding: 60px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stats__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.stat__number {
    font-size: clamp(36px, 4vw, 52px);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat__number::after {
    content: '+';
    font-size: 0.6em;
    opacity: 0.5;
}

.stat__label {
    font-size: 14px;
    color: var(--text-muted);
}

/* ===== Services ===== */
.services {
    padding: 120px 0;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.service-card__number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.service-card__icon {
    margin-bottom: 24px;
    opacity: 0.8;
}

.service-card__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.service-card__desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== Projects ===== */
.projects {
    padding: 120px 0;
}

.projects__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.project-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.project-card--large {
    grid-column: 1 / -1;
}

.project-card__bg {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-card--large .project-card__bg {
    height: 360px;
}

.project-card__info {
    padding: 28px 32px;
    background: var(--bg-light);
}

.project-card__tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.project-card__title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
}

.project-card__desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.project-card__stack {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-card__stack span {
    font-size: 12px;
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-muted);
}

/* Project Mockups */
.preview-mockup {
    width: 80%;
    max-width: 500px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-bar {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.3);
}

.mockup-bar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.mockup-content {
    display: flex;
    padding: 12px;
    gap: 12px;
    min-height: 200px;
}

.mockup-sidebar {
    width: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.mockup-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mockup-chart {
    height: 100px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    border-radius: 4px;
}

.mockup-cards {
    display: flex;
    gap: 8px;
}

.mockup-cards div {
    flex: 1;
    height: 50px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
}

.preview-phone {
    width: 140px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.phone-screen {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 14px;
    padding: 16px 10px;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phone-header {
    height: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.phone-card {
    height: 40px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 6px;
}

.phone-nav {
    margin-top: auto;
    display: flex;
    justify-content: space-around;
}

.phone-nav span {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.preview-ai {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.ai-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    animation: aiPulse 2s ease-in-out infinite;
}

@keyframes aiPulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.1); opacity: 1; }
}

.ai-waves {
    display: flex;
    gap: 4px;
    align-items: flex-end;
    height: 30px;
}

.ai-waves span {
    width: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    animation: aiWave 1s ease-in-out infinite;
}

.ai-waves span:nth-child(1) { height: 10px; animation-delay: 0s; }
.ai-waves span:nth-child(2) { height: 20px; animation-delay: 0.15s; }
.ai-waves span:nth-child(3) { height: 15px; animation-delay: 0.3s; }

@keyframes aiWave {
    0%, 100% { height: 10px; }
    50% { height: 25px; }
}

/* ===== Approach ===== */
.approach {
    padding: 120px 0;
    background: var(--bg-light);
}

.approach__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.approach-step {
    position: relative;
    padding-top: 32px;
}

.approach-step__line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border);
}

.approach-step__line::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text);
}

.approach-step__number {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.approach-step__title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.approach-step__desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ===== Pricing ===== */
.pricing {
    padding: 120px 0;
}

.pricing__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

.price-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    transition: all var(--transition);
    position: relative;
}

.price-card:hover {
    border-color: var(--border-hover);
}

.price-card--featured {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-light) 100%);
}

.price-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: var(--bg);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 20px;
    border-radius: 20px;
}

.price-card__header {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.price-card__name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.price-card__price {
    font-size: 32px;
    font-weight: 700;
}

.price-card__period {
    font-size: 14px;
    color: var(--text-dim);
    margin-top: 4px;
}

.price-card__features {
    margin-bottom: 32px;
}

.price-card__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-muted);
    padding: 10px 0;
}

.price-card__feature--active {
    color: var(--text);
}

.price-card__feature svg {
    flex-shrink: 0;
}

/* ===== Team ===== */
.team {
    padding: 120px 0;
    background: var(--bg-light);
}

.team__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.team__grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.team-member {
    text-align: center;
}

.team-member__avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dim);
}

.team-member__name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.team-member__role {
    font-size: 13px;
    color: var(--text-dim);
}

/* ===== CTA ===== */
.cta {
    padding: 120px 0;
}

.cta__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.cta__title {
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 600;
    line-height: 1.15;
    margin-bottom: 20px;
}

.cta__subtitle {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

.cta__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-input {
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color var(--transition);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-dim);
}

.form-input:focus {
    border-color: var(--border-hover);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
}

.footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer__copy {
    font-size: 12px;
    color: var(--text-dim);
    margin-top: 8px;
}

.footer__nav {
    display: flex;
    gap: 24px;
}

.footer__nav a {
    font-size: 13px;
    color: var(--text-muted);
}

.footer__contacts {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.footer__contacts a {
    font-size: 13px;
    color: var(--text-muted);
}

.footer__social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.footer__social a {
    opacity: 0.5;
    transition: opacity var(--transition);
}

.footer__social a:hover {
    opacity: 1;
}

/* ===== Custom Cursor ===== */
@media (pointer: fine) {
    * { cursor: none !important; }

    .custom-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 40px;
        height: 40px;
        border: 1px solid rgba(255, 255, 255, 0.4);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        transform: translate(-50%, -50%);
        transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                    height 0.4s cubic-bezier(0.19, 1, 0.22, 1),
                    border-color 0.3s ease,
                    background 0.3s ease;
        mix-blend-mode: difference;
    }

    .custom-cursor--active {
        width: 64px;
        height: 64px;
        border-color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.05);
    }

    .custom-cursor__dot {
        position: fixed;
        top: 0;
        left: 0;
        width: 6px;
        height: 6px;
        background: #fff;
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000;
        transform: translate(-50%, -50%);
    }
}

/* ===== Animations ===== */
[data-animate] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.13, 0.47, 0.13, 0.98),
                transform 0.8s cubic-bezier(0.13, 0.47, 0.13, 0.98);
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* Split text */
.split-line {
    display: inline;
}

.section-title .char {
    display: inline-block;
    transform: translateY(105%) rotateX(-25deg);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.13, 0.47, 0.13, 0.98),
                opacity 0.4s ease;
}

/* Button hover morph */
.btn {
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.btn:hover {
    border-radius: 36px;
}

/* Project card tilt */
.project-card {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}

/* Nav link slide effect */
.nav__link {
    overflow: hidden;
    position: relative;
}

.nav__link::before {
    content: attr(href);
    display: none;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .approach__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .pricing__grid {
        grid-template-columns: 1fr;
        max-width: 440px;
    }

    .team__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 28px;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition);
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
    }

    .nav__link {
        font-size: 24px;
    }

    .burger {
        display: flex;
    }

    .header__phone {
        display: none;
    }

    .hero__inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__visual {
        display: none;
    }

    .hero__scroll {
        display: none;
    }

    .stats__inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .services__grid {
        grid-template-columns: 1fr;
    }

    .projects__grid {
        grid-template-columns: 1fr;
    }

    .approach__grid {
        grid-template-columns: 1fr;
    }

    .cta__inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .team__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .footer__nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer__contacts {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .stats__inner {
        grid-template-columns: 1fr;
    }

    .team__grid {
        grid-template-columns: 1fr;
    }
}
