@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;700;800&family=Unbounded:wght@500;700&display=swap');

:root {
    --bg: #edeaff;
    --bg-soft: rgba(241, 239, 255, 0.84);
    --surface: rgba(255, 255, 255, 0.6);
    --surface-strong: rgba(255, 255, 255, 0.8);
    --surface-solid: #f6f4ff;
    --text: #26214d;
    --muted: #5b5a86;
    --line: rgba(95, 85, 196, 0.16);
    --brand: #23a0e6;
    --brand-deep: #5f55c4;
    --accent: #7b73df;
    --accent-soft: #d8d3ff;
    --shadow: 0 24px 60px rgba(80, 74, 161, 0.18);
    --shadow-soft: 0 18px 40px rgba(80, 74, 161, 0.1);
    --radius-xl: 36px;
    --radius-lg: 28px;
    --radius-md: 20px;
    --container: 1240px;
}

html {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    font-weight: 700;
    background: #e4ebff;
    overflow-x: hidden;
}

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

img {
    max-width: 100%;
    display: block;
}

h1, h2, h3, h4, p, div, span, button, a {
    box-sizing: border-box;
}

main {
    width: min(var(--container), calc(100% - 48px));
    margin: 0 auto;
}

main > h2 {
    max-width: 860px;
    margin: 0 auto;
    font-size: clamp(28px, 3.4vw, 46px);
    line-height: 1.12;
    text-align: center;
}

/* header */

header {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    width: min(var(--container), calc(100% - 28px));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}

