:root {


    --color-text-number-secondary: rgba(64, 95, 137, 0.45);

    --fs-display: round(clamp(3.25rem, 6.2vw, 6rem), 2px); /* размер всегда будет целым чётным числом от 52px до 96px */
    --lh-display: 0.92;
}


h2 {
    margin-bottom: 0;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.1;
}




/* buttons begin */
.home_button {
    min-height: 3rem;

    padding: 0.8rem 1.35rem;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid transparent;
    border-radius: 0.5rem; /* 8px */

    font-size: 0.7rem;
    font-weight: var(--fw-bold);
    line-height: 1;
    text-transform: uppercase;

    transition: background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}


.home_button:hover {
    transform: translateY(-2px);
}


.home_button_primary {
    background: var(--color-primary);
    color: #ffffff;
}


.home_button_primary:hover {
    background: var(--color-primary-dark);
}


.home_button_secondary {
    background: transparent;
    color: var(--color-primary);

    border-color: rgba(64, 95, 137, 0.3);
}


.home_button_secondary:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}


.home_button_light {
    background: #ffffff;
    color: var(--color-primary);
}


.home_button_light:hover {
    background: var(--color-accent);
}



.home_practice .home_button,
.home_olympiads .home_button {
    margin-top: 1rem;
}
/* buttons end */

/* sections begin */
.section {
    padding: 2rem 0; /* 32px 0 */
}

.section header {
    display: grid;
    grid-template-columns: 3rem 1fr; /* 48px 1fr */
    gap: 0 1rem; /* 0 16px */
    margin-bottom: 1.875rem; /* 30px */
}

.section header h2 {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
    margin-bottom: 0.5rem; /* 8px */
}

.section_description {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
    color: rgba(51, 51, 51, 0.58);
}

.section_number {
    grid-row: 1 / 2;
    grid-column: 1 / 1;
    padding-top: 0.25rem; /* 4px */
    color: var(--color-primary);
    font-size: 0.75rem; /* 12px */
    font-weight: var(--fw-bold);
}
/* sections end */

/* hero begin */
#hero {
    min-height: calc(100vh - 4rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.9fr);
    gap: 4rem;
    align-items: center;
}

#hero_content {
    display: flex;
    flex-direction: column;
    gap: 2rem; /* 32px */
}

#hero_label {
    margin: 0;
    color: var(--color-primary);
    font-size: 0.75rem; /* 12px */
    font-weight: var(--fw-bold);
    text-transform: uppercase;
}

#hero_content h1 {
    margin: 0;
    font-size: var(--fs-display);
    line-height: var(--lh-display);
}

#hero_content h1 span {
    display: inline-block;
    color: var(--color-primary);
}

#hero_description {
    max-width: 35rem; /* 560px */
    margin: 0;
    font-size: 1rem; /* 16px */
    color: var(--color-text-main);
}

#hero_actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* 12px */
}

#hero_visual {
    min-height: 29rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    border-radius: 0.5rem; /* 8px */
    box-shadow: 0 1.5rem 4rem rgba(48, 75, 109, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero_visual_formula {
    position: absolute;
    color: var(--color-text-light);
    font-size: 1rem; /* 16px */
    font-weight: var(--fw-light);
    line-height: 1;
    text-shadow: 0 0.0625rem 0.125rem var(--color-shadow-light); /* 0 1px 2px */
    white-space: nowrap;
}

.hero_visual_formula_1 {
    top: 13%;
    left: 10%;
}

.hero_visual_formula_2 {
    top: 28%;
    right: 10%;
}

.hero_visual_formula_3 {
    bottom: 18%;
    left: 9%;
}

.hero_visual_formula_4 {
    bottom: 11%;
    right: 18%;
}

.hero_visual_formula_5 {
    top: 10%;
    right: 32%;
}

.hero_visual_formula_6 {
    bottom: 33%;
    left: 28%;
}

.hero_visual_formula_main {
    position: relative;
    color: var(--color-text-white);
    font-size: 11rem;
    font-weight: var(--fw-light);
}

.hero_visual_line {
    position: absolute;
    width: 13rem;
    height: 0.0625rem; /* 1px */
    background: rgba(255, 255, 255, 0.14);
}

.hero_visual_line_1 {
    top: 30%;
    left: -2rem;
    transform: rotate(-30deg);
}

.hero_visual_line_2 {
    right: -2rem;
    bottom: 29%;
    transform: rotate(30deg);
}
/* hero end */

/* directions begin */
#directions {
    margin: 2rem 0 0; /* 32px 0 0 */
}

