:root {
    --bg-main: #030617;
    --bg-elevated: #070b24;
    --bg-soft: #0b102b;
    --accent: #f33df0;
    --accent-soft: rgba(243, 61, 240, 0.12);
    --accent-2: #6c5ce7;
    --text-main: #f5f5ff;
    --text-muted: #a4a8d5;
    --border-soft: rgba(255, 255, 255, 0.06);
    --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.65);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-pill: 999px;
    --transition-fast: 0.2s ease-out;
    --transition-slow: 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at top left, #1f2937 0, #020617 55%, #000 100%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Поки не завантажилось — блокування скролу */

body:not(.page-loaded) {
    overflow: hidden;
}

/* CONTAINERS */

.container {
    width: min(1120px, 100% - 32px);
    margin-inline: auto;
}

.section {
    padding: 80px 0;
}

.section-alt {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.95));
    border-top: 1px solid var(--border-soft);
    border-bottom: 1px solid var(--border-soft);
}

.section-header {
    max-width: 640px;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    margin: 0 0 12px;
}

.section-header p {
    margin: 0;
    color: var(--text-muted);
}

/* PRELOADER */

#preloader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #111827 0, #020617 55%, #000 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    z-index: 9999;
    transition: opacity 0.4s ease-out, visibility 0.4s ease-out;
}

body.page-loaded #preloader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-orbit {
    width: 56px;
    height: 56px;
    position: relative;
}

.loader-orbit span {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border-top: 3px solid transparent;
    border-right: 3px solid transparent;
    border-bottom: 3px solid var(--accent);
    border-left: 3px solid var(--accent-2);
    animation: orbit 1.2s linear infinite;
}

.loader-orbit span:nth-child(2) {
    inset: 8px;
    border-bottom-color: #22d3ee;
    border-left-color: #22d3ee;
    animation-duration: 1.5s;
}

.loader-orbit span:nth-child(3) {
    inset: 16px;
    border-bottom-color: #fbbf24;
    border-left-color: #fbbf24;
    animation-duration: 1.8s;
}

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

@keyframes orbit {
    to {
        transform: rotate(360deg);
    }
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    background: linear-gradient(180deg, rgba(3, 6, 23, 0.95), rgba(3, 6, 23, 0.8), transparent);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
}

/* LOGO */

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 0.03em;
    font-size: 20px;
}

.logo-icon {
    font-size: 22px;
}

/* NAV */

.nav-list {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 15px;
    transition: color var(--transition-fast);
}

.nav-list a:hover {
    color: var(--text-main);
}

.nav-cta {
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid rgba(243, 61, 240, 0.4);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.8);
    padding: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    width: 18px;
    background: #e5e7eb;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle-open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* HERO */

.hero {
    position: relative;
    overflow: hidden;
    padding: 72px 0 88px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.5;
}

.hero-orbit {
    position: absolute;
    border-radius: 50%;
    filter: blur(42px);
}

.orbit-1 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.55), transparent 70%);
    top: -120px;
    left: -80px;
}

.orbit-2 {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(244, 114, 182, 0.55), transparent 70%);
    bottom: -160px;
    right: -80px;
}

.orbit-3 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.5), transparent 70%);
    bottom: 120px;
    left: 30%;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.3fr);
    gap: 56px;
    align-items: center;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: var(--accent-2);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(148, 163, 184, 0.4);
    margin-bottom: 14px;
}

.hero h1 {
    font-size: clamp(32px, 4vw, 40px);
    margin: 0 0 18px;
}

.hero-subtitle {
    margin: 0 0 24px;
    color: var(--text-muted);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 26px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast),
        box-shadow var(--transition-fast), transform 0.1s ease-out, border-color var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    color: #fff;
    box-shadow: 0 18px 35px rgba(76, 81, 191, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 24px 60px rgba(76, 81, 191, 0.6);
}

.btn-ghost {
    background: rgba(15, 23, 42, 0.75);
    color: var(--text-main);
    border-color: rgba(148, 163, 184, 0.6);
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.95);
}

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

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: var(--text-muted);
}

.hero-meta-value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.hero-card {
    background: radial-gradient(circle at top, rgba(148, 163, 255, 0.17), rgba(15, 23, 42, 0.98));
    border-radius: var(--radius-lg);
    padding: 22px 22px 20px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: var(--shadow-soft);
    max-width: 380px;
    margin-left: auto;
}

