/* RESET */

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

* {
    margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

input,
button,
textarea,
select {
    font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

ul,
ol {
    list-style: none;
    padding: 0;
}

#root,
#__next {
    isolation: isolate;
}

/* PALETTE */

:root {
    --brand-gray: #f3f4f6;
    --brand-dark: rgb(229, 231, 235);
    --brand-light: #f9fafb;
    --brand-black: #475569;

    --text-color: #24344b;
    --text-muted: #666;

    --island-shadow:
        #0000 0 0, #0000 0 0, #0000001a 0 4px 6px -1px, #0000001a 0 2px 4px -2px;
}

/* TYPOGRAPHY */

@font-face {
    font-family: "TildaSans";
    src:
        url("./fonts/TildaSans/TildaSans-VF.ttf"),
        url("./fonts/TildaSans/TildaSans-VF.woff2") format("woff2"),
        url("./fonts/TildaSans/TildaSans-VF.woff") format("woff");
}

body {
    font-family: TildaSans, Arial, sans-serif;
    color: var(--text-color);
}

.section-title {
    font-size: min(8vw, 2.3rem);
    font-weight: 600;
    margin: 1em 0;
    color: #d04693;
    text-transform: uppercase;
    font-weight: 600;
}

.section-subtitle {
    font-size: 1.4rem;
    margin: 1em 0;
}

.section-text {
    font-size: 1.2rem;
    margin: 1em 0;
}

/* LAYOUT */

:root {
    --section-width: min(1200px, 95vw);
}

body {
    background: var(--brand-gray);
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)),
        linear-gradient(
            134deg,
            #a9cbfe 0%,
            #fefff5 14.1%,
            #ffceff 26.3%,
            #dfecff 37.6%,
            #ebf9f9 47.5%,
            #afebed 62.5%,
            #b3f5d2 74.9%,
            #dadaa7 88.8%,
            #dda0a2 100%
        );
    background-blend-mode: soft-light, normal;
}

main {
    width: 100%;
    margin: -3rem auto 0;
    background: #fffb;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 0 12px #aaa4;
}

.container {
    width: var(--section-width);
    margin: 0 auto;
}

/* HEADER SECTION */

.header-section {
    padding: 3rem 0;

    .container {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        justify-content: space-between;
        align-items: center;
    }

    @media (min-width: 622px) {
        .container {
            flex-direction: row;
        }
    }
}

.header-logo {
    font-size: 3rem;
    line-height: 1em;
}

.header-logo__link {
    display: block;
}

.header-logo__image {
    height: 1em;
}

.header-contacts {
    display: flex;
    gap: 1em;
    font-size: 1.3rem;
    font-weight: 700;

    img {
        display: inline-block;
        width: 1em;
        height: 1em;
        vertical-align: text-bottom;
    }
}

/* HERO SECTION */

.hero-section {
    padding: 0 0 3rem;

    @media (min-width: 622px) {
        padding: 4rem 0 6rem;
    }
}

.hero-title {
    margin: 0.2em auto;
    font-size: min(4rem, 12vw);
    font-weight: 900;
    max-width: 10em;
    text-align: center;
    text-shadow: 0.03em 0.03em 0.05em #0033;
    color: #d04693;
    text-transform: uppercase;
    line-height: 1.2em;
}

.hero-subtitle {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: #34344bcc;
}

/* CALC SECTION */

.calc-section {
    background: transparent;
}

/* TELEGRAM SECTION */

.telegram-section {
    display: grid;
    grid-template: repeat(2, auto) / auto;
    margin-top: -3rem;
    padding: 2rem 2rem;
    background-color: var(--brand-light);
    border-bottom: solid 1px #eee;

    .section-title {
        grid-column: 1/-1;
    }

    @media (min-width: 992px) {
        grid-template: repeat(2, auto) / 3fr 2fr;
    }
}

.telegram-posts__container {
    container-type: inline-size;
    height: 80vh;
    overflow-y: scroll;
    scrollbar-width: 12px;

    padding: 1rem;
    margin: 0 calc(-2rem + 4px);
    border-radius: 12px;

    @media (min-width: 662px) {
        margin: 0 -1rem;
        padding: 2rem;
    }

    @media (min-width: 992px) {
        margin: 0;
    }
}

.telegram-posts__container {
    container-type: size;
    background:
        linear-gradient(to left top, #dd03e4aa, #f1a4b5aa, #5611ecaa),
        center / 400px repeat
            url(/assets/tgbg.jpg);
    box-shadow:
        5px 5px 5px -5px rgba(34, 60, 80, 0.6) inset,
        3px 3px 3px #0003;
    border: solid 1px rgb(229, 231, 235);
}

.telegram-posts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.telegram-post {
    display: flex;
    flex-direction: column;

    border-radius: 14px;
    box-shadow: 3px 3px 2px #0005;
    margin: 3px;
    background: white;
    max-width: calc(100cqw - 2rem);
    overflow: hidden;
    width: min-content;

    --post-pads: 2rem;

    img,
    video {
        max-height: 80cqh;
        max-width: calc(100cqw - var(--post-padds));
        display: block;
    }
}

.telegram-post__text {
    padding: 1rem 1rem 0;
    line-height: 1.2em;
}

.telegram-post__open {
    display: inline-block;
    padding: 0.1em 0.5em 0;
    border-radius: 0.3em;
    color: #fff;
    background: #d04693;
    text-transform: uppercase;
    font-size: 0.5rem;
    font-weight: 700;

    svg {
        display: inline-block;
        vertical-align: text-bottom;
        margin: 0.1em 0 -0.1em;
        height: 1.5em;
    }

    &:hover {
        filter: brightness(90%);
    }
}

.telegram-post__date {
    justify-self: flex-end;
    text-align: right;
    padding: 0 0.5rem;
    font-size: 0.7rem;
    color: #999;
}

.telegram-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    background: var(--brand-gray);
    padding: 2rem;
    width: fit-content;
    margin: 2rem auto;
    border-radius: 14px;
    box-shadow: 3px 3px 3px #0003;
    border: solid 1px rgb(229, 231, 235);

    h3 {
        font-size: 1.6rem;
    }

    p {
        font-size: 1.2rem;
        max-width: 23em;
    }

    @media (min-width: 992px) {
        border-radius: 0 14px 14px 0;
    }
}

