
/* ==========================================
   DSx STUDIO — ОСНОВНОЙ СТИЛЬ
   ========================================== */

:root {
    --bg: #080d19;
    --bg-secondary: #0e1525;
    --card: #131d30;
    --card-hover: #1b2940;

    --text: #f4f7ff;
    --text-secondary: #98a7c1;

    --primary: #5778ff;
    --primary-light: #8195ff;
    --purple: #985aff;

    --border: rgba(170, 190, 255, 0.12);

    --radius: 20px;
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    background: var(--bg);
    color: var(--text);

    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;

    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

button, a {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 5px;
}

.container {
    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;
}

/* ==========================================
   ШАПКА САЙТА
   ========================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;

    background: rgba(8, 13, 25, 0.84);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 82px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 24px;
    font-weight: 800;
    letter-spacing: -1px;

    white-space: nowrap;
}

.logo-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--purple)
    );

    color: white;
    font-size: 22px;

    box-shadow: 0 5px 25px rgba(87, 120, 255, 0.3);
}

.logo-accent {
    color: var(--primary-light);
}

.logo-caption {
    margin-left: 1px;

    font-size: 10px;
    letter-spacing: 2px;
    font-weight: 600;

    color: var(--text-secondary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav a {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;

    transition: color 0.25s;
}

.nav a:hover {
    color: white;
}

.header-button {
    padding: 11px 19px;

    background: rgba(87, 120, 255, 0.12);
    border: 1px solid rgba(87, 120, 255, 0.35);
    border-radius: 11px;

    color: #bac7ff;
    font-size: 13px;
    font-weight: 600;

    transition: 0.25s;
}

.header-button:hover {
    background: var(--primary);
    color: white;
}

/* ==========================================
   ГЛАВНЫЙ ЭКРАН
   ========================================== */

.hero {
    position: relative;
    min-height: 610px;

    display: flex;
    align-items: center;

    padding: 95px 0;

    overflow: hidden;
}

.hero::before {
    content: "";

    position: absolute;
    width: 700px;
    height: 700px;

    top: -350px;
    right: -200px;

    background: radial-gradient(
        circle,
        rgba(83, 78, 255, 0.14),
        transparent 65%
    );

    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 70px;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.hero-label,
.section-label {
    display: inline-block;

    color: var(--primary-light);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero h1 {
    margin-top: 21px;

    font-size: clamp(38px, 5vw, 65px);
    line-height: 1.13;

    font-weight: 800;
    letter-spacing: -2.5px;
}

.hero h1 span {
    display: block;

    background: linear-gradient(
        100deg,
        #7194ff,
        #ae78ff
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text > p {
    max-width: 520px;
    margin-top: 26px;

    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;

    margin-top: 35px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 13px 24px;

    border-radius: 12px;

    font-size: 14px;
    font-weight: 600;

    transition:
        transform 0.25s,
        background 0.25s,
        box-shadow 0.25s;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn-primary {
    background: linear-gradient(
        135deg,
        var(--primary),
        #7653eb
    );

    color: white;

    box-shadow: 0 8px 30px rgba(87, 120, 255, 0.22);
}

.btn-primary:hover {
    box-shadow: 0 12px 35px rgba(87, 120, 255, 0.4);
}

.btn-secondary {
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.025);
    color: #c5cde0;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* ==========================================
   ВИЗУАЛЬНЫЙ БЛОК ГЛАВНОЙ
   ========================================== */

.hero-visual {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    perspective: 1000px;
}

.hero-glow {
    position: absolute;

    width: 390px;
    height: 390px;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(91, 91, 255, 0.23),
        transparent 70%
    );

    filter: blur(30px);
}

.showcase-card {
    position: relative;

    width: 100%;
    max-width: 420px;
    min-height: 365px;

    padding: 27px;

    border: 1px solid rgba(149, 164, 255, 0.25);
    border-radius: 28px;

    background:
        radial-gradient(
            circle at 75% 20%,
            rgba(112, 73, 255, 0.27),
            transparent 55%
        ),
        linear-gradient(
            145deg,
            #1b2944,
            #10182a 65%,
            #111a31
        );

    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);

    transform: rotateY(-7deg) rotateX(3deg);

    animation: floatCard 6s ease-in-out infinite;
}

.showcase-top,
.showcase-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.showcase-top {
    color: #8494b4;
    font-size: 10px;
    letter-spacing: 1.5px;
}

.showcase-status {
    color: #b4c4ff;
}

.showcase-symbol {
    margin: 36px 0 14px;

    font-size: clamp(65px, 10vw, 105px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -8px;

    background: linear-gradient(
        135deg,
        #b1c1ff,
        #597cff,
        #b56eff
    );

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    filter: drop-shadow(
        0 8px 22px rgba(110, 100, 255, 0.25)
    );
}

.showcase-card h3 {
    font-size: 22px;
    letter-spacing: -0.5px;
}

.showcase-card p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 6px;
}

.showcase-bottom {
    margin-top: 35px;
    padding-top: 17px;

    border-top: 1px solid var(--border);

    color: #7e90b3;
    font-size: 10px;
}

/* ==========================================
   КАТАЛОГ ПРИЛОЖЕНИЙ
   ========================================== */

.apps-section {
    padding: 105px 0 115px;

    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;

    margin-bottom: 40px;
}

.section-heading h2,
.about-content h2 {
    margin-top: 13px;

    font-size: clamp(28px, 4vw, 39px);
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-heading p {
    max-width: 600px;

    margin-top: 13px;

    color: var(--text-secondary);
    font-size: 15px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.app-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 305px;
    padding: 27px;

    background: var(--card);

    border: 1px solid var(--border);
    border-radius: var(--radius);

    transition:
        transform 0.3s,
        background 0.3s,
        border-color 0.3s,
        box-shadow 0.3s;
}

.app-card:hover {
    transform: translateY(-7px);

    background: var(--card-hover);
    border-color: rgba(113, 144, 255, 0.36);

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.17);
}

.app-card-top {
    display: flex;
    justify-content: space-between;
    align-items: start;

    margin-bottom: 23px;
}

.app-icon {
    width: 67px;
    height: 67px;

    display: grid;
    place-items: center;

    border-radius: 18px;

    color: white;
    font-size: 32px;
    font-weight: 700;
}

.crystal-icon {
    background: linear-gradient(
        135deg,
        #7365ff,
        #b255e8
    );

    box-shadow: 0 6px 25px rgba(130, 90, 255, 0.2);
}

.timer-icon {
    background: linear-gradient(
        135deg,
        #248ee8,
        #21c7db
    );

    box-shadow: 0 6px 25px rgba(34, 152, 235, 0.18);
}

.upcoming-icon {
    background: #26324a;
    color: #8394b4;
}

.app-category {
    padding: 5px 11px;

    border-radius: 20px;

    background: rgba(111, 136, 255, 0.1);

    color: #a3b5ff;
    font-size: 11px;
}

.app-card h3 {
    margin-bottom: 10px;

    font-size: 21px;
    letter-spacing: -0.4px;
}

.app-card > p {
    color: var(--text-secondary);

    font-size: 13px;
    line-height: 1.8;
}

.app-meta {
    display: flex;
    align-items: center;
    gap: 13px;
    flex-wrap: wrap;

    margin-top: 23px;

    color: #7688a7;
    font-size: 12px;
}

.app-meta span + span::before {
    content: "•";
    margin-right: 13px;
    color: #52617e;
}

.app-link {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: auto;
    padding-top: 22px;

    color: #9fb2ff;
    font-size: 14px;
    font-weight: 600;

    transition: color 0.25s;
}

.app-link span {
    font-size: 20px;
    transition: transform 0.25s;
}

.app-link:hover {
    color: white;
}

.app-link:hover span {
    transform: translateX(5px);
}

.upcoming-card {
    border-style: dashed;
    background: rgba(20, 29, 47, 0.5);
}

.app-link-disabled {
    color: #73819c;
    cursor: default;
}

/* ==========================================
   О СТУДИИ
   ========================================== */

.about-section {
    padding: 110px 0;
    position: relative;
}

.about-content {
    max-width: 760px;
    margin: 0 auto;

    text-align: center;
}

.about-content p {
    margin-top: 23px;

    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.9;
}

/* ==========================================
   ПОДВАЛ
   ========================================== */

.footer {
    background: #090f1c;
    border-top: 1px solid var(--border);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
    padding-top: 43px;
    padding-bottom: 42px;
}

.footer-brand strong {
    font-size: 20px;
    letter-spacing: -0.5px;
}

.footer-brand p {
    margin-top: 6px;

    color: var(--text-secondary);
    font-size: 13px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;

    padding-top: 19px;
    padding-bottom: 22px;

    border-top: 1px solid var(--border);

    color: #64738d;
    font-size: 12px;
}

/* ==========================================
   АНИМАЦИИ
   ========================================== */

@keyframes floatCard {
    0%, 100% {
        transform:
            translateY(0)
            rotateY(-7deg)
            rotateX(3deg);
    }

    50% {
        transform:
            translateY(-13px)
            rotateY(-5deg)
            rotateX(2deg);
    }
}

/* ==========================================
   ПЛАНШЕТЫ
   ========================================== */

@media (max-width: 1000px) {

    .hero-content {
        gap: 30px;
    }

    .hero h1 {
        letter-spacing: -1.5px;
    }

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .header-button {
        display: none;
    }

}

/* ==========================================
   МОБИЛЬНЫЕ УСТРОЙСТВА
   ========================================== */

@media (max-width: 700px) {

    .container {
        width: min(100% - 32px, var(--max-width));
    }

    .header-inner {
        min-height: 70px;
        flex-wrap: wrap;
        gap: 8px 15px;
        padding: 12px 0;
    }

    .logo {
        font-size: 21px;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        font-size: 19px;
    }

    .logo-caption {
        display: none;
    }

    .nav {
        gap: 15px;
    }

    .nav a {
        font-size: 12px;
    }

    .hero {
        padding: 68px 0 85px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 55px;
    }

    .hero-text {
        text-align: center;
    }

    .hero-label {
        font-size: 10px;
    }

    .hero h1 {
        font-size: clamp(35px, 9vw, 51px);
        letter-spacing: -1.5px;
    }

    .hero-text > p {
        font-size: 14px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .showcase-card {
        max-width: 370px;
        min-height: 330px;
        transform: none;
        animation: none;
    }

    .showcase-symbol {
        font-size: 85px;
    }

    .apps-section {
        padding: 75px 0 85px;
    }

    .apps-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .app-card {
        min-height: 275px;
        padding: 23px;
    }

    .section-heading {
        margin-bottom: 30px;
    }

    .about-section {
        padding: 80px 0;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 5px;
    }
}

/* ==========================================
   МАЛЕНЬКИЕ ЭКРАНЫ
   ========================================== */

@media (max-width: 390px) {

    .header-inner {
        justify-content: center;
    }

    .nav {
        width: 100%;
        justify-content: center;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .showcase-card {
        padding: 20px;
    }

    .showcase-symbol {
        font-size: 70px;
    }

}

/* ==========================================
   ДОСТУПНОСТЬ: МЕНЬШЕ АНИМАЦИЙ
   ========================================== */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================
   КАТАЛОГ — ПОИСК И ФИЛЬТРАЦИЯ
   ========================================== */

.catalog-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;

    margin-bottom: 16px;
}

/* Переключатели категорий */

.catalog-filters {
    display: flex;
    gap: 8px;

    padding: 5px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #10192a;
}

.catalog-filter {
    padding: 10px 21px;

    border: 1px solid transparent;
    border-radius: 10px;

    background: transparent;

    color: var(--text-secondary);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;

    cursor: pointer;
    transition: 0.25s;
}

.catalog-filter:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.catalog-filter.active {
    color: white;

    background: linear-gradient(
        135deg,
        #5477ff,
        #7652da
    );

    box-shadow: 0 4px 15px rgba(80, 100, 255, 0.2);
}

.catalog-filter:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* Строка поиска */

.catalog-search {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 330px;
    max-width: 100%;
    min-height: 48px;

    padding: 0 16px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #131d30;
    color: #8294b2;

    transition:
        border-color 0.25s,
        box-shadow 0.25s;
}

.catalog-search:focus-within {
    border-color: var(--primary);

    box-shadow: 0 0 0 3px
        rgba(87, 120, 255, 0.1);
}

.catalog-search svg {
    flex-shrink: 0;
}

.catalog-search input {
    width: 100%;
    min-width: 0;

    padding: 13px 0;

    background: transparent;
    border: none;
    outline: none;

    color: white;
    font-family: inherit;
    font-size: 13px;
}

.catalog-search input::placeholder {
    color: #7586a2;
}

.catalog-search input::-webkit-search-cancel-button {
    cursor: pointer;
}

/* Количество результатов */

.catalog-results {
    margin-bottom: 25px;

    color: #7e8da8;
    font-size: 12px;
}

/* Скрытые карточки */

.app-card[hidden],
.catalog-empty[hidden] {
    display: none;
}

/* Нет результатов */

.catalog-empty {
    padding: 65px 20px;

    border: 1px dashed var(--border);
    border-radius: 20px;

    background: #111a2a;
    text-align: center;
}

.empty-icon {
    margin-bottom: 15px;

    color: #7188c5;
    font-size: 55px;
    line-height: 1;
}

.catalog-empty h3 {
    font-size: 21px;
    font-weight: 700;
}

.catalog-empty p {
    margin-top: 10px;

    color: var(--text-secondary);
    font-size: 14px;
}

/* Адаптация под телефоны */

@media (max-width: 700px) {

    .catalog-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .catalog-filters {
        width: 100%;
    }

    .catalog-filter {
        flex: 1;
        padding: 11px 10px;
    }

    .catalog-search {
        width: 100%;
    }

}
