
/* мобилка <= 768px */
@media (max-width: 768px) {
    :root {
        --grid-columns: 4;
        --page-padding: 16px;
        --grid-gap: 12px;

        --header-offset: 20px;
        --section-space: 60px;
    }


    /* типографика */
    .text-h1 {
        font-size: 35px;
    }

    .text-h2 {
        font-size: 32px;
    }

    .text-caption {
        font-size: 21px;
    }

    .text-body {
        font-size: 16px;
    }

    .text-microcopy,
    .text-microcopy-medium {
        font-size: 12px;
    }


    /* ui */
    .nav {
        display: none;
    }

    .button.mobile-menu-button {
        display: inline-flex;
    }

    .icon-button {
        width: 50px;
        height: 50px;

        border-radius: var(--radius-small);
    }

    .icon-button img,
    .icon-button svg {
        width: 30px;
        height: 30px;
    }

    /* хедер */
    .header {
        right: auto;
        width: max-content;
    }

    .header__logo-text {
        display: none;
    }

    .header__logo-icon {
        height: 23px;
    }

    /* выпадающее меню */
    .mobile-nav {
        position: absolute;
        top: calc(100% + 12px);
        left: 0;

        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;

        width: 100%;

        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    }

    .mobile-nav.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-nav__link {
        width: 100%;
        min-height: 41px;

        justify-content: flex-start;
        text-align: left;

        color: rgba(var(--color-black-rgb), 0.35);
    }

    .mobile-nav__link.is-active {
        color: var(--color-black);
    }


    /* футер */
    .footer {
        min-height: 330px;
        padding: 48px 16px 48px;
        border-radius: 32px 32px 0 0;
    }

    .footer__nav {
        gap: 28px;
        font-size: 24px;
    }

    .footer__meta,
    .footer__credits {
        position: static;
        gap: 0;
        justify-content: space-between;

        width: 100%;
        font-size: 12px;
    }

    .footer__meta {
        margin-top: 48px;
    }

    .footer__credits {
        margin-top: 12px;
    }




    /* I. главная !! */

    /* I.I. hero-блок */
    .hero-screen {
        --planet-main-size: clamp(280px, 78vw, 520px);
        --mob-hero-shift: clamp(32px, 6svh, 72px);

        height: 100vh;
        height: 100svh;
        min-height: 0;
        max-height: 950px;

        border-radius: 0 0 var(--radius-large-mobile) var(--radius-large-mobile);
    }

    /* планеты */
    .hero-screen__planet--main {
        top: calc(50% - var(--mob-hero-shift));
    }
    .hero-screen__planet--small {
        top: calc(50% + var(--planet-main-size) * 0.42 - var(--mob-hero-shift));
    }

    /* логотип + описание */
    .hero-screen__content {
        position: absolute;
        inset: 0;

        display: block;

        width: auto;
        max-width: none;

        transform: none;
    }

    /* логотип */
    .hero-screen__logo--mobile {
        display: block;
        position: absolute;
        left: 24px;
        top: calc(48% - var(--mob-hero-shift));
        transform: translateY(-50%);

        width: clamp(240px, 88vw, 300px);
        height: auto;
    }

    .hero-screen__logo--desktop,
    .hero-screen__logo--tablet {
        display: none;
    }

    /* описание лабы */
    .hero-screen__lead {
        position: absolute;
        left: 24px;
        right: 24px;
        bottom: 80px;

        width: auto;
        max-width: 348px;
        margin: 0;

        font-size: 21px;
        line-height: 1.1;
        letter-spacing: -0.06em;
    }


    /* пунктики с подписями */
    .hero-callout {
        width: 170px;
        height: 107px;
    }

    .hero-callout__text {
        width: 200px;
        max-width: none;
        white-space: normal;
    }

    /* перенос подписей */
    .hero-callout__text--desktop-tablet {
        display: none;
    }

    .hero-callout__text--mobile {
        display: block;
    }

    .hero-callout__text-line {
        display: block;
        white-space: nowrap;
    }

    .hero-callout__text-line + .hero-callout__text-line::before {
        content: none;
    }

    /* верхний правый пункт */
    .hero-callout--top {
        left: auto;
        right: 32px;
        top: calc(50% - 235px - var(--mob-hero-shift));
    }

    .hero-callout--top .hero-callout__circle {
        left: 0;
        bottom: 0;
    }

    .hero-callout--top .hero-callout__line {
        left: 24px;
        bottom: 24px;
        width: 150px;
    }

    .hero-callout--top .hero-callout__text {
        left: 64px;
        top: -7px;
        text-align: left;
    }
    
    /* нижний левый пункт */
    .hero-callout--bottom {
        left: 32px;
        right: auto;
        top: auto;
        bottom: calc(50% - 235px + var(--mob-hero-shift));
    }

    .hero-callout--bottom .hero-callout__circle {
        right: 0;
        top: 0;
    }

    .hero-callout--bottom .hero-callout__line {
        right: 24px;
        top: 24px;
        width: 150px;
    }

    .hero-callout--bottom .hero-callout__text {
        left: -4px;
        top: 15px;
        text-align: left;
    }


    /* mob : кнопки */
    .hero-screen__buttons {
        left: 16px;
        right: 16px;
        bottom: 16px;
        transform: none;

        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-flow: row;
        gap: 12px;
    }




    /* I.II. о нас */
    .about-preview__inner {
        row-gap: 32px;
    }
    
    /* заголовок */
    .about-preview__title {
        grid-column: 1 / 5;
        grid-row: auto;
    }

    /* утп */
    .about-preview__stats {
        grid-column: 1 / 5;
        grid-row: auto;

        display: grid;
        grid-template-columns: 1fr;
        row-gap: 16px;

        margin-top: -4px;
    }

    .about-preview__stat {
        margin: 0;
        width: 100%;
    }

    .about-preview__stat:nth-child(1) {
        grid-column: 1 / -1;
        justify-self: stretch;
        align-items: flex-start;
        text-align: left;
    }

    .about-preview__stat:nth-child(2) {
        grid-column: 1 / -1;
        justify-self: stretch;
        align-items: flex-end;
        text-align: right;
    }

    .about-preview__stat:nth-child(3) {
        grid-column: 1 / -1;
        justify-self: stretch;
        align-items: flex-start;
        text-align: left;
    }

    .about-preview__stat--end {
        align-items: flex-start;
        text-align: left;
    }

    .about-preview__stat-line {
        white-space: normal;
    }

    /* описание + миссия */
    .about-preview__content {
        grid-column: 1 / 5;
        grid-row: auto;
        grid-template-columns: 1fr;
        row-gap: 32px;
    }
        
    .about-preview__block,
    .about-preview__block--mission {
        grid-column: 1 / 5;
        flex-direction: column; gap: 8px;
    }
    
    .about-preview__text,
    .about-preview__block--mission .about-preview__text {
        max-width: none;
    }
        
    /* ста */ .about-preview__button {
        grid-column: 1 / 5;
        grid-row: auto;
        justify-self: stretch;
        margin-top: 0;
    }





    /* I.III. тизер каталога */
    .catalog-teaser__marquee {
        overflow: visible;
    }

    .catalog-teaser__track {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        column-gap: 16px;
        row-gap: 24px;
        width: auto;
        animation: none;
    }

    .catalog-teaser__planet[aria-hidden="true"] {
        display: none;
    }

    /* планеты */
    .catalog-teaser__planet {
        gap: 16px;
    }

    .catalog-teaser__planet-image {
        width: 100%;
        max-width: clamp(140px, 44vw, 220px);
    }

    .catalog-teaser__merch {
        display: flex;
        grid-template-columns: none;
        column-gap: var(--grid-gap);
        margin-top: 48px;

        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }

    .catalog-teaser__card {
        flex: 0 0 72%;
        scroll-snap-align: center;
    }

    /* mob : ста-кнопка каталога */
    .catalog-teaser__button {
        width: 100%;
        max-width: 100%;
        margin: 32px 0 0;
        justify-content: center;
    }






    /* I.IV. мероприятия */
    .events-preview__header {
        display: grid;
        grid-template-columns: repeat(var(--grid-columns), minmax(0, 1fr));
        column-gap: var(--grid-gap);
        row-gap: 16px;
        margin-bottom: 32px;
    }

    .events-preview__title {
        grid-column: 1 / 5;
        grid-row: 1;
        white-space: nowrap;
    }

    .events-preview__categories {
        display: contents;
    }

    .events-preview__category {
        padding-top: 0;
    }

    /* 1-й блок названий */
    .events-preview__category:nth-of-type(1) {
        grid-column: 1 / 3;
        grid-row: 2;
        justify-self: start;
        text-align: left;
        margin-top: 16px;
    }

    /* 2-й блок названий */
    .events-preview__category:nth-of-type(2) {
        grid-column: 2 / 5;
        grid-row: 3;
        justify-self: start;
        text-align: left;
    }

    /* 3-й блок названий */
    .events-preview__category:nth-of-type(3) {
        grid-column: 3 / 5;
        grid-row: 4;
        justify-self: end;
        text-align: right;
    }

    .events-preview__category .text-microcopy {
        white-space: nowrap;
    }

    /* mobile : слайдер */
    .events-preview__slider--desktop {
        display: none;
    }

    .events-preview__slider--mobile {
        display: block;
        width: 100%;
        overflow: hidden;
    }

    .events-preview__slider--mobile .events-preview__track {
        display: flex;
        gap: var(--grid-gap);
    }

    .events-preview__slider--mobile .events-preview__slide {
        display: block;
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
    }

    .events-preview__slider--mobile .events-preview__card,
    .events-preview__slider--mobile .events-preview__card--full {
        width: 100%;
    }

    /* карточка */
    .events-preview__card {
        height: 600px;
        overflow: hidden;
        border-radius: var(--radius-medium);
    }

    /* оверлей */
    .events-preview__card-overlay {
        padding: 24px;
        opacity: 1;
    }

    .events-preview__card:hover .events-preview__card-overlay {
        opacity: 1;
    }

    /* тап по оверлею */
    .events-preview__card.is-overlay-hidden .events-preview__card-overlay {
        opacity: 0;
    }

    .events-preview__card-line {
        margin: 16px 0;
    }

    .events-preview__card-description-group {
        flex-direction: column;
        gap: 12px;
    }

    /* 3 карточки коллабораций */
    .events-preview__card-image--c1 {
        background-position: 22% center;
    }

    .events-preview__card-image--c2 {
        background-position: center;
    }

    .events-preview__card-image--c3 {
        background-position: 80% center;
    }

    /* стрелки */
    .events-preview__arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;

        border: none;
        cursor: pointer;

        width: 50px;
        height: 50px;
        border-radius: var(--radius-small);
    }

    .events-preview__arrow img,
    .events-preview__arrow svg {
        width: 30px;
        height: 30px;
    }

    .events-preview__arrow--prev {
        left: 24px;
    }

    .events-preview__arrow--next {
        right: 24px;
    }

    .events-preview__arrow--prev img {
        transform: none;
    }

    .events-preview__arrow--next img {
        transform: rotate(180deg);
    }

    /* ста-кнопка */
    .events-preview__button {
        width: 100%;
        margin: 32px auto 0;
    }








    /* II. каталог */

    .catalog-cart-button {
        right: 16px;
    }

    .catalog-hero__header {
        margin-bottom: 32px;
    }

    .catalog-hero__title {
        grid-column: 1 / 5;
        grid-row: 1;
    }

    /* II.0. корзина */
    .catalog-cart {
        top: calc(var(--header-offset) + 41px + 8px);
        left: 16px;
        right: 16px;
        width: auto;
        max-width: none;
    }

    /* плюсики минусики */
    .catalog-cart__qty-button {
        width: 40px;
        height: 40px;
        border-radius: var(--radius-small);
    }

    .catalog-cart__qty-button::before {
        width: 12px;
        height: 1.5px;
    }

    .catalog-cart__qty-button--plus::after {
        width: 1.5px;
        height: 12px;
    }


    /* II.I. подписи */
    .catalog-hero__labels {
        display: grid;
        grid-column: 1 / 5;
        grid-row: 2;
        grid-template-columns: repeat(12, minmax(0, 1fr));
        column-gap: 4px;
        row-gap: 12px;
        margin-top: 16px;
    }

    /* строка 1 */
    .catalog-hero__label:nth-child(1)  { grid-column: 1 / 4;   grid-row: 1; justify-self: start; }
    .catalog-hero__label:nth-child(2)  { grid-column: 4 / 7;   grid-row: 1; justify-self: start; }
    .catalog-hero__label:nth-child(3)  { grid-column: 7 / 10;  grid-row: 1; justify-self: center; }
    .catalog-hero__label:nth-child(4)  { grid-column: 10 / 13; grid-row: 1; justify-self: end; text-align: right; }
    
    /* строка 2 */
    .catalog-hero__label:nth-child(5)  { grid-column: 1 / 3;   grid-row: 2; justify-self: start; }
    .catalog-hero__label:nth-child(6)  { grid-column: 3 / 5;   grid-row: 2; justify-self: start; }
    .catalog-hero__label:nth-child(7)  { grid-column: 5 / 7;   grid-row: 2; justify-self: start; }
    .catalog-hero__label:nth-child(8)  { grid-column: 7 / 10;  grid-row: 2; justify-self: start; }
    .catalog-hero__label:nth-child(9)  { grid-column: 10 / 13; grid-row: 2; justify-self: end; text-align: right; }
    
    /* строка 3 */
    .catalog-hero__label:nth-child(10) { grid-column: 1 / 4;   grid-row: 3; justify-self: start; text-align: left; }
    .catalog-hero__label:nth-child(11) { grid-column: 4 / 7;   grid-row: 3; justify-self: start; }
    .catalog-hero__label:nth-child(12) { grid-column: 7 / 9;   grid-row: 3; justify-self: start; text-align: left; }
    .catalog-hero__label:nth-child(13) { grid-column: 9 / 13;  grid-row: 3; justify-self: end; text-align: right; }


    /* II.II. планеты */
    .catalog-planets__grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--grid-gap);
        row-gap: 24px;
    }

    .catalog-planets__grid .catalog-planets__item,
    .catalog-planets__grid .catalog-planets__item:nth-child(3n + 1),
    .catalog-planets__grid .catalog-planets__item:nth-child(3n + 2),
    .catalog-planets__grid .catalog-planets__item:nth-child(3n) {
        grid-column: auto;
        align-items: center;
        width: 100%;
        min-width: 0;
        padding: 0;
    }

    .catalog-planets__grid .catalog-planets__item .catalog-planets__image-wrap {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .catalog-planets__name {
        width: 100%;
        margin-top: 12px;
        text-align: center;
    }

    /* плюсик */
    .catalog-planets__add {
        left: 50%;
        bottom: 16px;
        transform: translateX(-50%);

        width: 50px;
        height: 50px;
        border-radius: var(--radius-small);
    }

    .catalog-planets__add img,
    .catalog-planets__add svg {
        width: 30px;
        height: 30px;
    }


    /* попап */
    .catalog-success {
        left: 50%;
        top: 70%;
        right: auto;

        width: calc(100vw - 32px);
        max-width: 370px;

        transform: translate(-50%, -50%) translateY(-8px);
    }

    .catalog-success.is-open {
        transform: translate(-50%, -50%);
    }




    /* II.III. проекты */
    .catalog-projects {
        --proj-media-inset: 8px;
    }

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

    .catalog-projects__card--constructor,
    .catalog-projects__card--instructions {
        grid-column: auto;
        flex-direction: column;
        height: auto;
        border-radius: var(--radius-medium);
    }

    .catalog-projects__content {
        padding: 24px 24px 16px;
    }

    .catalog-projects__text {
        max-width: none;
    }

    /* ста-кнопка */
    .catalog-projects__button {
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: 16px;
        z-index: 2;
        margin-top: 0;
        align-self: auto;
    }

    /* пикча */
    .catalog-projects__media {
        width: auto;
        align-self: stretch;
        margin: var(--proj-media-inset);
        aspect-ratio: 1 / 1;
        border-radius: var(--radius-small);
    }




    /* II.IV. мерч */
    .catalog-merch__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: var(--grid-gap);
        row-gap: 32px;
    }

    .catalog-merch__item {
        grid-column: auto;
    }

    .catalog-merch__item--wide {
        grid-column: 1 / -1;
        order: 1;
    }

    .catalog-merch__image {
        transform: scale(1.6);
    }

    .catalog-merch__item--wide .catalog-merch__image {
        transform: scale(2.5);
    }

    /* плюсик */
    .catalog-merch__add {
        bottom: 16px;
        border-radius: var(--radius-small);
    }

    .catalog-merch__name {
        margin-top: 12px;
    }










    /* III. мероприятия */

    .events-page__desktop {
        display: none;
    }

    .events-page__mobile {
        display: block;
    }

    /* оверлей виден по дефолту */
    .events-page .events-preview__card-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    /* скрытие оверлея по тапу */
    .events-page .events-preview__card.is-overlay-hidden .events-preview__card-overlay {
        opacity: 0;
        pointer-events: none;
    }








    /* IV. руководство */

    .guide-hero { border-radius: 0 0 var(--radius-large-mobile) var(--radius-large-mobile); }

    /* обложка */
    .guide-hero__cover {
        top: 53%;
        left: calc(50% + 5px);
        transform: translate(-50%, -50%);
        width: 98%;
        max-height: 80%;
    }


    /* подсказка callout */
    .guide-hero-callout {
        left: 50%;
        right: auto;
        top: auto;
        bottom: 16px;
        transform: translateX(-50%);
        width: max-content;
        height: auto;

        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .guide-hero-callout__line {
        display: none;
    }

    .guide-hero-callout__circle {
        display: none;
    }

    .guide-hero-callout__text {
        position: static;
        width: max-content;
        max-width: 240px;

        white-space: nowrap;
        text-align: center;
    }

    /* развороты */
    .guide-spreads__track { gap: 16px; }
    .guide-spreads__slide { flex: 0 0 82vw; }
    .guide-spreads__image {
        height: auto;
        width: 100%;
        aspect-ratio: 1412 / 1000;
        object-fit: cover;
        border-radius: 12px;
    }









    /* V. о нас */
    
    .about-page { padding-top: 0; }

    .about-page__hero {
        position: relative;

        width: 100vw;
        margin-left: calc(50% - 50vw);

        height: 100vh;
        height: 100svh;

        overflow: hidden;
        background-color: var(--color-light-gray);

        border-radius: 0 0 var(--radius-large-mobile) var(--radius-large-mobile);
    }

    /* пикча вместо видео */
    .about-page__hero-video { display: none; }
    .about-page__hero-image {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        transform: scale(1.35);
        transform-origin: center center;
    }

    .about-page__info { margin-top: 40px; }
    .about-gallery { margin-top: 40px; }

    /* 3 слайдера */
    .about-gallery__desktop { display: none; }
    .about-gallery__mobile { display: block; }

    .about-gallery__slider { margin-bottom: 16px; }
    .about-gallery__slider:last-child { margin-bottom: 0; }

    .about-gallery__mobile .about-gallery__slider {
        overflow: hidden;
    }

    .about-gallery__mobile .about-gallery__track {
        display: flex;
        gap: var(--grid-gap);
    }

    .about-gallery__mobile .about-gallery__slide {
        flex: 0 0 100%;
        width: 100%;
        min-width: 100%;
    }

    /* обрезка рендеров */
    .about-gallery__mobile .about-gallery__image {
        height: auto;
        aspect-ratio: 1 / 1;
        object-fit: cover;
        border-radius: 24px;
    }










    /* 404 */
    .error-hero {
        --error-planet-size: clamp(300px, 76vw, 380px);
        --error-planet-center: 45%;
        --error-button-bottom: 16px;

        height: 100svh;
        min-height: 600px;
        border-radius: 0 0 var(--radius-large-mobile) var(--radius-large-mobile);
    }

    .error-hero__planet-wrap {
        width: var(--error-planet-size);
        height: var(--error-planet-size);

        left: 50%;
        top: var(--error-planet-center);
        transform: translate(-50%, -50%);
    }

    /* код 404 */
    .error-hero__code {
        left: 50%;
        top: var(--error-planet-center);
        transform: translate(-50%, -50%);

        width: calc(100vw - 32px);
        max-width: none;
        height: auto;
    }


    /* пунктик */
    .error-callout {
        left: 46%;
        top: -22%;
        transform: none;

        width: 180px;
        height: 110px;
    }

    .error-callout__circle {
        position: absolute;
        left: 0;
        bottom: 0;
        top: auto;
        transform: none;

        width: 48px;
        height: 48px;
    }

    .error-callout__line {
        display: block;
        position: absolute;
        left: 24px;
        bottom: 24px;
        width: 150px;
        height: auto;
    }

    .error-callout__text--desktop {
        display: none;
    }

    .error-callout__text--mobile {
        display: block;
        position: absolute;
        left: 64px;
        top: 10px;
        bottom: auto;
        transform: none;
        margin-bottom: 0;

        width: 120px;
        text-align: left;
        white-space: normal;
        color: var(--color-light-gray);
    }

    .error-callout__text--mobile .error-callout__text-line {
        display: block;
        white-space: nowrap;
    }

    .error-callout__text--mobile .error-callout__text-line + .error-callout__text-line::before {
        content: none;
    }

    /* боди текст */
    .error-hero__text {
        left: 50%;
        top: calc(
            var(--error-planet-center) + var(--error-planet-size) / 2 +
            (100% - var(--error-planet-center) - var(--error-planet-size) / 2 - var(--error-button-bottom) - 41px) / 2
        );
        transform: translate(-50%, -50%);
        width: 80%;
        text-align: center;
    }

    /* кнопка */
    .error-hero__button {
        left: 16px;
        right: 16px;
        bottom: var(--error-button-bottom);
        transform: none;
        justify-content: center;
    }
}