.telegram-cta__options {
    margin: 0 auto;
    padding: 1em;
    padding-left: 2.5em;
    max-width: 18em;
    text-align: left;
    border: dashed 1px #aaa;

    li {
        text-indent: -1.5em;
        line-height: 1.2em;

        &:not(:last-of-type) {
            margin-bottom: 0.5em;
        }
    }
}

.telegram-link {
    display: block;
    border: 0;
    padding: 1.2rem 2rem;
    width: fit-content;
    border-radius: 10px;
    background-color: #475569;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;

    img {
        margin-right: 0.3rem;
        height: 1.4rem;
        display: inline-block;
        vertical-align: text-top;
    }
}

/* SUCCESS SECTION */

.success-section {
    padding: 6rem 2rem 2rem;
    text-align: center;
    margin-top: -3.2rem;
}

.success-block {
    position: relative;
    max-width: 622px;
    margin: 0 auto;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 2rem;
}

.success-text {
    font-weight: 500;
    font-size: 1.3rem;
    line-height: 1.4em;
}

.success-cta {
    font-size: min(9vw, 3rem);
    line-height: 0.8em;
    font-weight: 100;
    max-width: 9em;
    font-family: "Caveat", cursive;
    font-weight: 1000;
    right: 0;
    bottom: -2rem;
    color: #d04693;
    z-index: 0;
}

/* TYPES SECTION */

.types-section {
    padding: 1rem 1rem 0;

    @media (min-width: 662px) {
        padding: 2rem 2rem 0;
    }
}

.types-list {
    --gap: 1rem;

    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
}

.types-list__item {
    box-shadow: 2px 2px 3px #0353;
    border-radius: 12px;
    padding: 1.5rem;
    flex-basis: 100%;
    background: linear-gradient(#b5eced99, #fff2);
    color: #012d;

    @media (min-width: 662px) {
        padding: 2rem;
    }

    @media (min-width: 778px) {
        flex-basis: calc(50% - var(--gap) / 2);
    }
}

.types-list__item-title {
    text-transform: uppercase;
}

.types-list__item-description {
    margin: 0.5em 0;
    text-align: justify;
}

.types-list__item-link {
    padding: 0.1em 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #d04693;
    cursor: pointer;

    &:hover {
        border-bottom: solid 1px #d04693;
    }
}

/* CONTACTS SECTION */

.contacts-section {
    padding: 2rem 2rem 0;
}

.contacts-map {
    margin: 0 -2rem;
}

/* FOOTER SECTION */

.footer-section {
    padding: 2rem 0;
    color: #777;
    background: #333;
}

/* FLOAT MENU */

.float-menu {
    position: fixed;
    bottom: 0;
    left: 50%;
    translate: -50%;
    max-width: 450px;
    border: solid 1px #ddd;
    background-color: var(--brand-light);
    opacity: 0.9;
    box-shadow: var(--island-shadow);
    border-radius: 3px;
}

.float-menu__list {
    display: flex;
}

.float-menu__item {
    padding: 0.9rem 1.1rem 0.4rem;
    &:hover {
        background-color: #0001;
    }
}

.float-menu__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.float-menu__icon {
    height: 1.2rem;
}

/* TYPE PAGES */

.type-page {
    font-size: 1rem;

    @media (min-width: 664px) {
        font-size: 1.2rem;
    }

    main {
        margin-top: 0;
        background: #fff9;
    }
}

.article-section {
    padding: 2rem 2rem 5rem;
    max-width: 55rem;
    margin: 0 auto;

    h1 {
        color: #d04693;
        text-align: center;
        font-size: 2rem;
        line-height: 1.2em;
        margin: 0.8em auto 1em;
        text-transform: uppercase;
        font-weight: 900;
        max-width: 15em;

        .-small {
            font-size: 0.5em;
            line-height: 1.5em;
            margin-top: 0.3em;
        }

        @media (min-width: 664px) {
            font-size: 2.5rem;
        }

        @media (min-width: 992px) {
            font-size: 3rem;
        }
    }

    h2 {
        text-transform: uppercase;
        color: #d04693;
        margin: 1.2em 0 0.5em;
    }

    h3 {
        margin: 1em 0 0.3em;
    }

    p {
        margin: 1em 0;
        &:last-child {
            margin-bottom: 0;
        }
    }

    ul {
        list-style: disc;
        padding-left: 1em;
    }
}

/* UTILS */

.center {
    text-align: center;
}

.left {
    text-align: left;
}
