.menu-toggle,
.mobile-only {
    display: none;
}

.particle-field {
    position: fixed;
    z-index: -2;
    inset: 0;
    pointer-events: none;
    opacity: .9;
}

.hero-art {
    transform: perspective(900px)
        translate3d(var(--parallax-x, 0), var(--parallax-y, 0), 0)
        rotateX(var(--parallax-rx, 0deg))
        rotateY(var(--parallax-ry, 0deg));
    transform-style: preserve-3d;
    transition: transform .18s ease-out;
    will-change: transform;
}

.hero-art .model {
    animation: model-float 5s ease-in-out infinite;
}

.hero-art::after {
    content: "";
    position: absolute;
    inset: 27%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(83, 212, 134, .16), transparent 68%);
    filter: blur(12px);
    animation: glow-pulse 3.5s ease-in-out infinite;
    z-index: -1;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature-card,
.principle-list article,
.article-card,
.audiences > a {
    transition: transform .28s ease, border-color .28s ease, background-color .28s ease, box-shadow .28s ease;
}

.feature-card:hover,
.article-card:hover,
.principle-list article:hover {
    transform: translateY(-6px);
    border-color: rgba(94, 213, 143, .28);
    box-shadow: 0 22px 65px rgba(0, 0, 0, .2);
}

@keyframes model-float {
    0%, 100% { transform: rotate(-12deg) translateY(0); }
    50% { transform: rotate(-8deg) translateY(-12px); }
}

@keyframes glow-pulse {
    0%, 100% { opacity: .55; transform: scale(.9); }
    50% { opacity: 1; transform: scale(1.16); }
}

/* The manifesto needs a reading layout, not two equal content columns. */
.manifesto {
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .55fr);
    align-items: center;
    column-gap: clamp(48px, 7vw, 110px);
}

.manifesto blockquote {
    max-width: 780px;
    font-size: clamp(42px, 4.7vw, 66px);
    line-height: 1.08;
    text-wrap: balance;
}

.manifesto > div {
    align-self: center;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(23, 31, 54, .78), rgba(12, 17, 32, .5));
}

.manifesto > div p {
    margin: 0 0 24px;
    color: #c4cada;
    font-size: 17px;
    line-height: 1.75;
}

