/* Главная (templates/home.html, core.home): про сервер. Стиль «неон» — цвет из акцента. */
.home {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 72rem;
}

/* Длинные названия (темы форума, ники) не должны раздвигать страницу шире экрана. */
.home > * {
    min-width: 0;
}

/* --- Баннер ---------------------------------------------------------------- */
.home-hero {
    position: relative;
    overflow: hidden;
    /* Отступ сверху до «Сезон N идёт» = отступу от неё до заголовка (margin у __title). */
    padding: 1.75rem 2.5rem 2.25rem;
    border: 1px solid rgba(var(--tertiary-text), .35);
    border-radius: 1.75rem;
    background:
        linear-gradient(90deg, rgba(10, 10, 14, .92) 0%, rgba(10, 10, 14, .7) 45%, rgba(10, 10, 14, .2) 100%),
        linear-gradient(0deg, rgba(10, 10, 14, .85) 0%, transparent 55%),
        var(--hero-img, none) center / cover no-repeat,
        #17161c;
    box-shadow: 0 0 0 1px rgba(var(--tertiary-text), .08), 0 0 40px rgba(var(--tertiary-text), .14), 0 18px 40px rgba(0, 0, 0, .55);
}

.home-hero__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
}

.home-hero__title,
.home-hero__lead {
    max-width: 38rem;
}

.home-hero__kicker {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: rgba(var(--tertiary-text), .15);
    color: rgba(var(--tertiary-text), 1);
    font-size: .85rem;
    font-weight: 700;
}

.home-hero__title {
    margin: 1.75rem 0 .75rem;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
}

.home-hero__lead {
    margin-bottom: 1.5rem;
    color: rgba(var(--bs-white-rgb), .82);
    font-size: 1.05rem;
}

.home-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.home-hero__status {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: rgba(10, 10, 14, .55);
    color: rgba(var(--bs-white-rgb), .8);
    font-size: .85rem;
    font-weight: 600;
}

.home-hero__dot {
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: #6c717c;
}

.home-hero__status.is-on .home-hero__dot {
    background: rgb(var(--tertiary-text));
    box-shadow: 0 0 10px rgba(var(--tertiary-text), .9);
    animation: home-pulse 2s ease-in-out infinite;
}

.home-hero__status.is-off .home-hero__dot {
    background: var(--nn-danger);
}

@keyframes home-pulse {
    50% { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero__status.is-on .home-hero__dot { animation: none; }
}

/* --- Своя плашка ----------------------------------------------------------- */
.home-me {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: .75rem 1.5rem;
    border: 1px solid rgba(var(--tertiary-text), .25);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, .04);
}

.home-me__figure {
    height: 64px;
    image-rendering: pixelated;
}

.home-me__hello {
    display: flex;
    flex-direction: column;
    margin-right: auto;
}

.home-me__name {
    font-family: var(--nn-font-display);
    font-size: 1.2rem;
}

.home-me__stat {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: inherit;
    text-decoration: none;
}

.home-me__stat:hover {
    background: rgba(var(--tertiary-text), .12);
}

.home-me__stat span {
    color: var(--bs-secondary-color);
}

/* --- Общие заголовки разделов --------------------------------------------- */
.home-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    margin-bottom: 1rem;
}

.home-section__title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
}

.home-section__lead {
    max-width: 48rem;
    margin: -.25rem 0 1rem;
    color: var(--bs-secondary-color);
}

.home-section__head .home-section__title {
    margin: 0;
}

.home-section__more {
    color: rgba(var(--tertiary-text), 1);
    font-size: .95rem;
    text-decoration: none;
}

.home-section__more:hover {
    text-decoration: underline;
}

/* --- Мега-проект ---------------------------------------------------------- */
.home-goal .card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.home-goal__head {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.home-goal__icon {
    display: grid;
    flex: none;
    place-items: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 1rem;
    background: rgba(var(--tertiary-text), .9);
    color: #111;
    font-size: 1.5rem;
    box-shadow: 0 0 20px rgba(var(--tertiary-text), .4);
}

.home-goal__kicker {
    color: var(--bs-secondary-color);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.home-goal__title {
    margin: .1rem 0 0;
    font-size: 1.35rem;
}

.home-goal__percent {
    margin-left: auto;
    font-family: var(--nn-font-display);
    font-size: 1.6rem;
    color: rgba(var(--tertiary-text), 1);
}

.home-bar {
    display: block;
    height: .6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    overflow: hidden;
}

.home-bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: rgb(var(--tertiary-text));
    box-shadow: 0 0 12px rgba(var(--tertiary-text), .6);
}

.home-goal__unlocks {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}

.home-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--bs-white-rgb), .14);
    background: rgba(255, 255, 255, .05);
    font-size: .85rem;
}