#directions_grid {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 0.0625rem solid var(--color-border-gray); /* 1px */
    border-radius: 0.5rem; /* 8px */
    overflow: hidden;
}

.direction_card_large {
    grid-row: span 2;
}

.direction_card a {
    height: 100%;
    padding: 2rem;
    display: grid;
    grid-template-rows: repeat(2, auto);
    grid-template-columns: 1fr 1.5rem;
    gap: 1rem;
    background: var(--color-bg-white);
    transition: background 0.25s ease, transform 0.25s ease;
}

.direction_card a:hover {
    background: var(--color-accent);
}

.direction_card_number {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    color: var(--color-text-number-secondary);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
}

.direction_card_content {
    grid-row: 2 / 3;
    grid-column: 1 / 2;
}

.direction_card_content svg {
    display: block;
    height: 2.25rem; /* 36px */
    fill: var(--color-primary);
}

.direction_card_content h3 {
    margin: 1rem 0 0.625rem; /* 16px 0 10px */
}

.direction_card_content p {
    margin: 0;
    color: rgba(51, 51, 51, 0.6);
}

.direction_card a > svg {
    grid-row: span 2;
    grid-column: 2 / 3;
    align-self: end;
    width: 1.5rem;
    fill: var(--color-primary);
    transition: transform 0.2s ease;
}

.direction_card a:hover > svg {
    transform: translateX(0.3rem);
}
/* directions end */

/* classes begin */
#classes_grid {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border: 0.0625rem solid var(--color-border-gray); /* 1px */
    border-radius: 0.5rem; /* 8px */
    overflow: hidden;
}

.class_card a {
    aspect-ratio: 16 / 9;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--color-bg-white);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.class_card a:hover {
    background: var(--color-primary);
    color: var(--color-text-white);
}

.class_card:last-child {
    grid-column: span 2;
}

.class_card:last-child a {
    aspect-ratio: 32 / 9;
}

.class_card_number {
    color: var(--color-text-number-secondary);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
}

.class_card:hover .class_card_number {
    color: rgba(255, 255, 255, 0.65);
}

.class_card_name {
    font-size: 1.125rem;
    font-weight: var(--fw-semibold);
}

.class_card_subjects {
    color: rgba(51, 51, 51, 0.52);
    font-size: 0.625rem;
    text-transform: uppercase;
}

.class_card:hover .class_card_subjects {
    color: rgba(255, 255, 255, 0.7);
}
/* classes end */

/* how it works begin */
#how_it_works {
    scroll-margin-top: 4rem; /* прокрутится не доезжая 4rem до блока */
}

#path_grid {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.path_item {
    min-height: 12rem;
    padding: 1.5rem;
    background: var(--color-bg-white);
    border: 0.0625rem solid var(--color-border-gray); /* 1px */
    border-radius: 0.5rem; /* 8px */
}

.path_item_number {
    display: block;
    margin-bottom: 2rem;
    color: var(--color-text-number-secondary);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
}

.path_item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem; /* 8px */
}

.path_item p {
    margin: 0;
    color: rgba(51, 51, 51, 0.58);
    font-size: 0.875rem; /* 14px */
}

.path_arrow svg {
    display: block;
    width: 1.5rem;
    fill: rgba(64, 95, 137, 0.45);
}

#topic_demo {
    margin-top: 3rem; /* 48px */
    background: var(--color-bg-white);
    border: 0.0625rem solid var(--color-border-gray); /* 1px */
    border-radius: 0.5rem; /* 8px */
}

#topic_demo_header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 0.0625rem solid var(--color-border-gray); /* 1px */
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
    text-transform: uppercase;
}

#topic_demo_header_meta {
    display: flex;
    gap: 1rem;
}