.hero-card-title {
    margin: 0 0 6px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent-2);
}

.hero-card-text {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.hero-checklist {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ABOUT */

.section-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 40px;
    align-items: flex-start;
}

.about-stats {
    display: grid;
    gap: 16px;
}

.about-card {
    padding: 16px 18px;
    border-radius: var(--radius-md);
    background: radial-gradient(circle at top left, rgba(148, 163, 255, 0.16), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.about-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent-2);
}

.about-text {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

/* SERVICES */

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.service-card {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--radius-md);
    padding: 18px 18px 16px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.7);
    font-size: 14px;
}

.service-card h3 {
    margin: 0 0 10px;
    font-size: 17px;
}

.service-card p {
    margin: 0 0 10px;
    color: var(--text-muted);
}

.service-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--text-muted);
}

/* WORKS SLIDER */
.works-slider {
    position: relative;
    background: rgba(15, 23, 42, 0.95);
    border-radius: var(--radius-lg);
    padding: 22px 0 32px;  /* Прибери бічні падінги */
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.works-track {
    display: flex;
    width: 100%;
    transform: translateX(0);
    transition: transform var(--transition-slow);
}

.works-slide {
    flex: 0 0 100%;
    min-width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    padding: 0 22px;  /* Додай падінг сюди */
}

.work-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.98));
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.8);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
}

.work-card:hover {
    transform: translateY(-4px);
    border-color: rgba(240, 171, 252, 0.7);
    box-shadow: 0 26px 70px rgba(76, 81, 191, 0.65);
}

.work-image {
    aspect-ratio: 4 / 5;
    overflow: hidden;
}

.work-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.5s ease-out;
}

.work-card:hover .work-image img {
    transform: scale(1.07);
}

.work-body {
    padding: 12px 14px 14px;
}

.work-body h3 {
    margin: 0 0 6px;
    font-size: 16px;
}

.work-body p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

/* SLIDER CONTROLS */

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

.slider-btn:hover:not(:disabled) {
    background: rgba(15, 23, 42, 1);
    border-color: var(--accent-2);
    transform: translateY(-50%) translateY(-1px);
}

.slider-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.slider-btn-prev {
    left: 10px;
}

.slider-btn-next {
    right: 10px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.slider-dot-active {
    width: 22px;
    background: linear-gradient(90deg, var(--accent-2), var(--accent));
}

/* PROCESS */

.process-steps {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
}

.process-steps li {
    margin-bottom: 14px;
}

.process-steps h3 {
    margin: 0 0 4px;
    font-size: 16px;
    color: var(--text-main);
}

/* FAQ */

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.faq-item {
    padding: 18px 18px 14px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid var(--border-soft);
    font-size: 14px;
}

.faq-item h3 {
    margin: 0 0 8px;
    font-size: 16px;
}

.faq-item p {
    margin: 0;
    color: var(--text-muted);
}

/* CONTACT */

.section-contact {
    border-top: 1px solid var(--border-soft);
    background: radial-gradient(circle at top, rgba(79, 70, 229, 0.35), rgba(3, 6, 23, 1));
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
    gap: 40px;
    align-items: flex-start;
}

.contact-info p {
    color: var(--text-muted);
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 20px;
    color: var(--text-muted);
    font-size: 14px;
}

.contact-list a {
    color: inherit;
}

.contact-cta-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-main);
    font-size: 14px;
    text-decoration: none;
}

.link-pill-ghost {
    background: transparent;
}

.contact-form-wrapper {
    background: rgba(15, 23, 42, 0.98);
    border-radius: var(--radius-lg);
    padding: 20px 20px 18px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    box-shadow: var(--shadow-soft);
}

.contact-form h3 {
    margin-top: 0;
}

.contact-form label {
    display: block;
    font-size: 14px;
    margin-bottom: 12px;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.5);
    background: rgba(15, 23, 42, 0.96);
    color: var(--text-main);
    font: inherit;
}

.contact-form textarea {
    resize: vertical;
}

/* FOOTER */

.site-footer {
    padding: 26px 0 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(3, 6, 23, 0.98);
}

.footer-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
}

/* PROJECT PAGE */

.project-header {
    margin-bottom: 40px;
}

.project-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: var(--accent-2);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(148, 163, 184, 0.4);
    margin-bottom: 16px;
}