.home-goal__next {
    margin: 0;
    color: var(--bs-secondary-color);
}

/* --- История: карусель сезонов --------------------------------------------- */
.home-story {
    position: relative;
    overflow: hidden;
    height: 22rem;
    border-radius: 1.4rem;
}

.home-story__track {
    display: flex;
    gap: 1rem;
    height: 100%;
    /* Длительность — как MOVE в скрипте главной (templates/home.html). */
    transition: transform .7s cubic-bezier(.65, 0, .35, 1);
}

.home-story__slide {
    display: grid;
    flex: 0 0 min(52rem, 84%);
    grid-template-columns: 1.15fr 1fr;
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(var(--bs-white-rgb), .12);
    border-radius: 1.4rem;
    background: #17161c;
    opacity: .4;
    transform: scale(.94);
    transition: opacity .5s ease, transform .5s ease, border-color .5s ease, box-shadow .5s ease;
    cursor: pointer;
}

.home-story__slide.is-active {
    opacity: 1;
    transform: none;
    cursor: default;
    border-color: rgba(var(--tertiary-text), .45);
    box-shadow: 0 0 28px rgba(var(--tertiary-text), .16);
}

.home-story.no-anim .home-story__track,
.home-story.no-anim .home-story__slide {
    transition: none;
}

.home-story__cover {
    display: grid;
    place-items: center;
    background: #1d1c23 center / cover no-repeat;
    color: var(--bs-secondary-color);
    font-size: 2rem;
}

.home-story__body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: .5rem;
    padding: 1.5rem 1.75rem;
    overflow: auto;
}

.home-story__title {
    margin: 0;
    font-size: 1.5rem;
    color: rgba(var(--tertiary-text), 1);
}

.home-story__arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    margin-top: -1.3rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.home-story__arrow:hover {
    border-color: rgba(var(--tertiary-text), .7);
    color: rgba(var(--tertiary-text), 1);
}

.home-story__arrow--prev { left: .6rem; }
.home-story__arrow--next { right: .6rem; }

@media (prefers-reduced-motion: reduce) {
    .home-story__track, .home-story__slide { transition: none; }
}

/* Телефон: обложка сверху, текст снизу. */
@media (max-width: 767.98px) {
    .home-story { height: 30rem; }
    .home-story__track { gap: .5rem; }
    .home-story__slide {
        flex-basis: 86%;
        grid-template-columns: 1fr;
        grid-template-rows: 11rem 1fr;
    }
    .home-story__body { padding: 1rem 1.1rem; }
    .home-story__title { font-size: 1.2rem; }
    .home-story__body p { font-size: .92rem; }
    .home-story__arrow { width: 2.1rem; height: 2.1rem; margin-top: -1.05rem; top: 5.5rem; }
}

/* --- Как начать ------------------------------------------------------- */
.home-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    gap: .75rem;
    margin: 0;
}

.home-steps .card-body {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1.25rem;
}

.home-steps h3 {
    margin: 0;
    font-size: 1.1rem;
}

.home-steps a {
    margin-top: auto;
    color: rgba(var(--tertiary-text), 1);
    text-decoration: none;
}

.home-steps__num {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: rgb(var(--tertiary-text));
    color: #111;
    font-weight: 800;
    box-shadow: 0 0 16px rgba(var(--tertiary-text), .45);
}

/* --- Телефон ------------------------------------------------------------- */
@media (max-width: 575.98px) {
    .home { gap: 2rem; }
    .home-hero { padding: 1.25rem 1.25rem 1.5rem; border-radius: 1.4rem; }
    .home-hero__title { margin-top: 1.25rem; }
    .home-hero__actions .btn { flex: 1 1 auto; }
    .home-me { padding: .75rem 1rem; }
    .home-me__stat { flex: 1 1 auto; justify-content: center; }
    .home-goal .card-body { padding: 1.1rem; }
    .home-goal__icon { width: 2.6rem; height: 2.6rem; font-size: 1.2rem; }
    .home-goal__title { font-size: 1.1rem; }
}