@media (max-width: 800px) {
    .manifesto {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .manifesto blockquote {
        font-size: clamp(36px, 9vw, 50px);
    }

    .manifesto > div {
        padding: 26px;
    }

    .menu-toggle {
        display: grid;
        width: 44px;
        height: 44px;
        place-content: center;
        gap: 6px;
        border: 1px solid var(--line);
        border-radius: 50%;
        background: transparent;
        position: relative;
        z-index: 12;
    }

    .menu-toggle span {
        display: block;
        width: 18px;
        height: 1px;
        background: #fff;
        transition: .2s;
    }

    .menu-toggle[aria-expanded="true"] span:first-child {
        transform: translateY(3.5px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] span:last-child {
        transform: translateY(-3.5px) rotate(-45deg);
    }

    .site-header nav {
        display: none;
        position: fixed;
        z-index: 10;
        inset: 0;
        background: rgba(7, 11, 26, .98);
        padding: 100px 28px 35px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        overflow-y: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overscroll-behavior: contain;
    }

    .site-header nav.is-open {
        display: flex;
    }

    .site-header nav a,
    .site-header nav a:not(.nav-cta),
    .site-header nav .mobile-only {
        display: block;
        color: #fff;
        font-size: 24px;
        font-weight: 700;
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .site-header nav .nav-cta {
        margin-top: 20px;
        text-align: center;
        font-size: 16px;
        border: 1px solid var(--line);
        padding: 14px 18px;
    }

    .menu-open {
        overflow: hidden;
        touch-action: none;
    }
}

/* Mobile baseline: readable text, comfortable touch targets and stable wrapping. */
@media (max-width: 600px) {
    body { text-rendering: optimizeLegibility; -webkit-text-size-adjust: 100%; }
    main, .container, .site-footer { min-width: 0; }
    h1, h2, h3, p, blockquote, a, button { overflow-wrap: break-word; }
    .section { padding-block: 68px; }
    .page-hero { padding-block: 78px 58px; }
    .page-hero h1, .article-detail h1, .legal h1,
    .forum-hero h1, .form-page h1, .forum-topic-head h1 {
        font-size: clamp(42px, 13vw, 58px);
        line-height: .98;
        letter-spacing: -.05em;
    }
    .button { min-height: 48px; }
    input, textarea, select { max-width: 100%; font-size: 16px !important; }
    .footer-nav a, .footer-bottom a, .footer-bottom button {
        display: flex;
        align-items: center;
        min-height: 40px;
    }
    .cookie-banner { max-height: calc(100dvh - 20px); overflow-y: auto; }
    main > .section,
    main > section.section,
    .site-footer {
        content-visibility: auto;
        contain-intrinsic-size: auto 700px;
    }
}

@media (hover: none), (pointer: coarse) {
    .button, .feature-card, .article-card, .audiences > a, .footer-telegram {
        will-change: auto;
    }
}

@media (max-width: 380px) {
    .hero h1 { font-size: 48px; }
    .hero-actions, .teacher-hero__actions, .teacher-story__links, .teacher-contact > div { width: 100%; }
    .hero-actions .button, .teacher-hero__actions .button, .teacher-contact .button { width: 100%; }
    .manifesto > div, .feature-card, .article-card, .account-form, .forum-message { padding-inline: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-art,
    .hero-art .model,
    .hero-art::after,
    .feature-card,
    .article-card,
    .principle-list article,
    .audiences > a {
        animation: none;
        transform: none;
        transition: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }

}

.low-performance .hero-art,
.low-performance .hero-art .model,
.low-performance .hero-art::after,
.low-performance .feature-card,
.low-performance .article-card,
.low-performance .principle-list article,
.low-performance .audiences > a {
    animation: none;
    transform: none;
    transition: none;
}

.low-performance .reveal {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .particle-field {
        display: none;
    }
}

@media (max-width: 820px), (hover: none), (pointer: coarse) {
    .particle-field {
        display: none !important;
    }
}

.mobile-device .particle-field,
.low-performance .particle-field {
    display: none !important;
}

.trial-hero {
    min-height: 760px;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(50px, 8vw, 120px);
    align-items: center;
    padding-block: 90px;
}

.trial-hero h1 {
    font-size: clamp(58px, 7vw, 94px);
    line-height: .95;
    letter-spacing: -.055em;
    margin: 20px 0 28px;
}

.trial-hero .lead {
    color: var(--muted);
    font-size: 18px;
    line-height: 1.75;
    max-width: 650px;
}

.trial-facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    list-style: none;
    padding: 0;
    margin: 45px 0 0;
    background: var(--line);
}

.trial-facts li {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bg);
    padding: 20px 16px;
}

.trial-facts strong { font-size: 22px; }
.trial-facts span { color: var(--muted); font-size: 12px; }

.trial-form-card {
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--line);
    border-radius: 22px;
    background: linear-gradient(145deg, rgba(24, 33, 57, .96), rgba(12, 17, 32, .94));
    box-shadow: 0 35px 90px rgba(0, 0, 0, .28);
}

.trial-form-card h2 { font-size: 38px; margin: 12px 0 8px; }
.form-intro { color: var(--muted); margin: 0 0 28px; }
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 110px; gap: 14px; }
.field label { display: block; font-size: 13px; color: #c7cddd; margin-bottom: 8px; }
.field input,
.field textarea {
    width: 100%;
    color: #fff;
    background: rgba(5, 9, 21, .62);
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 14px 15px;
    font: inherit;
    outline: none;
}
.field input:focus,.field textarea:focus { border-color: rgba(83, 212, 134, .65); box-shadow: 0 0 0 3px rgba(83, 212, 134, .08); }
.field textarea { resize: vertical; }
.errorlist { color: #ff9e9e; font-size: 12px; margin: 7px 0 0; padding-left: 18px; }
.consent-field { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; margin: 6px 0 24px; }
.consent-field input { width: 18px; height: 18px; accent-color: var(--green); }
.consent-field label { color: var(--muted); font-size: 12px; line-height: 1.5; }
.submit-button { width: 100%; }
.form-success { text-align: center; padding-block: 40px; }
.form-success > span { display: grid; width: 62px; height: 62px; place-items: center; margin: auto; border-radius: 50%; background: rgba(83, 212, 134, .13); color: var(--green); font-size: 28px; }
.form-success p { color: var(--muted); line-height: 1.6; }
.form-success .button { margin-top: 18px; }
.trial-program { display: grid; grid-template-columns: .9fr 1.1fr; gap: 100px; }
.trial-program .section-heading { align-self: start; }

@media (max-width: 800px) {
    .trial-hero,.trial-program { grid-template-columns: 1fr; gap: 55px; }
    .trial-hero { padding-block: 65px; }
    .trial-program { gap: 25px; }
}

@media (max-width: 520px) {
    .trial-hero h1 { font-size: 50px; }
    .trial-facts { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; gap: 0; }
    .trial-form-card { padding: 24px 18px; }
}
