/* =========================================
   BRANKO GAPO - CSS
   ========================================= */

/* CSS Variables */
:root {
    --color-bg: #0a0a0a;
    --color-bg-light: #141414;
    --color-bg-card: #1a1a1a;
    --color-text: #f5f5f5;
    --color-text-muted: #888;
    --color-accent: #e63946;
    --color-accent-light: #ff4d5a;
    --color-border: #2a2a2a;
    
    --color-cyan: #00b4d8;
    --color-magenta: #e63946;
    --color-yellow: #ffd60a;
    --color-key: #1a1a1a;
    
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'DM Sans', sans-serif;

    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* Custom Cursor */
.cursor,
.cursor-follower {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}

.cursor {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.15s var(--ease-out);
}

body:hover .cursor-follower {
    border-color: rgba(255,255,255,0.5);
}

a:hover ~ .cursor,
button:hover ~ .cursor {
    transform: translate(-50%, -50%) scale(2);
}

/* Container */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

/* Typography */
.section-number {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-accent);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    max-width: 500px;
}

.section-header {
    margin-bottom: 4rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 500;
    border: none;
    border-radius: 0;
    cursor: none;
    transition: all 0.3s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--color-accent);
    color: #fff;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-accent-light);
    transform: translateX(-100%);
    transition: transform 0.3s var(--ease-out);
}

.btn-primary:hover::before {
    transform: translateX(0);
}

.btn-primary span,
.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-text);
    background: rgba(255,255,255,0.05);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s var(--ease-out);
}

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

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
}

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.logo-sub {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav-menu a {
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s var(--ease-out);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: none;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s var(--ease-out);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 8rem 0 4rem;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.grid-overlay {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    position: relative;
    z-index: 1;
}

.hero-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-label .line {
    width: 40px;
    height: 1px;
    background: var(--color-accent);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 10vw, 8rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
}

.title-line {
    display: block;
    overflow: hidden;
}

.title-accent {
    color: var(--color-accent);
    position: relative;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text-muted);
    max-width: 500px;
    margin-bottom: 3rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-scroll {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--color-accent), transparent);
    animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* Services Section */
.services {
    padding: 8rem 0;
    background: var(--color-bg-light);
    position: relative;
}

.services::before {
    content: 'УСЛУГИ';
    position: absolute;
    top: 4rem;
    right: 2rem;
    font-family: var(--font-display);
    font-size: clamp(4rem, 15vw, 12rem);
    font-weight: 700;
    color: rgba(255,255,255,0.02);
    pointer-events: none;
    writing-mode: vertical-rl;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--color-bg-card);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--ease-out);
    border: 1px solid transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease-out);
}

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

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
}

.service-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-accent);
    transition: transform 0.3s var(--ease-out);
}

.service-card:hover .service-icon svg {
    transform: scale(1.1);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.service-arrow {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    font-size: 1.5rem;
    color: var(--color-accent);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s var(--ease-out);
}

.service-card:hover .service-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* About Section */
.about {
    padding: 8rem 0;
    position: relative;
    overflow: hidden;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
}

.about-content {
    max-width: 540px;
}

.about-lead {
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.about-stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--color-border);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

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

.visual-box {
    width: 320px;
    height: 320px;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    position: relative;
}

.cmyk-bars {
    display: flex;
    gap: 1rem;
}

.cmyk-bar {
    width: 40px;
    height: 160px;
    border-radius: 4px;
}

.cmyk-bar.cyan {
    background: var(--color-cyan);
    animation: barPulse 3s infinite 0s;
}

.cmyk-bar.magenta {
    background: var(--color-magenta);
    animation: barPulse 3s infinite 0.2s;
}

.cmyk-bar.yellow {
    background: var(--color-yellow);
    animation: barPulse 3s infinite 0.4s;
}

.cmyk-bar.key {
    background: #333;
    border: 1px solid var(--color-border);
    animation: barPulse 3s infinite 0.6s;
}

@keyframes barPulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.85); }
}

.visual-text {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    color: var(--color-text-muted);
}

/* Clients Section */
.clients {
    padding: 8rem 0;
    background: var(--color-bg-light);
    overflow: hidden;
}

