/* --- FONTS IMPORT --- */
@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600&family=Unbounded:wght@300;500;700;900&display=swap");

/* --- TECH FUTURE VARIABLES --- */
:root {
    --font-heading: "Unbounded", sans-serif;
    --font-body: "Manrope", sans-serif;

    /* Palette */
    --color-ink: #1a1a2e; /* Deep dark text */
    --color-ink-sub: #5f6388; /* Subtext */
    --color-accent-start: #8b5cf6;
    --color-accent-end: #6d28d9;

    /* Glassmorphism Settings */
    --glass-bg: rgba(255, 255, 255, 0.45);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);
    --glass-shadow: 0px 20px 40px rgba(139, 92, 246, 0.15);
    --glass-blur: blur(20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-ink);
    background-image: url("../unnamed.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Сетка на фоне для технологичности */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(124, 58, 237, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

/* Огромная надпись на фоне */
body::after {
    content: "THEORY";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-size: clamp(100px, 25vw, 400px);
    font-weight: 900;
    background: linear-gradient(
        135deg,
        rgba(124, 58, 237, 0.05) 0%,
        rgba(59, 130, 246, 0.05) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.05em;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

/* --- Floating Orbs (чуть ярче) --- */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(139, 92, 246, 0.6) 0%,
        rgba(124, 58, 237, 0.1) 70%
    );
    top: -200px;
    left: -200px;
    animation: float1 20s ease-in-out infinite;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.5) 0%,
        rgba(37, 99, 235, 0.1) 70%
    );
    bottom: -150px;
    right: -150px;
    animation: float2 15s ease-in-out infinite;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(
        circle,
        rgba(236, 72, 153, 0.4) 0%,
        rgba(219, 39, 119, 0.1) 70%
    );
    top: 40%;
    right: 5%;
    animation: float3 25s ease-in-out infinite;
}

@keyframes float1 {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(60px, 100px);
    }
}
@keyframes float2 {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-80px, -60px);
    }
}
@keyframes float3 {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(-50px, 80px);
    }
}

.container {
    position: relative;
    z-index: 1;
    padding-top: 80px;
    padding-bottom: 80px;
    max-width: 1200px;
}

/* --- HERO CARD (Главный блок) --- */
.hero-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 40px;
    padding: 100px 60px;
    text-align: center;
    box-shadow: var(--glass-shadow);
    margin-bottom: 80px;
    position: relative;
    overflow: hidden;
}

/* Блик на стекле */
.hero-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 20%,
        rgba(255, 255, 255, 0.4) 25%,
        transparent 30%
    );
    transform: skewX(-20deg) translateX(-150%);
    transition: 0.5s;
    pointer-events: none;
}
.hero-card:hover::before {
    transform: skewX(-20deg) translateX(150%);
    transition: 1.5s;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 1px;
    margin-bottom: 32px;
    display: inline-block;
    color: var(--color-ink);
}

.tagline {
    font-family: var(--font-body);
    color: var(--color-accent-start);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 32px;
    display: inline-block;
    padding: 8px 20px;
    background: #fff;
    border-radius: 100px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(48px, 8vw, 110px);
    font-weight: 900;
    color: var(--color-ink);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 32px;
    text-transform: uppercase;
    background-image: linear-gradient(180deg, #0f172a 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-family: var(--font-body);
    color: var(--color-ink-sub);
    font-size: 20px;
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

/* --- BUTTON CTA --- */
.cta-button {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    background: var(--color-ink);
    border: none;
    padding: 24px 56px;
    border-radius: 100px;
    cursor: pointer;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.4);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.cta-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6366f1, #a855f7, #ec4899);
    opacity: 0;
    transition: 0.4s;
    z-index: -1;
}

.cta-button:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 30px 60px -12px rgba(99, 102, 241, 0.5);
}

.cta-button:hover::before {
    opacity: 1;
}

.cta-button:active {
    transform: translateY(-1px);
}

/* --- FEATURES GRID --- */
.feature-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 32px;
    padding: 32px;
    height: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.2);
    border-color: white;
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.1);
    color: var(--color-accent-end);
    font-size: 28px;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    background: linear-gradient(
        135deg,
        var(--color-accent-start),
        var(--color-accent-end)
    );
    color: white;
    transform: scale(1.1) rotate(5deg);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--color-ink);
    line-height: 1.3;
    margin: 0;
    width: 100%;
}

/* Декоративная стрелочка при наведении */
.feature-card::after {
    content: "→";
    position: absolute;
    bottom: 32px;
    right: 32px;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-accent-start);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}
.feature-card:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* --- SCREENSHOTS & CAROUSEL --- */
.screenshots-section {
    margin-top: 100px;
    margin-bottom: 60px;
}