#topic_demo_header_meta span:first-child {
    color: var(--color-primary);
}

#topic_demo_header > span {
    color: rgba(51, 51, 51, 0.4);
}

#topic_demo_body {
    min-height: 13rem;
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
}

#topic_demo_body_text h4 {
    margin-bottom: 0.75rem; /* 12px */
}

#topic_demo_body_text p {
    max-width: 30rem;
    margin: 0;
    color: rgba(51, 51, 51, 0.6);
}

#topic_demo_body_formula {
    color: var(--color-primary);
    font-size: round(clamp(2rem, 4vw, 3.25rem), 2px); /* размер всегда будет целым чётным числом от 32px до 52px */
    font-weight: var(--fw-light);
    text-align: center;
}

#topic_demo_footer {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: flex-end;
    border-top: 0.0625rem solid var(--color-border-gray); /* 1px */
}

#topic_demo_footer a {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* 8px */
    color: var(--color-primary);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
    text-transform: uppercase;
}

#topic_demo_footer a svg {
    width: 1.5rem; /* 24px */
    fill: var(--color-primary);
    transition: transform 0.2s ease;
}

#topic_demo_footer a:hover svg {
    transform: translateX(0.3rem);
}
/* how it works end */

/* practice begin */
#practice {
    min-height: 30rem;
    margin: 2rem 0;
    padding: 4rem;
    background: var(--color-primary);
    border-radius: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
    overflow: hidden;
}

#practice_content {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* 16px */
}

#practice_content > span {
    color: var(--color-text-light);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
    text-transform: uppercase;
}

#practice_content h2 {
    margin: 0;
    color: var(--color-text-white);
    font-size: round(clamp(2rem, 4vw, 3.25rem), 2px); /* размер всегда будет целым чётным числом от 32px до 52px */
    font-weight: var(--fw-light);
}

#practice_content h2 span {
    display: inline-block;
    font-weight: var(--fw-semibold);
}

#practice_content p {
    max-width: 30rem;
    margin: 0;
    color: var(--color-text-light);
}

#practice_content a {
    align-self: start;
    display: flex;
    gap: 0.5rem; /* 8px */
    margin-top: 1rem; /* 16px */
}

#practice_content a svg {
    width: 1.5rem; /* 24px */;
    fill: var(--color-primary);
}

#practice_visual {
    min-height: 20rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#practice_card {
    width: min(100%, 25rem);
    padding: 2rem;
    background: var(--color-bg-white);
    box-shadow: 0 2rem 4rem rgba(0, 0, 0, 0.18);
    transform: rotate(3deg);
}

#practice_card_top {
    display: flex;
    justify-content: space-between;
    color: var(--color-primary);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
    text-transform: uppercase;
}

#practice_card_formula {
    margin: 3rem 0;
    font-size: 2rem; /* 32px */
    font-weight: var(--fw-light);
    text-align: center;
}

#practice_card_lines {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* 8px */
}

#practice_card_lines span {
    width: 100%;
    height: 0.0625rem; /* 1px */
    background: rgba(51, 51, 51, 0.12);
}

#practice_card_lines span.short {
    width: 60%;
}

#practice_card_answer {
    margin-top: 2rem;
    color: var(--color-primary);
    font-size: 1.25rem; /* 20px */
    font-weight: var(--fw-semibold);
}
/* practice end */

/* exams begin */
#exams_grid {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.exam_card a {
    min-height: 15rem;
    padding: 2rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    background: var(--color-bg-white);
    border: 0.0625rem solid var(--color-border-gray); /* 1px */
    border-radius: 0.5rem; /* 8px */
    transition: background 0.2s ease, border-color 0.2s ease;
}

.exam_card a:hover {
    background: var(--color-accent);
    border-color: rgba(64, 95, 137, 0.25);
}

.exam_card_number {
    color: var(--color-text-number-secondary);
    font-size: 2rem;
    font-weight: var(--fw-light);
}

.exam_card_content span {
    color: rgba(51, 51, 51, 0.45);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
    text-transform: uppercase;
}

.exam_card_content h3 {
    margin: 0.375rem 0 0.75rem; /* 6px 12px */
    font-size: 2rem; /* 32px */
}

