/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0a;
    --bg-elev: #111111;
    --bg-card: #151515;
    --text: #f5f5f5;
    --text-dim: #888888;
    --text-muted: #555555;
    --accent: #c8ff00;
    --border: #1f1f1f;
    --border-light: #2a2a2a;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    overflow-x: hidden;
    cursor: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ===== Кастомный курсор ===== */
.cursor {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease;
    opacity: 0.5;
}

.cursor-follower.hover {
    width: 80px;
    height: 80px;
    opacity: 1;
}

@media (max-width: 768px) {
    body { cursor: auto; }
    .cursor, .cursor-follower { display: none; }
}

/* ===== Навигация ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 24px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.nav.scrolled {
    border-bottom-color: var(--border);
}

.nav-logo {
    font-weight: 800;
    font-size: 20px;
    letter-spacing: -0.02em;
}

.accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 14px;
    color: var(--text-dim);
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    font-size: 14px;
    padding: 10px 20px;
    border: 1px solid var(--border-light);
    border-radius: 100px;
    transition: all 0.3s ease;
}

.nav-cta:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
}

@media (max-width: 768px) {
    .nav { padding: 16px 24px; }
    .nav-links { display: none; }
}

/* ===== Hero ===== */
.hero {
    min-height: 100vh;
    padding: 160px 48px 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 40px;
    font-family: 'JetBrains Mono', monospace;
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: relative;
}

.pulse::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(2); opacity: 0; }
}

.hero-title {
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 40px;
}

.hero-subtitle {
    font-size: clamp(16px, 1.5vw, 20px);
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 48px;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn {
    padding: 18px 36px;
    border-radius: 100px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--text);
    transform: translateY(-2px);
}

.btn-ghost {
    border: 1px solid var(--border-light);
    color: var(--text);
}

.btn-ghost:hover {
    border-color: var(--text);
    transform: translateY(-2px);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    max-width: 1400px;
    margin: 80px auto 0;
    width: 100%;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.stat-number {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-dim);
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    right: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (max-width: 768px) {
    .hero { padding: 120px 24px 60px; }
    .hero-stats { grid-template-columns: 1fr; gap: 24px; margin-top: 60px; }
    .scroll-indicator { display: none; }
}

/* ===== Секции ===== */
.section-header {
    max-width: 1400px;
    margin: 0 auto 80px;
    padding: 0 48px;
}

.section-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: clamp(40px, 6vw, 88px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

/* ===== Работы ===== */
.works {
    padding: 120px 0;
}

.works-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    gap: 32px;
}

.work-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    padding: 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.work-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), var(--accent, #c8ff00) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.work-card:hover::before {
    opacity: 0.15;
}

.work-card:hover {
    border-color: var(--border-light);
    transform: translateY(-4px);
}

.work-preview {
    position: relative;
    aspect-ratio: 16/10;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-number {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-muted);
    z-index: 2;
}

.work-mockup {
    width: 85%;
    perspective: 1000px;
}

.mockup-browser {
    background: #0d0d0d;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: transform 0.5s ease;
}

.work-card:hover .mockup-browser {
    transform: rotateY(-5deg) rotateX(3deg) scale(1.02);
}

.browser-bar {
    padding: 10px 14px;
    background: #1a1a1a;
    display: flex;
    gap: 6px;
    border-bottom: 1px solid var(--border);
}

.browser-bar span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-light);
}

.browser-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mock-header {
    height: 8px;
    width: 40%;
    background: var(--border-light);
    border-radius: 4px;
}