.screenshots-title {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    color: var(--color-ink);
    text-align: center;
    margin-bottom: 60px;
    text-transform: uppercase;
    letter-spacing: -0.03em;
}

.carousel-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 40px;
    padding: 60px 0;
    box-shadow: var(--glass-shadow);
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    gap: 30px;
    padding-left: 0;
    width: max-content;
}

.carousel-wrapper {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    position: relative;
}

.carousel-slide {
    min-width: 320px;
    height: 600px;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: white;
    border: 4px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    transition: transform 0.4s ease;
}

/* Tech Overlay Effect */
.carousel-slide::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 40%,
        rgba(139, 92, 246, 0.1) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

/* ОПЦИОНАЛЬНО: Размытие боковых слайдов */
.carousel-slide:not(.active-slide) img {
    filter: blur(2px);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.carousel-slide.active-slide img {
    filter: blur(0);
    opacity: 1;
}

.carousel-slide.active-slide {
    transform: scale(1.05);
    border-color: var(--color-accent-start);
    box-shadow: 0 25px 60px rgba(124, 58, 237, 0.25);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    color: var(--color-ink);
}

.carousel-arrow:hover {
    background: var(--color-ink);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.left {
    left: 40px;
}
.carousel-arrow.right {
    right: 40px;
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--color-accent-start);
    transform: scale(1.3);
}

/* --- FOOTER --- */
.footer {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: var(--glass-border);
    border-radius: 32px;
    padding: 40px;
    margin-top: 80px;
    text-align: center;
}

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

.footer-contact a {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--color-ink);
    text-decoration: none;
    margin-right: 30px;
    font-size: 16px;
    transition: color 0.3s;
}

.footer-contact a:hover {
    color: var(--color-accent-start);
}

.footer-copyright {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    color: var(--color-ink-sub);
    text-transform: uppercase;
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.modal-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid white;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
    border-radius: 40px;
    padding: 50px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: var(--color-ink);
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--color-ink);
    color: white;
    transform: rotate(90deg);
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(
        135deg,
        var(--color-accent-start),
        var(--color-accent-end)
    );
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    color: white;
    font-size: 32px;
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.3);
}

.modal-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--color-ink);
}

.modal-description {
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-ink-sub);
}

/* --- MOBILE IMPROVEMENTS (MEDIA QUERIES) --- */
@media (max-width: 768px) {
    /* 1. Global Scroll Fix */
    html,
    body {
        width: 100%;
        overflow-x: hidden; /* Cuts off horizontal overflow */
        position: relative;
    }

    /* 2. Hero Section */
    .hero-card {
        padding: 40px 20px;
        text-align: center;
        margin-bottom: 40px;
    }

    .hero-title {
        font-size: 32px;
        word-wrap: break-word;
    }

    /* 3. Features Grid: GRID FIX */
    .features-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns */
        gap: 12px !important;

        /* KEY FIX: Reset Bootstrap negative margins */
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    /* Reset Bootstrap columns inside grid */
    .features-grid > [class*="col-"] {
        width: 100% !important;
        max-width: 100% !important;
        flex: none !important;

        /* Remove extra paddings from col-* */
        padding: 0 !important;
        margin: 0 !important;
    }

    .feature-card {
        /* Center content inside card */
        flex-direction: column;
        align-items: center;
        text-align: center;
        justify-content: center;

        padding: 15px 10px;
        min-height: 140px;
        height: 100%;
    }

    .feature-icon {
        margin-bottom: 10px;
        margin-right: 0;
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .feature-title {
        font-size: 13px;
        line-height: 1.2;
        width: 100%;
        margin: 0;
    }

    /* Remove decorative arrow on mobile */
    .feature-card::after {
        display: none;
    }

    /* 4. Modals and Carousel */
    .modal-card {
        width: 95%;
        padding: 30px 20px;
        margin: 10px;
    }

    .carousel-track {
        gap: 15px;
    }

    .carousel-slide {
        min-width: unset !important; /* Let JS handle width */
    }
}
@media (max-width: 480px) {
    body::after {
        content: "THEO";
        font-size: 80px;
        opacity: 0.015;
    }
}

/* 7.2 Low Power Mode */
.low-power-mode .floating-orb,
.low-power-mode #canvas-container {
    display: none !important;
}

.low-power-mode * {
    animation: none !important;
    transition: none !important;
}

/* 8.2 Accessibility Focus States */
.carousel-arrow:focus,
.carousel-dot:focus,
.feature-card:focus {
    outline: 3px solid var(--color-accent-start);
    outline-offset: 4px;
}

.cta-button:focus {
    outline: 3px solid white;
    outline-offset: 4px;
}

.carousel-arrow:focus:not(:focus-visible),
.carousel-dot:focus:not(:focus-visible) {
    outline: none;
}