.exam_card_content p {
    max-width: 27rem;
    margin: 0;
    color: rgba(51, 51, 51, 0.6);
}

.exam_card svg {
    grid-column: span 2;
    justify-self: end;
    width: 1.5rem; /* 24px */
    fill: var(--color-primary);
    transition: transform 0.2s ease;
}

.exam_card a:hover svg {
    transform: translateX(0.3rem);
}
/* exams end */

/* olympiads begin */
#olympiads {
    min-height: 30rem;
    margin: 2rem 0;
    padding: 4rem;
    background: var(--color-primary-dark);
    border-radius: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: center;
    overflow: hidden;
}

#olympiads_content {
    display: flex;
    flex-direction: column;
    gap: 1rem; /* 16px */
}

#olympiads_content > span {
    color: var(--color-text-light);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
    text-transform: uppercase;
}

#olympiads_content h2 {
    margin: 0;
    color: var(--color-text-white);
    font-size: round(clamp(2rem, 4vw, 3.25rem), 2px); /* размер всегда будет целым чётным числом от 32px до 52px */
    font-weight: var(--fw-light);
}

#olympiads_content h2 span {
    display: inline-block;
    font-weight: var(--fw-semibold);
}

#olympiads_content p {
    max-width: 30rem;
    margin: 0;
    color: var(--color-text-light);
}

#olympiads_content a {
    align-self: start;
    display: flex;
    gap: 0.5rem; /* 8px */
    margin-top: 1rem; /* 16px */
}

#olympiads_content a svg {
    width: 1.5rem; /* 24px */;
    fill: var(--color-primary);
}

#olympiads_visual {
    min-height: 20rem;
    position: relative;
}

#olympiads_visual span {
    position: absolute;
    color: rgba(255, 255, 255, 0.11);
    font-size: 7rem; /* 112px */
    font-weight: var(--fw-light);
}

#olympiads_visual span:nth-child(1) {
    top: 2%;
    left: 10%;
}

#olympiads_visual span:nth-child(2) {
    top: 28%;
    right: 15%;
}

#olympiads_visual span:nth-child(3) {
    bottom: 5%;
    left: 22%;
}

#olympiads_visual span:nth-child(4) {
    bottom: 18%;
    right: 27%;
}

#olympiads_visual span:nth-child(5) {
    top: 42%;
    left: 45%;
}
/* olympiads end */

/* academy begin */
#academy {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    align-items: center;
}

#academy_description {
    max-width: 30rem;
    margin-bottom: 1.5rem;
    color: rgba(51, 51, 51, 0.62);
}

#academy_content a {
    align-self: start;
    display: inline-flex;
    gap: 0.5rem; /* 8px */
    margin-top: 1rem; /* 16px */
}

#academy_content a svg {
    width: 1.5rem; /* 24px */;
    fill: var(--color-text-white);
}

#academy_visual {
    min-height: 22rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#academy_window {
    width: min(100%, 33rem);
    overflow: hidden;
    background: var(--color-bg-white);
    border: 0.0625rem solid var(--color-border-gray); /* 1px */
    box-shadow: 0 1.5rem 3rem rgba(51, 51, 51, 0.08);
    transform: rotate(-2deg);
}

#academy_window_header {
    height: 2rem;
    padding: 0 0.75rem; /* 0 12px */
    background: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.375rem; /* 6px */
}

#academy_window_header span {
    width: 0.375rem; /* 6px */
    height: 0.375rem; /* 6px */
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

#academy_window_body {
    min-height: 16rem; /* 256px */
    display: grid;
    grid-template-columns: 5rem 1fr; /* 80px 1fr */
}

#academy_window_body_sidebar {
    padding: 1rem 0.75rem; /* 16px 12px */
    display: flex;
    flex-direction: column;
    gap: 0.875rem; /* 14px */
    background: var(--color-accent);
}

#academy_window_body_sidebar span {
    width: 100%;
    height: 0.375rem; /* 6px */
    background: rgba(64, 95, 137, 0.18);
}

#academy_window_body_content {
    padding: 1.5rem; /* 24px */
    display: flex;
    flex-direction: column;
    gap: 1rem; /* 16px */
}