.mock-hero {
    height: 60px;
    background: linear-gradient(90deg, var(--accent, #c8ff00), transparent);
    border-radius: 6px;
    opacity: 0.3;
}

.mock-hero-alt {
    height: 60px;
    background: linear-gradient(90deg, var(--accent, #00d4ff), transparent);
    border-radius: 6px;
    opacity: 0.3;
}

.mock-grid, .mock-features {
    display: grid;
    gap: 8px;
}

.mock-grid {
    grid-template-columns: repeat(3, 1fr);
}

.mock-grid div, .mock-features div {
    height: 40px;
    background: var(--border);
    border-radius: 4px;
}

.mock-features {
    grid-template-columns: repeat(2, 1fr);
}

.work-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.work-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.work-title {
    font-size: clamp(32px, 3.5vw, 48px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}

.work-desc {
    color: var(--text-dim);
    font-size: 16px;
    line-height: 1.6;
}

.work-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.work-tags span {
    padding: 6px 14px;
    background: var(--bg-elev);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 12px;
    color: var(--text-dim);
}

.work-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--text);
    transition: gap 0.3s ease;
}

.work-card:hover .work-link {
    gap: 20px;
    color: var(--accent);
}

.work-link .arrow {
    transition: transform 0.3s ease;
}

.work-card:hover .work-link .arrow {
    transform: translateX(4px);
}

@media (max-width: 900px) {
    .work-card { grid-template-columns: 1fr; gap: 32px; padding: 24px; }
    .works-grid, .section-header { padding: 0 24px; }
}

/* ===== Услуги ===== */
.services {
    padding: 120px 0;
    border-top: 1px solid var(--border);
}

.services-list {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

.service-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-item:last-child {
    border-bottom: 1px solid var(--border);
}

.service-item:hover {
    padding-left: 20px;
}

.service-item:hover .service-arrow {
    transform: translateX(8px);
    color: var(--accent);
}

.service-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--text-muted);
}

.service-content h3 {
    font-size: clamp(24px, 2.5vw, 36px);
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.service-content p {
    color: var(--text-dim);
    font-size: 15px;
    max-width: 600px;
}

.service-arrow {
    font-size: 32px;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .service-item { grid-template-columns: 1fr; gap: 16px; padding: 32px 0; }
    .service-arrow { display: none; }
    .services-list { padding: 0 24px; }
}

/* ===== О нас ===== */
.about {
    padding: 120px 0;
    border-top: 1px solid var(--border);
}

.about-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.about-text {
    font-size: clamp(18px, 1.8vw, 24px);
    line-height: 1.5;
    color: var(--text-dim);
}

.about-principles {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.principle {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 24px 0;
    border-top: 1px solid var(--border);
}

.principle-num {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    color: var(--accent);
}

.principle-text {
    font-size: 18px;
    font-weight: 500;
}

@media (max-width: 900px) {
    .about-content { grid-template-columns: 1fr; gap: 48px; padding: 0 24px; }
}

/* ===== Контакты ===== */
.contact {
    padding: 160px 48px;
    border-top: 1px solid var(--border);
}

.contact-inner {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.contact .section-label {
    margin-bottom: 40px;
}

.contact-title {
    font-size: clamp(48px, 8vw, 120px);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 32px;
}

.contact-subtitle {
    font-size: 18px;
    color: var(--text-dim);
    margin-bottom: 48px;
}

.contact-email {
    display: inline-block;
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 500;
    padding: 20px 40px;
    border: 1px solid var(--border-light);
    border-radius: 100px;
    transition: all 0.3s ease;
    margin-bottom: 48px;
}

.contact-email:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.contact-socials {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.contact-socials a {
    font-size: 15px;
    color: var(--text-dim);
    transition: color 0.3s ease;
    position: relative;
}

.contact-socials a:hover {
    color: var(--text);
}

@media (max-width: 768px) {
    .contact { padding: 100px 24px; }
}

/* ===== Футер ===== */
.footer {
    padding: 40px 48px;
    border-top: 1px solid var(--border);
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 32px;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-right {
    display: flex;
    gap: 24px;
}

.footer-right a {
    font-size: 13px;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: var(--text);
}

@media (max-width: 768px) {
    .footer { padding: 32px 24px; }
    .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ===== Анимации появления ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Selection ===== */
::selection {
    background: var(--accent);
    color: var(--bg);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}