/* Home page styles for app/httpsApi/template/home.html. */

:root {
    --home-bg: #f6f8fb;
    --home-surface: #ffffff;
    --home-text: #172033;
    --home-muted: #667085;
    --home-border: #e3e8ef;
    --home-primary: #6669d6;
    --home-primary-dark: #3739a4;
    --home-header-height: 70px;
}

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

html {
    min-height: 100%;
    background: var(--home-bg);
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    overflow-x: hidden;
    background: var(--home-bg);
    color: var(--home-text);
    font-family: 'UKIJ Tor', system-ui, -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

a {
    color: inherit;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    border-bottom: 1px solid var(--home-border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.app-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    width: min(1120px, calc(100% - 32px));
    min-height: var(--home-header-height);
    margin: 0 auto;
}

.app-brand {
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transform: translateY(-50%);
}

.app-brand__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    background: var(--home-surface);
}

.app-brand__mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-brand__name {
    color: var(--home-text);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
}

.menus {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 54px;
    margin: 0 auto;
    padding-top: 20px;
    width: 500px;
}

.menus a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 55px;
    border-radius: 8px;
    color: var(--home-muted);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    width: 33%;
}

.menus a:nth-child(1) {
    background: #fbdce5;
    color: #9e0c3a;
}

.menus a:nth-child(2) {
    background: #d9d5fc;
    color: #2c1fb8;
}

.menus a:nth-child(3) {
    background: #c4e4cd;
    color: #16943b;
}

/*.menus a::after {*/
/*    position: absolute;*/
/*    right: 14px;*/
/*    bottom: 2px;*/
/*    left: 14px;*/
/*    height: 2px;*/
/*    background: var(--home-primary);*/
/*    content: '';*/
/*    opacity: 0;*/
/*    transform: scaleX(0.5);*/
/*    transition: opacity 180ms ease, transform 180ms ease;*/
/*}*/

/*.menus a:hover,*/
/*.menus a:focus-visible,*/
/*.menus a:first-child {*/
/*    color: var(--home-primary);*/
/*}*/

/*.menus a:hover::after,*/
/*.menus a:focus-visible::after,*/
/*.menus a:first-child::after {*/
/*    opacity: 1;*/
/*    transform: scaleX(1);*/
/*}*/

#home-redesign {
    width: 100%;
    min-height: calc(100svh - var(--home-header-height) - 54px - 96px);
}

.app-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(1120px, calc(100% - 32px));
    min-height: 590px;
    margin: 0 auto;
    padding: 38px 0 34px;
}

.app-hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 500px;
    overflow: visible;
    direction: ltr;
    isolation: isolate;
}

.app-hero-card {
    --hero-position: 0;
    --hero-y: -10px;
    --hero-rotation: 0deg;
    --hero-scale: 1.04;
    --hero-z: 5;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: var(--hero-z);
    display: block;
    width: 235px;
    height: 460px;
    aspect-ratio: 1200 / 2670;
    padding: 0;
    overflow: hidden;
    border: 7px solid #172033;
    border-radius: 24px;
    background: #172033;
    box-shadow: 0 22px 45px rgba(23, 32, 51, 0.2);
    cursor: pointer;
    transform: translate(-50%, -50%)
    translateX(calc(var(--hero-position) * 132px))
    translateY(var(--hero-y))
    rotate(var(--hero-rotation))
    scale(var(--hero-scale));
    transform-origin: 50% 88%;
    transition: transform 320ms cubic-bezier(0.2, 0.75, 0.25, 1), box-shadow 320ms ease;
}

.app-hero-card:hover,
.app-hero-card:focus-visible,
.app-hero-card.is-active {
    box-shadow: 0 28px 56px rgba(23, 32, 51, 0.28);
}

.app-hero-card:focus-visible {
    outline: 3px solid #79b99e;
    outline-offset: 4px;
}

.app-hero-card__image,
.app-hero-card__image img {
    display: block;
    width: 100%;
    height: 100%;
}

.app-hero-card__image {
    overflow: hidden;
}

.app-hero-card__image img {
    object-fit: cover;
    object-position: top center;
}

.app-hero-card__top {
    position: absolute;
    top: 6px;
    right: 50%;
    z-index: 2;
    width: 44px;
    height: 12px;
    border-radius: 5px;
    background: rgb(22 32 52);
    transform: translateX(50%);
}

.downloads {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: fit-content;
    min-width: 250px;
    min-height: 60px;
    margin: 0 auto 28px;
    padding: 7px 18px;
    border-radius: 8px;
    background: var(--home-primary);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(33, 122, 87, 0.2);
    cursor: pointer;
    text-decoration: none;
    transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.downloads:hover,
.downloads:focus-visible {
    background: var(--home-primary-dark);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(33, 122, 87, 0.26);
    outline: none;
    transform: translateY(-1px);
}

.downloads .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 25px;
    font-size: 20px;
}

.downloads .icon::before {
    color: #ffffff;
    content: '\f019';
    font-family: 'Font Awesome 5 Free';
    font-size: 16px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.downloads .text {
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.app-footer {
    width: 100%;
    margin-top: auto;
    background: #172033;
    color: #aeb8c8;
}

.app-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(1120px, calc(100% - 32px));
    min-height: 66px;
    margin: 0 auto;
    padding: 14px 0;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
}

.app-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 50;
    width: min(360px, calc(100% - 32px));
    padding: 13px 17px;
    border-radius: 8px;
    background: #172033;
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(23, 32, 51, 0.24);
    font-size: 14px;
    line-height: 1.6;
    opacity: 0;
    pointer-events: none;
    text-align: center;
    transform: translate(-50%, calc(-50% + 12px));
    transition: opacity 180ms ease, transform 180ms ease;
}

.app-toast.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}

@media (max-width: 680px) {
    :root {
        --home-header-height: 64px;
    }

    .app-header__inner {
        width: calc(100% - 24px);
    }

    .app-brand__mark {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .app-brand__name {
        font-size: 16px;
    }

    .menus {
        justify-content: center;
        min-height: 50px;
        padding-inline: 12px;
        overflow: hidden;
        width: 100%;
    }

    .menus a {
        min-height: 36px;
        font-size: 14px;
    }

    #home-redesign {
        min-height: 440px;
    }

    .app-hero {
        width: calc(100% - 24px);
        min-height: 440px;
        padding: 28px 0 18px;
        margin-bottom: 30px;
    }

    .app-hero__visual {
        min-height: 430px;
        overflow: hidden;
        margin-top: 30px;
    }

    .app-hero-card {
        width: min(44vw, 170px);
        height: auto;
        aspect-ratio: 1200 / 2670;
        border-width: 5px;
        border-radius: 19px;
        transform: translate(-50%, -50%)
        translateX(calc(var(--hero-position) * min(12vw, 74px)))
        translateY(var(--hero-y))
        rotate(var(--hero-rotation))
        scale(var(--hero-scale));
    }

    .app-hero-card__top {
        top: 4px;
        width: 34px;
        height: 8px;
    }

    .downloads {
        margin-bottom: 20px;
        padding: 6px 15px;
    }

    .downloads .icon {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }

    .app-footer__bottom {
        width: calc(100% - 24px);
        min-height: 60px;
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .menus a {
        padding-inline: 9px;
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