.clients-marquee {
    margin: 4rem 0;
    overflow: hidden;
    padding: 2rem 0;
}

.marquee-track {
    display: flex;
    gap: 3rem;
    width: max-content;
}

.marquee-track:hover {
    animation-play-state: paused;
}

.client-logo {
    flex-shrink: 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-muted);
    white-space: nowrap;
    padding: 1rem 2rem;
    border: 1px solid var(--color-border);
    transition: all 0.3s var(--ease-out);
}

.client-logo:hover {
    color: var(--color-text);
    border-color: var(--color-accent);
}

.clients-testimonial {
    max-width: 800px;
    margin: 4rem auto 0;
    text-align: center;
}

.clients-testimonial blockquote p {
    font-size: 1.5rem;
    /*font-style: italic;*/
    color: var(--color-text-muted);
    position: relative;
}

.clients-testimonial blockquote p::before,
.clients-testimonial blockquote p::after {
    content: '"';
    font-size: 4rem;
    color: var(--color-accent);
    opacity: 0.3;
    font-family: Georgia, serif;
    position: absolute;
}

.clients-testimonial blockquote p::before {
    left: -2rem;
    top: -1rem;
}

.clients-testimonial blockquote p::after {
    content: '"';
    right: -2rem;
    bottom: -4rem;
}

/* Contact Section */
.contact {
    padding: 8rem 0;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 100%;
    background: var(--color-border);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.contact-info {
    padding-right: 3rem;
}

.contact-lead {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-bg-light);
    border: 1px solid transparent;
    transition: all 0.3s var(--ease-out);
}

.contact-item:hover {
    border-color: var(--color-border);
}

.contact-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-accent);
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 1rem;
}

.contact-text small {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-form-wrapper {
    padding-left: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.25rem 0 0.75rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border);
    outline: none;
    transition: border-color 0.3s;
}

.form-group textarea {
    resize: none;
    min-height: 120px;
}

.form-group label {
    position: absolute;
    left: 0;
    top: 1rem;
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    pointer-events: none;
    transition: all 0.3s var(--ease-out);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.5rem;
    font-size: 0.75rem;
    color: var(--color-accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: transparent;
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 2rem;
}

.footer-brand .logo-text {
    margin-bottom: 0.5rem;
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .about-visual {
        order: -1;
    }
    
    .contact::before {
        display: none;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }
    
    .contact-info {
        padding-right: 0;
    }
    
    .contact-form-wrapper {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .cursor,
    .cursor-follower {
        display: none;
    }
    
    body {
        cursor: auto;
    }
    
    .btn,
    a,
    button {
        cursor: pointer;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        background: var(--color-bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.4s var(--ease-out);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu a {
        font-size: 1.5rem;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    .hero-scroll {
        display: none;
    }
    
    .about-stats {
        flex-wrap: wrap;
        gap: 2rem;
    }
    
    .stat {
        flex: 1 1 calc(50% - 1rem);
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .visual-box {
        width: 260px;
        height: 260px;
    }
    
    .cmyk-bar {
        width: 30px;
        height: 120px;
    }
}

/* Animations on scroll */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s var(--ease-out);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s var(--ease-out);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    max-width: 560px;
    width: 100%;
    padding: 3rem;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s var(--ease-out);
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--color-accent);
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1.5rem;
}

.modal-icon svg {
    width: 100%;
    height: 100%;
    stroke: var(--color-accent);
}

.modal-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.modal-content {
    color: var(--color-text-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-content p {
    margin-bottom: 1rem;
}

.modal-content ul {
    list-style: none;
    margin-top: 1.5rem;
}

.modal-content ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.modal-content ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

.modal-cta {
    margin-top: 1rem;
}

/* Service card clickable */
.service-card {
    cursor: pointer;
}

@media (max-width: 768px) {
    .modal {
        padding: 2rem;
        margin: 1rem;
    }
    
    .modal-title {
        font-size: 1.5rem;
        padding-right: 2rem;
    }
}

/* Selection */
::selection {
    background: var(--color-accent);
    color: #fff;
}

/* Loading spinner */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}