#academy_window_body_content span {
    height: 2.5rem; /* 40px */
    background: var(--color-accent);
    border-left: 0.25rem solid var(--color-primary); /* 4px */
}

#academy_window_body_content span:nth-child(2) {
    width: 80%;
}

#academy_window_body_content span:nth-child(3) {
    width: 60%;
}
/* academy end */

/* final cta begin */
#final {
    min-height: 30rem;
    margin-top: 2rem;
    padding: 4rem;
    background: var(--color-primary);
    border-radius: 0.5rem; /* 8px */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#final_formula {
    position: absolute;
}

#final_formula svg {
    display: block;
    height: 28rem;
    fill: rgba(255, 255, 255, 0.06);
}

#final_content {
    position: relative;
    z-index: 2;
}

#final_content > span {
    color: var(--color-text-light);
    font-size: 0.625rem; /* 10px */
    font-weight: var(--fw-bold);
}

#final_content h2 {
    margin: 1rem 0;
    color: var(--color-text-white);
    font-size: round(clamp(2.25rem, 5vw, 4rem), 2px); /* размер всегда будет целым чётным числом от 36px до 64px */
    font-weight: var(--fw-light);
}

#final_content p {
    margin-bottom: 0;
    color: var(--color-text-light);
}

#final_content a {
    margin-top: 2rem;
    display: inline-flex;
    gap: 0.5rem; /* 8px */
}

#final_content a svg {
    width: 1.5rem; /* 24px */;
    fill: var(--color-primary);
}
/* final cta end */

/* seo begin */
#seo {
    max-width: 52rem;
    margin: 4rem auto 0;
    text-align: center;
}

#seo h2 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

#seo p {
    margin-bottom: 0;
    color: rgba(51, 51, 51, 0.58);
    font-size: 0.875rem; /* 14px */
}
/* seo end */

/* media queries begin */
@media (width < 1280px) {
    #classes_grid {
        grid-template-columns: repeat(4, 1fr);
    }

    #path_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .path_arrow {
        display: none;
    }
}

@media (width < 992px) {
    .section header {
        grid-template-columns: 2rem 1fr;
    }

    #hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    #hero_visual {
        min-height: 24rem;
    }

    #practice,
    #olympiads,
    #academy {
        grid-template-columns: 1fr;
    }

    #practice_visual {
        min-height: 18rem;
    }

    #olympiads_visual {
        min-height: 15rem;
    }

    #academy_visual {
        min-height: 18rem;
    }
}

@media (width < 768px) {
    .section header {
        grid-template-columns: 1rem 1fr;
    }

    #directions_grid {
        grid-template-columns: 1fr;
    }

    .direction_card_large {
        grid-row: auto;
    }

    #classes_grid {
        grid-template-columns: repeat(3, 1fr);
    }

    #path_grid {
        grid-template-columns: 1fr;
    }

    .path_item {
        min-height: auto;
    }

    #topic_demo_body {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    #topic_demo_body_formula {
        padding: 1rem 0;
    }

    #exams_grid {
        grid-template-columns: 1fr;
    }

    #practice,
    #olympiads,
    #final {
        padding: 3rem 2rem;
    }
}

@media (width < 600px) {
    #hero_description {
        font-size: 0.875rem; /* 14px */
    }

    #hero_actions {
        flex-direction: column;
    }

    #hero_visual {
        min-height: 18rem;
        aspect-ratio: 1 / 1;
    }

    .hero_visual_formula_main {
        font-size: 8rem;
    }

    #classes_grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .class_card a {
        padding: 0.875rem; /* 14px */
    }

    .direction_card a {
        padding: 1.5rem;
    }

    .exam_card a {
        padding: 1.5rem;
    }

    #practice,
    #olympiads,
    #final {
        padding: 2.5rem 1.5rem;
    }

    #practice_card {
        padding: 1.5rem;
    }

    #topic_demo_header {
        padding: 1rem;
    }

    #topic_demo_header_meta {
        gap: 0.5rem; /* 8px */
    }



    .home_button {
        width: 100%;
    }
}

@media (width < 480px) {}
/* media queries end */