.header-left,
.header-menu,
.header-vision-button {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(242, 244, 255, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
}

.header-left {
    min-width: 280px;
    min-height: 82px;
    padding: 12px 18px 12px 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex: 1;
}

.header-image {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    object-fit: cover;
    box-shadow: 0 10px 24px rgba(95, 85, 196, 0.22);
}

.header-name {
    margin: 0;
    font-family: "Unbounded", sans-serif;
    font-size: 22px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.header-name a,
.header-menu a {
    transition: color 0.25s ease, opacity 0.25s ease;
}

.header-name a:hover,
.header-menu a:hover {
    color: var(--brand);
}

.header-menu {
    min-height: 82px;
    padding: 0 34px;
    border-radius: 999px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 34px;
}

.header-menu h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.header-vision-button {
    min-width: 232px;
    min-height: 82px;
    padding: 0 28px;
    border-radius: 28px;
    color: var(--brand-deep);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 20px;
    line-height: 1.1;
}

.header-vision-button:hover {
    background: rgba(248, 249, 255, 0.88);
}

.empty-space {
    height: 158px;
}

/* homepage */

.greeting {
    max-width: 980px;
    margin: 0 auto 42px;
    padding: 44px 52px;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 40px;
    background: #f3f7ff;
    box-shadow: var(--shadow);
    text-align: center;
}

.greeting h2 {
    margin: 0 0 18px;
    font-size: clamp(20px, 1.9vw, 30px);
    line-height: 1.3;
    font-weight: 800;
}

.greeting h2:last-child {
    margin-bottom: 0;
    color: var(--brand-deep);
}

.main-block1,
.main-block2 {
    margin: 34px 0;
    padding: 30px;
    border-radius: 36px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.54);
    box-shadow: var(--shadow-soft);
    display: grid;
    grid-template-columns: minmax(240px, 420px) 1fr;
    align-items: center;
    gap: 26px;
}

.main-block2 {
    grid-template-columns: 1fr minmax(240px, 460px);
}

.main-block1-img,
.main-block2-img {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: 30px;
}

.main-block1-text,
.main-block2-text {
    width: auto;
    margin: 0;
    font-size: clamp(22px, 2vw, 34px);
    line-height: 1.35;
}

/* footer */

footer {
    width: min(var(--container), calc(100% - 48px));
    margin: 88px auto 24px;
    padding: 22px 28px;
    border-radius: 28px;
    background: #5f86e8;
    color: #f8f7ff;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    box-shadow: var(--shadow);
}

footer h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

footer .header-image {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    box-shadow: none;
}

/* contacts */

.contact-texts,
.contact-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.contact-texts {
    margin-bottom: 20px;
}

.tg-text,
.vk-text {
    width: auto;
    margin: 0;
    padding: 0 10px;
    font-size: clamp(24px, 2.5vw, 40px);
    line-height: 1.2;
    text-align: center;
}

.contact-square {
    width: auto;
    min-height: 440px;
    margin: 0;
    padding: 26px;
    background: var(--surface-strong);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.contact-square h2 {
    margin: 0;
    font-size: clamp(18px, 1.8vw, 26px);
    line-height: 1.35;
    text-align: center;
    word-break: break-word;
}

.contact-square a {
    color: var(--brand-deep);
}

.tg-qr,
.vk-qr {
    width: min(100%, 320px);
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 26px;
}

/* course */

.course-title,
.module-title {
    max-width: 1100px;
    margin: 0 auto 18px;
    font-family: "Unbounded", sans-serif;
    font-size: clamp(32px, 4.2vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    text-align: center;
}

.course-text {
    max-width: 860px;
    margin: 0 auto 42px;
    color: var(--muted);
    font-size: clamp(22px, 2.2vw, 32px);
    line-height: 1.35;
    text-align: center;
}

.course-modules {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.module {
    min-height: 520px;
    padding: 28px;
    border-radius: 34px;
    background: #eef4ff;
    border: 1px solid rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.module:hover,
.lesson-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 68px rgba(34, 42, 56, 0.18);
    border-color: rgba(95, 85, 196, 0.32);
}

.module h2 {
    margin: 0 0 12px;
    font-size: clamp(28px, 2.3vw, 36px);
    line-height: 1.15;
    text-align: left;
}

.module .module-subtitle {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.2;
}

.module .module-subtitle-lower {
    position: relative;
    top: 8px;
}

.module-button-lower {
    margin-top: 8px;
}

.module h3 {
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.45;
    text-align: left;
}

.module-text-fixed {
    min-height: 150px;
}

.module-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 0 28px;
    border-radius: 999px;
    background: #4f7fe6;
    color: white;
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(95, 85, 196, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}

.module-button:hover {
    transform: translateY(-2px);
    filter: saturate(1.04);
    box-shadow: 0 18px 34px rgba(95, 85, 196, 0.28);
}

.module-button:active {
    transform: translateY(0);
}

/* module overviews */

.lessons-list1 {
    width: 100%;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.lesson-card {
    min-height: 300px;
    padding: 22px;
    border-radius: 30px;
    background: #edf3ff;
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.lesson-card h2 {
    margin: 0 0 22px;
    font-size: 24px;
    line-height: 1.28;
    flex: 1;
}

.lesson-number {
    min-width: 110px;
    width: fit-content;
    min-height: 42px;
    margin: 0 0 18px;
    padding: 0 18px;
    border-radius: 999px;
    background: rgba(95, 85, 196, 0.14);
    color: #5f55c4;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 17px;
    font-weight: 800;
}

.lesson-card .module-button {
    align-self: flex-start;
    margin-top: auto;
}

/* lesson pages */

.lesson-title {
    width: min(960px, 100%);
    margin: -18px auto 24px;
    text-align: center;
    line-height: 1.15;
    color: var(--text);
    text-wrap: balance;
}

.lesson-title-block {
    display: block;
    margin-bottom: 10px;
    color: var(--brand-deep);
    font-size: clamp(22px, 2.8vw, 30px);
}

.lesson-title-lesson {
    display: block;
    font-family: "Unbounded", sans-serif;
    font-size: clamp(24px, 3.3vw, 38px);
    letter-spacing: -0.04em;
}

.lesson-video {
    display: block;
    width: 90%;
    max-width: none;
    margin: 24px auto;
    height: 600px;
    border-radius: 26px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    background: #d8d8f4;
}

.lesson-video + p {
    max-width: 960px;
    margin: 28px auto 0;
    padding: 26px 30px;
    border-radius: 28px;
    background: var(--surface-strong);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
    font-size: 20px;
    line-height: 1.65;
    color: var(--muted);
}

/* responsive */

@media (max-width: 1200px) {
    .course-modules {
        grid-template-columns: 1fr;
    }

    .lessons-list1 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-texts,
    .contact-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    header {
        position: static;
        transform: none;
        width: min(var(--container), calc(100% - 24px));
        margin: 18px auto 0;
        flex-direction: column;
        align-items: stretch;
    }

    .header-right {
        flex-direction: column;
        align-items: stretch;
    }

    .header-menu {
        width: 100%;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
    }

    .header-vision-button,
    .header-left {
        width: 100%;
    }

    .empty-space {
        height: 28px;
    }

    .greeting,
    .main-block1,
    .main-block2,
    .contact-square,
    .module,
    .lesson-card,
    .lesson-video + p {
        border-radius: 28px;
    }

    .main-block1,
    .main-block2 {
        grid-template-columns: 1fr;
    }

    .main-block2-img {
        order: -1;
    }
}

@media (max-width: 720px) {
    main {
        width: min(var(--container), calc(100% - 24px));
    }

    .header-menu {
        min-height: auto;
        padding: 18px 22px;
        justify-content: center;
    }

    .header-menu h1 {
        width: 100%;
        text-align: center;
    }

    .greeting {
        padding: 30px 22px;
    }

    .course-title,
    .module-title {
        letter-spacing: -0.04em;
    }

    .lessons-list1 {
        grid-template-columns: 1fr;
    }

    .lesson-card {
        min-height: 260px;
    }

    .lesson-title {
        margin-top: 0;
    }

    .lesson-video {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .lesson-video + p {
        padding: 22px 20px;
        font-size: 18px;
    }

    footer {
        width: calc(100% - 24px);
        flex-direction: column;
        text-align: center;
    }
}