.project-header h1 {
    font-size: 32px;
    margin: 0 0 12px;
    line-height: 1.2;
}

.project-lead {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

.project-layout {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 48px;
    align-items: start;
}

.project-image {
    position: sticky;
    top: 90px;
    width: 100%;
    margin-bottom: 80px;
}

.project-image img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    display: block;
}

.project-details {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 80px;
}

.project-section h2 {
    font-size: 24px;
    margin: 0 0 16px;
    color: var(--text-main);
}

.project-section ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-muted);
    line-height: 1.7;
}

.project-section li {
    margin-bottom: 12px;
}

.project-testimonials {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-quote {
    background: rgba(15, 23, 42, 0.96);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    border: 1px solid var(--border-soft);
    margin: 0;
}

.project-quote blockquote {
    margin: 0 0 12px;
    color: var(--text-main);
    font-style: italic;
    line-height: 1.6;
}

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

.project-not-found {
    text-align: center;
    padding: 80px 20px;
}

.project-not-found h1 {
    margin: 0 0 20px;
    font-size: 32px;
}

.project-not-found p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

/* Кнопка повернення */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    transition: all var(--transition-fast);
    margin-bottom: 24px;
}

.back-link:hover {
    background: rgba(15, 23, 42, 1);
    border-color: var(--accent-2);
    transform: translateX(-2px);
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .container {
        width: min(1120px, 100% - 48px);
    }
    
    .hero-inner {
        gap: 48px;
    }
    
    .section {
        padding: 70px 0;
    }
}

@media (max-width: 960px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }

    .hero-card {
        margin-left: 0;
        max-width: 100%;
    }

    .section-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

    .faq-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .contact-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .works-slide {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    
    /* Project page */
    .project-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }
    
    .project-image {
        position: static;
        max-height: none;
    }
    
    .project-image img {
        max-height: 400px;
    }
}

@media (max-width: 720px) {
    .container {
        width: calc(100% - 32px);
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 28px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-list {
        position: absolute;
        inset: 60px 16px auto 16px;
        background: rgba(15, 23, 42, 0.98);
        border-radius: 18px;
        border: 1px solid rgba(148, 163, 184, 0.4);
        flex-direction: column;
        padding: 12px 14px 10px;
        gap: 10px;
        transform-origin: top;
        transform: scaleY(0.8);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.18s ease-out, transform 0.18s ease-out;
    }

    .nav-open {
        opacity: 1;
        pointer-events: auto;
        transform: scaleY(1);
    }
    
    .header-inner {
        padding: 18px 0; /* Або 16px 0, якщо 18px здається забагато */
    }
    
    .hero {
        padding: 48px 0 64px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero-meta {
        gap: 16px;
    }
    
    .hero-meta-value {
        font-size: 18px;
    }

    .services-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .works-slide {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px;
        padding: 0 16px;
    }
    
    .works-slider {
        padding: 16px 0 28px;
    }

    .slider-btn {
        top: auto;
        bottom: 50px;
        transform: translateY(0);
    }

    .slider-btn-prev {
        left: 12px;
    }

    .slider-btn-next {
        right: 12px;
    }

    .contact-form-wrapper {
        margin-top: 10px;
    }
    
    /* Project page mobile */
    .project-header h1 {
        font-size: 26px;
    }
    
    .project-lead {
        font-size: 15px;
    }
    
    .project-section h2 {
        font-size: 20px;
    }
    
    .project-image img {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        width: calc(100% - 24px);
    }
    
    .logo {
        font-size: 18px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .section {
        padding: 48px 0;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
    
    .works-slider {
        padding: 12px 0 24px;
    }
    
    .works-slide {
        padding: 0 12px;
        gap: 12px;
    }
    
    .slider-btn {
        width: 32px;
        height: 32px;
        font-size: 20px;
        bottom: 40px;
    }
    
    .slider-btn-prev {
        left: 8px;
    }
    
    .slider-btn-next {
        right: 8px;
    }
    
    .faq-item,
    .service-card,
    .about-card {
        padding: 14px 16px;
    }
    
    .contact-form-wrapper {
        padding: 16px;
    }
    
    /* Project page extra small */
    .project-header h1 {
        font-size: 22px;
    }
    
    .project-section {
        gap: 24px;
    }
    
    .project-image img {
        max-height: 250px;
    }
}